Mixture of Contexts for Long Video Generation
Abstract
Long-context video generation is fundamentally a memory problem: models must retain and retrieve salient events across long range without collapsing or drifting. However, scaling diffusion transformers (DiTs) to generate long-context videos is fundamentally limited by the quadratic cost of self-attention, which makes memory and computation intractable and difficult to optimize for long sequences. We recast long-context video generation as an internal information retrieval task and propose a simple, learnable sparse attention routing module, Mixture of Contexts (MoC), as an effective long-term memory retrieval engine. In MoC, each query dynamically selects a few informative chunks plus mandatory anchors (caption, local windows) to attend to, with causal routing that prevents loop closures. As we scale the data and gradually sparsify the routing, the model allocates compute to salient history, preserving identities, actions, and scenes over minutes of content. Efficiency follows as a byproduct of retrieval (near-linear scaling), which enables practical training and synthesis, and the emergence of memory and consistency at the scale of minutes. Project Page: https://primecai.github.io/moc/.
Cite
Text
Cai et al. "Mixture of Contexts for Long Video Generation." International Conference on Learning Representations, 2026.Markdown
[Cai et al. "Mixture of Contexts for Long Video Generation." International Conference on Learning Representations, 2026.](https://mlanthology.org/iclr/2026/cai2026iclr-mixture/)BibTeX
@inproceedings{cai2026iclr-mixture,
title = {{Mixture of Contexts for Long Video Generation}},
author = {Cai, Shengqu and Yang, Ceyuan and Zhang, Lvmin and Guo, Yuwei and Xiao, Junfei and Yang, Ziyan and Xu, Yinghao and Yang, Zhenheng and Yuille, Alan and Guibas, Leonidas and Agrawala, Maneesh and Jiang, Lu and Wetzstein, Gordon},
booktitle = {International Conference on Learning Representations},
year = {2026},
url = {https://mlanthology.org/iclr/2026/cai2026iclr-mixture/}
}