Visual anomaly detection in real-world industrial settings faces two major limitations. First, most existing methods are trained on purely normal data or on unlabeled datasets assumed to be predominantly normal, presuming the absence of contamination, an assumption that is rarely satisfied in practice. Second, they assume no access to labeled anomaly samples, limiting the model from learning discriminative characteristics of true anomalies. Therefore, these approaches often struggle to distinguish anomalies from normal instances, resulting in reduced detection and weak localization performance. In real-world applications, where training data are frequently contaminated with anomalies, such methods fail to deliver reliable performance. In this work, we propose a robust anomaly detection framework that integrates limited anomaly supervision into the adaptive deviation learning paradigm. We introduce a composite anomaly score that combines three complementary components: a deviation score capturing statistical irregularity, an entropy-based uncertainty score reflecting predictive inconsistency, and a segmentation-based score highlighting spatial abnormality. This unified scoring mechanism enables accurate detection and supports gradient-based localization, providing intuitive and explainable visual evidence of anomalous regions. Following the few-anomaly paradigm, we incorporate a small set of labeled anomalies during training while simultaneously mitigating the influence of contaminated samples through adaptive instance weighting. Extensive experiments on the MVTec and VisA benchmarks demonstrate that our framework outperforms state-of-the-art baselines and achieves strong detection and localization performance, interpretability, and robustness under various levels of data contamination.
翻译:现实工业环境中的视觉异常检测面临两大主要局限。首先,现有方法大多基于纯净正常数据或假设主要为正常的未标注数据集进行训练,这种假设在实践中极少成立。其次,这些方法通常无法获取标注的异常样本,限制了模型学习真实异常判别特征的能力。因此,现有方法往往难以有效区分异常与正常实例,导致检测性能下降和定位能力薄弱。在训练数据常受异常污染的实际应用场景中,此类方法难以提供可靠性能。本研究提出一种鲁棒的异常检测框架,将有限异常监督信息融入自适应偏差学习范式。我们设计了一种复合异常评分机制,整合三个互补组成部分:捕捉统计异常性的偏差评分、反映预测不一致性的基于熵的不确定性评分,以及突出空间异常性的基于分割的评分。这种统一评分机制既能实现精确检测,又支持基于梯度的定位,为异常区域提供直观可解释的视觉证据。遵循少样本异常检测范式,我们在训练中引入少量标注异常样本,同时通过自适应实例加权机制抑制污染样本的影响。在MVTec和VisA基准数据集上的大量实验表明,本框架在不同程度的数据污染下均能超越现有先进基线方法,在检测与定位性能、可解释性及鲁棒性方面均表现出色。