DiffSim: Taming Diffusion Models for Evaluating Visual Similarity
Yiren Song, Xiaokang Liu, Mike Zheng Shou
TL;DR
<3-5 sentence high-level summary> DiffSim introduces a diffusion-model–based framework for evaluating visual similarity between reference and generated images, addressing the limitations of pixel- and high-level semantic metrics. By extracting and aligning attention features from the denoising U‑Net through the Aligned Attention Score, DiffSim captures both appearance and style coherence without fine-tuning. It presents two variants, DiffSim-S (self-attention) and DiffSim-C (cross-attention with IP-Adapter Plus), and introduces Sref and IP benchmarks to quantify style and instance similarity, respectively. The method achieves state-of-the-art alignment with human judgments across diverse benchmarks and demonstrates adaptability to CLIP and DINO, offering a robust, scalable tool for evaluating visual coherence in generative tasks.
Abstract
Diffusion models have fundamentally transformed the field of generative models, making the assessment of similarity between customized model outputs and reference inputs critically important. However, traditional perceptual similarity metrics operate primarily at the pixel and patch levels, comparing low-level colors and textures but failing to capture mid-level similarities and differences in image layout, object pose, and semantic content. Contrastive learning-based CLIP and self-supervised learning-based DINO are often used to measure semantic similarity, but they highly compress image features, inadequately assessing appearance details. This paper is the first to discover that pretrained diffusion models can be utilized for measuring visual similarity and introduces the DiffSim method, addressing the limitations of traditional metrics in capturing perceptual consistency in custom generation tasks. By aligning features in the attention layers of the denoising U-Net, DiffSim evaluates both appearance and style similarity, showing superior alignment with human visual preferences. Additionally, we introduce the Sref and IP benchmarks to evaluate visual similarity at the level of style and instance, respectively. Comprehensive evaluations across multiple benchmarks demonstrate that DiffSim achieves state-of-the-art performance, providing a robust tool for measuring visual coherence in generative models.
