Memento: Long-Horizon Reasoning in Video Generation by Writing States into Pixels

Minghao Tian, Yifei Wang, Feng Wang, Chen Wei, Alan YuillearXiv 2026

TL;DR

Video diffusion models are surprisingly capable visual problem-solvers, right up until a problem requires a long sequence of dependent steps—at which point they completely fall apart. Inspired by Christopher Nolan’s film Memento, this paper teaches video models to overcome their lack of serial working memory by literally writing intermediate states into the video’s pixels and handing that finished frame off to the next short generation pass. It’s Chain-of-Thought for video generation, achieved with zero architectural changes.

What Problem Does This Paper Address?

Large language models handle multi-step reasoning through Chain-of-Thought: they emit tokens one by one, locking in intermediate results before computing the next step. Video diffusion models do the exact opposite. When asked to simulate physics, navigate a maze, or do math in pixels, a standard video model denoises the entire clip simultaneously. Every frame attends to every other frame while everything is still blurry and uncertain. Because no intermediate frame is finalized before later frames try to build on it, multi-step reasoning collapses as the "reasoning horizon" (the number of dependent steps, $N$) grows.

Even if you break a video into sequential chunks—starting each new clip from the final frame of the last—a single plain image rarely contains enough information to continue. A snapshot of a bouncing ball shows its position, not its velocity; a maze frame shows where the ball is, not which waypoints it already visited. Without hidden state, the model gets stuck in loops or loses momentum.

Single pass generation gets stuck in a loop on a 4-waypoint maze, whereas Memento writes a teal trail of visited cells into the pixels and solves the maze across four sequential passes.

Methods

Just like Leonard Shelby tattooing clues onto his body to work in short episodes, Memento gives standard image-to-video (I2V) models two complementary mechanisms:

  1. The Visible Cache: Hidden states are rendered directly into the pixels of the video so that any boundary frame becomes Markovian (containing everything needed for the next step). Depending on the task, this cache might be explicit text annotations (like carries and running sums in arithmetic), an object's current 3D pose (a rotated die), or a geometric trail left behind a moving ball whose curve and length encode history or velocity.
  2. The Chain of Passes: Instead of generating all $T$ frames in one shot, generation is split into $K$ short passes. Pass $k$ is conditioned only on the unchanged text prompt and the final frame generated by pass $k-1$.

What is standard here is the model itself: the authors use off-the-shelf latent diffusion transformers (Wan2.2-TI2V-5B and LongCat-Video) with standard LoRA fine-tuning. What is new is formatting the training data into sliced clips rendered with visual caches, teaching the model to both write its working memory into pixels and read it back at the start of the next pass.

Datasets

To cleanly isolate the effect of the reasoning horizon $N$ from single-step difficulty, the authors introduce six procedurally generated, rule-scored benchmarks across three domains:

  • Arithmetic: Chain Addition (adding $N+1$ single-digit numbers step-by-step) and Multiplication ($N$-digit by 1-digit multiplication with carries).
  • Spatial: Dice Rotation (tracking a die's pose across $N$ rotation commands) and Waypoint Maze (visiting $N$ ordered waypoints without crossing walls).
  • Physical: Gravity Bouncing (a ball bouncing in a 2D box) and Polygonal Billiard (elastic reflections inside a random convex hexagon), where $N$ controls the simulated time span.

Key Insights and Ideas

  • Neither memory nor serial passes work alone: In a controlled $2\times2$ ablation, rendering the visual cache inside a single joint pass ("Cache-only") fails because intermediate states still aren't fixed before they are read. Conversely, chaining clips without the visual cache ("Chain-only") fails—dropping to 0% on addition and ruining physics tasks—because each cut erases carries or velocity. You need to write the state and lock it in.
  • More compute doesn't fix joint denoising: Giving a single-pass model $4\times$ as many denoising steps ($S=200$ vs. $S=50$) to match the network evaluations of a 4-pass chain yields virtually zero improvement (staying flat at 0.16 average success). The bottleneck isn't compute; it's the lack of committed serial states.
  • Gains mirror how much a static frame hides: Memento helps most when a plain frame hides everything (like mental math carries) and least in continuous physics, where single-pass models can already infer velocity across adjacent frames—though Memento still wins by preventing trajectory drift over long horizons.

Key Results

Evaluated on Wan2.2-TI2V-5B across all six tasks:

  • At Horizon $N=4$: Memento boosts average success from 0.16 (standard single-pass) to 0.66.Cache-only (0.18) and Chain-only (0.12) barely budge the needle. On Chain Addition, accuracy leaps from 0.07 to 0.93; on Dice Rotation, from 0.00 to 0.72; on Waypoint Maze, from 0.37 to 0.89.
  • Generalization across architectures: On the larger 13.6B LongCat-Video model at $N=4$, average success similarly jumps from 0.21 to 0.70 (reaching 0.98 on mazes).
  • Scaling to Horizon $N=8$: While single-pass generation collapses to 0.07 average success, Memento retains 0.54.

Limitations and Future Work

Memento is a proof of concept with clear guardrails. First, the visual cache is hand-designed per task and explicitly supervised using ground-truth states during fine-tuning—the model doesn't invent its own scratchpad notation. Second, the number of passes $K$ is fixed in advance rather than dynamically halted when a problem is solved, and a separate LoRA adapter is trained for each task and horizon. Teaching video models to discover what states to write into pixels on their own, and generalizing smoothly across unseen horizons, remain wide-open next steps.

Summary updated

BibTeX
@misc{tian2026memento,
  author = {Minghao Tian and Yifei Wang and Feng Wang and Chen Wei and Alan Yuille},
  title = {{Memento: Long-Horizon Reasoning in Video Generation by Writing States into Pixels}},
  year = {2026},
  eprint = {2611.40215},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.40215},
}
Figure