Skip to yearly menu bar Skip to main content


Poster

Bayesian Prompt Flow Learning for Zero-Shot Anomaly Detection

Zhen Qu · Xian Tao · Xinyi Gong · ShiChen Qu · Qiyu Chen · Zhengtao Zhang · Xingang Wang · Guiguang Ding


Abstract:

Recently, vision-language models (e.g. CLIP) have demonstrated remarkable performance in zero-shot anomaly detection (ZSAD). By leveraging auxiliary data during training, these models can directly perform cross-category anomaly detection on target datasets, such as detecting defects on industrial product surfaces or identifying tumors in organ tissues. Existing approaches typically construct text prompts through either manual design or the optimization of learnable prompt vectors. However, these methods face several challenges: 1) Hand-crafted text prompts depend heavily on expert knowledge and require extensive trial and error; 2) The single-form learnable prompts is insufficient to capture the complex semantics of anomalies; and 3) The prompt space is poorly constrained, leading to suboptimal generalization performance on unseen categories. To address these issues, we propose Bayesian Prompt Flow Learning (Bayes-PFL), which models the prompt space as a learnable probability distribution from a Bayesian perspective. Specifically, a prompt flow module is designed to learn both image-specific and image-agnostic distributions, which are jointly utilized to regularize the text prompt space and enhance model's generalization on unseen categories. These learned distributions are then sampled to generate diverse text prompts, effectively covering the prompt space. Additionally, a residual cross-attention (RCA) module is introduced to better align dynamic text embeddings with fine-grained image features. Experimental results demonstrate that our method achieves state-of-the-art performance in ZSAD across 15 public industrial and medical anomaly detection datasets. Code will be released upon acceptance.

Live content is unavailable. Log in and register to view live content