LayerRecall: A State-Conditioned Memory Router for Long-Horizon Consistency in Video Generation
Organizations: Zhejiang University · The University of Hong Kong
Abstract
Autoregressive video diffusion enables scalable long-video generation by producing chunks from a bounded recent context. While recency-based caching preserves local continuity, it evicts historical cues needed when subjects, objects, scenes, or attributes reappear. Existing memory mechanisms expose models to nonlocal history, but access alone does not ensure effective use. Our analysis reveals that video DiT layers exhibit distinct preferences for current, recent, and distant context, suggesting that long-range memory requires deciding both what to retrieve and where to use it. We introduce LayerRecall, a current-conditioned, layer-selective memory router that retrieves relevant historical K/V states and injects them only into backbone-specific memory-sensitive layers while preserving local attention elsewhere. To reduce reliance on scarce high-quality long-horizon videos and explicit memory-allocation labels, we further propose Cross-Horizon Prediction Matching (CHPM), which uses a privileged long-context reference to supervise the bounded-memory router in prediction space. Across 100 multi-shot evaluation prompts, LayerRecall achieves the best overall results on MemoBench and MovieBench while matching its backbone on VBench-Long, demonstrating stronger long-range recovery without sacrificing local continuity. Qualitative analyses further reveal memory-guided self-correction, whereby initially mismatched local attributes return to their historical appearance without resetting ongoing motion or scene structure. Additional analyses show cross-backbone portability and negligible inference overhead.
Figures & tables
| MemoBench | MovieBench | |||||||||
| Method | Venue | VBench-Long Avg. | Overall | Obj. Reapp. | Layout Rec. | State Upd. | Overall | Shot Coh. | Scene Layout | Narrative |
| LongLive | ICLR26 | 0.977 | 0.499 | 0.516 | 0.534 | 0.464 | 0.544 | 0.491 | 0.624 | 0.509 |
| LongLive-2.0 | arXiv26 | 0.978 | 0.513 | 0.519 | 0.524 | 0.499 | 0.546 | 0.531 | 0.596 | 0.517 |
| LongLive-RAG | arXiv26 | 0.958 | 0.373 | 0.358 | 0.360 | 0.297 | 0.394 | 0.352 | 0.436 | 0.355 |
| CausVid | CVPR25 | 0.975 | 0.426 | 0.418 | 0.414 | 0.400 | 0.483 | 0.489 | 0.495 | 0.450 |
| Deep Forcing | ICML26 | 0.964 | 0.408 | 0.371 | 0.441 | 0.405 | 0.511 | 0.473 | 0.583 | 0.427 |
| Metric | All-Layer Routing | LayerRecall | Diff. |
| VBench Motion Smooth. | 0.9910 | 0.9916 | +0.0006 |
| Helios Smooth. | 0.9917 | 0.9923 | +0.0006 |
| CLIP Adjacent | 0.9397 | 0.9574 | +0.0177 |
| DINO Adjacent | 0.8795 | 0.9212 | +0.0417 |
| Backbone | Variant | End-to-end time (s/video) | FPS |
| LongLive-2.0 | w/o LayerRecall | 305.9 | 5.22 |
| w/ LayerRecall | 309.4 | 5.16 |
| Method | Variant | Memo Overall | Memo ID | Memo State | Memo Camera |
| LayerRecall | Random init | 0.519 | 0.484 | 0.487 | 0.508 |
| Trained | 0.548 | 0.530 | 0.525 | 0.573 |
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
| Split | Size | Purpose | CHPM train | Layer selection | Final eval |
| Training set | 1,600 | Multi-shot prompts used to train CHPM. The prompt summary records 480 3-shot, 480 4-shot, 320 5-shot, and 320 6-shot cases across subject, color, position, and scene axes. | Yes | No | No |
| Profiling set | 100 | Held-out prompts used for prompt-stability analysis and layer-policy validation across subject, color, object, and spatial memory stresses. | No | Yes | No |
| Main evaluation set | 100 | Held-out 3-shot prompts used to generate the main evaluation videos. The summary records 25 cases for each of subject, color, position, and scene axes. | No | No | Yes |
| Item | Setting |
| Backbone | LongLive-2.0 5B on Wan2.2-TI2V-5B. |
| Trainable parameters | LayerRecall router only; 1,648,416 parameters. |
| Training prompts | 1,600 multi-shot prompts. |
| Latent rollout | 384 latent frames, 48 chunks, 8 latent frames per chunk. |
| Prediction schedule | One sampled diffusion timestep and one denoising prediction-matching forward per supervised anchor. |
| Teacher/student history | Teacher retains the complete causal prefix at each anchor, with a maximum attention horizon of 384 latent frames; student has a 32-frame total attention-visible budget comprising an 8-frame sink, up to two retrieved history chunks (16 frames), and the current 8-frame chunk. |
| Method | Native multi-shot support | Input format | Adaptation rule |
| LongLive | Yes/partial | Block prompt list | Use the 48-block prompt script directly when supported. |
| LongLive-2.0 | Yes/partial | Block prompt list | Use the 48-block prompt script directly. |
| LongLive-RAG | Partial | Retrieved prompt/context | Preserve the same shot script and use its retrieval interface. |
| CausVid | No/partial | Single text prompt | Concatenate shots into a coherent long-video prompt with explicit reappearance constraints. |
| Deep Forcing | No/partial | Single text prompt | Concatenate shots; preserve subject, layout, and return constraints. |
| Dummy Forcing | No/partial | Single text prompt | Concatenate shots; preserve the memory target and final return. |
Long-Horizon Video Generation
Long-horizon video generation creates coherent, controllable videos over extended durations despite limited context and accumulating errors.
See all 164 papers