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.
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.
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.
Image refinement (OAO-AttackBench, SD3 Medium, 1024×1024):
| Method | VQAScore↑ | TIFA↑ |
| Base (SD3) | 0.650 | 0.604 |
| IR-Guidance | 0.654 | 0.601 |
| Jazbec et al. | 0.660 | 0.625 |
| ProbFormer | 0.665 | 0.629 |
Video refinement (Dynamic-bench, Wan2.2-T2V-A14B, 832×480, 81 frames):
| Method | VQAScore↑ | Physical Commonsense↑ | MJ-Video↑ |
| Base (Wan) | 0.725 | 3.592 | 0.718 |
| P&P | 0.734 | 3.583 | 0.754 |
| ProbFormer | 0.744 | 3.633 | 0.755 |
Image diversification (GenEval, FLUX.1-dev, eight 512×512 images per prompt):
| Method | DINO↑ | Vendi↑ | MUSIQ↑ |
| Base (FLUX) | 0.577 | 2.817 | 74.236 |
| Group Inference | 0.693 | 3.478 | 74.047 |
| DAVE | 0.644 | 3.363 | 75.268 |
| ProbFormer | 0.702 | 3.871 | 75.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.
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.
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.