The "Missing Middle" of Visual Similarity
How do we mathematically define "similarity" between two images? For years, the field has been split between two extremes. On one end, low-level metrics like LPIPS excel at spotting pixel-level changes or texture shifts but fail to realize that a rotated object is still the "same" object. On the other end, high-level embeddings from models like CLIP or DINO are excellent at identifying broad categories (e.g., "this is a dog") but often ignore crucial mid-level details like color, orientation, or spatial layout.
The "missing middle" is where human perception lives. We don't just see pixels, and we don't just see labels; we see a holistic combination of pose, shape, color, and structure.
To bridge this gap, researchers introduced DreamSim, a new perceptual similarity metric designed to align with human judgment by focusing on these mid-level visual features.
How DreamSim Works
The authors' approach relies on a clever combination of synthetic data generation and efficient model tuning:
- Synthetic Triplet Generation: Using text-to-image models like Stable Diffusion, the team generated thousands of image triplets consisting of a Reference image and two variations (A and B). These variations were specifically designed to perturb mid-level attributes like pose, color, or the number of objects.
- Human-in-the-Loop Filtering: They collected over 100,000 human judgments via Amazon Mechanical Turk. Crucially, they used an iterative filtering process to keep only "cognitively impenetrable" triplets—those where humans reached a near-unanimous consensus. This ensured the training signal was clear and representative of universal human perception rather than subjective preference. This resulted in the NIGHTS (Novel Image Generations with Human-Tested Similarity) dataset, featuring 20,000 synthetic image triplets with unanimous human labels.
- The DreamSim Metric: The metric itself is an ensemble of three powerful vision backbones: DINO, CLIP, and OpenCLIP. Instead of training these massive models from scratch, they used LoRA (Low-Rank Adaptation) to fine-tune a tiny fraction (0.67%) of the parameters. This allowed the model to learn the nuances of human similarity without losing the broad knowledge already contained in the pre-trained models.
Key Insights and Results
- Synthetic Data Generalizes: One of the most striking findings is that a metric trained entirely on synthetic images from Stable Diffusion generalizes remarkably well to real images. This suggests that modern generative models capture enough "natural image statistics" to serve as a robust proxy for the real world in perceptual tasks.
- Human Alignment: DreamSim achieved an impressive 96.16% accuracy in predicting human judgments on the NIGHTS dataset, far surpassing LPIPS (68.7%) and base DINO (89.5%).
- User Preference in Retrieval: In a retrieval study on the ImageNet-R dataset, users preferred DreamSim’s results 36.8% of the time, compared to 28.7% for OpenCLIP and 19.5% for DINO.
- Feature Inversion: When used to reconstruct an image from its embedding, DreamSim produced results with much higher fidelity to the original's color, shape, and semantics compared to other metrics.
- Ensembling Matters: Combining the "spatial" strengths of DINO with the "semantic" strengths of CLIP created a more robust metric than any single backbone could provide.
Limitations and Future Work
While powerful, DreamSim inherits the biases of its parent models (Stable Diffusion, CLIP, DINO). The dataset is currently object-centric, meaning the metric might not perform as well on complex, multi-object scenes or landscapes where the "foreground" is less defined. Additionally, while the metric is excellent for automatic, "instinctive" similarity, it doesn't yet capture the full complexity of high-level human reasoning or subjective aesthetic preference. Future work could involve expanding the dataset to include more diverse scene types and more complex human-centric interactions.
Summary updated