Introduction
Industrial Anomaly Detection (IAD) is a cornerstone of automated quality control. While traditional supervised methods excel, they are hampered by the need for extensive labeled datasets for every new product category. Zero-Shot Industrial Anomaly Detection (ZSIAD) addresses this by leveraging Vision-Language Models (VLMs) like CLIP to identify defects without prior training on specific classes. However, current ZSIAD methods often struggle with generic text prompts (e.g., "a photo of a broken object") that fail to capture subtle semantic nuances, leading to high false-alarm rates and poor localization.
The HEPE Framework
This paper introduces the Hybrid Explainable Prompt Enhancement (HEPE) framework. HEPE moves beyond static templates by integrating Multi-modal Large Language Models (MLLMs) and Visual Foundation Models (VFMs) to generate context-aware, "semantic-rich" prompts. The framework operates through two primary agents:
1. Multi-stage Text Prompt Agent
Instead of relying on manual descriptions, HEPE utilizes an MLLM (specifically Qwen2-VL) to perform a comparative analysis between a normal reference image and a test image. This process involves:
- Differential Articulation: The MLLM identifies specific visual differences between the two images.
- Anti-false Alarm Constraint: A Large Language Model (LLM) filters these differences to ensure the final prompt focuses strictly on actual defects rather than benign variations like lighting or orientation.
2. Visual Attention Agent
To improve spatial localization, HEPE employs a VFM (DINOv2) to generate Attention Prompts. An Anomaly Feature Selection (AFS) module, utilizing Omni-dimensional Dynamic Convolution (OD Conv), identifies suspicious regions in the foreground. These visual cues are fused with the refined text embeddings via a Hybrid Semantic Fusion (HSF) module to guide the CLIP-based backbone.
Experimental Evaluation
The framework was rigorously evaluated on seven diverse industrial datasets, including MVTec AD and VisA. HEPE achieved state-of-the-art performance, reaching an average 92.9% AUROC at the image level and 95.1% AUROC at the pixel level, outperforming previous benchmarks like AdaCLIP.
Qualitative Performance and Explainability
A key advantage of HEPE is its inherent explainability. By generating natural language descriptions of anomalies (e.g., "a broken pin located at the bottom of the PCB"), the system provides human-interpretable justifications alongside its visual heatmaps. This dual output significantly aids operators in understanding the nature of detected defects.
Conclusion and Future Work
HEPE demonstrates that the synergy between differential text prompting and visual attention significantly enhances zero-shot capabilities in industrial settings. While the reliance on a "normal" reference image and the computational cost of large MLLMs are current limitations, the framework sets a new standard for accurate and explainable automated inspection. Future research will focus on distilling these capabilities into smaller, edge-ready models for real-time manufacturing deployment.
Summary updated