VLMDiff: Leveraging Vision-Language Models for Multi-Class Anomaly Detection with Diffusion

Samet Hicsonmez, Abd El Rahman Shabayek, Djamila Aouada · DOI

Introduction

Visual Anomaly Detection (AD) is a critical task in industrial quality control and autonomous systems, aimed at identifying rare deviations from "normal" patterns. Traditional unsupervised methods often struggle with scalability, requiring separate models for each object class. Furthermore, standard reconstruction-based approaches frequently fail to capture fine-grained details, leading to high false-positive rates. VLMDiff addresses these challenges by integrating Latent Diffusion Models (LDMs) with Vision-Language Models (VLMs) to create a robust, multi-class anomaly detection framework.

Methodology

The core innovation of VLMDiff lies in using detailed textual descriptions as a "normality anchor" to guide the diffusion process.

VLM-Guided Conditioning

Unlike previous methods that rely on simple class labels or image-only priors, VLMDiff utilizes a pre-trained VLM (InternVL-2) to generate comprehensive descriptions of normal objects. For a given input image $I$, the VLM is prompted to "describe the main object in detail." This text is then processed by a frozen text encoder to produce a condition vector $c$.

Diffusion Reconstruction and Localization

The framework employs a Latent Diffusion Model where the U-Net is conditioned on the VLM-generated vector $c$. During training, the model learns to reconstruct the latent representation $z$ of normal images from a noised version $z_t$. At inference, the model attempts to reconstruct the input. Anomalous regions, which the model has not learned to represent, are "corrected" toward the normal distribution defined by the text prompt.

Overview of the VLMDiff training and inference pipelines.

Anomaly localization is achieved by extracting features from both the original image $I$ and the reconstructed image $\tilde{I}$ using a self-supervised feature extractor (DINO). A dissimilarity map is then computed to produce the final anomaly map $A$.

Experimental Results

VLMDiff was evaluated across several benchmarks, including Real-IAD, COCO-AD, MVTec-AD, and VISA.

Quantitative Performance

The model demonstrates state-of-the-art performance, particularly on the complex Real-IAD dataset, where it achieved a Per-Region Overlap (PRO) score of 87.7. This represents a significant 29.6-point improvement over the previous diffusion-based state-of-the-art, DiAD. On the COCO-AD dataset, which focuses on high-level semantic anomalies, VLMDiff outperformed existing methods by 8 points in the PRO metric.

Qualitative Analysis

Qualitative comparisons reveal that VLMDiff produces cleaner anomaly maps with fewer false positives in complex backgrounds compared to baseline methods like DiAD and TransFusion.

Qualitative comparison of anomaly maps generated by VLMDiff against baseline methods.

Conclusion

VLMDiff represents a significant advancement in unsupervised multi-class anomaly detection. By leveraging the descriptive power of VLMs, the framework provides a stronger training signal for diffusion-based reconstruction, leading to superior localization accuracy. Future work will focus on optimizing inference speed and exploring learnable prompt strategies to further enhance the model's sensitivity to minute defects.

Summary updated

BibTeX
@inproceedings{hicsonmez2026vlmdiff,
  author = {Samet Hicsonmez and Abd El Rahman Shabayek and Djamila Aouada},
  title = {{VLMDiff: Leveraging Vision-Language Models for Multi-Class Anomaly Detection with Diffusion}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2026},
}
Figure