What is Wrong with One-Class Anomaly Detection?

JuneKyu Park, Jeong-Hyeon Moon, Namhyuk Ahn, Kyung-Ah SohnarXiv 2021

TL;DR

Traditional one-class anomaly detection (AD) often fails in the real world because "normal" data is rarely just one thing—it usually contains multiple hidden categories. This paper introduces CLAD (Confidence-based self-Labeling Anomaly Detection), a framework that uncovers these latent classes through self-labeling to draw tighter, more accurate decision boundaries, significantly outperforming standard methods in complex, multi-modal scenarios.

What Problem Does This Paper Address?

In safety-critical applications like self-driving cars, a system must identify "anomalies"—situations it hasn't seen before. Most current AD methods treat this as a "one-class" problem: they try to draw a single boundary around all "normal" training data.

The authors argue this is fundamentally flawed for real-world data. "Normal" is often a collection of diverse things (e.g., different types of road signs, various animal species). When a model tries to wrap all these diverse points in one big boundary, that boundary becomes "loose." As shown in Figure 1, this looseness creates gaps where abnormal samples can hide, leading to dangerous false negatives.

Figure 1: Comparison of two AD scenarios. (a) One-class AD scenario where the model creates a single decision boundary to cover all normal data. Some abnormal samples are misclassified due to the loose boundary. (b) Our proposed AD scenario. An optimal solution can model latent class- condition information and draws tight class-wise decision boundaries. For normal samples, each class is denoted as different shapes. Note that the latent class information are not observable to the models; only the oracle is able to access this.

Methods

The authors propose a four-step framework called CLAD to bridge the gap between unsupervised anomaly detection and supervised classification:

  1. Feature Extraction: They first train a convolutional autoencoder to compress images into meaningful latent features ($z$).
  2. Self-Labeling via Clustering: Using a technique called Deep Embedded Clustering (DEC), the model groups the training data into $L$ clusters. Each sample is then assigned a "pseudo-label" based on its cluster. This effectively "discovers" the hidden sub-classes within the normal data.
  3. Supervised Classification: A standard classifier (ResNet-18) is trained to predict these pseudo-labels. Because the classifier is forced to distinguish between different types of "normal" data, it naturally creates much tighter decision boundaries around each sub-group.
  4. Confidence-based AD: During inference, the system treats anomaly detection as an Out-of-Distribution (OOD) task. They use the ODIN scoring method, which applies temperature scaling and small input perturbations to make the model's confidence scores more reliable. If the model isn't confident that a sample belongs to any of the discovered pseudo-classes, it flags it as an anomaly.

Datasets

The researchers evaluated CLAD on four major image datasets, re-organizing them into "super-categories" to simulate realistic latent class scenarios:

  • MNIST: Digits grouped by shape (e.g., {Curly, Straight, Mixed}).
  • GTSRB: German traffic signs grouped by function (e.g., {Speed Limit, Warning, Direction}).
  • CIFAR-10: Grouped into broad categories like {Thing, Living}.
  • Tiny-ImageNet: Organized into five semantic hierarchies using WordNet (e.g., {Animal, Insect, Instrument, Structure, Vehicle}).

Key Insights and Ideas

  • The "Looseness" Trap: The core insight is that ignoring the internal structure of normal data is a security risk. A single global boundary is almost always less efficient than multiple local ones.
  • Pseudo-labels as a Bridge: By generating labels where none exist, the authors can leverage powerful, well-studied supervised OOD techniques for an unsupervised problem.
  • Semantic Awareness: Unlike traditional methods that look at raw data distribution, CLAD attempts to learn the semantics of normality. By clustering, it learns that a "stop sign" and a "speed limit sign" are both normal but distinct, preventing the model from accepting a "random red octagon with weird text" just because it's near the stop sign cluster.

Key Results

CLAD consistently outperformed established baselines like OCSVM and DeepSVDD across the board.

  • MNIST: CLAD achieved an AUROC of 94.0% on the "Curly" super-category, compared to DeepSVDD's 81.7%.
  • GTSRB: In the challenging "Special Sign" category, CLAD maintained a stable performance of 62.2% AUROC, while DeepSVDD struggled significantly.
  • Complexity Handling: On natural scene datasets like CIFAR-10 and Tiny-ImageNet, CLAD showed much more consistent results. The authors note that DeepSVDD is highly sensitive to latent class labels and often fails when anomalies are semantically close to normal sub-classes.

Limitations and Future Work

While CLAD is powerful, the authors acknowledge a few hurdles:

  • Feature Extraction Bias: The success of the self-labeling step depends heavily on the quality of the initial features. If the autoencoder picks up on dataset biases (like background color) rather than objects, the clusters will be meaningless.
  • Hyperparameter Sensitivity: While the model is robust to the number of clusters (as long as there are enough to capture the diversity), finding the optimal latent dimension size still requires careful tuning.
  • Future Directions: The team plans to explore disentanglement—separating the context of a scene from the object itself—to make the feature extraction even more robust for real-world deployment.

Summary updated

BibTeX
@misc{park2021what,
  author = {JuneKyu Park and Jeong-Hyeon Moon and Namhyuk Ahn and Kyung-Ah Sohn},
  title = {{What is Wrong with One-Class Anomaly Detection?}},
  year = {2021},
  eprint = {2104.09793},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2104.09793},
}
Figure