Summary (Overview)

  • Identifies the historical context-gradient gap in frozen-cache Self Forcing: future losses supervise how noisy tokens read cached history, but cannot propagate into the clean-timestep computation that writes self-generated latents into K/V memory. This missing credit-assignment path causes identity drift, scene breaks, and layout inconsistency during long extrapolation.
  • Proposes Self Gradient Forcing (SGF), a two-pass training strategy that restores the missing memory-writing supervision without full rollout backpropagation. Pass 1 performs a no-gradient serial autoregressive rollout and records the self-generated context and noisy latents at a sampled denoising exit step. Pass 2 discards the rollout cache and performs a bounded parallel reconstruction where the recorded context is reprocessed (stop-gradient) and gradients flow through the clean-context K/V formation and future-to-context causal attention.
  • Achieves substantially improved long-video extrapolation (60s and 240s) across frame-wise and chunk-wise generation under multiple initializations (TF, causal CD, causal ODE), with consistent gains in subject consistency, background consistency, aesthetic quality, motion smoothness, and flickering. At 5s, SGF matches Self Forcing quality.
  • Demonstrates training feasibility with only modest overhead (peak memory 87.01GB vs 79.01GB, runtime 11.71s vs 10.39s per 5 steps) compared to frozen-cache Self Forcing, while direct differentiable-cache training runs out of memory (OOM).
  • Validates with human preference study: GSB scores are all positive (up to 48.7%) across 1,900+ paired judgments, indicating consistent preference for SGF over Self Forcing in long-horizon generation.

Introduction and Theoretical Foundation

Background

Long-form autoregressive video generation requires scenes, objects, and dynamics to remain coherent far beyond the training window. In autoregressive video diffusion, each new frame or chunk is conditioned on the prompt and previously generated content. However, Teacher-Forcing (TF) training conditions on ground-truth video contexts, while inference conditions on self-generated histories, creating exposure bias.

Self Forcing (Huang et al., 2025) mitigates this mismatch by training the student on histories produced by its own autoregressive rollout, using distribution-matching distillation (DMD) supervision from a bidirectional video model. This self-rollout recipe has become a common training paradigm. However, to make self-rollout training feasible, these methods typically truncate cross-chunk gradient flow through the historical KV cache.

The Historical Context-Gradient Gap

During rollout, generated latents are processed by the causal DiT at the clean context timestep tctx=0t_{\text{ctx}} = 0 and stored as a causal KV cache. Later chunks read this cache as frozen historical context. Future losses can train noisy denoising tokens to read cached history, but cannot propagate into the clean-timestep computation that wrote the historical K/V entries. The authors call this missing credit-assignment path the historical context-gradient gap.

Formally, let CθC_\theta denote the cache-writing computation at tctx=0t_{\text{ctx}} = 0. In serial rollout:

KVi0(θ)=Cθ(x~i,tctx;KV<i0),tctx=0\text{KV}_i^0(\theta) = C_\theta\left(\tilde{x}_i, t_{\text{ctx}}; \text{KV}_{<i}^0\right), \quad t_{\text{ctx}} = 0

where x~i\tilde{x}_i is the predicted clean latent for block ii. The new entry KVi0\text{KV}_i^0 becomes part of the state used by later blocks. If future losses could differentiate through this historical entry, they would assign credit to the clean-context computation that encoded x~i\tilde{x}_i into K/V memory.

Frozen-cache Self Forcing removes this signal. The historical K/V entries are treated as detached rollout state. Consequently, future losses do not supervise the tctx=0t_{\text{ctx}} = 0 computation that produced those entries. This becomes problematic because the same DiT parameters are shared across noisy denoising and clean-context cache writing. DMD losses at noisy timesteps update the shared parameters:

θr+1=θrηθLSF(θr),KVi0(θr+1)≢KVi0(θr) in general\theta^{r+1} = \theta^r - \eta \nabla_\theta \mathcal{L}_{\text{SF}}(\theta^r), \quad \text{KV}_i^0(\theta^{r+1}) \not\equiv \text{KV}_i^0(\theta^r) \text{ in general}

Thus, training can change the clean-context cache writer, but frozen-cache Self Forcing provides no future-loss correction for how self-generated latents are encoded into K/V memory.

Direct Differentiable Cache (Impractical)

A direct solution would keep the historical KV cache differentiable, allowing future losses to backpropagate into the clean-timestep K/V writing computation. However, this requires retaining the autograd graph for every historical cache write until all later blocks that consume it have been processed. The graph grows with rollout length, transformer depth, and sequential cache updates, making direct differentiable-cache training impractical for long-horizon self-rollout.

Methodology

Self Gradient Forcing (SGF)

SGF is a two-pass training strategy that turns the serial graph-retention problem into a bounded parallel recomputation problem.

Pass 1: No-Gradient Self-Rollout

The first pass is the ordinary serial autoregressive rollout used at inference. For each block ii, the model denoises with the current historical cache and records a sampled exit state: the noisy input zitz^{t_\star}_i and the predicted clean latent x~i\tilde{x}_i. The latent x~i\tilde{x}_i is then processed at tctx=0t_{\text{ctx}} = 0 to update the serial K/V cache for later blocks. All computations are run without gradient tracking, and the recorded states are treated as fixed data for Pass 2.

Pass 2: Parallel Context-Gradient Reconstruction

SGF keeps Pass 1 and the reconstruction geometry unchanged but removes the stop-gradient boundary on the reconstructed context K/V path. The context latents X~ctx\tilde{X}_{\text{ctx}} themselves remain stop-gradient inputs, so SGF does not optimize the sampled rollout trajectory. Instead, the model re-encodes these fixed self-generated latents at tctx=0t_{\text{ctx}} = 0, and the resulting K/V entries remain differentiable when future target tokens attend to them.

The reconstruction is:

X^tar=Gθ(Z,t;X~ctx,tctx,Mrec)\hat{X}_{\text{tar}} = G_\theta\left(Z^\star, t^\star; \tilde{X}_{\text{ctx}}, t_{\text{ctx}}, M_{\text{rec}}\right)

where MrecM_{\text{rec}} is the causal reconstruction mask that reproduces the sink-plus-window attention relation induced by the serial cache.

The gradient flow is:

θLDMD(X^tar)LDMDKVrecctxKVrecctxθ\nabla_\theta \mathcal{L}_{\text{DMD}}(\hat{X}_{\text{tar}}) \supset \frac{\partial \mathcal{L}_{\text{DMD}}}{\partial \text{KV}_{\text{rec}}^{\text{ctx}}} \frac{\partial \text{KV}_{\text{rec}}^{\text{ctx}}}{\partial \theta}

Therefore, future DMD losses supervise both target-side denoising and clean-context K/V writing.

Algorithm

The full SGF training step is summarized in Algorithm 1 (see paper). Key steps:

  1. Sample exit index sUniform{1,,K}s \sim \text{Uniform}\{1,\dots,K\} and set ttst^\star \leftarrow t_s.
  2. Pass 1: Disable gradients. For each block ii from 1 to NN, denoise from t1t_1 to tst_s using current cache, record zitz^{t_\star}_i and x~i\tilde{x}_i, then update cache with Cθ(x~i,tctx;KV)C_\theta(\tilde{x}_i, t_{\text{ctx}}; \text{KV}).
  3. Pass 2: Enable gradients. Set Xrecsg(Xctx)X_{\text{rec}} \leftarrow \text{sg}(X_{\text{ctx}}). Compute X^tarGθ(Z,t;Xrec,tctx,Mrec)\hat{X}_{\text{tar}} \leftarrow G_\theta(Z^\star, t^\star; X_{\text{rec}}, t_{\text{ctx}}, M_{\text{rec}}). Update θ\theta with LDMD(X^tar)\mathcal{L}_{\text{DMD}}(\hat{X}_{\text{tar}}), keeping context-K/V gradients.

Gradient Boundary

SGF is a bounded reconstruction of the sampled exit computation, not full rollout BPTT. The recorded context latents, noise samples, scheduler states, and Pass-1 serial cache trajectory are all stop-gradient. Gradients flow only through the Pass-2 reconstruction: the clean-context forward, K/V projections, future-to-context attention, and target-side denoising computation.

Streaming Context Policy

For frame-wise streaming generation, both Self Forcing and SGF use the same sink-plus-FIFO context policy. The authors use a fixed sink prefix and a FIFO window of recent latents. For the Wan video VAE, four sink latents are used to preserve the temporal boundary prefix induced by its asymmetric grouping pattern (1-frame boundary group followed by 4-frame groups).

Empirical Validation / Results

Experimental Setup

  • Training window: 5 seconds for all models.
  • Evaluation: 5s (VBench), 60s (VBench-Long prompts), 240s (128 MovieGen prompts).
  • Matched pairs: SGF vs Self Forcing share the same initialization, prompt set, random seed, sink/FIFO policy, sliding window, chunking strategy, and sampling configuration.
  • Frame-wise: sink 4, total window 21, FIFO 16, current chunk 1.
  • Chunk-wise: sink 3, total window 12, FIFO 6, current chunk 3, chunk size 3.

Long Video Generation (60s and 240s)

Frame-wise Results (Table 1)

HorizonMetric ↑Causal ODE initCausal CD initTF init
SFSGFSFSGFSFSGF
60sAesthetics0.5430.6060.6080.6300.6500.653
Background0.9470.9660.9690.9730.9700.974
Dynamics0.8670.5660.4890.2670.6470.730
Imaging0.6570.7150.6840.7080.7040.714
Motion0.9750.9860.9840.9880.9850.982
Subject0.9280.9710.9740.9830.9760.983
Flickering0.9710.9870.9920.9920.9880.991
240sAesthetics0.5100.5430.5330.5840.6140.619
Background0.9430.9660.9640.9710.9650.968
Dynamics0.8400.5560.5990.3850.6690.648
Imaging0.6480.6980.6320.6900.7010.718
Motion0.9710.9850.9810.9860.9800.982
Subject0.9360.9690.9670.9760.9650.972
Flickering0.9370.9720.9710.9770.9670.968

SGF improves over Self Forcing on most quality and consistency metrics across both horizons. Dynamic degree is the main exception (Self Forcing can be higher), but this is because Self Forcing rollouts often contain scene jumps, broken camera geometry, and object deformation that create incoherent apparent motion.

Chunk-wise Results (Table 2)

Similar pattern: SGF improves aesthetics, background, imaging, motion, subject, and flickering over matched Self Forcing baselines under causal CD and TF initializations.

User Study (Table 3)

Blind GSB preference study with >1,900 paired judgments:

SettingHorizonCausal ODE initCausal CD initTF init
Frame-wise60s29.6%36.8%45.1%
Frame-wise240s38.6%35.9%48.7%
Chunk-wise60s32.9%37.5%
Chunk-wise240s34.3%44.9%

All scores are positive, indicating consistent preference for SGF over Self Forcing.

Training Feasibility (Table 4)

Training variantPeak memoryStable memoryTime / 5 stepsOutcome
Self Forcing, frozen KV cache79.01 GB79.01 GB10.39 strains
SGF, serial Pass 1 + parallel Pass 287.01 GB63.73 GB11.71 strains
Self Forcing, differentiable KV cacheOOMOOMOOM

SGF adds modest overhead (10% peak memory, 13% runtime) while direct differentiable-cache runs out of memory.

Two-Pass Recovery Fidelity (Table 7)

Pass 2 closely reproduces Pass-1 exit predictions across denoising steps:

Exit stepRel. L2Rel. L2 / ϵbf16\epsilon_{\text{bf16}}Cosine
10000.021332.730.999766
7500.015662.000.999874
5000.011251.440.999936
2500.008121.040.999967
Overall0.014091.800.999886

Overall relative 2\ell_2 error is 1.41%, and cosine similarity is 0.999886, consistent with accumulated bf16 roundoff rather than substantive mismatch.

Sink Ablation (Table 8)

For frame-wise SGF with TF initialization at 60s:

MetricSink 1Sink 2Sink 4Sink 8
Aesthetics0.6270.6450.6530.655
Background0.9700.9740.9740.976
Dynamics0.7430.7330.7300.728
Imaging0.7150.7130.7140.714
Motion0.9820.9820.9820.983
Subject0.9830.9820.9830.983
Flickering0.9900.9900.9910.992

Sink 4 reaches the stable range suggested by the VAE boundary diagnostic; sink 1 is weaker on aesthetics and flickering.

Theoretical and Practical Implications

  • Theoretical contribution: Identifies and formalizes the historical context-gradient gap

Related papers