Papers
Fast and Adaptive Visual Memory for Video and World Models
Video models can benefit from remembering earlier events, but repeatedly attending to every past visual token becomes expensive. CodecMem aims to keep information from the full history at lower cost…
- arXiv
- 2612.04174 · Preprint · not peer-reviewed
- Published
- 2026-12-02
- Authors
- Liyuan Zhu, Chao Liu, Julius Berner, Tao Sun, Ying Shen, Shengyu Huang, Tianye Li, Amrita Mazumdar, Rafał Karp, Enting Liu, Haithem Turki, Gordon Wetzstein, Iro Armeni, Shalini De Mello, Alex Trevithick
In plain words
Video models can benefit from remembering earlier events, but repeatedly attending to every past visual token becomes expensive. CodecMem aims to keep information from the full history at lower cost by predicting incoming video from its own previous reconstruction and storing visual details where that prediction does not work well.
Key results
- Long-context memory benchmark. CodecMem ranks first among the 12 compressed-memory baselines.
- Codec speed and design. The abstract describes CodecMem as running at 100+ fps.
AI summary
Overview
- Research area: Computer vision, long-context video generation, visual memory, and world action models (WAMs).
- Technical level: Intermediate.
- Scope: The paper presents CodecMem, a visual-memory method that uses motion-based prediction to decide which multi-scale visual tubelets to retain from a video’s history.
What This Paper Is About
Video models can benefit from remembering earlier events, but repeatedly attending to every past visual token becomes expensive. CodecMem aims to keep information from the full history at lower cost by predicting incoming video from its own previous reconstruction and storing visual details where that prediction does not work well.
Key Contributions
- A codec-based memory for video and world models. CodecMem represents older visual history with tokens selected according to how difficult it is to predict, while retaining the full history rather than discarding it after a fixed window.
- A motion-compensated tubelet codec. The codec predicts video by warping its previous reconstruction, then selects RGB tubelets to correct prediction errors. Tubelets can cover regions of different sizes and are encoded using an existing video VAE.
- A benchmark for several kinds of visual memory. The authors test retrieval, tracking, and spatial memory with contexts up to 60 s, comparing compressed-memory methods with full-memory references.
- Evaluations beyond the benchmark. The paper applies CodecMem to robot policies, an in-context pushing task, long video generation, and few-step video-model distillation.
Main Findings
- Long-context memory benchmark: CodecMem ranks first among the 12 compressed-memory baselines. On this benchmark, it approaches dense attention with 18× fewer inference FLOPs and surpasses dense attention on tracking sequences longer than those seen in training.
- Retrieval and tracking: In the benchmark’s retrieval task, CodecMem performs close to dense attention. In tracking, its reported extrapolation score is 90.8, compared with 85.2 for dense attention; its in-distribution score is 99.5, compared with 99.6 for dense attention.
- Spatial memory: CodecMem is second among the limited-budget methods and close to dense attention on the benchmark’s spatial-memory task. The paper reports that the task-specialized MemLearner performs well on spatial reconstruction but struggles on retrieval or tracking.
- Robot memory: On RoboMME, CodecMem’s average success rate is 71.3%, and it leads the other reported WAMs in each of the benchmark’s four suites. In the paper’s separate in-context pushing task, CodecMem matches dense memory while using 4.7× fewer inference FLOPs.
- Long video generation: In the paper’s 15 s video-generation comparison, CodecMem improves on the no-codec model in temporal quality, subject consistency, and visual quality across the evaluated segments. It stays close to dense attention and surpasses it on the final segment for temporal quality and subject consistency; its text alignment is the lowest of the three variants.
- Few-step video generation: On VBench, SF+CodecMem reports a Total score of 84.43 and a Quality score of 85.44, the highest among the compared distilled autoregressive models. Its Semantic score is 80.38, which ranks third among those models.
- Codec speed and design: The abstract describes CodecMem as running at 100+ fps. In the reconstruction ablation, the full model’s tubelet selection runs at 126 FPS on one H100. The ablations also show lower reconstruction quality when scale information or multi-scale selection is removed, and when motion and residuals are stored instead of the selected tubelets.
Methodology in Plain English
CodecMem processes a video a window at a time. It uses optical flow to warp its own reconstruction of the previous window and predict the next one. When that prediction misses visual information, it selects tubelets: RGB regions spanning the window that can be different sizes—32, 64, 128, or 256 pixels across. Each tubelet is resized to 32 × 32 before being encoded, so larger tubelets represent broader regions at lower detail.
The codec selects tubelets according to how much they reduce prediction error. A quality gate skips regions the prediction already represents well, so the number of selected tubelets depends on the video content. After selection, the codec updates its reconstruction; that reconstruction becomes the reference for predicting the next window.
For older history, the video model attends to the accumulated codec tokens rather than every token from every past frame. It also retains a sink frame and the recent chunk at full resolution. In a WAM, the codec processes new observations after the robot acts; in video generation, it processes the model’s generated video.
Why This Matters
For research, CodecMem offers a way to reduce redundancy in long visual histories without replacing them with a fixed-size summary or dropping older content. Its central design choice is to spend tokens on visual information that is hard to predict from the past.
Potential applications include:
- Robotics: Retaining information about objects, instructions, and demonstrations that are no longer visible during an episode.
- Long-form video generation: Helping generated subjects and environments remain consistent over longer rollouts.
- World models and simulation: Preserving earlier observations that may matter for later predictions or actions.
- Camera-controlled scene reconstruction: Using remembered visual context to synthesize views of a previously observed scene.
For industry, the work is relevant to reducing the inference cost of models that use long visual histories. The paper demonstrates benefits in model experiments, but does not report production deployment results.
Future Directions
- Explore the paper’s proposed next step: generating directly in an adaptive token space so generation, like memory, can focus computation on changing content.
- Test how CodecMem performs across additional video models, WAMs, and types of visual content.
- Study how tubelet-selection choices affect the trade-off between memory use, speed, and downstream task performance.
- Evaluate the method in practical deployment settings and determine whether its reported efficiency and task benefits hold there.
Target Audience
This paper is most relevant to researchers and practitioners in video generation, visual memory, video transformers, world models, and robot learning. It may also interest engineers working on the inference cost of systems that need to condition on long video histories.
Authors’ abstract
We present CodecMem, a fast (100+ fps) and adaptive codec for long-context video and world models. We introduce the first motion-compensated tubelet codec designed for generative video models: to encode an observation, it warps its own reconstruction of the previous frame with estimated flow and stores additional multi-scale tubelets only where this warping fails. We condition video models on this codec memory, which spans the whole history, in place of dense attention over…
The full abstract on arXiv