CodingDINO trains an agent with RL to rebuild images and video as code

CodingDINO trains an agent with RL to rebuild images and video as code

A paper listed on Hugging Face introduces CodingDINO, a unified agentic reinforcement learning (RL) framework for learning internal visual representations through code-based reconstruction. The starting premise is that frontier LLMs increasingly solve complex tasks by writing and executing code, so visual inputs might be represented in the same medium. Rebuilding an image or video as an executable program makes appearance, geometry and temporal dynamics explicit. That yields compositional representations an LLM can inspect, reason over and edit directly.

The authors argue that existing vision-to-code methods mostly stress single-pass generation or inference-time refinement. That leaves a gap between using visual feedback and learning from it. CodingDINO is built to close that gap. Inspired by DINO, it treats observation-to-render consistency as a general learning principle across 2D and 3D images and videos.

The setup has three parts. A unified harness executes and renders SVG, HTML, Three.js, Blender and animation programs, and returns visual renders along with execution diagnostics. Training starts with supervised fine-tuning on verified teacher trajectories. Multi-turn RL then trains the agent to write, render, inspect and revise code inside the harness. Each trajectory is rewarded for execution validity and for visual consistency with the target, measured with frozen DINO features and relative depth.

On results, the abstract says that across six image-to-code and video-to-code benchmarks CodingDINO rivals frontier LLMs such as Opus 5.5 and GPT-6 Astra, ranking first on 10 of 12 headline metrics and in the top three on 10. A single-pass variant, CodingDINO-Single, uses no rendering feedback at all and still retains 85.4% of the full model's quality on average. The authors conclude that code-based reconstruction is a route to learning reusable internal visual representations, extending DINO's representational ambition to language models that reason and act through code.

Key facts

  • CodingDINO is an agentic RL framework that learns visual representations by reconstructing images and videos as executable code.
  • A harness runs and renders SVG, HTML, Three.js, Blender and animation programs; rewards combine execution validity with visual consistency measured via frozen DINO features and relative depth.
  • Training begins with supervised fine-tuning on verified teacher trajectories, then multi-turn RL teaches the agent to write, render, inspect and revise code.
  • Across six image-to-code and video-to-code benchmarks, the authors say it rivals Opus 5.5 and GPT-6 Astra, ranking first on 10 of 12 headline metrics and in the top three on 10.
  • The single-pass variant CodingDINO-Single, with no rendering feedback, retains 85.4% of the full model's quality on average.

Why it matters

The paper targets a gap the authors name directly: vision-to-code systems tend to generate code in one pass or refine it at inference time, but do not learn from visual feedback. CodingDINO trains the write, render, inspect, revise loop with multi-turn RL, so the agent is rewarded for how closely its render matches the target. The authors also pitch the output as a representation: code makes appearance, geometry and time explicit, so an LLM can inspect and edit it.

Who it affects

Mainly researchers working on vision-to-code, image and video understanding, and agents that act through code. The harness spans web graphics (SVG, HTML, Three.js), 3D (Blender) and animation, so the approach touches both 2D and 3D work. The framing around DINO also speaks to people studying visual representation learning.

How to use it

Nothing is offered to use yet. The abstract mentions no code, model or dataset release. For a reader, the practical takeaway is the recipe: supervised fine-tuning on verified teacher trajectories, then multi-turn RL in a render-and-inspect harness, with rewards from execution validity and DINO-feature consistency.

How solid is it

This is a preprint abstract, and the figures are the authors' own. No independent replication or peer review is mentioned. The abstract names no authors or institutions. It does not name the six benchmarks or the 12 headline metrics, and it does not say which metrics CodingDINO won or lost. It does not say whether 'top three on 10' is out of the same 12 headline metrics. No per-benchmark scores are given, including for Opus 5.5 and GPT-6 Astra. 'Rivals' is the authors' wording, not a claim of beating them overall.

Risks and caveats

The 85.4% figure is relative to CodingDINO's own quality, not an absolute score, and the abstract does not say how quality is aggregated across metrics. No model size, base model, training data size or compute budget is given, so the cost of reproducing the result is unclear. The claim that code-based reconstruction yields reusable internal visual representations is the authors' conclusion from their results.

“These results position code-based reconstruction as a route to learning reusable internal visual representations”

— CodingDINO paper abstract