Source-linked AI summary

PhysOPSD: Code as Privilege for Physically Plausible Video Generation

Harold Haodong Chen, Rui Peng, Lingteng Qiu, Kejie Qiu, Chao Xu, Zilong Dong

arXiv:2611.12411v1cs.CV

TL;DR

Video generators remain brittle on physical dynamics, and existing post-training methods and visual contexts have limitations. PhysOPSD uses executable code as privileged context for on-policy self-distillation, with dual-level privilege and controlled physical variations. It improves physical plausibility across backbones, outperforming SFT and RL baselines with 3K samples while preserving general video quality.

  • Problem

    Video generators remain brittle on physically plausible dynamics, while SFT has offline state mismatch, RL has sparse ill-defined rewards, and text or video contexts lack suitable controllable physical structure.

    Source: §1 · pp. 1–2
  • Method

    PhysOPSD uses executable code as privileged context for on-policy self-distillation, combining dual-level physical drafts with controlled parameter variations under shared rollout noise.

    Source: §1 · p. 2
  • Results

    PhysOPSD improves physical plausibility across diverse backbones, outperforming SFT and RL baselines with 3K samples while preserving general video generation quality.

    Source: §1 · p. 3, §5.2 · p. 7, §6 · p. 9
  • Takeaways & Limitations

    Executable code provides an editable physical context that PhysOPSD uses to internalize dynamics for simulation-free video generation.

    Source: §1 · p. 2

    The reported physical scope is limited to dynamics that standard simulation engines can stably compute, excluding chaotic multi-physics and thermodynamic phase transitions.

    Source: §7 · p. 9

Abstract

from arXiv · show

While modern video generative models achieve remarkable visual fidelity, they remain noticeably brittle when generating physically plausible dynamics and complex interactions. Targeted post-training is crucial, yet supervised fine-tuning suffers from offline state mismatch, and reinforcement learning is hindered by sparse, ill-defined physical reward functions. On-Policy (Self-)Distillation (OPSD) reconciles on-policy rollouts with dense corrective feedback, shifting the core challenge to designing effective privileged context. However, conventional modalities fall short: text prompts are inherently declarative, whereas real reference videos heavily entangle physical laws with visual appearance without parametric control. To this end, we propose PhysOPSD, introducing executable code as privileged physical context for video generation. Unlike static visual observations, executable code instantiates an editable physical world with intrinsic abstraction and controllability. Powered by PhysOPSD-Engine, we translate real-world physical scenarios into verifiable simulation programs. PhysOPSD then incorporates (i) dual-level physical privilege to bridge the information gap via an intermediate bottleneck, alongside (ii) controlled physical variations under shared rollout noise to expose causal dynamic shifts. Extensive experiments demonstrate that PhysOPSD substantially improves physical plausibility across diverse backbones, outperforming SFT and RL baselines with only $3$K samples, while preserving general video generation quality.

1. Introduction

Video generators remain brittle on physical dynamics, while existing post-training methods and privileged contexts have limitations. PhysOPSD uses executable code as privileged context to improve physical plausibility through on-policy self-distillation.

1. Introduction

  • SFT provides dense supervision but uses offline data mismatched to inference states, while RL trains on-policy but faces sparse, ill-defined rewards and credit-assignment bottlenecks..Source: §1 · p. 2
  • Text prompts remain declarative, and reference videos entangle dynamics with appearance, identity, and background clutter without controllable structure.Source: §1 · p. 2
  • PhysOPSD introduces executable code as privileged physical context, using editable simulations to express dynamics at different information densities and perturb physical parameters.The introduction names these properties abstraction and controllability.Source: §1 · p. 2
  • PhysOPSD-Engine converts real-world scenarios into verifiable simulation code, while PhysOPSD pairs dense and abstract drafts and varies physical parameters under shared rollout noise.The paired drafts form an intermediate information bottleneck; parameter variation supervises how physical shifts relate to dynamic outcomes.Source: §1 · p. 2
  • PhysOPSD consistently improves physical plausibility across backbones, outperforming prior SFT and RL baselines with only a small fraction of their training data while preserving general video quality.The introduction describes the result across diverse backbones and does not specify a numerical sample count here.Source: §1 · p. 3

2. Related Work

Prior work applies on-policy distillation and executable code to several generative and visual tasks. PhysOPSD differs by using code as physical context for general video generation.

On-Policy Distillation

  • OPSD uses asymmetric privileged information to create a self-teacher, and PhysOPSD applies it to general video generation with executable code as physical context.Earlier work applied OPSD to language reasoning, image generation, and video drift mitigation in few-step autoregressive generators.Source: §2 · p. 3
  • Unlike OPSD-V, which stabilizes causal autoregressive cache history, PhysOPSD targets on-policy self-distillation for general video generation.Source: §2 · p. 3

Code-for-Vision

  • Prior code-for-vision work uses programs for scene synthesis, reconstruction, editing, physical reasoning, or delegated spatiotemporal processes; PhysOPSD instead empowers the generative model itself.Source: §2 · p. 3

3. Preliminary: Problem Formulation

The section formulates video generation as a rollout process and OPSD as velocity matching on student-generated states. The teacher receives privileged conditioning while the student’s rollout and inference behavior remain unchanged.

3. Preliminary: Problem Formulation

  • A video rollout starts from Gaussian noise and uses a numerical ODE solver to integrate a time-dependent velocity field across a discrete schedule.The field is conditioned on the text prompt, and the integrated trajectory characterizes model rollout behavior.Source: §3 · p. 3
  • In OPSD, the student samples an on-policy trajectory from its inference-time condition, while the self-teacher receives additional privileged context.Source: §3 · p. 3
  • The student is optimized by velocity matching along its own rollout, with privileged context changing only teacher conditioning and not student rollout states or inference behavior.The teacher is an EMA copy of the student parameters.Source: §3 · p. 3

4. PhysOPSD

PhysOPSD uses executable code to provide controllable physical context for on-policy self-distillation, translating real-world scenarios into simulations and structured drafts. Its training combines hierarchical physical privilege with paired parameter variations, while inference discards simulation components and drafts.

4.1. Overview

  • Executable code provides privileged context that specifies physical laws, object states, and dynamic parameters in an editable simulation.The rendered draft conditions the self-teacher, while the program generates the underlying dynamics.Source: §4.1 · pp. 3–4

4.2. Executable Physical Context Engine

  • PhysOPSD-Engine translates physical references into executable scene programs, with scope limited to simulation-groundable rigid-body, deformable-solid, and fluid dynamics.Turbulent gas diffusion and thermodynamic phase shifts are excluded because of numerical instability and difficulty isolating causal parameters.Source: §4.2 · p. 4
  • The engine iteratively verifies programs for executable and physical validity, visible interactions, and controllable parameter responses.Target prompts are grounded in executed outcomes to align prompt, program, and draft.Source: §4.2 · pp. 4–5

4.3. Structured Physical Self-Distillation

  • PhysOPSD exploits code abstraction and controllability through dual-level privilege and controlled physical variation.These mechanisms translate code's structural properties into self-distillation.Source: §4.3 · p. 5

4.3.1. Dual-Level Physical Privilege

  • Dense drafts preserve surface geometry and detailed interactions, while abstract drafts retain coarse motion and contact; staged distillation uses the abstract draft as an intermediate bottleneck.The hierarchy moves from dense to abstract to text-only conditioning, reducing the privilege gap and filtering fine-grained visual details.Source: §4.3.1 · p. 5, details · p. 5

4.3.2. Controlled Physical Variation

  • Paired scenes vary selected physical parameters while preserving other scene factors, and shared initial noise makes their rollout responses more directly comparable.At inference, simulation components and physical drafts are discarded, leaving a generator with zero runtime overhead.Source: §4.3.2 · p. 6

5. Experiments

Experiments evaluate PhysOPSD’s physical adherence and general video quality across two video-generation backbones, then analyze privileged modalities, structured privilege, and data scaling. PhysOPSD improves physical plausibility with 3K samples while preserving general quality; coding drafts and structured privileges outperform their alternatives.

5.1. Experimental Settings

  • The experiments compare PhysOPSD on OmniWeaving and UniVideo, using VideoPhy-2 and PhyGround for physical adherence and VBench for general video quality.The section also evaluates against base models and reports comparisons with PhyT2V, SFT, and offline RL baselines.Source: §5 · p. 6, §5.1 · pp. 6–7

5.2. Main Results

  • VideoPhy-2 overall gains were +4.2 for UniVideo and +4.1 for OmniWeaving, while PhyGround gains were +1.6 and +3.4, respectively, using 3K samples versus SFT’s 80K and offline RL’s 21K.VBench shows quality is maintained or slightly improved: UniVideo rises from 83.5 to 84.0, while OmniWeaving remains at 83.3.Source: §5.2 · pp. 7–8
  • PhysOPSD transfers dynamics from simplified simulation geometry to open-domain photorealistic scenes, including fluid sloshing, impact cratering, elastic penetration, and optical reflection.The reported baseline failures include motion stagnation, geometric distortions, and broken reflection mechanics.Source: §5.2 · p. 8

5.3. Analysis of Code-as-Privilege

  • In Figure 6, PhysOPSD with Coding Draft improves physical adherence over refined-text and real-video contexts, reaching PhyGround Overall 68.3 and VideoPhy-2 All 67.0, with gains of +3.5 and +3.9 over real video.Source: Figure 6 · p. 8

5.4. Analysis of Structured Privilege

  • Dual-Level privilege gains +4.1 on All, exceeding Abstract-Only (+2.6) and Dense-Only (+3.4) in the reported VideoPhy-2 analysis.The authors attribute the advantage to abstract drafts bridging the privilege gap through an intermediate information bottleneck.Source: §5.4 · p. 8
  • Controlled Pairs gain +4.1 on All, compared with +3.3 for Independent-Only training on independent physical scenes.The paired scenes differ by a single physical parameter, exposing counterfactual dynamic shifts.Source: §5.4 · p. 8

5.5. Analysis of Data Efficiency

  • With 1K samples, PhysOPSD gains +1.6 on All; at 4K, gains rise to +5.1, with no premature plateauing.At 1K, the reported PC ≥4 gain is +1.8; at 4K, SA ≥4 gains +3.8 and PC ≥4 gains +2.8.Source: §5.5 · pp. 8–9

6. Conclusion

PhysOPSD uses executable code as privileged physical context for on-policy self-distillation, with an engine that constructs verifiable simulation scenes and rendered drafts. Its structured privileges improve physical plausibility across backbones while preserving general video quality.

6. Conclusion

  • PhysOPSD introduces executable code as privileged physical context for on-policy self-distillation.The method uses code to instantiate an editable physical world with abstraction and controllability.Source: §6 · p. 9
  • PhysOPSD-Engine constructs verifiable simulation scenes and rendered drafts, while dual-level privilege and controlled physical variations structure the distillation.The dual-level strategy bridges an information gap via an intermediate bottleneck; paired variations under shared rollout noise expose dynamic causality.Source: §6 · p. 9
  • Experiments on standard physics benchmarks show improved physical plausibility across diverse backbones with high sample efficiency while preserving general video quality.Source: §6 · p. 9

7. Scope of This Report

PhysOPSD is presented as a general on-policy self-distillation framework, evaluated by relative gains over base generators and a compact 3K-sample budget. Its physical scope is bounded by dynamics standard simulation engines can stably compute.

7. Scope of This Report

  • The report frames PhysOPSD as a general on-policy self-distillation framework rather than a weight-locked model, comparing relative capability gains over respective base generators.The report cites UniVideo and OmniWeaving as examples and uses cross-architecture gains to assess generalizability.Source: §7 · p. 9
  • PhysOPSD-Engine is designed as an open, modular pipeline connecting standard coding LLMs with physics engines, with complexity expected to grow as those components advance.The distillation formulation need not change for the pipeline to synthesize increasingly complex scenarios.Source: §7 · p. 9
  • The demonstrated physical scope is limited to dynamics standard simulation engines can stably compute, including rigid-body contacts, elastic mechanics, and fluid dynamics.Chaotic multi-physics and thermodynamic phase transitions such as combustion are excluded because of solver instability and difficulty isolating parameters.Source: §7 · p. 9

A.1. PhysOPSD-Engine Details

PhysOPSD-Engine iteratively refines simulation programs using execution diagnostics, then produces synchronized drafts and grounded prompts. The appendix also reports PhysOPSD-3K case studies and identifies the inputs to the structured OPSD algorithm.

A.1. PhysOPSD-Engine Details

  • Dense and abstract drafts render the same frozen trajectory and camera view, while controlled variants freeze non-target attributes and initial conditions.Dense drafts use meshes, shaders, and realistic lighting; abstract drafts use wireframe primitives and centroid trajectories.Source: §A.1 · p. 12
  • The annotation process creates complementary T2V prompts and V2V instructions grounded in executed simulation telemetry and measured physical facts.The T2V prompt describes the scene and dynamics; the V2V instruction directs photorealistic refinement while preserving motion and layout.Source: §A.1 · p. 12
  • Closed-loop execution diagnostics refine scene programs into verifiable 3D physical environments with observable, physically grounded dynamics.The coding agent uses execution logs, kinematic telemetry, and preview keyframes to revise geometry, contact parameters, and camera trajectories.Source: §A.1 · pp. 12, 14

A.2. PhysOPSD-3K Statistics and Case Studies

  • PhysOPSD-3K comprises 3K total instances, and case studies show the self-teacher reliably synthesizes physically consistent dynamics under dense geometric and abstract wireframe draft conditioning while physical parameters are systematically perturbed.Source: §A.2 · p. 14

A.3. PhysOPSD Algorithmic Overview

  • The structured OPSD algorithm takes paired multi-level conditions constructed by PhysOPSD-Engine as input.The appendix identifies the paired scene families and privilege conditions among the algorithm inputs.Source: §A.3 · p. 14

B.1. Baseline Implementations

The implementation applies PhysOPSD to two unified video-generation backbones and compares post-training paradigms on those same backbones. Its algorithm takes paired scene conditions and returns trained student parameters.

Baseline Implementations

  • PhysOPSD is implemented on OmniWeaving and UniVideo, which support text and visual inputs without architectural modifications.The models enable asymmetric student-teacher conditioning.Source: §B.1 · p. 14
  • The structured OPSD algorithm takes paired scene-family conditions and outputs trained student parameters.Its inputs also include pretrained parameters, a privilege distribution, a solver and schedule, and EMA decay.Source: §B.1 · p. 14
  • The comparison adapts PhyT2V, SFT, and PhysHPO to the same backbones as representative post-training paradigms.SFT uses WISA-80K, approximately 80K curated text-video pairs spanning 17 physical categories.Source: §B.1 · p. 14

B.2. Evaluation Benchmarks

The evaluation section specifies physical-plausibility benchmarks and a general video-quality benchmark. It also points to qualitative comparisons with baselines and further PhysOPSD demonstrations.

B.2. Evaluation Benchmarks

  • VideoPhy-2 evaluates action-centric physical commonsense across 200 action categories using Semantic Adherence, Physical Commonsense, threshold proportions, and a joint score.Evaluation is under the text-to-video setting.Source: §B.2 · p. 15
  • PhyGround evaluates text- and initial-frame-conditioned generation across 250 scenarios and 13 physical laws, reporting general plausibility, law-specific compliance, and their equal-weighted Overall score.Source: §B.2 · p. 16
  • VBench 1.0 measures general text-to-video capability across 16 dimensions, reporting normalized Quality, Semantic, and Total scores.Source: §B.2 · p. 16

C. Exhibition Board

Loading 2611.12411v1…