Light Forcing: Accelerating Autoregressive Video Diffusion via Sparse Attention
Authors: Chengtao Lv, Yumeng Shi, Yushi Huang, Ruihao Gong, Shen Ren, Wenya Wang Affiliations: Nanyang Technological University (NTU), AUMOVIO-NTU Corporate Lab, HKUST, Beihang University, Sensetime Research, AUMOVIO Singapore arXiv: 2602.04789 GitHub: chengtao-lv/LightForcing Year: 2026
1. Motivation (研究动机)
1.1 AR 视频生成中的 Attention 瓶颈
Autoregressive (AR) video diffusion model 通过逐 chunk 生成视频帧,相比 bidirectional model 天然支持流式输出和实时交互。但随着生成的 chunk 数量增加,KV cache 线性增长,spatiotemporal 3D full attention 的二次复杂度成为部署瓶颈。如 Figure 1 所示,在 Self Forcing 1.3B 模型上生成 480p 视频时,到第 14 个 chunk,attention 占总延迟约 75%,且延迟增速约为其他组件的 3.1 倍。
Figure 1 解读: 该图展示了在 RTX 5090 上用 Self Forcing 1.3B 生成视频时,attention(蓝色)与其他组件(Linear+Other,橙色)随 chunk index 增长的延迟变化。其他组件延迟基本恒定(~200ms),而 attention 延迟从约 200ms 线性增长到约 1000ms,到最后一个 chunk 时占比达 75%,增速约为其他组件的 3.1 倍。这直接说明了 attention 是 AR 视频生成的主要性能瓶颈。
1.2 直接套用 Bidirectional Sparse Attention 的问题
现有 sparse attention 方法(STA、SVG2、SLA、VMoBA 等)大多为 bidirectional video diffusion model 设计。作者发现直接将这些 chunk-agnostic 策略应用于 AR model 会导致严重的质量下降,原因有二:
- Accumulation Error 放大:早期 chunk 的 sparsity 引入的误差会通过 autoregressive rollout 不断累积,后续 chunk 即使恢复 dense attention 也无法修复。
- 历史信息利用不足:AR 模型中每个 query block 对历史帧的关注模式在不同 layer、head、timestep 间差异很大,简单的 sliding window 或 attention sink 方法会丢失关键的长程依赖信息。
Figure 2 解读: 四组实验对比了不同 sparsity 分配策略的效果(7 chunks,21 latent frames)。蓝/红/绿色方块分别表示 0%/80%/90% 的 attention sparsity。Setting 1(全 dense)是 baseline。Setting 2 仅对第一个 chunk 使用 80% sparsity,其余 dense——结果出现不可逆的视觉退化(过饱和、曝光偏移)。Setting 3 反过来,第一个 chunk dense、后续 80% sparse——质量接近 Setting 1。这说明早期 chunk 的质量是关键,一旦早期 prior 建立好,后续 chunk 可以安全地使用高 sparsity。Setting 4 全部 90% sparsity 下,later chunk 图像逐渐变清晰,印证了 denoising 的累积效应。
2. Idea (核心思想)
Light Forcing 的核心思路:为 AR 视频生成量身定制 sparse attention,而非简单复用 bidirectional 方案。 具体包含两个互补的设计:
-
Chunk-Aware Growth (CAG):从理论角度量化每个 chunk 对全局 accumulation error 的贡献,据此为每个 chunk 分配不同的 sparsity ratio——早期 chunk 保留更多 attention budget(低 sparsity),后期 chunk 渐进增加 sparsity。这样早期 chunk 建立高质量 prior,后期 chunk 继承这些 prior 而无需密集 attention。
-
Hierarchical Sparse Attention (HSA):采用 coarse-to-fine 两级 mask selection 策略,先在 frame 级别检索最相关的历史 keyframe,再在 block 级别从选中的 frame 中挑选关键 block。这种方式能以固定 attention 复杂度覆盖丰富的历史上下文,避免 sliding window 的 history-forgetting 问题。
两者协同工作:CAG 在 chunk 粒度决定总 sparsity budget,HSA 在 chunk 内部决定具体哪些历史 token 被关注。
3. Method (方法)
3.1 Preliminaries: AR Video Diffusion
AR 视频生成将 N 帧视频序列的联合分布分解为条件概率的乘积:
每个条件分布通过 few-step diffusion generator 近似,以 KV cache(即之前的 clean chunk)为条件。具体地,chunk 的生成从纯噪声开始,经过 步 denoising:
其中 是 denoised estimate(预测 ), 是 forward corruption(加噪)操作。
Blockwise Sparse Attention 的基本形式:将 按 block 切分,定义 block mask ,只在 的 tile 上计算 attention,跳过 的 tile。
3.2 Chunk-Aware Growth (CAG)
Figure 3 解读: 左半部分展示 CAG 策略——在 autoregressive generation 过程中,随着 chunk index 增加(1→2→3),sparsity ratio 逐渐增大(图中颜色从深到浅)。公式 控制分配,其中 反映 noise level。右半部分展示 HSA 的完整 pipeline:query 先做 Blockwise Pooling 得到 ,历史 KV 分别做 Blockwise Pooling 和 Framewise Pooling 得到压缩表示,然后通过 Frame Selection 和 Block Selection 两级筛选,生成最终的 Blockwise Attention Mask。
理论推导
Sparsity 引入的误差可以用生成分布 与 clean 分布 之间的 TV distance 来衡量:
- Term 1:finite-step sampling error,,noise level 越高( 越大)error 越小
- Term 2:score estimation error,反映模型不完美的近似误差
关键 insight: 早期 chunk noise level 高( 大),sampling error 本身就小,可以容忍更多 sparsity;但这些 chunk 为后续 chunk 提供 prior,所以反而需要低 sparsity 保证质量。
Sparsity 分配公式
对 chunk ,sparsity ratio 为:
其中:
- :base sparsity(预设常数)
- :chunk 到达的 noise level,
- :modulated sparsity factor,通过约束总 FLOPs 等于目标 sparsity 下的 FLOPs 来求解:
# Pseudocode: Chunk-Aware Growth sparsity allocation
def compute_chunk_sparsity(n_chunks, s_target, s_base, noise_levels, q_lens, k_lens):
"""
Args:
n_chunks: number of chunks
s_target: overall target sparsity ratio (e.g., 0.9)
s_base: base sparsity hyperparameter (e.g., 0.98)
noise_levels: alpha_i for each chunk (proportional to 1/sqrt(t))
q_lens: query sequence length for each chunk
k_lens: key sequence length for each chunk
Returns:
sparsity ratios for each chunk
"""
d = hidden_dim
# Solve for beta: enforce equal FLOPs
# (1 - s_target) * sum(l_q * l_k) = sum((1 - s_base + alpha_i * beta) * l_q * l_k)
numerator = (1 - s_target) * sum(q_lens[i] * k_lens[i] for i in range(n_chunks)) \
- sum((1 - s_base) * q_lens[i] * k_lens[i] for i in range(n_chunks))
denominator = sum(noise_levels[i] * q_lens[i] * k_lens[i] for i in range(n_chunks))
beta = numerator / denominator
# Compute per-chunk sparsity
sparsity = [s_base - noise_levels[i] * beta for i in range(n_chunks)]
# First chunk always uses dense attention
sparsity[0] = 0.0
return sparsity3.3 Hierarchical Sparse Attention (HSA)
HSA 在每个 chunk 的生成过程中,决定当前 query 应该关注哪些历史 token。分三步:Token Compression、Mask Selection、Blockwise Sparse Attention。
Step 1: Token Compression
对 query 和 KV 做 mean pooling 压缩:
- Blockwise pooling:将 和当前 chunk 的 按 block size / 聚合
- Framewise pooling:将历史 chunk 的 按 frame 级别( 个 block 一组)聚合
Step 2: Mask Selection (Coarse-to-Fine)
Frame Selection:计算每个 query block 与所有历史 frame 的相关性,选 top-k 个最相关的 frame:
其中 是当前 chunk 的所有 frame(始终保留)。
Block Selection:在选中的 frame 内,进一步选 top-k 个最相关的 block:
Step 3: Blockwise Sparse Attention
根据选中的 frame 和 block 构建 block-level mask ,然后执行 sparse attention:
Figure 4 解读: 四张 attention heatmap 分别展示了 Self Forcing 模型在 chunk 7(frame 18-20,每 frame 24 个 block)对所有历史 frame(frame 0-17)的 attention logits,来自不同 layer 和 head。
Figure 4 解读: 可以观察到:(1) attention 模式在不同 layer/head/timestep 间差异巨大——有的集中在对角线(时间邻近),有的呈现 attention sink 模式(集中在最早的 frame)。
Figure 4 解读: 还有一些则关注特定的中间 frame。
Figure 4 解读: (2) 这种多样性说明固定模式(如 sliding window)无法适应所有情况,需要动态的 mask selection,这正是 HSA 设计的出发点。
# Pseudocode: Hierarchical Sparse Attention
def hierarchical_sparse_attention(q_chunk, k_chunks, v_chunks,
chunk_idx, sparsity_ratio,
block_size_q, block_size_kv,
topk_frames=6):
"""
Args:
q_chunk: query for current chunk [f * n, d]
k_chunks: list of key tensors for all chunks [chunk_0, ..., chunk_i]
v_chunks: list of value tensors for all chunks
chunk_idx: current chunk index i
sparsity_ratio: s_i from CAG
block_size_q, block_size_kv: block sizes for query and key
topk_frames: number of historical frames to retrieve
"""
f = frames_per_chunk
n = tokens_per_frame
# --- Step 1: Token Compression ---
# Blockwise pooling for query
q_block = mean_pool(q_chunk, block_size_q) # [f * ceil(n/b_q), d]
# Blockwise pooling for current chunk KV
k_curr_block = mean_pool(k_chunks[chunk_idx], block_size_kv) # [f * ceil(n/b_kv), d]
# Framewise pooling for historical KV (coarser)
k_hist_block = mean_pool(concat(k_chunks[:chunk_idx]), block_size_kv)
k_hist_frame = mean_pool(k_hist_block, ceil(n / block_size_kv)) # [(i-1)*f, d]
# --- Step 2: Mask Selection ---
n_q_blocks = q_block.shape[0]
# Determine number of active blocks per query from sparsity_ratio
total_k_blocks = k_curr_block.shape[0] + k_hist_block.shape[0]
n_active = int((1 - sparsity_ratio) * total_k_blocks)
mask = zeros(n_q_blocks, total_k_blocks)
for r in range(n_q_blocks):
# Frame-level selection: score each historical frame
frame_scores = einsum(q_block[r], k_hist_frame) # [(i-1)*f]
selected_frames = topk_indices(frame_scores, topk_frames)
# Always include current chunk frames
selected_frames = union(selected_frames, current_chunk_frames)
# Block-level selection within selected frames
for frame_idx in selected_frames:
block_scores = einsum(q_block[r], k_hist_block[frame_idx])
selected_blocks = topk_indices(block_scores, k=n_active_per_frame)
mask[r, selected_blocks] = 1
# Current chunk: always fully visible
mask[r, current_chunk_block_indices] = 1
# --- Step 3: Blockwise Sparse Attention ---
output = sparse_attention(q_chunk, concat_kv, mask, block_size_q, block_size_kv)
return output3.4 CAG 与 HSA 的协同
两个组件在不同粒度上互补:
- CAG 在 macro level 为每个 chunk 分配 sparsity budget ,决定该 chunk 可以关注多少历史信息
- HSA 在 micro level 决定 budget 下具体选择哪些历史 frame 和 block
实现上,CAG 保持第一个 chunk 为 dense attention(因为序列较短且为后续 chunk 建立 prior),从第二个 chunk 开始应用渐进 sparsity。HSA 的两级 mask selection 开销很小(约 2% 端到端延迟增加),因为只需一次 frame retrieval step。
3.5 Training: Finetune
Light Forcing 需要在预训练权重上进行 2000 iterations 的 post-training finetune,使模型适应 sparse attention pattern。训练时直接应用 CAG + HSA 的 sparse mask。采用 LoRA(类似 LongLive)进行高效微调。
4. Experimental Setup (实验设置)
| 项目 | 设置 |
|---|---|
| Base Model | Self Forcing 1.3B, LongLive 1.3B |
| Chunk Size | 3 latent frames per chunk |
| Denoising Steps | 4 steps (few-step AR generation) |
| Resolution | 512 x 768 |
| Video Length | 5 seconds |
| Finetune | 2000 iterations, post-training on pre-trained weights |
| Block Size | 64 (all sparse attention methods) |
| Sparsity | Static methods ~80%, Dynamic methods ~90% |
| Hyperparameters | , |
| HSA topk frames | 6 |
| Evaluation | VBench (16 dimensions on 5-second videos) |
| Latency Benchmark | RTX 5090 GPU |
| Sparse Kernel | SpargeAttention (Zhang et al., 2025b) |
| Inference Backend | FlashInfer (Ye et al., 2025) |
Baselines:
- Static mask: STA (sliding tile), Radial Attention
- Dynamic mask: SVG2 (K-means clustering), VMoBA (mixture-of-block), SLA (sparse-linear)
- Dense: FlashAttention2
5. Experimental Results (实验结果)
5.1 Main Results (Table 1)
Figure 5 解读: 定性比较了各方法在 Self Forcing 上生成的 5 秒视频(prompt: “A cute raccoon playing guitar in a boat on the ocean”)。Dense Attention 和 Light Forcing 都生成了高保真、一致的视频。其他 baseline 出现明显退化:STA 和 VMoBA 产生了物体重复(两只浣熊),SLA 出现多余物体和颜色偏移,Radial 有严重伪影。Light Forcing 是唯一在保持加速的同时达到接近 dense attention 质量的方法。
Self Forcing 1.3B 上的关键指标:
| Method | Latency(s) | Speedup | Total Score |
|---|---|---|---|
| FlashAttention2 | 9.61 | 1.00x | 84.1 |
| STA | 8.27 | 1.16x | 83.6 |
| SLA | 7.71 | 1.25x | 83.2 |
| VMoBA | 7.42 | 1.29x | 83.6 |
| Light Forcing | 7.39 | 1.30x | 84.5 |
核心发现:
- Light Forcing 在 VBench Total Score 上超过了 dense attention(84.5 vs 84.1),同时实现 1.3x 加速
- 这表明 dense attention 中存在大量冗余,合理的 sparse 方案可以实现 “lossless” 甚至 “quality gain”
- 在 LongLive 1.3B 上同样优于所有 baseline(83.9 vs 83.2 best baseline),加速 1.19x
5.2 Ablation Study (Table 2)
| Method | Subject Consistency | Aesthetic Quality | Imaging Quality | Dynamic Degree | Total Score |
|---|---|---|---|---|---|
| Flash Attention | 95.3 | 67.4 | 70.0 | 63.1 | 84.1 |
| +1D Sparse (no finetune) | 86.9 | 51.4 | 66.0 | 52.8 | 73.0 |
| +Finetune | 94.9 | 65.1 | 69.8 | 46.4 | 82.8 |
| +CAG | 96.1 | 67.7 | 71.0 | 37.5 | 83.2 |
| +CAG & HSA | 96.2 | 67.2 | 71.0 | 66.7 | 84.5 |
- 直接应用 1D sparse attention(90% sparsity)导致质量崩溃(73.0)
- Finetune 恢复大部分质量但仍低于 dense(82.8 vs 84.1)
- 加入 CAG 提升 Aesthetic 和 Imaging Quality,但 Dynamic Degree 大幅下降(37.5)——说明 aggressive sparsity 导致模型过度依赖早期 chunk 的 prior,牺牲了运动丰富度
- 加入 HSA 后 Dynamic Degree 从 37.5 跃升至 66.7,超过 dense attention 的 63.1,总分达到 84.5
5.3 Efficient Deployment
Figure 6 解读: 在 RTX 5090 上生成 5 秒视频的端到端延迟分解。原始 Self Forcing 总延迟约 9556ms(VAE 3132 + Linear 3323 + Attention 3101)。逐步优化:(1) LightVAE 将 VAE 从 3132ms 降至 929ms;(2) FP8 量化将 Linear 从 3323ms 降至 2234ms;(3) Light Forcing 将 Attention 从 3101ms 降至 941ms。最终总延迟约 4104ms,实现 2.33x 端到端加速,达到 19.7 FPS,在消费级 GPU 上首次实现实时 AR 视频生成。
5.4 HSA Sensitivity (Table 3)
| Top-k frames | Quality Score | Semantic Score | Total Score |
|---|---|---|---|
| 6 | 85.4 | 80.9 | 84.5 |
| 9 | 85.2 | 80.8 | 84.4 |
| 12 | 85.1 | 80.9 | 84.3 |
方法对 top-k 参数不敏感,说明每个 query block 只需关注少量历史 frame 即可获得足够的上下文信息。
5.5 More Qualitative Examples
Figure 7 解读: 在 Self Forcing 上的更多定性比较,使用 “A person is clay pottery making” 和 “Turtle swimming in ocean” 两个 prompt。大多数 baseline 出现 (1) 细节丢失(手指变形)和 (2) 异常生成(双头海龟)等问题。Light Forcing 与 Dense Attention 质量相当,保持了手部细节和物体一致性。SLA 和 VMoBA 的退化尤为明显(红框标注了异常区域)。
5.6 Limitations
- 仅在 1.3B 模型上验证,尚未扩展到更大模型(如 14B realtime-video model)
- Sparse attention 基于 FlashAttention 2 kernel,可能需要针对更新 GPU 架构(如 Hopper)进行适配
- 与 step distillation / low-bit quantization 等其他加速方法的深度结合仍是 open question