Why Writing Code Outsmarts Video Generators at Visual Logic
Original paper: Solve Vision with Code: Coding Agents Are Stronger Visual Reasoners Than Video Models
"A video generation model acts like a painter trying to freehand an entire film reel from intuition, where tiny visual miscalculations snowball into chaotic errors over time. A coding agent behaves like a mechanical draughtsman who inspects the opening scene, calculates the exact physical blueprints, and builds a clockwork projector to run the motion flawlessly. Because it relies on explicit rules rather than visual guesswork, the programmatic engine produces the right outcome every single time."
Teaching computers to predict the physical world reliably is vital for robotics, autonomous vehicles, and industrial simulation. This research shows that translating images into symbolic computer code outperforms pure visual generation, pointing toward more dependable real-world AI systems.
- Coding agents beat state-of-the-art video models on visual reasoning tasks by over 20%.
- Code represents physical logic and object trajectories more reliably than pixel hallucination.
- Symbolic programs avoid the compounding visual hallucinations common in video generators.
Why Writing Code Outsmarts Video Generators at Visual Logic
▶ Watch on YouTube Shorts ↗📑 Original arXiv Technical Abstract
Video generation models are increasingly evaluated as visual reasoners: given a first frame and a natural-language prompt, can the model produce the video in which the specified task is carried out? The paradigm is considered advantageous because the reasoning is native to the visual medium, unfolding directly in the frames rather than through language or code. Whether this native route is in fact the more reliable path to visual reasoning has not been tested against a symbolic alternative under the same conditions. We therefore pose the same tasks, with identical inputs, output specification and evaluator, to both media: rather than denoising pixels, a coding agent writes a program that renders the answer video, which an unmodified rule-based evaluator scores. On VBVR-Pro-Bench (Xu et al., 2026), a 500-instance suite spanning five cognitive categories with symbolic ground truth, the agent receives the same first frame and prompt as the video model, with no access to ground truth, metadata or generation models, and one attempt per instance. Three closed-model agents (Codex with gpt-6-astra, Claude Code with Fable 5.1 and Gemini CLI with Gemini 3.1 Pro) score 0.923, 0.894 and 0.893, each more than 0.22 above the strongest video model. Among 23 runnable open-weight models, the best, GLM-5, reaches 0.572, above all video models except the RL-trained one. Together, we show that for tasks whose solutions can be computed from a first frame and a prompt, program synthesis is currently a substantially more reliable route to visual reasoning than video generation. We further distinguish depictive programs, which navigate the image to recover a transferable scheme, from propositional programs, which operate on hard-coded values, revealing how visual reasoning unfolds in agent-written programs and what it implies for its nature of reasoning in general.
✍️ Are you an author of this paper? Add code/demo links or a note
Help readers explore your work — share your official GitHub repo, Hugging Face weights, affiliation, or a clarification note for our editorial review queue.