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基准上的大量实验表明,本框架优于现有先进基线方法,在不同程度的数据污染下均实现了强大的检测与定位性能、可解释性及鲁棒性。