Detecting anomalies is one fundamental aspect of a safety-critical software system, however, it remains a long-standing problem. Numerous branches of works have been proposed to alleviate the complication and have demonstrated their efficiencies. In particular, self-supervised learning based methods are spurring interest due to their capability of learning diverse representations without additional labels. Among self-supervised learning tactics, contrastive learning is one specific framework validating their superiority in various fields, including anomaly detection. However, the primary objective of contrastive learning is to learn task-agnostic features without any labels, which is not entirely suited to discern anomalies. In this paper, we propose a task-specific variant of contrastive learning named masked contrastive learning, which is more befitted for anomaly detection. Moreover, we propose a new inference method dubbed self-ensemble inference that further boosts performance by leveraging the ability learned through auxiliary self-supervision tasks. By combining our models, we can outperform previous state-of-the-art methods by a significant margin on various benchmark datasets.
翻译:检测异常是安全关键软件系统的一个基本方面,然而这仍然是一个长期存在的问题。已有诸多分支工作被提出以缓解该复杂性,并展示了其有效性。特别是,基于自监督学习的方法因其无需额外标签即可学习多样化表示的能力而备受关注。在自监督学习策略中,对比学习是一个特定框架,在包括异常检测在内的各个领域验证了其优越性。然而,对比学习的主要目标是在没有任何标签的情况下学习任务无关的特征,这并不完全适合辨别异常。在本文中,我们提出了一种任务特定的对比学习变体,称为掩码对比学习,它更适合于异常检测。此外,我们提出了一种新的推理方法,称为自集成推理,通过利用辅助自监督任务学到的能力进一步提升了性能。通过结合我们的模型,我们在各种基准数据集上以显著优势超越了之前的最优方法。