arXiv(opens in a new tab)cs.CVAug 2026Cited by 2 papers on PaperVantage

Manuscript Offprint

arXiv:2608.27922

DensityKV: Density-Guided KV Cache Compression for Long Video Generation

Wenqu Zhao, Xuemin Chi, Xin Zhang, Guoqing Ma, Baorun Li, Jianjie Fang, Peizhi Tang, Chen Gao, Wei Wu

Wenqu Zhao 1∗^{1*}, Xuemin Chi 1^{1}, Xin Zhang 1^{1}, Guoqing Ma 1^{1}, Baorun Li 1^{1}, Jianjie Fang 1,2^{1,2}, Peizhi Tang 1,2^{1,2}, Chen Gao 1,2^{1,2}, Wei Wu 1^{1}

1^{1} Manifold AI 2^{2} Tsinghua University

Code: https://github.com/ZhaoWQQ/DensityKV

Historical Attention / Admission

T = 0s

Figure

T = 30s

T = 60s

Prompt: A cute panda sitting on a stool, playing the guitar with its front paws, looking joyful and focused. The background is a green bamboo forest with dappled sunlight. Soft and whimsical illustration style.

Figure 1: DensityKV maintains generated history in per-head KV banks whose local density growth is controlled after admission. Left: historical-attention maps show which past states each new segment uses, while admission profiles show when retained KV tokens entered the bank. Right: access to this retained history helps long videos maintain subjects, objects, and scenes more consistently over time.

Abstract

Autoregressive video diffusion models enable streaming generation through sliding-window attention, but each generated block is conditioned on previously generated content, causing appearance and motion errors to propagate recursively over time. Historical key-value (KV) memory preserves earlier subject and scene states and helps maintain long-horizon consistency. However, retaining every generated state creates a historical archive that grows continuously with the rollout, while recurrent states repeatedly add redundant coverage. To address this problem, we propose DensityKV, a training-free historical KV bank management strategy. DensityKV maintains a separate token-level KV bank for each attention head and measures local redundancy among the post-RoPE keys that directly parameterize attention routing using Soft-Riesz density. By constraining neighborhood-density growth after states enter the bank, DensityKV limits repeated historical accumulation while preserving coherent states from each completed generation block. Experiments across three autoregressive video generation backbones and multiple generation lengths show that, at the same upper bound on historical KV capacity, DensityKV improves long-horizon consistency and generation stability while keeping persistent historical storage bounded independently of rollout length.

1 Introduction

Diffusion Transformers have become a strong foundation for video synthesis (Peebles and Xie 2023; Wan Team et al. 2025). Recent autoregressive (AR) variants turn short-clip diffusion models into causal generators that reuse key-value (KV) states and stream frames beyond the training horizon (Yin et al. 2024; Huang et al. 2025; Zhu et al. 2026; Yang et al. 2025). During long rollouts, recursive conditioning propagates appearance and motion errors, while the sliding window that bounds attention discards earlier subject and scene states that could stabilize later blocks.

Long-range memory can restore access to this discarded history. Existing methods preserve early anchors, retain selected historical states, or retrieve non-local information from previously generated content (Yang et al. 2025; Yi et al. 2025; Zhao et al. 2026; Hu et al. 2026). However, storing all historical states causes the cache to grow with generation length, and many stored states are redundant. We study how to retain useful native historical K/V states in a bounded bank before future queries are known.

Frame-level retention is too coarse because a frame combines repetitive background tokens with changing appearance, pose, and motion states. A single decision for the whole

∗^{*}Corresponding author.

frame can either waste memory on repeated regions or discard useful states. Token-level selection instead allows different regions to compete for capacity according to their local coverage in key space. Because future queries are unavailable, the selection criterion should be query-independent and defined in the model's native attention space.

Euclidean distance between post-RoPE keys bounds their normalized logit discrepancy for any query. We therefore use local key-space density to identify key neighborhoods that are already well represented without observing future queries; values are always retained or removed together with their original keys.

DensityKV is a training-free historical KV bank management strategy for frozen AR video generators. Each layer and head maintains a token-level bank of fully denoised states. A Soft-Riesz potential measures post-RoPE key crowding, while each state records its density at admission as a local baseline. DensityKV admits the largest candidate prefix satisfying the relative growth constraint and evicts states whose neighborhoods later become overrepresented. Co-admitted states establish their baselines together, so only later blocks contribute post-admission density growth. The backbone's native attention reads the retained states directly from the resulting bank. Figure 2 summarizes this online update.

Our contributions are:

• We formulate historical KV maintenance as an online representation-coverage problem and derive an attention-aligned post-RoPE key geometry for query-agnostic redundancy estimation.

• We introduce DensityKV, combining per-head token banks, Soft-Riesz crowding, and insertion-relative density constraints while preserving exact K/V pairs without training, merging, or reconstruction.

• Across three backbones and 30–120-second generations, DensityKV achieves the best overall average rank and 31 of 54 single-metric wins under the same upper bound on historical KV capacity.

References (29)