Video-Coder: Reinforcing Agentic Coding for Video Generation

Chaoyang Wang, Sicheng Gao, Junan Hu, Kunyang Li, Dongyang Chen, Yiyang Zhou, Huaxiu Yao, Yong Jae Lee, Radu Timofte, Yuzhang Shang

arXiv:2611.09894 · 2026-11-09 공개 · arXiv · PDF

reinforcement-learning video-generation agent-training sft code-driven phygenbench vbench-20 video-coder

Abstract

Recent years have witnessed remarkable progress in video generation in terms of visual quality and temporal consistency. However, generating videos with precise spatial structure, coherent motion dynamics, and controllable scene composition remains challenging. In this paper, we introduce Video-Coder, the first attempt to train a code-driven video generation agent, which autonomously writes and executes code to construct a dynamic 3D scene (Draft Video) that provides structure and motion signals to downstream video generators. To support this paradigm, we design a dedicated data pipeline and curate two high-quality datasets, Video-Coder-SFT-6k and Video-Coder-RL-2k, which contain diverse prompts and ground-truth reference videos. We further develop the Video- Coder Harness, a unified interactive environment integrating code execution, 3D scene rendering, and execution feedback for agent training and inference. We then train Video-Coder with SFT fol- lowed by harness-native agentic reinforcement learning with dual reward feedback, which combines execution-based and video-based rewards. Additionally, we design an annealing training strategy that gradually reduces the execution reward over time, allowing the model to rely more on the video reward in the later training stages. Experiments show that Video-Coder achieves significant gains, improving Minimax-H3 by approximately 7 points on PhyGenBench and 24 points on VBench-2.0. We hope this work can serve as an open foundation for coding agents in video generation, and we fully open-source our data, models, and code

한국어 요약

한 줄 요약

Video-Coder는 코드 기반 3D 장면 생성을 통해 비디오 생성의 물리적 일관성과 제어성을 향상시키는 첫 번째 에이전트 기반 시스템이다.

핵심 기여도

핵심 아이디어

Video-Coder는 기존 비디오 생성 모델이 픽셀 또는 잠재 공간에서 학습하는 반면, 물리적 세계를 명시적으로 모델링하지 못한다는 한계를 극복하기 위해, 코드 기반 3D 장면 생성을 통해 구조와 운동 신호를 명시적으로 정의하는 새로운 접근법을 제안한다. 이는 "Draft Video"라는 중간 표현을 생성하여, 이후 비디오 생성기의 입력으로 제공함으로써 최종 비디오의 일관성과 제어성을 높인다.

코드는 장면의 기하학, 객체 운동, 카메라 경로를 명확하고 실행 가능한 방식으로 표현할 수 있으며, 이를 통해 "세 개의 구가 다른 높이에서 동시에 떨어짐"과 같은 제약 조건을 명확히 정의할 수 있다. 이는 기존 픽셀 기반 모델이 어려움을 겪는 문제를 해결할 수 있다.

Video-Coder는 사용자 입력에 따라 다중 턴으로 코드를 작성하고 실행하며, 실행 오류와 렌더링 결과를 관찰하여 코드를 반복적으로 개선하는 에이전트 기반 프로그래밍 작업을 수행한다. 이는 비디오 생성 과정을 해석 가능하고 검증 가능한 방식으로 만들며, 사용자 편집 및 재현성을 높인다.

기술적 접근법

주요 결과

의의 및 한계

Video-Coder는 비디오 생성에서 물리적 일관성과 제어성을 향상시키는 새로운 패러다임을 제시하며, 코드 기반 장면 생성을 통한 해석 가능성과 재현성을 강조한다. 이는 사용자 편집 및 디버깅을 용이하게 하며, 다양한 비디오 생성기와 호환되는 방식으로 일반화 가능하다. 또한, 데이터셋과 코드를 오픈소스로 공개함으로써 향후 연구의 기반을 제공한다.

한편, 현재 연구는 특정 비디오 생성기 (예: Minimax-H3)에 기반한 실험 결과를 제시하고 있으며, 다양한 비디오 생성기와의 호환성 검증이 필요하다. 또한, 코드 생성의 복잡성과 실행 시간에 대한 최적화는 아직 미흡한 측면이다.

실용적 활용

Video-Coder는 애니메이션, 게임 개발, VR/AR 콘텐츠 제작 등에서 사용자 제어가 필요한 비디오 생성 작업에 적용 가능하다. 또한, 물리적 제약 조건이 중요한 산업 분야 (예: 자율주행 시뮬레이션, 로봇 학습)에서도 활용 가능하다.