Manuscript Offprint

arXiv:2610.23677

Agentic Physics-Grounded Video Generation via Memory-Augmented In-Context Reasoning

Xikang Guan, Shaocong Yang, Yanqi Bao, Can Wang, Zheng Gu, Zhengqing Chen, Kai Chen, Jing Huo, Yang Gao

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Physical plausibility is essential for realistic video generation. Existing methods impose physical guidance before synthesis via simulations or refined prompts, but this can limit dynamic diversity, miss errors that emerge only after generation, and require repeated regeneration when inconsistencies remain. We therefore study a generate–diagnose–repair paradigm that preserves the original generation capability and selectively repairs physical inconsistencies afterward, raising two key questions: what to repair and how to repair? To address them, we introduce PhysRepair, an agentic video generation framework that combines causal reasoning over the observed physical failure with prior repair experience to enable localized and adaptive correction. Specifically, Spatiotemporal Causal Constraints identify the first invalid physical state and its causally affected states, producing a repair specification that guides physically plausible local regeneration while preserving unaffected content. Experience-augmented In-context Learning combines the ongoing repair context with relevant experience from previous repairs, allowing the agent to adapt its repair decisions across diverse physical failures and accumulate completed trajectories for future cases. Experiments on PhysicsIQ Verified across solid mechanics, fluid dynamics, optics, thermodynamics, and magnetism demonstrate that PhysRepair consistently improves the physical plausibility of generated videos over existing methods. Our project page is available at https://xxkkxxx.github.io/PhysRepair-Website/.

1 INTRODUCTION

Modern video generators achieve impressive visual quality but still struggle with physical plausibility, often producing implausible motion, incorrect contact or collision behavior, and unrealistic responses to physical forces (Bansal et al., 2024; 2025; Guo et al., 2025). Existing approaches to physically plausible video generation primarily seek to prevent physical failures during synthesis by incorporating physical knowledge through training data, motion priors, simulation, or iteratively refined physical prompts (Liu et al., 2024; Xue et al., 2025; Yang et al., 2025; Nguyen et al., 2026). However, imposing extensive physical guidance before synthesis can constrain the model's ability to generate diverse and complex dynamics, favoring simpler and predefined physical interactions. In contrast, we follow a generate–diagnose–repair paradigm that preserves the generator's original synthesis capability and introduces physical guidance only after specific inconsistencies are observed, enabling localized correction of the affected interactions while leaving already-valid content.

†^{\dagger}Equal contribution

†^{†}Project leader

∗^{*}Corresponding author

(a) Plan and Prompt Refine

(c) Generate–Diagnose–Repair (Ours)

Figure

Figure 1: Comparison of physics-grounded video generation paradigms. (a) Plan and Prompt Refine iteratively updates generation plans or physics-aware prompts, while (b) Simulator Program Refine iteratively updates physical programs or simulator configurations; both impose physical guidance before synthesis and may require repeated regeneration. (c) PhysRepair instead follows a generate–diagnose–repair paradigm: it diagnoses physical failures from the generated video (what to repair?) and performs localized, causally constrained repair, while leveraging prior repair experience to adapt the intervention and preserve generated already-valid content (how to repair?).

unchanged, as shown in Fig. 1. This formulation raises two coupled challenges: 1) What to repair. A spatial mask can localize an object, but cannot determine which temporal states should change, whether another object's trajectory should be preserved, or how a physical failure propagates across objects, space, and time (Yi et al., 2020; Motamed et al., 2026); 2) How to repair. Diverse physical failures require different physical evidence, simulation configurations, and generation conditions that cannot be predefined for every case, while overly broad corrections may disrupt already-valid interactions and dynamics and introduce new inconsistencies (Shinn et al., 2023; Xu et al., 2026).

To address these challenges, we cast physical video repair as an adaptive agentic process: the agent reasons about the causal influence of an observed physical failure to localize the repair to the affected content, while drawing on prior repair processes of related physical failures to determine how the repair should be performed. This enables targeted and adaptive correction without globally modifying already-valid dynamics or solving each failure from scratch. By iteratively diagnosing repaired results and refining subsequent interventions, the agent progressively improves the physical plausibility of the generated video.

Concretely, we introduce PhysRepair, an agentic video generation system that operationalizes this adaptive repair process through Spatiotemporal Causal Constraints and Experience-augmented In-context Learning. For Spatiotemporal Causal Constraints, we organize the diagnosed interaction into an object-centric causal representation, locate the first physically invalid state, and trace its downstream effects to construct a causal repair specification. The specification is then used to reconstruct a physically plausible alternative to the incorrect dynamics and guide localized video regeneration while suppressing conflicting source dynamics. Experience-augmented In-context Learning maintains the evolving repair process in short-term working memory and augments it with relevant repair experience retrieved from long-term experience memory. Together, they provide in-context guidance to adapt agentic repair decisions, while completed trajectories are distilled back into the long-term experience memory for future repairs.

We evaluate PhysRepair on Physics-IQ Verified across five physics categories—solid mechanics, fluid dynamics, optics, thermodynamics, and magnetism—to assess physical plausibility. Compared with existing methods, PhysRepair demonstrates improved physical plausibility on Physics-IQ Verified. Ablation studies further examine the effects of Spatiotemporal Causal Constraints and Experience-augmented In-context Learning. Our main contributions are:

• We introduce PhysRepair, an agentic generate–diagnose–refine formulation that iteratively identifies and corrects physical failures after generation, enabling targeted intervention while preserving already-valid dynamics and visual content.

• We address the complementary challenges of what to repair and how to repair through two components: Spatiotemporal Causal Constraints and Experience-augmented In-context Learning. The former identifies causally affected object–space–time states to localize in-tervention while preserving unaffected content, whereas the latter retrieves relevant prior repair experience to adapt repair decisions across diverse physical failures.

• We conduct extensive experiments on Physics-IQ Verified across five physics categories—solid mechanics, fluid dynamics, optics, thermodynamics, and magnetism, demonstrating consistent improvements in physical correctness.

References (27)