Table of Contents
Fetching ...

Beyond the Noise: Aligning Prompts with Latent Representations in Diffusion Models

Vasco Ramos, Regev Cohen, Idan Szpektor, Joao Magalhaes

TL;DR

Conditional diffusion models suffer from misalignment and costly post-hoc evaluation. The authors introduce NoisyCLIP, a noise-aware twin-tower alignment method that operates on intermediate latent representations during reverse diffusion and is trained via contrastive learning on noise-corrupted latents. They also provide open benchmarks Noisy-Conceptual-Captions and Noisy-GenAI-Bench to evaluate language-to-latent alignment throughout generation. Empirically, NoisyCLIP enables real-time alignment assessment, reduces Best-of-N compute by up to 50% while retaining about 98% of final CLIP performance, and offers insights on latent-range and backbone choices for robust mid-generation ranking.

Abstract

Conditional diffusion models rely on language-to-image alignment methods to steer the generation towards semantically accurate outputs. Despite the success of this architecture, misalignment and hallucinations remain common issues and require automatic misalignment detection tools to improve quality, for example by applying them in a Best-of-N (BoN) post-generation setting. Unfortunately, measuring the alignment after the generation is an expensive step since we need to wait for the overall generation to finish to determine prompt adherence. In contrast, this work hypothesizes that text/image misalignments can be detected early in the denoising process, enabling real-time alignment assessment without waiting for the complete generation. In particular, we propose NoisyCLIP a method that measures semantic alignment in the noisy latent space. This work is the first to explore and benchmark prompt-to-latent misalignment detection during image generation using dual encoders in the reverse diffusion process. We evaluate NoisyCLIP qualitatively and quantitatively and find it reduces computational cost by 50% while achieving 98% of CLIP alignment performance in BoN settings. This approach enables real-time alignment assessment during generation, reducing costs without sacrificing semantic fidelity.

Beyond the Noise: Aligning Prompts with Latent Representations in Diffusion Models

TL;DR

Conditional diffusion models suffer from misalignment and costly post-hoc evaluation. The authors introduce NoisyCLIP, a noise-aware twin-tower alignment method that operates on intermediate latent representations during reverse diffusion and is trained via contrastive learning on noise-corrupted latents. They also provide open benchmarks Noisy-Conceptual-Captions and Noisy-GenAI-Bench to evaluate language-to-latent alignment throughout generation. Empirically, NoisyCLIP enables real-time alignment assessment, reduces Best-of-N compute by up to 50% while retaining about 98% of final CLIP performance, and offers insights on latent-range and backbone choices for robust mid-generation ranking.

Abstract

Conditional diffusion models rely on language-to-image alignment methods to steer the generation towards semantically accurate outputs. Despite the success of this architecture, misalignment and hallucinations remain common issues and require automatic misalignment detection tools to improve quality, for example by applying them in a Best-of-N (BoN) post-generation setting. Unfortunately, measuring the alignment after the generation is an expensive step since we need to wait for the overall generation to finish to determine prompt adherence. In contrast, this work hypothesizes that text/image misalignments can be detected early in the denoising process, enabling real-time alignment assessment without waiting for the complete generation. In particular, we propose NoisyCLIP a method that measures semantic alignment in the noisy latent space. This work is the first to explore and benchmark prompt-to-latent misalignment detection during image generation using dual encoders in the reverse diffusion process. We evaluate NoisyCLIP qualitatively and quantitatively and find it reduces computational cost by 50% while achieving 98% of CLIP alignment performance in BoN settings. This approach enables real-time alignment assessment during generation, reducing costs without sacrificing semantic fidelity.

Paper Structure

This paper contains 47 sections, 3 equations, 11 figures, 5 tables.

Figures (11)

  • Figure 1: NoisyCLIP measures language-to-latent alignment during reverse diffusion by comparing textual prompts to intermediate latent representations, enabling early detection of misalignments.
  • Figure 2: A prompt is used to generate an image, and at an intermediate step, the generated image and the original prompt are encoded and their similarity is measured. As demonstrated, our method generates a similarity score that is closely aligned with the score assessed for the final produced image, while at intermediate stages of generation, allowing for the early identification of misalignments. These results are possible due to the fine-tuning of the image encoder on latent images present on the Noisy-Conceptual-Captions dataset.
  • Figure 3: Analysis of alignment measurement throughout the reverse diffusion process shows that our model distinctly separates aligned from misaligned images as soon as latent 20.
  • Figure 4: Alignment (VQAScore) vs Best-of-N denoising cost. Cost is normalized for a scenario where $N=6$.
  • Figure 5: Best-of-N results for latents 20 and 30 as well as in the final image. The plots compare NoisyCLIP (blue line) with CLIP (orange line) in a BoN setting. The alignment of the selected image with the prompt is assessed using the VQAScore.
  • ...and 6 more figures