arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.10080cs.CV
收藏

面向零样本异常检测的贝叶斯提示流学习

Bayesian Prompt Flow Learning for Zero-Shot Anomaly Detection

Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所);School of Artificial Intelligence, University of Chinese Academy of Sciences(中国科学院大学人工智能学院);HDU;Casivision;Luoyang Institute for Robot and Intelligent Equipment(洛阳机器人与智能装备研究所);Tsinghua University(清华大学)

Zhen Qu, Xian Tao, Xinyi Gong, Shichen Qu, Qiyu Chen, Zhengtao Zhang, Xingang Wang, Guiguang Ding

AI总结:

本文提出贝叶斯提示流学习(Bayes-PFL),将提示空间建模为可学习概率分布,通过提示流模块和残差跨模态注意力模块提升零样本异常检测在未见类别上的泛化能力,并在15个工业和医学数据集上验证了其优越性能。

摘要:

近年来,视觉-语言模型(如 CLIP)在零样本异常检测(ZSAD)中展现出卓越性能。通过在训练阶段利用辅助数据,这些模型能够直接在目标数据集上执行跨类别异常检测,例如检测工业产品表面的缺陷或识别器官组织中的肿瘤。现有方法通常通过人工设计或可学习提示向量的优化来构建文本提示。然而,这些方法面临若干挑战:1)手工设计的提示需要大量专家知识和反复试错;2)单一形式的可学习提示难以捕捉复杂的异常语义;3)无约束的提示空间限制了对未见类别的泛化能力。为解决这些问题,我们提出了贝叶斯提示流学习(Bayes-PFL),该方法从贝叶斯视角将提示空间建模为可学习的概率分布。具体而言,设计了一个提示流模块来同时学习图像特定分布和图像无关分布,二者被联合用于正则化文本提示空间,并提升模型在未见类别上的泛化能力。随后,从这些学习到的分布中进行采样以生成多样化的文本提示,从而有效覆盖提示空间。此外,引入了一个残差跨模态注意力(RCA)模块,以更好地对齐动态文本嵌入与细粒度图像特征。在15个工业和医学数据集上的大量实验证明了我们方法的优越性能。代码可在 https://github.com/xiaozhen228/Bayes-PFL 获取。

英文摘要:

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) handcrafted prompts require extensive expert knowledge and trial-and-error; 2) single-form learnable prompts struggle to capture complex anomaly semantics; and 3) an unconstrained prompt space limits generalization to 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 improve the 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-model attention (RCA) module is introduced to better align dynamic text embeddings with fine-grained image features. Extensive experiments on 15 industrial and medical datasets demonstrate our method's superior performance. The code is available at https://github.com/xiaozhen228/Bayes-PFL.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑