TL;DR
Generating minute-long AI videos usually forces an awkward choice: either the AI forgets what the subject looks like halfway through, or it gets stuck in a repetitive motion loop trying to remember. OmniMem breaks this trade-off by acting like a dynamic search engine for a video generator's past, selectively retrieving exact, full-resolution memories from earlier frames on demand. The result is rich, continuous 60-second motion and rock-solid visual consistency, all without blowing up GPU memory.
What Problem Does This Paper Address?
Modern autoregressive (AR) video generators build videos sequentially, chunk by chunk. To keep everything coherent, the model stores past visual context in a Key-Value (KV) cache—essentially its working memory. As a video stretches toward a minute or longer, this cache grows linearly, quickly choking GPU memory and slowing down computation.
Existing workarounds suffer from two distinct flavors of amnesia:
- Sliding Windows simply throw away older memories. Without long-range context, a black-and-white goat gradually morphs into a brown-and-white goat (object drift).
- Anchor/Sink Tokens permanently pin the very first few frames in memory. While the model remembers the goat's identity, anchoring too hard to the beginning causes the video to loop back to its starting pose (motion repetition).
Why not just borrow sparse memory retrieval from Large Language Models (LLMs), fetching only the most relevant historical blocks? Because video is a different beast. Instead of generating one token at a time like an LLM, chunk-based video models process thousands of tokens simultaneously. Applying standard sparse retrieval here triggers two nasty bottlenecks:
- Local Bias: Attention naturally favors adjacent, clean frames, wasting its limited retrieval budget on recent chunks it already sees in its local sliding window.
- Union Explosion: Even if each of the 4,000+ query tokens and multiple attention heads only fetches a tiny handful of historical blocks, they all ask for different blocks. The combined union of requested memories ends up spanning almost the entire history, wiping out any memory savings when offloading and reloading between CPU and GPU.
Methods
Built atop a causal Diffusion Transformer (Wan2.1-T2V-1.3B) and inspired by LLM Native Sparse Attention (NSA), OmniMem fuses three parallel attention branches: Sliding-Window Attention (recent chunks), Compression Attention (a coarse, spatially 2D-pooled summary of all history), and Selection Attention (top-$K$ full-resolution historical blocks).
To make Selection Attention work at scale for video, the authors introduce three clever mechanisms:
- Adaptive Window Exclusion (AWE): Once enough history accumulates, AWE masks out the recent chunks already covered by the sliding window from the retrieval pool. This forces the selector to spend its sparse budget on genuinely long-range memories.
- Query-Shared KV Selection: Because neighboring video tokens care about similar context, OmniMem groups adjacent queries (e.g., groups of 15) and has them vote on a single shared top-$K$ block selection, curbing cross-query divergence.
- Per-Head Scattered KV Access: Different attention heads genuinely need different historical eras, so forcing them to share hurts quality. Instead of building a giant, padded memory buffer on the GPU containing the union of all heads' requests, a custom Triton kernel uses a pointer table to let each head read its own non-contiguous blocks directly, backed by an on-demand GPU/CPU cache.
Datasets
- Training: Fine-tuned using prompts from VidProM.
- Evaluation: Single-prompt 60-second videos are evaluated on the official VBench-Long benchmark. For multi-prompt switching, the authors construct an evaluation set of 100 multi-prompt scripts (following the LongLive protocol), where prompts change every 10 seconds across 60-second (and 120-second) rollouts.
Key Insights and Ideas
- Fixed "sink" tokens restrict motion: Visualizing attention maps reveals that heads naturally look for scattered moments across the entire timeline, not just the first frame. Replacing rigid sink tokens with dynamic retrieval lets the model reference early frames only when needed, curing motion repetition.
- Computationally sparse $\neq$ memory sparse: A naive sparse attention setup still suffers from Union Explosion in chunk-based generation—meaning you still have to keep nearly the entire KV cache on the GPU to avoid constant PCIe transfer stalls. Grouping queries and scattering head access restores true memory scalability.
- Heads specialize naturally: Learned fusion gates show that some attention heads rely almost exclusively on the local sliding window, while others actively balance coarse global compression and sharp historical retrieval.
Key Results
On 60-second video generation (VBench-Long), OmniMem achieves state-of-the-art overall quality (83.08 Total Score) while dramatically unlocking motion:
- 52.3% jump in Dynamic Degree: OmniMem scores 82.29, whereas strong baselines like LongLive (53.47), MemFlow (54.03), and RollingForcing (47.64) all hover below 55 due to repetitive/stagnant rollouts.
- Minimal memory overhead: Uses 23.3 GB VRAM on an H100—just 1.7% more than LongLive (22.9 GB), and 6$\times$ less than an adapted LLM NSA baseline (138.4 GB).
- Scalability: At 717 frames, OmniMem uses 3.3$\times$ less GPU memory and runs 2.7$\times$ faster than full-history attention.
- Human Preference: In blind evaluations of 60-second prompt-switching videos, human raters preferred OmniMem 65.7% of the time for overall quality (vs. 21.9% for MemFlow and 12.4% for LongLive).
Limitations and Future Work
Not discussed in the paper. (In the provided main text, the authors do not include a dedicated section discussing limitations or future research directions, though they note that their primary 60-second evaluations still rely on long-video fine-tuning rather than pure zero-shot length extrapolation.)
Summary updated