TL;DR
Standard inference-time scaling for image generation wastes significant computation by decoding latent representations into pixels, only to re-encode them for a Multimodal Large Language Model (MLLM) verifier. This paper introduces Verifier on Hidden States (VHS), which eliminates this bottleneck by verifying images directly from the intermediate hidden states of a Diffusion Transformer (DiT). This approach slashes joint generation-and-verification time by 63.3% and compute FLOPs by 51%, while actually improving text-to-image alignment performance under tight time budgets.
What Problem Does This Paper Address?
Inference-time scaling (or "Best-of-N" sampling) has become a popular strategy to improve generative models. Instead of relying on a single output, the system generates multiple candidate images and uses a verifier—typically an MLLM—to score and select the one that best matches the prompt.
While effective, this process introduces a massive computational bottleneck. Visual generative models like Diffusion Transformers (DiTs) operate in a compressed latent space. To score a candidate, the system must decode the latent representation into pixel space (an image) and then pass it to the MLLM's visual encoder (like CLIP) to re-encode it into a visual embedding space.
This decode-encode loop is highly redundant and costly. The overhead is especially painful for modern single-step generators, where the time spent decoding and verifying can completely overshadow the time spent generating the image in the first place.
Methods
The authors propose Verifier on Hidden States (VHS), a latent verifier designed to bypass the pixel-space bottleneck entirely.
Instead of waiting for the generator to finish and decode the image, VHS extracts intermediate hidden representations ($h_{\ell^*}$) directly from an intermediate layer of the DiT backbone. It then feeds these hidden states through a lightweight projection layer (connector) straight into a compact Large Language Model (Qwen2.5-0.5B). This allows the system to truncate the generator, skipping the remaining DiT layers, the autoencoder decoder, and the external vision encoder.
VHS is trained using a two-stage procedure:
- Alignment Stage: Aligns the generator's internal hidden features with the LLM's embedding space. The authors generate synthetic images from text captions, use Gemma-3-4B to re-caption the resulting images (to account for generator hallucinations), and train the connector to map the hidden states to the text tokens.
- Verifier Fine-tuning: Adapts the model to output a binary "Yes/No" alignment score. To combat severe class imbalance (where the generator produces far more "correct" images than "incorrect" ones), the authors employ a weighted cross-entropy or focal loss.
Datasets
- Training/Alignment: The alignment stage utilizes the image-caption pairs from the first stage of the LLaVA training dataset, adapted by generating synthetic images and re-captioning them with Gemma-3-4B. The verifier fine-tuning stage uses prompts from the Reflect-DiT training dataset to generate 118k candidate samples.
- Evaluation: The model is evaluated on the GenEval benchmark, which measures text-to-image alignment across six distinct categories: Single Object, Two Objects, Counting, Colors, Position, and Attribute Binding.
Key Insights and Ideas
- The Latent Space is Already Semantic: The core "aha" moment is realizing that a generator's internal representations already contain the rich semantic information required for verification. Forcing them into pixels and back into embeddings is an unnecessary detour.
- The "Goldilocks" Layer: Not all DiT layers are suitable for verification. Shallow layers are too noisy because they are close to the initial random noise input. The final layers are dominated by low-level perceptual reconstruction details (similar to autoencoder latents). Intermediate layers (specifically layer 7 out of 20 in their SANA-Sprint setup) provide the optimal balance of mature semantic signal and computational savings.
- Trading Latency for Exploration: By dramatically reducing the cost of verifying a single candidate, VHS allows the system to score a much larger pool of candidates within the same wall-clock time budget. For example, in a 550ms window, a standard verifier can only check 2 candidates (Best-of-2), while VHS can check 4 (Best-of-4).
Key Results
The authors paired VHS with the single-step generator SANA-Sprint and evaluated it against standard MLLM verifiers on an NVIDIA A100 GPU:
- Efficiency Gains: Compared to a standard MLLM w/ CLIP verifier, VHS reduces joint generation-and-verification time by 63.3%, compute FLOPs by 62.9%, and peak VRAM usage by 14.5%.
- GenEval Performance: Under strict wall-clock time constraints, VHS consistently outperforms the standard baseline because it can evaluate more candidates:
- At a 550ms budget: VHS achieves an overall score of 78.1% (Best-of-4) vs. the baseline's 75.4% (Best-of-2).
- At an 1100ms budget: VHS scores 80.5% (Best-of-9) vs. the baseline's 78.8% (Best-of-4).
- Generalization: The authors successfully applied VHS to a completely different single-step generator, PixArt-α-DMD, demonstrating a 48% speedup and superior accuracy in Best-of-3 and Best-of-4 settings.
Limitations and Future Work
While VHS delivers impressive gains for tight, real-world inference budgets, the authors note that its performance advantage narrows as the computational budget grows very large (e.g., at a 1650ms budget, the gain over the baseline drops to +0.5%).
Additionally, finding the optimal intermediate layer to extract hidden states remains an empirical process that must be repeated for different generator backbones. Future work could explore automated methods for layer selection or techniques to dynamically adjust the truncation depth based on prompt complexity.
Summary updated