Vision language model improves zero shot detection of unusual defects

Proximity-CLIP: Text-Guided Semantic Proximity Learning for Zero-Shot Anomaly Detection

Computer Vision and Pattern Recognition

Summary

Detecting unusual defects in images without specific training can be tricky because similar descriptions of normal and abnormal objects often overlap, making it hard to tell them apart. The authors found that forcing models to treat these descriptions as totally different causes problems with how the images are understood. To fix this, they designed a method called Proximity-CLIP that adjusts how much difference the model expects between normal and abnormal descriptions, keeping important structure intact. They also created a module that uses these adjusted descriptions to better find small defects in images. Their approach works better than existing methods on several tests while needing only small changes to the model.

zero-shot anomaly detectionvision-language modelssemantic proximitytext prototypesgeometric dilemmavisual adaptationsemantic margindynamic regularizationanomaly query moduleglobal pooling

Authors

Manwen Yang, Leqian Ding, Yu Guo, Fei Wang

Abstract

Vision-language models offer a promising approach for zero-shot anomaly detection (ZSAD). However, due to object-centric bias, normal and anomalous text prototypes exhibit a high semantic overlap. While enforcing strict orthogonality between them improves discriminability, mapping highly contiguous visual inputs onto drastically orthogonal prototypes introduces a geometric dilemma, disrupting the pre-trained structural continuity. To address this problem, we propose Proximity-CLIP, a framework that visually calibrates the semantic margin to guide visual adaptation. First, we introduce a visually-calibrated semantic proximity learning mechanism that uses a bounded dynamic regularization to learn an appropriate semantic margin, ensuring discriminative separation while preserving structural alignment. Second, we design an Anomaly Query Module (AQM) driven by these text priors. Using the calibrated anomalous prototype as a semantic query, the AQM actively retrieves localized defect cues from contextual visual patches, mitigating the dilution of subtle anomalies during global pooling. Extensive experiments demonstrate that Proximity-CLIP outperforms current state-of-the-art methods across multiple ZSAD benchmarks with minimal architectural modifications.