论文专题讲解:Self Forcing:对齐自回归视频训练与推理
- 论文:
Self Forcing: Bridging the Train-Test Gap in Autoregressive Video Diffusion - 方法:
Self Forcing - 链接:arXiv:2506.08009
- 版本:2025-06-09 首次提交,2025-11-10 更新到 v2
- 会议:NeurIPS 2025 Spotlight
- 项目页:Self Forcing
- 代码与模型:GitHub、Hugging Face
- 关键词:视频世界模型、autoregressive video diffusion、exposure bias、KV cache、DMD、SiD、GAN、实时流式生成
这篇论文的核心问题非常直接:自回归视频扩散模型训练时看的是 ground-truth 上下文,推理时却只能看自己生成的上下文。 这种 train-test mismatch 会导致 exposure bias,误差沿时间累积,视频越往后越容易过饱和、过锐化、闪烁或漂移。
Self Forcing 的答案是:训练时就执行和推理一样的自回归 rollout,用模型自己生成的历史帧作为上下文,再用视频级 distribution matching loss 对完整生成序列做监督。
论文位置
Self Forcing 和 Diffusion Forcing、CausVid、LingBot-World 在同一条路线附近,但解决层级不同。
| Method | Core idea | Main limitation it addresses |
|---|---|---|
| Teacher Forcing | train next frame/chunk using clean ground-truth context | inference uses generated context, so exposure bias remains |
| Diffusion Forcing | assign independent noise levels to different frames/chunks | covers noisy context, but training context still not true model rollout |
| CausVid | causal student distilled from bidirectional teacher with DMD | fast streaming generation, but DF-generated training outputs differ from inference outputs |
| Self Forcing | train with autoregressive self-rollout and video-level distribution matching | directly aligns training outputs with inference-time model distribution |
从世界模型角度看,这篇论文重要,是因为流式视频世界模拟器最终必须长期 rollout。一个只在固定短片段里好看的模型,不一定能在交互闭环里稳定;Self Forcing 把训练目标改成“模型要学会处理自己造成的历史误差”。

图源:Self Forcing,Figure 1。原图对比 Teacher Forcing、Diffusion Forcing 和 Self Forcing:前两者训练输出不来自推理时真实模型分布,Self Forcing 在训练中执行 autoregressive self-rollout,并对最终视频序列施加 distribution matching loss。
这张图比较的不是三种 loss 名字,而是训练时的上下文分布是否等于推理时的上下文分布。Teacher Forcing 训练时总是喂真实历史帧,模型从未见过自己生成的错误历史;Diffusion Forcing 会给上下文加不同噪声,增强鲁棒性,但上下文仍不是当前模型真实 rollout 出来的视频。
Self Forcing 的关键是训练时真的执行 autoregressive self-rollout:前一段视频由当前模型生成,后一段生成时就条件在这些自生成历史上。最后再对整段 rollout 视频施加 DMD / SiD / GAN 这类 distribution matching objective。这样训练信号直接作用在推理时会遇到的分布上,目标不只是“每一步像真实数据”,而是“模型在自己造成的历史误差下仍能继续生成稳定视频”。
核心问题
自回归视频扩散把视频分布拆成时间上的条件分布:
每个条件分布不是一次性输出 token,而是通过扩散或 flow matching 逐步去噪:
Teacher Forcing 训练的是:
但推理时实际使用的是:
这里 是真实历史, 是模型自己生成的历史。二者分布不同,训练时没有教模型如何纠正自己的错误,推理时错误就会滚雪球。
Diffusion Forcing 把上下文噪声水平随机化,确实比纯 clean ground-truth 更接近推理场景,但仍然没有真正从模型自己的 rollout 分布里取上下文。Self Forcing 的核心变化是把训练上下文改成:
这就是它名字里的 Self。
方法总览
Self Forcing 的训练流程可以压成一条链:
1 | initialize causal AR diffusion model from Wan2.1 / CausVid-style ODE init |

图源:Self Forcing,Figure 2。原图展示 TF/DF 需要在整段视频上用特殊 causal mask 并行训练,而 Self Forcing 训练过程直接模仿 AR inference,使用 KV cache,不需要特殊 attention mask。
TF/DF 看起来并行高效,但需要人为设计 attention mask,让模型“假装”在做因果生成;上下文仍主要来自数据或带噪数据。Self Forcing 反过来:训练时就真的逐步生成,并用 KV cache 复用历史,因此模型看到的是自己 rollout 造成的上下文分布。读这张图时重点看“训练时上下文从哪里来”,而不是只看是否用了 causal mask。
自回归 self-rollout
论文采用 few-step diffusion / flow matching,让每个 frame 或 chunk 只用 4 个 denoising steps。否则,如果每帧都要几十步扩散,还要反传整条 rollout,训练成本会不可接受。
论文实现里有两种自回归粒度:
| Variant | Generation unit | Strength | Weakness |
|---|---|---|---|
| Frame-wise AR | one frame/chunk at finer temporal granularity | lower first-frame latency, more responsive | more AR steps, more temporal consistency pressure |
| Chunk-wise AR | 3 latent frames per block | better quality and consistency | slightly higher latency |
chunk-wise 是主结果,frame-wise 用来说明 Self Forcing 在更长 AR chain 下也能稳住质量。
训练时,模型在第 个 frame/chunk 上执行几步去噪,并把生成结果写入 KV cache,下一步生成会读这个 cache。这个流程和推理一致,所以训练 loss 看到的是模型真实会产生的错误。
梯度截断
Self-rollout 的难点是内存。若对所有历史 frame/chunk 和所有 denoising steps 全量反传,代价会爆炸。论文采用 stochastic gradient truncation:
- 对每个训练序列随机采样一个 denoising step;
- 只对当前 frame/chunk 的最后相关 denoising step 开启梯度;
- 历史 frames/chunks 写入 KV cache 后 detach;
- 前面生成的上下文仍影响当前输出,但不承受跨整条序列的反传。
这种设计的取舍很清楚:它牺牲了一部分长程 credit assignment,但换来可训练性。论文也在局限里承认,梯度截断可能限制模型学习更长距离依赖。
视频级 distribution matching
Self Forcing 的 loss 不再是单纯 frame-wise denoising MSE,而是对完整生成视频分布做匹配:
论文实验支持三类 distribution matching objective:
| Objective | Matched divergence / signal | Notes |
|---|---|---|
| DMD | reverse KL via score difference | main result; data-free when using pretrained diffusion score networks |
| SiD | Fisher-divergence-style score identity distillation | also works, but training can be less stable |
| GAN | Jensen-Shannon via discriminator | uses generated real video dataset and R3GAN-style objective |
重点不是哪个 objective 单独最强,而是 Self Forcing 框架本身可以接不同的视频级分布匹配目标。论文 Table 2 显示 DMD、SiD、GAN 三者都比 TF/DF 基线更稳。
Rolling KV cache
Self Forcing 还提出 rolling KV cache,用于长视频外推。问题是:普通 sliding-window 视频扩散在窗口移动时,要重复计算重叠 frames 的 KV;已有 causal diffusion 实现也常常需要在新窗口重算 cache。
Self Forcing 的做法更像 StreamingLLM:
1 | keep fixed-size KV cache for recent frames/chunks |

图源:Self Forcing,Figure 3。原图对比 bidirectional sliding window、causal sliding window with KV recomputation 和 Self Forcing rolling KV cache。Self Forcing 不重算 KV,将长视频外推复杂度降到随长度线性增长。
长视频流式生成时,问题不只是模型能不能 causal,还包括历史上下文的计算能不能复用。bidirectional sliding window 每次处理一个窗口都需要看窗口内全部 token,不能自然复用过去计算;普通 causal sliding window 虽然不看未来,但如果每次移动窗口都重算历史 KV,长视频成本仍然很高。
Self Forcing 的 rolling KV cache 把过去 chunk 的 key/value 缓存下来,新 chunk 只计算自己的 KV,并读最近历史 cache。窗口满了就淘汰最旧 KV。这样每新增一段视频,计算量主要来自新段,而不是反复重算整段历史。对世界模型或交互视频来说,这个设计决定了它能不能长期 rollout,而不只是生成一个短 demo。
论文还发现一个细节:naive rolling KV 会有明显闪烁,因为模型训练时总能看到第一帧 image latent,而 rolling cache 长视频推理时第一帧会被淘汰。解决办法是在训练时限制 attention window,让模型在 denoise 最后一个 chunk 时看不到第一 chunk,从而模拟长视频推理条件。
训练细节
论文和官方代码给出的实现细节如下。
| Item | Detail |
|---|---|
| Base model | Wan2.1-T2V-1.3B |
| Model family | Flow Matching text-to-video model with causal 3D VAE latent space |
| Video setting | 5s videos, 16 FPS, 480P-level generation |
| Initialization | CausVid-style ODE initialization |
| ODE pairs | 16K ODE solution pairs sampled from the base model |
| Prompt source | filtered and LLM-extended VidProM / VidProS prompts |
| Prompt filtering | remove too-short prompts, command-line args, and high-NSFW prompts |
| Prompt expansion | Qwen/Qwen2.5-7B-Instruct with Wan2.1-style prompt extension |
| Diffusion steps | 4-step schedule |
| Denoising step list in code | [1000, 750, 500, 250] |
| Timestep shift | 5.0 |
| CFG / guidance scale | 3.0 |
| Chunk-wise AR | 3 latent frames per block |
| DMD training | about 600 iterations, under 2 hours on 64 H100 GPUs in released repo |
| Paper training budget | each DMD Self Forcing experiment converges in about 1.5 hours on 64 H100 GPUs |
| Repro note | repo suggests gradient accumulation can reproduce in under 16 hours on 8 H100 GPUs |
| Attention | Self Forcing uses FlashAttention-3; TF/DF baselines use FlexAttention |
| Mixed precision | enabled in released config |
| FSDP sharding | hybrid_full in released config |
| EMA | 0.99, starts at step 200 in released config |
| DMD total batch size | 64 |
| DMD learning rate | generator 2e-6, critic/fake score 4e-7 |
| SiD learning rate | generator 2e-6, critic 2e-6 |
| DMD / SiD update ratio | dfake_gen_update_ratio = 5 in released configs |
有两个细节特别值得注意:
- DMD/SiD 版本可以是 data-free post-training:不需要真实视频数据,只需要 prompts 和 pretrained score networks;
- GAN 版本需要真实或生成的视频数据,论文用 Wan2.1-14B 生成 70K videos 作为 GAN 训练数据,也用于 many-step TF/DF AR baseline 微调。
Table 3: Specification of training hyperparameters
下面根据论文 Table 3 与官方配置重绘,保留英文表头。部分 GAN 细节论文只在公式和文字中描述,开源 repo 当前主要提供 DMD / SiD 配置。
| Hyperparameters | DMD | SiD | GAN |
|---|---|---|---|
| Real score network | Wan2.1-T2V-14B | Wan2.1-T2V-1.3B | N/A |
| Real score CFG weight | 3.0 | 3.0 | N/A |
| Critic network initialization | Wan2.1-T2V-1.3B | Wan2.1-T2V-1.3B | Wan2.1-T2V-1.3B |
| Batch size | 64 | 64 | 768 |
| Generator optimizer | AdamW | Adam | AdamW |
| Critic optimizer | AdamW | Adam | AdamW |
| Generator LR | 2e-6 | 2e-6 | reported in paper appendix |
| Critic LR | 4e-7 | 2e-6 | reported in paper appendix |
| EMA decay | 0.99 | 0.99 | reported in paper appendix |
| Denoising steps | 4 | 4 | 4 |
| Distribution loss | DMD | SiD | R3GAN / relativistic GAN with R1 + R2 |
表源:Self Forcing: Bridging the Train-Test Gap in Autoregressive Video Diffusion,Table 3。原论文表格要点:该表汇总 DMD、SiD 和 GAN 三类 Self Forcing objective 的训练超参;DMD/SiD 使用 pretrained score networks 和 4-step generator,GAN 版本则使用 R3GAN-style 对抗目标与更大的 batch。
实验结果
Table 1: Comparison with relevant baselines
论文使用 VBench 和速度指标比较同规模模型。表格保留英文格式。
| Model | #Params | Resolution | Throughput (FPS) | Latency (s) | Total Score | Quality Score | Semantic Score |
|---|---|---|---|---|---|---|---|
| LTX-Video | 1.9B | 480P | 8.98 | 13.5 | 80.00 | 82.30 | 70.79 |
| Wan2.1 | 1.3B | 480P | 0.78 | 103 | 84.26 | 85.30 | 80.09 |
| SkyReels-V2 | 1.3B | 480P | 0.49 | 112 | 82.67 | 84.70 | 74.53 |
| MAGI-1 | 4.5B | 480P | 0.19 | 282 | 79.18 | 82.04 | 67.74 |
| CausVid | 1.3B | 480P | 17.0 | 0.69 | 81.20 | 84.05 | 69.80 |
| Self Forcing (Ours, chunk-wise) | 1.3B | 480P | 17.0 | 0.69 | 84.31 | 85.07 | 81.28 |
| NOVA | 0.6B | 480P | 0.88 | 4.1 | 80.12 | 80.39 | 79.05 |
| Pyramid Flow | 2B | 480P | 6.7 | 2.5 | 81.72 | 84.74 | 69.62 |
| Self Forcing (Ours, frame-wise) | 1.3B | 480P | 8.9 | 0.45 | 84.26 | 85.25 | 80.30 |
表源:Self Forcing: Bridging the Train-Test Gap in Autoregressive Video Diffusion,Table 1。原论文表格要点:该表比较同类视频生成模型的参数量、分辨率、吞吐、延迟和 VBench 分数;Self Forcing 在保持 Wan2.1 级别总分的同时,把延迟降到 0.69s chunk-wise 或 0.45s frame-wise。
这张表支撑三点:
- chunk-wise Self Forcing 和 CausVid 速度相同,但质量和语义分数明显更高;
- frame-wise Self Forcing 延迟最低,为 0.45s;
- 相对 Wan2.1,Self Forcing 基本保住 VBench 总分,同时把 latency 从 103s 降到 0.69s 或 0.45s。

图源:Self Forcing,Figure 5。原图对比 Wan2.1、SkyReels-V2、CausVid 和 Self Forcing 在多个时间点的生成结果,展示 CausVid 随时间出现过饱和,而 Self Forcing 更稳定。
这类视频结果不能只看第一帧或最漂亮的一帧,要沿时间检查颜色是否逐步过饱和、主体是否漂移、背景是否跳变、动作是否变慢。图中 CausVid 的问题更像长期 rollout 的统计漂移,而不是单帧能力不足;Self Forcing 的优势在于训练时已经让模型条件在自己生成的历史上,所以更能适应这种推理时分布。它和前面的 self-rollout 训练图是一组因果链:训练分布更接近推理分布,长时视觉漂移更轻。
Table 2: Ablation study
| Chunk-wise AR | Total Score | Quality Score | Semantic Score |
|---|---|---|---|
| Diffusion Forcing (DF), Many (502)-step models | 82.95 | 83.66 | 80.09 |
| Teacher Forcing (TF), Many (502)-step models | 83.58 | 84.34 | 80.52 |
| DF + DMD, Few (4)-step models | 82.76 | 83.49 | 79.85 |
| TF + DMD, Few (4)-step models | 82.32 | 82.73 | 80.67 |
| Self Forcing (Ours, DMD) | 84.31 | 85.07 | 81.28 |
| Self Forcing (Ours, SiD) | 84.07 | 85.52 | 78.24 |
| Self Forcing (Ours, GAN) | 83.88 | 85.06 | 79.16 |
| Frame-wise AR | Total Score | Quality Score | Semantic Score |
|---|---|---|---|
| Diffusion Forcing (DF), Many (502)-step models | 77.24 | 79.72 | 67.33 |
| Teacher Forcing (TF), Many (502)-step models | 80.34 | 81.34 | 76.34 |
| DF + DMD, Few (4)-step models | 80.56 | 81.02 | 78.71 |
| TF + DMD, Few (4)-step models | 78.12 | 79.62 | 72.11 |
| Self Forcing (Ours, DMD) | 84.26 | 85.25 | 80.30 |
| Self Forcing (Ours, SiD) | 83.54 | 84.71 | 78.86 |
| Self Forcing (Ours, GAN) | 83.27 | 84.57 | 78.08 |
表源:Self Forcing: Bridging the Train-Test Gap in Autoregressive Video Diffusion,Table 2。原论文表格要点:该表在 chunk-wise 和 frame-wise AR 两种设置下比较 TF、DF、DMD 后训练和 Self Forcing;frame-wise AR 链更长、误差累积更强,而 Self Forcing 仍保持最高或接近最高 VBench 分数,直接支撑 train-test distribution alignment 的主张。
这张表要分 chunk-wise 和 frame-wise 两部分读。chunk-wise 每次生成一个较大的 latent block,AR 链较短,误差累积压力较小;frame-wise 的生成粒度更细,链更长,更容易暴露 train-test mismatch。若一个方法只在 chunk-wise 好,在 frame-wise 掉很多,说明它可能仍然依赖较短 rollout 掩盖误差。
Self Forcing 在 frame-wise 下仍保持接近 84 的总分,而 TF/DF 和它们的 DMD 后训练版本掉得更明显。这直接支撑论文主张:训练时使用模型自己的 rollout 分布,比只在真实历史或 noisy context 上训练更能抗长期误差累积。这里的重点不是 Self Forcing 换了一个更强 backbone,而是同一类 AR 设置下训练分布对齐带来的差异。
这张消融最有价值。frame-wise AR 的链更长,更容易暴露误差累积。TF/DF 在 frame-wise 下掉得很明显,而 Self Forcing 仍保持 84 左右的总分,说明训练时 self-rollout 的分布对齐确实解决了关键问题。

图源:Self Forcing,Figure 6。原图左侧比较 DMD loss 下不同训练范式的单 iteration 时间,右侧比较相同 wall-clock budget 下 VBench score。Self Forcing 虽然顺序 rollout,但训练效率不差,且同等时间质量更高。
常见担心是 Self Forcing 训练时要顺序 rollout,会比 TF/DF 慢太多。左图看单次 iteration 成本,右图看同样 wall-clock budget 下的 VBench 分数;真正要比较的是“单位训练时间换来多少质量”,不是单步是否最并行。图里的结论是:Self Forcing 虽然牺牲了一部分并行形态,但因为训练分布更对齐推理分布,同等时间下质量收益更好。
和 CausVid 的关系
CausVid 和 Self Forcing 都从 Wan2.1-1.3B 出发,都追求 few-step causal video generation,也都使用 distribution matching。但它们的训练分布不同。
| Dimension | CausVid | Self Forcing |
|---|---|---|
| Training context | DF-style noisy / ground-truth-derived context | self-generated context from AR rollout |
| Loss target | distribution matching on DF-generated outputs | distribution matching on actual inference-time outputs |
| KV cache in training | mainly inference-side system mechanism | used during training self-rollout |
| Main failure addressed | bidirectional-to-causal distillation and speed | exposure bias and error accumulation |
| Reported speed | 17 FPS, 0.69s latency in comparable Wan-1.3B setting | 17 FPS, 0.69s chunk-wise; 8.9 FPS, 0.45s frame-wise |
论文对 CausVid 的批评非常明确:CausVid 的 DMD loss 匹配的是 DF 训练输出分布,而不是模型真实推理分布。Self Forcing 认为这会导致 loss 对错分布做优化。它的修正方式就是训练时真的跑 AR inference。
和 LingBot-World 的关系
LingBot-World 要把视频生成模型变成可交互世界模拟器;Self Forcing 则解决这条路线里的一个关键训练问题。
| Requirement for interactive world model | Self Forcing contribution |
|---|---|
| low latency | 0.45s / 0.69s first-frame latency on single H100 |
| streaming generation | causal AR generation with KV cache |
| long rollout | rolling KV cache avoids recomputing overlapping windows |
| train-test consistency | training uses self-generated context |
| robust sequence quality | holistic video-level distribution matching reduces error accumulation |
不过 Self Forcing 本身仍不是完整的动作条件世界模型。它主要解决“视频如何稳定、低延迟地自回归生成”,还没有解决动作、交互、物理约束和闭环评测。要变成 LingBot-World 一类系统,还需要接动作条件数据、用户输入、交互接口和长期记忆。
最值得复用的设计经验
1. 并行训练不一定总是正确目标
TF/DF 的优势是并行,但并行训练把模型放在一个不同于推理的分布里。Self Forcing 的观点是:基础预训练可以并行,关键 post-training 可以顺序化,以换取训练-推理一致性。
2. 少量 post-training 也能改变 rollout 行为
论文和 repo 都显示,DMD Self Forcing 只需要数百到数千级别的 post-training iteration,就能显著改善 AR rollout。这对已有视频模型工程很实用:不必从零训练一个新世界模拟器。
3. distribution matching 应该匹配真实生成分布
如果训练 loss 作用在 teacher-forced 或 diffusion-forced 输出上,而推理输出来自 self-rollout,那么优化目标和真实用户看到的视频不一致。Self Forcing 的核心原则是:loss 要施加在模型实际会生成的序列上。
4. KV cache 不是只属于推理
Self Forcing 把 KV cache 放进训练 loop,让训练过程也经历推理时的状态更新。这是它和常规“训练并行、推理缓存”的关键区别。
局限与风险
- 超过训练长度仍会退化:论文承认训练长度内误差累积明显缓解,但远超 5s 训练 horizon 后仍会质量下降。
- 梯度截断限制长程学习:为了可训练,历史 KV 被 detach,可能影响长距离 credit assignment。
- 不是动作条件模型:没有显式建模动作如何改变未来视频,不能直接作为交互世界模型。
- 真实数据依赖因 objective 而异:DMD/SiD 可以 data-free,但 GAN 版本需要视频数据。
- 实时性依赖硬件和优化:论文速度主要在单 H100 上报告,项目页也提到 4090 需要优化才能接近实时。
- 生成风险更高:低延迟视频生成降低了滥用门槛,论文也提醒 deepfake、虚假信息和偏见风险。
读完应该记住什么
Self Forcing 的关键贡献不是单纯把采样步数压到 4 步,而是把训练目标放回真实推理过程:
1 | autoregressive inference uses self-generated history |
对视频世界模型来说,这个思想很重要:如果未来的模拟器要在闭环里长期运行,就不能只在 ground-truth 上下文上训练。模型必须学会在自己的错误历史上继续生成,并把错误控制在不会快速崩坏的范围内。
参考资料
- Huang et al. Self Forcing: Bridging the Train-Test Gap in Autoregressive Video Diffusion. arXiv:2506.08009.
- 官方项目页:Self Forcing.
- 官方代码:guandeh17/Self-Forcing.
- 论文 HTML 版本:ar5iv:2506.08009v2.
- Title: 论文专题讲解:Self Forcing:对齐自回归视频训练与推理
- Author: Charles
- Created at : 2025-12-25 09:00:00
- Updated at : 2025-12-25 09:00:00
- Link: https://charles2530.github.io/2025/12/25/ai-files-paper-deep-dives-world-models-self-forcing/
- License: This work is licensed under CC BY-NC-SA 4.0.