dKV Forcing: Separating Generation and Memory Representations through a Differentiable KV Cache
Abstract
A causal video generator writes every segment it produces into a key--value (KV) cache, and later segments know the past only through it.
Self-rollout training stops the gradient at this cache, and Self Gradient Forcing (SGF) restores it, but applies it to the same weights that generate the current segment.
We find that writing and generating are different roles: in a pretrained generator the written KV already differs from the KV used for denoising, and on shared weights the gradient from future reads is negatively aligned with the gradient of generation.
We propose dKV Forcing (dKV denotes differentiable KV), which gives the write its own parameters, a low-rank residual used only when a segment enters the cache, and trains them with the gradient of the later segments that read what they wrote.
Opening this gradient through the cache in common use exhausts GPU memory.
We trace this to checkpoint replay re-writing the cache, not to the gradient path, which removes the need for the second reconstruction pass of SGF. dKV Forcing keeps the cache as persistent differentiable pages and computes the exact gradient in one temporal traversal, with an $11\%$ lower memory peak and $28\%$ less resident memory.
With pages that store hidden states, it trains 15\,s clips on which the two-pass reconstruction runs out of memory.
Trained on 5\,s clips, dKV Forcing reaches the highest VBench-Long quality score at 60\,s and 240\,s and outperforms SGF by $3.6$ and $6.1$ points of aesthetic quality, with a higher dynamic degree.