Skip to content
module

Drifting Model

12 members
lucid.models.generative.drifting

Drifting Models — one-step generation by evolving the pushforward in training.

Deng, Li, Li, Du and He, arXiv:2602.04770, 2026. A generator is trained toward a frozen, drifted copy of its own samples: attracted by the data, repelled by the other samples, through an anti-symmetric field that vanishes exactly when the two distributions agree. Inference is one network evaluation, with guidance trained in rather than applied.

Image Generation
Paper

Deng, Mingyang, He Li, Tianhong Li, Yilun Du, and Kaiming He. "Generative Modeling via Drifting." arXiv preprint [arXiv:2602.04770](https://arxiv.org/abs/2602.04770), 2026.

Overview

A generator fθf_\theta maps noise to samples, x=fθ(ϵ)x = f_\theta(\epsilon), and induces the pushforward q=fθ# pϵq = f_{\theta\#}\,p_\epsilon. Training is a sequence of models, so it is also a sequence of pushforwards {qi}\{q_i\}; a Drifting Model governs that sequence directly with a drifting field Vp,qV_{p,q} that says how each sample should move:

xi+1=xi+Vp,qi(xi).x_{i+1} = x_i + V_{p,q_i}(x_i).

The field is chosen anti-symmetric, Vp,q=−Vq,pV_{p,q} = -V_{q,p}, which is all it takes for q=p⇒V=0q = p \Rightarrow V = 0: matched distributions are an equilibrium. The instantiation is mean-shift attraction toward the data and repulsion from the current samples,

Vp,q(x)=1ZpZq Ey+∼p,  y−∼q[k(x,y+) k(x,y−) (y+−y−)],k(x,y)=exp⁡ ⁣(−1τ∥x−y∥),V_{p,q}(x) = \frac{1}{Z_p Z_q}\, \mathbb{E}_{y^+\sim p,\; y^-\sim q} \bigl[k(x, y^+)\,k(x, y^-)\,(y^+ - y^-)\bigr], \qquad k(x, y) = \exp\!\Bigl(-\tfrac{1}{\tau}\lVert x - y\rVert\Bigr),

with the normalisers ZZ realised as a softmax over the yy samples (and, in practice, a second softmax over the batch of xx).

The fixed point fθ(ϵ)=fθ(ϵ)+V(fθ(ϵ))f_\theta(\epsilon) = f_\theta(\epsilon) + V(f_\theta(\epsilon)) becomes a regression onto a frozen target,

L=Eϵ∥fθ(ϵ)−sg(fθ(ϵ)+V(fθ(ϵ)))∥2,\mathcal{L} = \mathbb{E}_\epsilon\Bigl\lVert f_\theta(\epsilon) - \mathrm{sg}\bigl(f_\theta(\epsilon) + V(f_\theta(\epsilon))\bigr)\Bigr\rVert^2,

whose value is E∥V∥2\mathbb{E}\lVert V\rVert^2 but whose gradient never passes through VV — back-propagating through a distribution is what the stop-gradient avoids.

For images the loss is taken in the feature space of a frozen self-supervised encoder ϕ\phi (a ResNet-style MAE, plus ConvNeXt-V2 for pixels), one term per scale and location, each with its own distance and drift normalisation and summed over temperatures τ∈{0.02,0.05,0.2}\tau \in \{0.02, 0.05, 0.2\}. Guidance is a training-time behaviour: real samples of other classes join the negatives with a weight set by a sampled scale α\alpha, the generator is conditioned on α\alpha, and inference stays one evaluation.

Classes

Functions