Explicit Boundary Guided Semi-Push-Pull Contrastive Learning for Supervised Anomaly Detection

Xincheng Yao, Ruoqi Li, Jing Zhang, Jun Sun, Chongyang Zhang
7/4/2022
147 citations
cs.CV
contrastive-ssl

Official code: xcyao00/BGAD (100 stars, Python, last commit 2024-10-31).

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

xcyao00/BGADOfficial100%

[CVPR 2023] Pytorch Implementation for CVPR2023 paper: Explicit Boundary Guided Semi-Push-Pull Contrastive Learning for Supervised Anomaly Detection

10012Python, ShellMar 20, 20232 years ago
anomaly-detectionexplicit-boundarypythonsupervised-anomaly-detection

Similar Papers

Cite this paper

@article{yao2022explicit,
  title  = {Explicit Boundary Guided Semi-Push-Pull Contrastive Learning for Supervised Anomaly Detection},
  author = {Xincheng Yao and Ruoqi Li and Jing Zhang and Jun Sun and Chongyang Zhang},
  year   = {2022},
  eprint = {2207.01463},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2207.01463v2},
  journal = {CVPR 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2207.01463.svg)](https://codeofpaper.com/paper/2207.01463)

Discussion