Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Defect-aware Hybrid Prompt Optimization via Progressive Tuning for Zero-Shot Multi-type Anomaly Detection and Segmentation

About

Recent vision-language models (VLMs) like CLIP have shown impressive anomaly detection performance under significant distribution shift by utilizing high-level semantic information through text prompts. However, these models often overlook fine-grained defect cues, e.g., hole, cut, or scratch, that are essential for understanding the anomaly's nature. Moreover, the modality gap between images and text can lead to subtle visual evidence being poorly captured in textual descriptions. To address the gap, we enhance the representation of "abnormal" with structured semantics, bridging coarse anomaly signals and fine-grained defect categories. We propose a hybrid prompting mechanism that combines human-readable descriptions of defect types with learnable token embeddings. Building on these ideas, we introduce DAPO, a Defect-aware Prompt Optimization framework for zero-shot multi-type and binary anomaly detection and segmentation under distribution shift. DAPO aligns anomaly-relevant visual features with their corresponding textual semantics by learning hybrid defect-aware prompts that combine fixed textual anchors with trainable token embeddings. We conducted experiments on public benchmarks (MPDD, VisA, MVTec-AD, MAD, and Real-IAD) and an internal dataset. The results suggest that compared to the baseline models, DAPO achieves a 3.6% average improvement in AUROC and average precision metrics at the image level under distribution shift, and a 5.2% average improvement in AUROC and F1 when localizing novel anomaly types under zero-shot settings.

Nadeem Nazer, Hongkuan Zhou, Lavdim Halilaj, Ylli Sadikaj, Steffen Staab• 2025

Related benchmarks

TaskDatasetResultRank
Anomaly DetectionVisA--
293
Anomaly DetectionMPDD (test)--
104
Anomaly SegmentationMPDD
AUROC0.951
74
Anomaly DetectionMPDD
Clean AUROC0.812
62
Anomaly SegmentationVisA (test)--
59
Anomaly SegmentationVisA--
30
Anomaly DetectionReal-IAD
I-AUROC84.3
18
Anomaly SegmentationReal-IAD
AUROC (Pixel-Level)96.4
14
Binary Anomaly DetectionSemi-conductor
AUROC0.918
3
Multi-type Anomaly SegmentationMAD-Sim (test)
AUROC91.9
2
Showing 10 of 11 rows

Other info

Follow for update