Skip to main content
QUICK REVIEW

[Paper Review] Catching Both Gray and Black Swans: Open-set Supervised Anomaly Detection

Choubo Ding, Guansong Pang|arXiv (Cornell University)|Mar 28, 2022
Anomaly Detection Techniques and ApplicationsComputer Science11 citations
TL;DR

This paper proposes DRA, a novel open-set supervised anomaly detection model that learns disentangled representations of seen anomalies, pseudo anomalies from data augmentation, and latent residual anomalies to detect both known (gray swans) and unseen (black swans) anomalies. By leveraging multi-head learning on these three abnormality types, DRA achieves state-of-the-art performance across nine real-world datasets, significantly outperforming existing unsupervised and supervised methods, especially in challenging settings with few or no seen anomaly examples.

ABSTRACT

Despite most existing anomaly detection studies assume the availability of normal training samples only, a few labeled anomaly examples are often available in many real-world applications, such as defect samples identified during random quality inspection, lesion images confirmed by radiologists in daily medical screening, etc. These anomaly examples provide valuable knowledge about the application-specific abnormality, enabling significantly improved detection of similar anomalies in some recent models. However, those anomalies seen during training often do not illustrate every possible class of anomaly, rendering these models ineffective in generalizing to unseen anomaly classes. This paper tackles open-set supervised anomaly detection, in which we learn detection models using the anomaly examples with the objective to detect both seen anomalies (`gray swans') and unseen anomalies (`black swans'). We propose a novel approach that learns disentangled representations of abnormalities illustrated by seen anomalies, pseudo anomalies, and latent residual anomalies (i.e., samples that have unusual residuals compared to the normal data in a latent space), with the last two abnormalities designed to detect unseen anomalies. Extensive experiments on nine real-world anomaly detection datasets show superior performance of our model in detecting seen and unseen anomalies under diverse settings. Code and data are available at: https://github.com/choubo/DRA.

Motivation & Objective

  • To address the limitation of existing supervised anomaly detection models that overfit to seen anomalies and fail to generalize to unseen anomaly classes.
  • To enable effective detection of both 'gray swans' (known, previously seen anomalies) and 'black swans' (rare, previously unknown anomalies) in real-world applications.
  • To leverage limited labeled anomaly examples alongside data augmentation and latent space residual analysis to improve generalization to unseen anomaly patterns.
  • To develop a unified framework that simultaneously learns diverse abnormality representations without relying solely on labeled anomaly data.

Proposed method

  • DRA employs a multi-head neural network architecture with three dedicated heads to learn disentangled representations of three abnormality types: seen anomalies, pseudo anomalies, and latent residual anomalies.
  • Pseudo anomalies are generated using data augmentation techniques such as CutPaste-Scar and CutMix, which simulate realistic but synthetic abnormal patterns.
  • Latent residual anomalies are identified by measuring reconstruction residuals in a learned latent space, where high residuals indicate potential unseen anomalies.
  • The model uses a contrastive learning objective to encourage feature separation between normal and abnormal representations across all three heads.
  • A reference-based residual learning mechanism samples N_r normal images to compute latent residuals, with N_r = 5 shown to be optimal in ablation studies.
  • The final anomaly score is a weighted fusion of predictions from all three heads, enabling robust detection across diverse anomaly types.

Experimental results

Research questions

  • RQ1Can a supervised anomaly detection model generalize effectively to unseen anomaly classes when only a few labeled examples of known anomalies are available?
  • RQ2How do different types of abnormality representations—seen anomalies, pseudo anomalies, and latent residual anomalies—complement each other in improving detection generalization?
  • RQ3What is the optimal strategy for generating pseudo anomalies that enhance detection of unseen anomalies without introducing bias?
  • RQ4How does the size of the reference set used for latent residual computation affect detection performance for unseen anomalies?
  • RQ5To what extent can disentangled representation learning improve performance on real-world datasets with limited or no anomaly data?

Key findings

  • DRA achieves state-of-the-art performance on nine real-world anomaly detection datasets, outperforming five SOTA unsupervised and supervised models, especially in detecting unseen anomalies.
  • On the MVTec AD dataset, DRA achieves a mean AUC of 0.935 ± 0.013 on the 'Leather' set and 0.922 ± 0.012 on the 'Tile' set, significantly outperforming KDAD (unsupervised) and DevNet (supervised) in detecting unseen anomalies.
  • When only one training anomaly example is available, DRA maintains strong performance, with a mean AUC of 0.850 ± 0.070 on the 'Thread' dataset, demonstrating robustness to low-shot settings.
  • Using pseudo anomalies from data augmentation (e.g., CutPaste-Scar) yields better and more stable results than external data sources on non-medical datasets, while external data (e.g., LAG) performs better on medical datasets like Hyper-Kvasir.
  • The optimal reference size for latent residual learning is N_r = 5, as increasing it to 10 does not consistently improve performance, and even N_r = 1 is sufficient for effective detection.
  • Sensitivity analysis confirms that the model is robust to variations in pseudo-anomaly source and reference size, with consistent improvements across diverse settings.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.