[论文解读] Explicit Boundary Guided Semi-Push-Pull Contrastive Learning for Supervised Anomaly Detection
该论文提出BGAD,一种新颖的监督异常检测方法,通过显式边界引导和半推拉对比损失,增强模型判别能力,同时减少因已知异常样本有限带来的偏差。通过学习归一化的正常特征分布以定义紧凑的分离边界,并应用仅将正常特征拉近、将异常特征推离边界外 margin 的边界引导损失,BGAD 在 MVTec AD 上实现了 SOTA 性能,各类别 AUROC 和 PRO 相较基线提升 2.5% 至 8.6%。
Most anomaly detection (AD) models are learned using only normal samples in an unsupervised way, which may result in ambiguous decision boundary and insufficient discriminability. In fact, a few anomaly samples are often available in real-world applications, the valuable knowledge of known anomalies should also be effectively exploited. However, utilizing a few known anomalies during training may cause another issue that the model may be biased by those known anomalies and fail to generalize to unseen anomalies. In this paper, we tackle supervised anomaly detection, i.e., we learn AD models using a few available anomalies with the objective to detect both the seen and unseen anomalies. We propose a novel explicit boundary guided semi-push-pull contrastive learning mechanism, which can enhance model's discriminability while mitigating the bias issue. Our approach is based on two core designs: First, we find an explicit and compact separating boundary as the guidance for further feature learning. As the boundary only relies on the normal feature distribution, the bias problem caused by a few known anomalies can be alleviated. Second, a boundary guided semi-push-pull loss is developed to only pull the normal features together while pushing the abnormal features apart from the separating boundary beyond a certain margin region. In this way, our model can form a more explicit and discriminative decision boundary to distinguish known and also unseen anomalies from normal samples more effectively. Code will be available at https://github.com/xcyao00/BGAD.
研究动机与目标
- 解决仅依赖正常样本的无监督异常检测模型判别能力不足的问题。
- 缓解监督异常检测中因模型过度拟合有限已知异常而产生的偏差问题。
- 通过有效利用少量已知异常进行训练,提升对未见异常的泛化能力。
- 构建更明确、可靠的决策边界,清晰分离正常与异常样本。
- 通过伪异常生成提升罕见异常场景下的特征学习效率。
提出的方法
- 该方法使用归一化流学习归一化的正常特征分布,并基于超参数 β 推导出显式、紧凑的分离边界。
- 提出一种边界引导的半推拉(BG-SPP)对比损失,仅将对数似然低于边界的正常特征拉近。
- 对对数似然高于边界的异常特征,将其从边界推开超过指定 margin,确保清晰分离。
- 半推拉机制避免对所有异常特征进行完全推开,降低过拟合风险,同时保持正常特征的紧凑性。
- 采用基于 RandAugment 的伪异常生成策略,模拟正常样本中的局部不规则性,以应对真实异常的稀少性。
- 模型端到端训练,结合 BG-SPP 损失,实现判别性特征学习,同时保持对未见异常的鲁棒性。
实验结果
研究问题
- RQ1基于正常分布的显式分离边界是否能提升异常检测模型的判别能力?
- RQ2半推拉对比损失机制是否能在减少已知异常偏差的同时,增强对未见异常的泛化能力?
- RQ3与传统对比学习相比,显式边界引导在异常检测基准上的 AUROC 和 PRO 指标表现如何?
- RQ4伪异常生成在低数据异常场景下对特征学习的改善程度如何?
- RQ5当模型仅在简单子集上训练并在困难、未见异常子集上测试时,该方法能否保持高性能?
主要发现
- 与基线 NFAD 相比,BGAD 在 MVTec AD 数据集上图像 AUROC 提升 2.5%(0.992 vs. 0.968)。
- 在困难子集上,BGAD 泛化能力出色,PRO 提升 6.7%(0.930 vs. 0.863),尽管仅在简单异常上进行训练。
- BG-SPP 损失优于完整推开变体(BGAD†),后者因过拟合导致 AUROC 下降,尤其在 Capsule 和 Transistor 等复杂类别中更为明显。
- 可视化显示,BGAD 减少了模糊的对数似然区域,生成的特征分布更具判别性,优于无监督或有偏差的监督方法。
- BGAD 生成的异常定位图在某些情况下比真实标签更准确,证明其卓越的定位能力。
- 该方法在 MVTec AD 基准的所有评估指标上均达到 SOTA 性能,包括图像 AUROC、像素 AUROC 和 PRO。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。