Reliable detection of anomalies is crucial when deploying machine learning models in practice, but remains challenging due to the lack of labeled data. To tackle this challenge, contrastive learning approaches are becoming increasingly popular, given the impressive results they have achieved in self-supervised representation learning settings. However, while most existing contrastive anomaly detection and segmentation approaches have been applied to images, none of them can use the contrastive losses directly for both anomaly detection and segmentation. In this paper, we close this gap by making use of the Contrastive Predictive Coding model (arXiv:1807.03748). We show that its patch-wise contrastive loss can directly be interpreted as an anomaly score, and how this allows for the creation of anomaly segmentation masks. The resulting model achieves promising results for both anomaly detection and segmentation on the challenging MVTec-AD dataset.
翻译:在实际运用机器学习模型时,可靠地发现异常现象至关重要,但由于缺乏贴标签的数据,这仍然具有挑战性。为了应对这一挑战,对比式学习方法越来越受欢迎,因为在自我监督的代表学习环境中取得了令人印象深刻的成果。然而,虽然大多数现有的对比式异常探测和分解方法都应用在图像上,但其中没有一个能够直接利用对比性损失来探测异常现象和分解。在本文件中,我们通过使用对比性预测编码模型(arXiv:1807.37488)来弥补这一差距。我们表明,其偏差式对比性损失可以直接被解释为异常分数,并如何允许创建异常分解面面具。由此形成的模型在对具有挑战性的MVTec-AD数据集的异常探测和分解方面都取得了大有希望的结果。