← Latest papers
💻 computer science

Pyramid Forcing: Head-Aware Pyramid KV Cache Policy for High-Quality Long Video Generation

The paper proposes Pyramid Forcing, a head-aware pyramidal KV cache framework that categorizes attention heads into Anchor, Wave, and Veil types to assign heterogeneous caching policies, thereby significantly improving long-term quality and consistency in autoregressive video generation.

Original authors: Jiayu Chen, Junbei Tang, Wenbiao Zhao, Maoliang Li, Jiayi Luo, Zihao Zheng, Jiawei Yang, Guojie Luo, Xiang Chen

Published 2026-05-14
📖 4 min read☕ Coffee break read

Original authors: Jiayu Chen, Junbei Tang, Wenbiao Zhao, Maoliang Li, Jiayi Luo, Zihao Zheng, Jiawei Yang, Guojie Luo, Xiang Chen

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are trying to tell a very long, complex story to a friend, but you can only remember a limited amount of what you've said so far. As the story gets longer, you might start forgetting important details, mixing up characters, or making the plot drift into nonsense. This is exactly the problem computer models face when generating long videos. They start with a great idea, but as they create frame after frame, the video gets blurry, the characters change faces, and the motion becomes weird. This is called "long-term degradation."

The paper introduces a new method called Pyramid Forcing to fix this. Here is how it works, using simple analogies:

The Problem: The "One-Size-Fits-All" Memory Mistake

Current video generators use a "memory bank" (called a KVCache) to remember previous frames. Think of this like a backpack.

  • The Old Way: Imagine everyone in a group has the same backpack, and the rule is to keep the exact same number of items in it, no matter what. If you need to remember a specific detail from 50 steps ago, the backpack might be full of junk from 40 steps ago, forcing you to throw away the important thing.
  • The Flaw: The paper found that the computer's "brain" (specifically, its Attention Heads) doesn't all work the same way. Some parts of the brain need to remember everything from a long time ago. Some parts only care about a rhythmic pattern. Others only care about the very beginning and the immediate present. Treating them all the same causes the video to degrade.

The Discovery: Three Types of "Brain Cells"

The researchers looked closely at how the computer pays attention to the past and found three distinct types of "Attention Heads" (think of these as specialized workers in a factory):

  1. The Anchors (Anchor Heads):

    • What they do: These workers need to see the whole picture from a long time ago to keep the story consistent. They are like the anchor of a ship; they hold the video steady so the character doesn't turn into a different person halfway through.
    • Their need: They need a wide, broad view of history.
  2. The Waves (Wave Heads):

    • What they do: These workers notice a repeating rhythm, like a heartbeat or a bouncing ball. They don't care about every single frame; they care about the pattern.
    • Their need: They only need to remember specific frames that match their rhythm (e.g., every 6th frame). Remembering everything else is just noise to them.
  3. The Veils (Veil Heads):

    • What they do: These workers are very focused on the very first frame (the start of the video) and the immediate next few frames. They get confused or overwhelmed if you show them too much middle-history.
    • Their need: They need a small, tight memory of just the start and the present. Too much history actually hurts their performance.

The Solution: Pyramid Forcing

Instead of using one generic backpack for everyone, Pyramid Forcing gives each worker a custom tool kit based on their job:

  • For the Anchors: It uses a "Strided Sliding Window." Imagine a camera that pans slowly across a long timeline, picking out key moments evenly spaced out. This keeps the long-range memory alive without filling up the whole backpack.
  • For the Waves: It uses "Periodic Sampling." Imagine a metronome. The system only saves the frames that hit the beat (e.g., frame 1, 7, 13, 19). It ignores the frames in between because the "Wave" worker doesn't need them.
  • For the Veils: It uses "Cache Merging." Imagine taking the last few frames and blending them into a single, compact summary. This keeps the "start" and "now" clear without letting the messy middle history clutter the view.

The "Ragged" Backpack

Usually, computers like memory to be neat and rectangular (like a stack of identical boxes). But because these three workers need different amounts of memory, the system creates a "ragged" memory bank (like a stack of boxes of different sizes). The paper also invented a new, fast way to read this messy stack so the computer doesn't get slow or confused.

The Results

When they tested this on generating 60-second videos:

  • Before: The video would start great but drift into nonsense, with the score (a measure of quality) around 77.87.
  • After: The video stayed consistent, the characters looked the same, and the motion was smooth, boosting the score to 81.21.

In short, Pyramid Forcing stops the video from getting "amnesiac" by realizing that different parts of the computer's brain need different types of memories, and it organizes the memory bank accordingly to keep long videos looking high-quality.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →