HyperAIHyperAI

Command Palette

Search for a command to run...

자기 기울기 강제: 네이티브 장기 비디오 외삽

초록

최근 자기회귀 비디오 확산 모델은 점차 자기 강제(Self Forcing) 기반으로 구축되고 있으며, 이 방식에서는 학생 모델이 실제 비디오 맥락이 아닌 자체 롤아웃으로 생성된 이력을 사용하여 학습된다. 이는 노출 편향을 줄이지만, 과거 키-값 캐시는 미래 프레임에 의해 단지 고정된 롤아웃 상태로만 사용된다. 결과적으로, 미래 손실은 이전에 생성된 잠재 변수가 이후 비디오 잠재 변수 생성을 위해 어떻게 더 유용한 키와 값으로 기록되어야 하는지 감독할 수 없다. 우리는 이를 과거 맥락-기울기 간극이라고 부른다. 우리는 전체 직렬 롤아웃을 통한 역전파 없이 이 누락된 감독 신호를 복원하는 2-패스 학습 전략인 자기 기울기 강제(SGF)를 제안한다. 패스 1에서는 기울기 없이 자기회귀 롤아웃을 수행하여 추론과 일치시키고, 샘플링된 잡음 제거 종료 단계에서 자체 생성된 맥락과 모델에 공급된 잡음 잠재 변수를 모두 기록한다. 패스 2에서는 기록된 종료 단계에 대해 병렬 맥락-기울기 재구성을 수행한다. 생성된 맥락은 기울기 중단된 깨끗한 잠재 변수 입력으로 사용되며, 모델은 맥락 KV 표현과 미래-맥락 간 인과적 어텐션을 재계산한다. 따라서 SGF는 미래 비디오 잠재 변수에 대한 손실을 사용하여 맥락을 더 효과적인 인과적 메모리로 인코딩하도록 모델을 학습시킴으로써, 네이티브 자기회귀 학습 목표 내에서 누락된 메모리 쓰기 감독을 제공한다. 다양한 초기화 조건에서 수행된 광범위한 장기 프레임 단위 및 청크 단위 실험 전반에 걸쳐, SGF는 특히 피사체 정체성, 배경/레이아웃 일관성 및 시간적 안정성 측면에서 자기 강제보다 더 강력한 네이티브 장기 비디오 외삽을 달성한다. 주목할 만하게도, 단 5초의 학습 윈도우만을 사용하여 SGF는 몇 분 동안 지속되는 비디오로 외삽할 수 있다. 코드와 모델은 프로젝트 페이지 https://zhuang2002.github.io/SelfGradientForcing에서 공개될 예정이다.

One-sentence Summary

Researchers from Joy Future Academy, JD, introduce Self Gradient Forcing (SGF), a two-pass training strategy that closes the historical context-gradient gap in autoregressive video diffusion models by backpropagating future-frame losses to supervise context memory writing without full rollout gradients, yielding significantly improved long-video extrapolation to several minutes, subject identity consistency, background/layout consistency, and temporal stability from only 5-second training windows.

Key Contributions

  • The paper identifies a historical context-gradient gap in Self Forcing, where future losses cannot supervise how self-generated video latents are encoded into the key-value cache for later frames.
  • Self Gradient Forcing (SGF), a two-pass training strategy, decouples autoregressive rollout from parallel context-gradient reconstruction, allowing future losses to optimize the memory-writing of self-generated history without full rollout backpropagation.
  • Experiments across frame-wise and chunk-wise generation, multiple initializations, and long horizons show that SGF, trained on a 5-second window, extrapolates to minutes-long videos and improves identity, layout consistency, and temporal stability over Self Forcing.

Introduction

Autoregressive video diffusion models generate long videos by conditioning each new chunk on previously generated content, but the standard teacher-forcing training uses ground-truth contexts, creating an exposure bias when the model must condition on its own outputs at inference. Self Forcing closes this mismatch by training on self-generated histories, yet it truncates gradient flow through the historical KV cache: future losses can supervise how later chunks read the cache, but cannot propagate back to the clean-timestep computation that wrote the self-generated frames into KV memory. This historical context-gradient gap leaves memory writing unsupervised, causing identity, layout, and temporal consistency to gradually degrade during long extrapolation. The authors propose Self Gradient Forcing (SGF), a two-pass training strategy that records the no-gradient serial rollout and then reconstructs the same computation in parallel, allowing gradients to flow through the clean-history KV representations and future-to-context attention. SGF restores the missing memory-writing supervision without requiring full backpropagation through the rollout, and it substantially improves native long-video extrapolation while matching short-horizon quality.

Method

The authors address a critical limitation in autoregressive video diffusion known as the historical context-gradient gap. In standard autoregressive generation, latent blocks are produced sequentially. At block jjj, the causal generator denoises zjtz_j^tzjt by attending to a historical K/V cache rather than raw past latents. After a block i<ji < ji<j is generated, its predicted clean latent x~i\tilde{x}_ix~i is processed at the clean context timestep tctx=0t_{\mathrm{ctx}} = 0tctx=0, and the resulting K/V entries are appended to the cache. The cache-writing computation is recurrent:

KVi0(θ)=Cθ(x~i,tctx;KV<i0),tctx=0.\mathsf{KV}_i^0(\theta) = \mathcal{C}_\theta \big(\tilde{x}_i, t_{\mathrm{ctx}}; \mathsf{KV}_{<i}^0 \big), \qquad t_{\mathrm{ctx}} = 0.KVi0(θ)=Cθ(x~i,tctx;KV<i0),tctx=0.

In frozen-cache Self Forcing, these historical K/V entries are treated as detached rollout state. Consequently, future losses do not supervise the tctx=0t_{\mathrm{ctx}} = 0tctx=0 computation that produced them, creating a missing supervision path for how self-generated latents are encoded into K/V memory. While keeping the serial historical K/V cache fully differentiable would theoretically close this gap, it is impractical for long-horizon self-rollout because the backward graph grows with rollout length, causing severe memory bottlenecks.

To resolve this, the authors introduce Self Gradient Forcing (SGF), which restores the missing memory-writing supervision without opening a recurrent autograd graph through the full self-rollout. SGF can be understood through an equivalent two-pass view of Self Forcing.

In the first pass, the model performs an ordinary no-gradient self-rollout and records a sampled exit state. In the second pass, SGF reconstructs the corresponding causal computation in parallel. Unlike frozen-cache Self Forcing, which treats the reconstructed context K/V path as detached memory, SGF removes the stop-gradient boundary on this path. The context latents X~ctx\tilde{X}_{\mathrm{ctx}}X~ctx themselves remain stop-gradient inputs, ensuring the sampled rollout trajectory is not optimized. However, the model re-encodes these fixed self-generated latents at tctx=0t_{\mathrm{ctx}} = 0tctx=0, and the resulting K/V entries remain differentiable when future target tokens attend to them. This allows future Distribution Matching Distillation losses to supervise both target-side denoising and clean-context K/V writing:

θLDMD(X^tar)LDMDKVctxrecKVctxrecθ.\nabla_\theta \mathcal{L}_{\mathrm{DMD}} (\hat{X}_{\mathrm{tar}}) \supset \frac{\partial \mathcal{L}_{\mathrm{DMD}}}{\partial \mathsf{KV}_{\mathrm{ctx}}^{\mathrm{rec}}} \frac{\partial \mathsf{KV}_{\mathrm{ctx}}^{\mathrm{rec}}}{\partial \theta}.θLDMD(X^tar)KVctxrecLDMDθKVctxrec.

The Pass-2 reconstruction is designed to recover the sampled exit computation from Pass 1. With deterministic layers, matched positional indices, and the same causal reconstruction geometry, the reconstructed target X^tar\hat{X}_{\mathrm{tar}}X^tar is theoretically identical to the recorded predicted context latents. This two-pass design avoids the memory blow-up of a direct differentiable cache, as Pass 1 is serial but no-gradient, while Pass 2 is gradient-enabled but fixed-window and parallel.

For frame-wise streaming generation, the authors employ a sink-plus-FIFO context policy. They maintain a fixed sink prefix and a FIFO window of recent latents to isolate the effect of SGF rather than context selection. For the video VAE, specific sink latents are used to preserve the temporal boundary prefix induced by its asymmetric grouping pattern.

Experiment

The evaluation trains all models on a 5-second window and tests native extrapolation to 60s and 240s, comparing SGF against matched Self Forcing baselines under identical prompts, seeds, and inference geometry. SGF consistently improves long-horizon quality and consistency, reducing drift artifacts such as identity shifts and background changes, and is clearly preferred by human raters. The training overhead is modest, confirming that learning to reconstruct self-generated context with gradients yields more stable long-video memory without sacrificing short-horizon performance.

Across 60-second and 240-second frame-wise generation, SGF consistently improves quality and consistency metrics over matched Self Forcing baselines, with especially clear gains in aesthetic quality, background consistency, imaging quality, motion smoothness, and subject consistency. Dynamic degree is the main exception, where Self Forcing can obtain a higher score, but this is linked to incoherent motion artifacts such as scene jumps, broken camera geometry, and object deformation rather than better motion quality. SGF yields higher aesthetic quality, background consistency, imaging quality, motion smoothness, and subject consistency across all initializations and both horizon lengths. Self Forcing often achieves higher dynamic degree, but the increase is attributed to disruptive artifacts like identity drift, crop drift, and layout changes that inflate the metric without improving perceived motion quality.

For chunk-wise 60-second video generation, SGF consistently improves over Self Forcing on most quality and consistency metrics, including aesthetic quality, background consistency, and subject consistency. The only exception is dynamic degree, where Self Forcing scores higher, but qualitative analysis attributes this to incoherent motion artifacts rather than genuine motion quality. SGF yields higher aesthetic quality, background consistency, and subject consistency than Self Forcing under TF initialization, with subject consistency rising from 0.951 to 0.982. Self Forcing achieves a higher dynamic degree (0.909 vs 0.634 under TF initialization), but this advantage is driven by scene jumps, camera breakage, and object deformation that inflate apparent motion.

A blind preference study shows that raters consistently prefer SGF over Self Forcing for long-horizon video generation, with all GSB scores positive. The advantage is most pronounced under TF initialization, where frame-wise generation at 240 seconds reaches the highest preference. Longer horizons generally strengthen the preference for SGF, reflecting its improved temporal stability. All GSB scores are positive, indicating a consistent preference for SGF across every setting and horizon tested. TF initialization yields the strongest preference for SGF, especially in frame-wise generation at the longer horizon. Longer horizons (240 seconds) tend to increase the preference margin compared to 60-second generations. Chunk-wise generation shows slightly lower preference scores than frame-wise generation for the same initializations, but the preference remains clearly positive.

Training with context-gradient recovery via SGF is feasible, unlike directly differentiating through the KV cache, which runs out of memory. SGF incurs a modest increase in peak memory and a slight runtime overhead, while actually reducing the stable memory footprint. The two-pass design isolates gradient computation, preventing the recurrent memory explosion of a differentiable cache. Enabling gradients through the entire historical KV cache exhausts memory, while SGF completes training successfully. Relative to frozen-cache Self Forcing, SGF raises peak memory by roughly 10% but reduces stable memory by about 19%. Wall-clock time per five training steps increases by approximately 13%, a modest overhead. SGF confines gradient computation to a parallel Pass-2 reconstruction after a no-gradient Pass-1 rollout, avoiding the serial cache-formation graph that causes out-of-memory in direct differentiable-cache training.

The evaluation compares SGF against Self Forcing across frame-wise and chunk-wise video generation at short and long horizons, using both automated quality metrics and blind human preference. SGF consistently yields higher aesthetic quality, background consistency, and subject consistency, and is preferred by raters, with the advantage growing at longer horizons. The only metric where Self Forcing sometimes scores higher, dynamic degree, is driven by incoherent artifacts like scene jumps and object deformation rather than genuine motion quality, while SGF’s training approach enables gradient-based context recovery with modest memory and time overhead, avoiding the memory explosion of a fully differentiable cache.


AI로 AI 구축

아이디어에서 출시까지 — 무료 AI 코코딩, 즉시 사용 가능한 환경, 최적의 GPU 가격으로 AI 개발을 가속화하세요.

AI 협업 코딩
바로 사용 가능한 GPU
최적의 가격

HyperAI Newsletters

최신 정보 구독하기
한국 시간 매주 월요일 오전 9시 에 이번 주의 최신 업데이트를 메일로 발송합니다
이메일 서비스 제공: MailChimp