TL;DR
Generating minute-long videos frame-by-frame is like playing a visual game of telephone: tiny errors snowball until the video dissolves into blurry, discolored chaos, while keeping every past frame in memory quickly blows up your GPU. Instead of relying on rigid rules like "forget the oldest frames" or "permanently freeze Frame 1," Learning-to-Memorize (L2M) trains a tiny neural router to dynamically curate the model's memory on the fly. By actively evicting corrupted frames and updating long-term anchors as scenes change, L2M keeps long videos crisp, dynamic, and coherent.
What Problem Does This Paper Address?
Current video diffusion models can easily generate gorgeous 5-to-10-second clips, but interactive applications—like world simulators or real-time content streaming—require autoregressive generation, predicting chunk after chunk over minutes.
To maintain continuity, these models store past frames in a Key-Value (KV) cache. Because GPU memory is finite, you eventually have to throw things away. Existing strategies rely on static, hand-crafted heuristics that create a frustrating Catch-22:
- Sliding windows (FIFO): Throw away the oldest frames. This causes long-range amnesia; if a character walks off-screen and returns, the model forgets what they looked like, and colors slowly drift.
- Fixed "Attention Sinks": Borrowed from LLMs, this permanently locks the very first few frames in memory as anchors. In video, however, if the camera pans to a new room or day turns to night, anchoring to Frame 1 forces the model to cling to obsolete history, causing motion stagnation or weird visual regressions (like rendering duplicate suns in the sky).
Methods
Built atop the open-source Self Forcing video diffusion framework, L2M replaces rigid cache rules with a learned, content-adaptive memory manager. Importantly, the base video generator remains completely frozen—only the lightweight memory router is trained (taking just 6 hours on 16 GPUs).
Here is what makes L2M tick:
- Importance-Aware Frame Router: A tiny 4-layer MLP looks at the pooled features of the chunk currently being generated alongside each historical frame in the cache, outputting a "keep or evict" importance score. During training, a student model (given only router-pruned memory) is trained via distillation to match the outputs of a teacher model (given the full, unpruned memory), alongside a sparsity penalty so it learns to be frugal.
- Frame-Level Pruning & RoPE Adjustment: Unlike prior methods that prune individual spatial tokens, L2M prunes whole latent frames. When a frame is dropped, the remaining frames have their 3D Rotary Position Embeddings (RoPE) mathematically rotated to close the temporal gap, preserving smooth positional continuity.
- Degradation-Aware Training: Because real inference frames accumulate artifacts, training solely on clean video makes the router overly trusting of old frames. The authors randomly inject noise into historical frames during training and penalize the router if it tries to keep them, teaching it to sniff out and discard corrupted context.
- Dynamic Memory Evolution (Inference): Within a fixed budget of 21 latent frames, L2M maintains 14 "sink" frames as long-term memory. Instead of hardcoding the initial frames, it dynamically initializes sinks using the highest-scoring frames. As the video progresses, it tracks Exponential Moving Average (EMA) importance scores. If a newer frame survives for 6 consecutive steps without eviction, it becomes eligible to dethrone a stale sink frame.
Datasets
- Evaluation: Models are evaluated on the VBench-Long benchmark using 128 prompts sourced from MovieGen (refined via Qwen2.5-7B-Instruct). No new benchmarks are introduced.
- Training: The specific video dataset used for the 1,000-step router distillation training is not explicitly named in the main text of the paper.
Key Insights and Ideas
- Coarser pruning beats finer pruning in 3D space: You might assume cherry-picking the best individual spatial tokens across all frames is superior to keeping/dropping entire frames. Yet token pruning scrambles 3D positional encodings—tokens from different times at the same $(x,y)$ coordinate end up colliding in RoPE space. Whole-frame pruning avoids this positional ambiguity entirely and performs better.
- Video attention sinks are about quality, not position: Visualizing the router's brain reveals why static heuristics partially worked in the past, and why they fail. While early and very recent frames often score high, importance varies wildly across transformer layers, and plenty of early frames are actually uninformative duds. Sink effectiveness comes from content reliability, not from sitting at index zero.
Key Results
L2M was tested on 30-second and 60-second video generation against strong open-source baselines (CausVid, Rolling Forcing, Self Forcing, and Deep Forcing).
- Top Marks in Quality & Consistency: On 60-second clips, L2M achieves the highest VBench Quality Score (80.73 vs. Deep Forcing's 79.17 and Self Forcing's 75.23) and Overall Consistency (24.54), while maintaining vibrant motion (56.25 Dynamic Degree vs. Rolling Forcing's stiff 35.94).
- Halting Error Snowballs: Measuring text-video alignment (ViCLIP) across consecutive 5-second slices of a 30-second video shows Self Forcing dropping 3.49 points from start to finish as colors drift. L2M drops by just 0.74 points, staying rock-steady after the 10-second mark.
- Learned > Heuristic: In ablations, L2M's learned router (81.15 Quality) handily beats both random eviction (79.92) and raw attention-weight eviction (80.68). Qualitatively, evolving the memory prevents bizarre artifacts—like tracking a moving sun smoothly across the sky instead of hallucinating two suns.
Limitations and Future Work
Not discussed in the main text of the paper (likely deferred to the supplementary appendix not included in the main 10-page manuscript).
Summary updated