Training-free token uncertainty fixes SD3 images, Wan videos, and diversifies FLUX outputs

Probabilistic Transformers for Generative Models

Hyunsoo Lee, Jihwan Kim, Sanghyeok Chu, Jin Young Choi, Sungsu Hur, Bohyung Han

cs.CV

2026-12-03

ProbFormer propagates Gaussian token variance through frozen Transformers and uses it to refine images/videos and diversify outputs, beating SOTA baselines on all three tasks.

What problem this solves

Transformers evolve token features layer by layer, and for a given input the trajectory is always the same. The model never states which parts of its own output it is unsure about. Bayesian neural networks put distributions on weights, but that road requires posterior inference and typically retraining, a non-starter for pretrained systems like SD3, FLUX, or Wan. In visual generation the gap is concrete: the model predicts a denoising direction, yet nothing indicates where that prediction is unstable or where several plausible outcomes coexist. Artifact fixing and prompt-level diversification have therefore leaned on heuristics or task-specific training.

Method

The core move turns each token from a point into a distribution, then carries the variance through the layers while leaving every pretrained parameter untouched.

Two applications follow. Refinement scores each token by the root-mean-square of its variance, selects the top-ρ tokens as a mask, and swaps in a freshly sampled clean estimate only inside the mask, redrawing just the regions the model is shaky about. Diversification samples tokens at some layer d from a Gaussian centered on the current feature with variance α²u, then lets the remaining layers run a standard forward pass; different draws give different plausible images.

Results

Image refinement (OAO-AttackBench, SD3 Medium, 1024×1024):

MethodVQAScore↑TIFA↑
Base (SD3)0.6500.604
IR-Guidance0.6540.601
Jazbec et al.0.6600.625
ProbFormer0.6650.629

Video refinement (Dynamic-bench, Wan2.2-T2V-A14B, 832×480, 81 frames):

MethodVQAScore↑Physical Commonsense↑MJ-Video↑
Base (Wan)0.7253.5920.718
P&P0.7343.5830.754
ProbFormer0.7443.6330.755

Image diversification (GenEval, FLUX.1-dev, eight 512×512 images per prompt):

MethodDINO↑Vendi↑MUSIQ↑
Base (FLUX)0.5772.81774.236
Group Inference0.6933.47874.047
DAVE0.6443.36375.268
ProbFormer0.7023.87175.811

Diversification shows the largest gain: Vendi jumps from 3.591 (Bhat et al., the strongest baseline) to 3.871. Refinement gains are modest. On WHOOPS!, CHAIR-I hallucination drops from 0.195 to 0.165 and recall rises from 0.846 to 0.869, but VQAScore slips from 0.799 to 0.793, and no refinement method beats the base model on that metric. For fairness, the uncertainty maps of Jazbec et al. were plugged into the same update rule, so that comparison tests the signal itself; ProbFormer still wins. On localization quality, SD3 text-rendering errors (malformed characters, wrong words) align with high-uncertainty regions, while BayesDiff and Jazbec et al. tend to light up entire text areas along with surrounding structure. The ablation replaces the initialization with a constant, drops propagation and scores at the boundary layer only, or estimates variance from the outputs of the K candidates; all three variants lose on every metric, and the last one shows analytic layerwise propagation beats brute-force candidate variance.

Why it matters

For anyone building on diffusion Transformers, this is a rare training-free upgrade: attach it to a frozen backbone and get a per-token uncertainty map that drives refinement, video correction, and diversification from one signal. Code is public. To be honest about magnitude, image-refinement gains sit in the 0.01 range and read as incremental; diversification carries the headline numbers. The larger value is the framing: Transformer computation viewed as the evolution of token distributions rather than point trajectories, a recipe that could in principle transfer beyond generative models.

Limitations

The paper has no dedicated limitations section, so part of this is reading between the lines. The first-order Taylor assumption breaks under strong nonlinearity, and the diagonal covariance closure discards cross-token correlations. Initialization runs K candidates through the first b blocks, and the added inference cost is never quantified. There are many hyperparameters (b, d, ρ, α, K) and no sensitivity analysis in the main text. The VQAScore dip on WHOOPS! suggests refinement gains depend on the metric. All experiments are on visual generative Transformers; LLMs remain untested.

Terms

Source

Related papers

All paper explainers