OpenCoF: Learning to Reason Through Video Generation

Xinyan Chen, Renrui Zhang, Ziyu Guo, Dongzhi Jiang, Hongsheng LiNeurIPS 2026

TL;DR

Video generators can make stunningly realistic clips, yet they often fail at basic logic, physics, and multi-step planning because they lack training data and dedicated memory spaces for step-by-step deduction. OpenCoF tackles this by introducing a diverse 17K-video reasoning dataset and equipping video diffusion transformers with learnable "scratchpad" tokens—teaching models not just to render pixels, but to visually think frame by frame.

What Problem Does This Paper Address?

When language models tackle hard problems, they use Chain-of-Thought (CoT)—writing out intermediate steps before landing on an answer. What is the visual equivalent for dynamic, physical, or spatial problems? Enter Chain-of-Frame (CoF) reasoning: letting a model work through a problem via the temporal evolution of video frames (like folding a 2D net into a 3D cube or sliding a block down a friction-filled ramp).

While modern video generators look cinematic, visual realism doesn't equal logical consistency. Trained mostly on general internet video, existing models struggle with physical rules and multi-step consequences. Furthermore, Diffusion Transformer (DiT) architectures have no dedicated place to hold an intermediate "plan"—forcing any reasoning to hide implicitly inside noisy pixel latents. Prior attempts to improve video reasoning have mostly stuck to narrow tasks (like maze-solving) without testing out-of-distribution generalization or modifying internal model mechanics.

Methods

The authors separate the effect of better data from better architecture using an open-source image-to-video backbone (Wan2.2-I2V-A14B):

  1. Data-Only Fine-Tuning (Wan-CoF): First, they fine-tune the baseline model using standard LoRA on their new reasoning dataset without changing the architecture. This establishes how much reasoning emerges purely from diverse temporal supervision.
  2. Reasoning Tokens (vt and tt): Next, to give the DiT an explicit "working memory," they introduce two separate, architecture-agnostic token mechanisms:
  3. Visual Reasoning Tokens (vt): Learnable tokens prepended directly to the flattened 1D sequence of compressed video latents. Inside every DiT block, vt tokens interact bidirectionally with video patches via self-attention—aggregating global visual context and broadcasting updates back—before being discarded at the end.
  4. Textual Reasoning Tokens (tt): Learnable tokens prepended to the text-encoder prompt sequence. They enter via cross-attention as static, unidirectional key/value context, acting as a learned, prompt-independent high-level rule prior shared across all frames.
Figure 2: Exploration of CoF techniques. Fine-tuning Wan2.2-I2V-A14B on OPENCOF-17K yields WAN-COF, which achieves substantial gains over the Wan2.2 baseline across four external video-reasoning benchmarks (MME-CoF, Gen-ViRe, VIPER, RULER-Bench). We further explore Visual Reasoning Tokens (vt) and Textual Reasoning Tokens (tt) as complementary reasoning-token designs, yielding WAN-COFvt and WAN-COFtt, which improve further while exhibiting different strengths across benchmarks.

Datasets

To train the models, the authors introduce OpenCoF-17K, containing 17,312 standardized videos (480p, 15 fps, 81 frames) paired with an initial image and text prompt across 11 task families. Unlike prior datasets relying solely on procedural generation, OpenCoF-17K blends four pipelines:

  • Instance-based rendering: Chess (mate-in-one) and $4\times4$ Sudoku.
  • Expert-guided rendering: 2D geometry auxiliary lines (human-annotated from Geo170K) and dot-to-dot animations (LLM + text-to-image + CV).
  • Procedural scene synthesis: Tangram puzzles, 3D cube folding, 3D polycube rotation, and physics motion (tracks with varying friction).
  • External video repurposing: Curated subsets from VR-Bench (mazes), BridgeData V2 (robotic manipulation), and VBVR (30 cognitive subtasks).
Figure 1: Overview of OPENCOF. We construct the OPENCOF-17K dataset, comprising 17,312 videos across 11 tasks, via four complementary pipelines, to provide diverse temporal supervision for Chain-of-Frame (CoF) reasoning.

Crucially, evaluation is performed strictly out-of-distribution on four independent, externally curated benchmarks: MME-CoF, Gen-ViRe, VIPER, and RULER-Bench.

Key Insights and Ideas

  • Supervision transfers across domains: Training on OpenCoF-17K doesn't just memorize puzzle formats; skills transfer to unseen external benchmarks (e.g., training on simulated ramps boosts VIPER Physics; grid games boost Gen-ViRe Algorithmic & Logical scores).
  • Visual vs. Textual tokens divide and conquer: Attention maps reveal a fascinating division of labor. vt acts like a spatial-temporal planner—firing strongly at the start (anchoring initial states) and end (resolving final consequences) of videos, with sparse, localized spatial focus (e.g., right on a robot gripper). Conversely, tt acts like a steady semantic rulebook—attending diffusely across the whole workspace and staying evenly active once motion begins.
  • Early denoising is "planning time": Both token types receive their heaviest attention during early, high-noise diffusion steps—confirming that the model leans on reasoning tokens while global structure and motion trajectories are still being decided, before tapering off during late-stage pixel refinement.

Key Results

Fine-tuning on OpenCoF-17K (Wan-CoF) substantially lifts the Wan2.2 baseline across all four external benchmarks, and adding reasoning tokens pushes performance even further:

  • MME-CoF (0–4 scale): Baseline 1.00 $\rightarrow$ Wan-CoF 1.30 (+30%) $\rightarrow$ Wan-CoF_tt 1.35 (+35%), surpassing open-source HunyuanVideo-I2V (0.98) and nearing closed-source Seedance-1.0-Pro (1.48).
  • Gen-ViRe (0–1 scale): Baseline 0.304 $\rightarrow$ Wan-CoF 0.391 (+29%) $\rightarrow$ Wan-CoF_vt 0.441 (+45%).
  • VIPER (0–100 POC): Baseline 3.3 $\rightarrow$ Wan-CoF 7.5 (+127%) $\rightarrow$ Wan-CoF_tt 8.8 (+167%), matching open-source Hunyuan-1.5 (8.1).
  • RULER-Bench (0–100 I2V): Baseline 55.8 $\rightarrow$ Wan-CoF 56.8 $\rightarrow$ Wan-CoF_vt 59.6 (+6.8%).

In sub-category breakdowns, vt excels at maintaining persistent visual plans (VIPER Planning jumps from 5.3 to 15.8), while tt shines on structural rules and prompt adherence.

Limitations and Future Work

The primary limitation acknowledged by the authors is that Visual Reasoning Tokens (vt) and Textual Reasoning Tokens (tt) were only trained and studied in isolation. Because empirical results and attention analyses show they play highly complementary roles—low-level spatial boundary tracking versus steady high-level semantic constraints—figuring out how to unify both token mechanisms effectively into a single model is the most promising next step.

Summary updated

Abstract

Reasoning has become a core capability for large models, especially when reliable decisions require understanding logical consequences. Recent video generation models offer a reasoning path distinct from previous Chain-of-Thought (CoT): reasoning can unfold through temporally connected frames, known as Chain-of-Frame (CoF) reasoning. However, existing video generators are primarily trained on general video corpora, still lacking diverse supervision and dedicated designs for CoF reasoning. To address this gap, we introduce OpenCoF, a framework comprising the OpenCoF-17K dataset, a reasoning video dataset spanning 11 task families, and Wan-CoF, a fine-tuned video model for studying whether diverse temporal supervision improves CoF behavior. Across four video reasoning benchmarks, Wan-CoF achieves considerable gains over the Wan2.2-I2V-A14B baseline. Building on this, we empirically explore more advanced designs for CoF capabilities, i.e., equipping the model with visual and textual reasoning tokens. This mechanism respectively captures low-level visual cues and high-level semantic priors for spatial and temporal reasoning. Through performance comparisons and attention analysis, we examine how these tokens contribute across model depth, denoising steps, space, and time. Our results suggest that stronger video reasoning requires both broad temporal supervision and explicit mechanisms for organizing intermediate reasoning state. We release the dataset, model, and code. More details are available on our project page: https://opencof.github.io/.
BibTeX
@inproceedings{chen2026opencof,
  author = {Xinyan Chen and Renrui Zhang and Ziyu Guo and Dongzhi Jiang and Hongsheng Li},
  title = {{OpenCoF: Learning to Reason Through Video Generation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=txkEmHILO7},
}
Figure