TL;DR
This paper introduces test-time Representational Alignment (REPA) for solving image inverse problems using pretrained diffusion and flow-based models. By guiding intermediate model representations to align with robust self-supervised vision features (specifically DINOv2) extracted from degraded measurements or proxy estimates, the method substantially boosts perceptual quality and sampling efficiency with negligible distortion penalties.
What Problem Does This Paper Address?
Diffusion and flow matching models excel as priors for inverse problems (e.g., super-resolution, inpainting, deblurring). Typically, solvers guide the generative reverse process using a measurement consistency loss. However, especially in latent diffusion models (LDMs), the nonlinearities of autoencoder decoders and severe input degradations often lead to artifacts, over-smoothing, or distorted textures.
While recent training-time methods like REPA enforce internal diffusion features to match self-supervised foundation models (like DINOv2) to boost generative quality, the ground-truth clean image is fundamentally unavailable at inference time in inverse problems. This paper asks: Can representation alignment guide the reverse diffusion process at test time without clean ground-truth targets?
Methods
The authors introduce an inference-time guidance objective that regularizes latent diffusion/flow trajectories using patch-level feature alignment:
-
Regularized Sampling Objective: At each reverse step, the update optimizes: $$\mathcal{J}_t(z_t \mid y, c_{\text{proxy}}) = \log p(y \mid z_t) + \log p(z_t) + \lambda \log p(c_{\text{proxy}} \mid z_t)$$ where the new REPA term maximizes cosine similarity between projected intermediate hidden states $g_\phi(G_2(z_t, t)^{[n]})$ and proxy target features $c_{\text{proxy}}^{[n]}$.
-
Proxy Representation ($c_{\text{proxy}}$): Since the clean ground truth $x_0$ is unknown, the authors use DINOv2 features extracted either directly from the degraded observation $y$ (when in image space) or from the posterior mean estimate $\hat{x}_0 = \mathcal{D}(\mathbb{E}[z_0 \mid z_t])$.
- Plug-and-Play Integration: The authors show REPA seamlessly integrates into both gradient-based solvers (Latent DPS) and projection/sampling-based solvers (ReSample), alongside an adaptive Signal-to-Noise Ratio (SNR) step-size scheduler.
- Theoretical Grounding: The authors formally link patch-wise cosine alignment to empirical Maximum Mean Discrepancy (MMD) and prove that adding this regularization strictly improves the classical perception–distortion trade-off frontier (improving perceptual score by $\Omega(\sqrt{\epsilon})$ while incurring only an $\epsilon$ distortion change).
+-----------------------------+
Degraded Input (y) -> | Frozen DINOv2 Encoder | -> Proxy Embeddings
+-----------------------------+ |
v (Cosine Similarity)
Latent Step (z_t) -> | Diffusion Transformer Blocks| -> Projected Latent Features
Datasets
- ImageNet (256×256 validation set): 100 images randomly selected to evaluate across four inverse problems (4× super-resolution, 128×128 box inpainting, Gaussian deblurring with $\sigma=3.0$, and random motion deblurring with intensity 0.5, all with added Gaussian noise $\sigma=0.01$).
- FFHQ: Used for qualitative evaluation of facial box inpainting.
- No new benchmark datasets were introduced.
Key Insights and Ideas
- DINOv2 is remarkably robust to corruptions: Even when images suffer heavy blur, downsampling, or masking, their high-level self-supervised patch tokens retain semantic layout and structure. Thus, $f_{\text{DINO}}(y)$ acts as a reliable proxy anchor for the true image representation.
- Bridging REPA and Perceptual Metrics: The paper theoretically demonstrates that maximizing the REPA patch similarity upper-bounds the MMD between conditional patch distributions plus a representation misalignment term, establishing why feature alignment directly improves perceptual metrics like LPIPS and FID.
- Massive Sampling Acceleration: Incorporating REPA achieves identical or superior perceptual quality (LPIPS) using $2\times$ to $4\times$ fewer discretization steps compared to baseline latent solvers.
Key Results
Evaluated on ImageNet 256×256 across PSNR, SSIM, LPIPS, and FID:
- Large Perceptual Gains with Minimal Distortion Cost:
- 4× Super-Resolution: Adding REPA to Latent DPS improved FID from 123.82 $\to$ 86.88 and LPIPS from 0.238 $\to$ 0.217 (PSNR remained nearly unchanged: 26.88 vs. 26.82 dB).
- Gaussian Deblurring: Adding REPA to ReSample lowered FID from 115.47 $\to$ 102.59 and LPIPS from 0.259 $\to$ 0.223.
- Box Inpainting: Latent DPS + REPA achieved an FID of 88.69 (down from 116.53) and LPIPS of 0.139 (down from 0.151).
- Outperforming Prior SOTA: In motion deblurring, ReSample + REPA attained an FID of 75.11 and LPIPS of 0.192, easily outperforming standard DPS (FID 89.06, LPIPS 0.242) and Latent DAPS (FID 135.18, LPIPS 0.274).
Limitations and Future Work
- Reliance on REPA-Trained Models: The solver assumes the underlying diffusion model was pre-trained with representational alignment (providing the projection MLP $g_\phi$ mapping hidden states to DINO space).
- Extreme Degradations: While DINO embeddings degrade much slower than raw pixels, extreme corruption regimes (e.g., severe downsampling $>16\times$) lead to non-negligible feature divergence, which can reduce the bound's tightness.
- Future Directions: Expanding beyond DINOv2 to other multimodal foundation models (e.g., CLIP, SigLIP, or DINOv3) and exploring non-linear/blind inverse problems where the forward operator is partially unknown.
Summary updated