Generating long, consistent videos is a bit like writing a novel: if you only remember the last three sentences you wrote, the plot will quickly fall apart. In the world of AI video generation, this is known as the "recency bias" problem.
A new paper from researchers at Stanford University introduces ReCR (Representation-Guided Context Rewriting), a training-free method that helps video models "remember" the right parts of their past to generate stable, high-quality videos spanning minutes rather than seconds.
TL;DR
ReCR is a plug-and-play decoding strategy that intelligently selects which past frames a video model should look at when generating the next segment. By using the model's own internal representations to pick a diverse, non-redundant set of "visual anchors," ReCR significantly reduces scene drift and identity loss in long-horizon video generation without requiring any extra training.
What Problem Does This Paper Address?
Most state-of-the-art video models generate content autoregressively—they predict the next few frames based on a "context window" of previous frames. However, due to memory and computational limits, this window is usually fixed to the most recent frames.
This creates a major hurdle for long videos:
- Identity Drift: Characters slowly morph into different people because the model "forgets" what they looked like at the start.
- Scene Inconsistency: The background gradually changes or "melts" away.
- Motion Decay: The video becomes static as the model loses the trajectory of movement.
The authors ask a simple but profound question: instead of just showing the decoder the most recent frames, can we explicitly choose which past frames are most useful for the next prediction?
Methods
ReCR formulates video decoding as a context selection problem. At each step of the generation process, it evaluates the entire history of generated frames and picks a sparse "budget" of frames to show the decoder.
The selection process is guided by three main criteria derived from the model's own internal layers:
- Global Compatibility: It favors frames that align with the overall "vibe" or state of the entire video rollout so far.
- Redundancy Avoidance: It penalizes frames that are too similar to what was just generated, forcing the model to look further back for fresh evidence.
- Boundary Coverage: It ensures that "anchor" frames from the very beginning and the most recent frames are always considered to maintain both long-term identity and short-term smoothness.
Once these frames are selected, ReCR uses Temporal Reindexing. It maps these sparse, distant frames onto a compact timeline. This "tricks" the decoder into seeing a continuous sequence of highly relevant information, even if the frames were originally seconds apart.
Datasets
The researchers evaluated ReCR using:
- MovieGen Prompt Suite: 128 complex prompts used to generate 30-second and 60-second videos.
- VBench-Long: A benchmark specifically designed to test the quality and consistency of long-duration AI videos.
- Transition-Count Prompt Switching: A newly introduced benchmark (24 prompt families) where the model must follow a sequence of changing instructions (e.g., "A woman walks... then she turns... then she opens a door") to test how well it handles new directives while keeping the character consistent.
Key Insights and Ideas
- The "Aha!" Moment: You don't need to train a new model to fix long-term memory. The "knowledge" of what is important is already hidden in the internal representations of existing pre-trained decoders. ReCR simply extracts that signal to guide the context window.
- Sparse is Better than Dense: Looking at 10 carefully chosen frames from across a 60-second history is often more effective than looking at the 10 most recent frames.
- Dynamic Allocation: As seen in Figure 4, ReCR doesn't just pick the same frames every time. It dynamically shifts its focus between the "early" anchors and "intermediate" event-driven frames based on the complexity of the motion.
Key Results
- Stability Gains: On 60-second rollouts, ReCR improved the "Dynamic Degree" (a measure of motion and change) by up to 23.65 points over baselines.
- Consistency: It consistently reduced "Aesthetic Drift" and "Subject Consistency" errors across multiple different model backbones (like Self-Forcing and LongLive).
- Efficiency: Because it is training-free and only involves a lightweight scoring step, it adds negligible latency (only a few milliseconds per block) compared to standard decoding.
- Ultra-Long Generation: The authors demonstrated stable visual continuity on videos as long as 300 seconds (5 minutes), a feat that usually causes standard autoregressive models to collapse into noise or static images.
Limitations and Future Work
While ReCR is a major step forward, the authors note a few areas for improvement:
- Myopic Decisions: The algorithm picks the best context for the next step, but it doesn't "plan" ahead for what it might need 10 steps from now.
- Frame-level Granularity: ReCR selects whole frames. Future versions might benefit from selecting specific objects or regions within frames (e.g., "keep the face from frame 1 but the background from frame 50").
- Abstract Prompts: The method relies on the model's internal representations being "good." In highly abstract or surreal prompts, these representations might be less reliable for guiding context selection.
For those interested in the implementation, the code is available at https://github.com/lixuan27/ReCR.
Summary updated