Test-Time Conditioning with Representation-Aligned Visual Features
Nicolas Sereyjol-Garros, Ellington Kirby, Victor Letzelter, Victor Besnier, Nermin Samet
TL;DR
This work presents REPA-G, a training-free, test-time conditioning framework for diffusion models that leverages representation-aligned visual features from a frozen backbone to steer sampling toward targeted semantic concepts. Conditioning is implemented via a potential $\mathscr{V}$ and its gradient, producing a tilted distribution $\tilde{p}_{0}(x; x_c) \propto p_{0}(x) e^{\lambda \mathscr{V}(\phi(x), \phi(x_c))}$ and enabling multi-scale and multi-source composition without retraining. The authors analyze the representation space, showing semantic structuring and a well-conditioned mapping from features to densities, and demonstrate strong results on ImageNet and COCO across various IPA/SPA configurations. The approach yields controllable, diverse generations with faithful concept adherence, highlighting practical impact for flexible, perceptually precise image synthesis without textual or label-based constraints. The work also provides extensive experimental evidence and releases code for reproducibility.
Abstract
While representation alignment with self-supervised models has been shown to improve diffusion model training, its potential for enhancing inference-time conditioning remains largely unexplored. We introduce Representation-Aligned Guidance (REPA-G), a framework that leverages these aligned representations, with rich semantic properties, to enable test-time conditioning from features in generation. By optimizing a similarity objective (the potential) at inference, we steer the denoising process toward a conditioned representation extracted from a pre-trained feature extractor. Our method provides versatile control at multiple scales, ranging from fine-grained texture matching via single patches to broad semantic guidance using global image feature tokens. We further extend this to multi-concept composition, allowing for the faithful combination of distinct concepts. REPA-G operates entirely at inference time, offering a flexible and precise alternative to often ambiguous text prompts or coarse class labels. We theoretically justify how this guidance enables sampling from the potential-induced tilted distribution. Quantitative results on ImageNet and COCO demonstrate that our approach achieves high-quality, diverse generations. Code is available at https://github.com/valeoai/REPA-G.
