Robust Anomaly Detection Under Training Data Contamination

You are reading version 1 of this direction, frozen 2026-10-04. The latest version is version 2.

Version 1 of 2311 papers402 conceptsfrozen 2026-10-04

In the standard textbook definition of anomaly detection, we assume access to a "clean" training set—a pristine collection of examples representing only normal behavior. From this, a model learns a boundary or a reconstruction pattern, and anything that deviates from it is flagged as an outlier.

In the real world, this assumption is a luxury. Industrial datasets, medical logs, and network traffic are almost always "polluted" or "contaminated" with unlabeled anomalies. When a model is trained on this "dirty" data, it doesn't just ignore the outliers; it incorporates them into its definition of normality. This phenomenon, often called training data contamination, causes the model to "swallow" the very signals it is meant to detect, leading to high false-negative rates during deployment.

The Mechanism of Failure: Why Models Learn Outliers

Why can't a deep neural network simply ignore a few bad apples in a large dataset? The problem lies in how these models optimize their loss functions. Laura Beggel and Michael Pfeiffer observe that in unsupervised settings, like those using autoencoders, anomalies initially produce large reconstruction errors. However, once the model has mastered the "easy" normal data and its loss plateaus, the remaining large gradients from the anomalies become the dominant signal. The model eventually "overfits" to these outliers to minimize the total loss, effectively masking them.

This sensitivity is particularly acute in models that learn representations from scratch. Jakob Bozic demonstrates that when models internalize anomalous features as part of the standard distribution, they lose the ability to distinguish similar defects during inference. This "blurred distinction" is the central challenge of robust anomaly detection.

Strategy 1: Iterative Refinement and Filtering

One of the most intuitive ways to handle contamination is to "clean" the dataset during the training process. Instead of trusting every sample, researchers have developed methods to identify and down-weight likely anomalies.

  • Loss-based Filtering: Cheng Feng and colleagues proposed a model-agnostic method that monitors loss fluctuations in the very first few epochs of training. Because normal data is usually more consistent, samples that exhibit volatile or high loss early on are likely anomalies and can be filtered out.
  • Iterative Refinement: The SRR (Self-supervise, Refine, Repeat) framework by Jinsung Yoon and Kihyuk Sohn uses an ensemble of classifiers to iteratively prune the training set. Similarly, the Iterative Anomaly Detection (IAD) framework by Minkyung Kim and Tae-Hyun Oh focuses on stable sample rankings rather than hard labels to boost robustness.
  • Iterative Training Set Refinement (ITSR): Laura Beggel also introduced ITSR, which uses Adversarial Autoencoders and 1-class SVMs to reject anomalies during training, preventing the model from ever learning to reconstruct them.

Strategy 2: Leveraging Pre-trained Priors

A significant finding in recent years is that models using pre-trained features are naturally more resilient to contamination than those trained from scratch.

Liron Bergman and Yedid Hoshen showed that a simple k-Nearest Neighbor (kNN) approach applied to features from a standard pre-trained ResNet (DN2) can outperform complex self-supervised methods. Because the feature extractor was trained on a different, massive dataset (like ImageNet), its "understanding" of what constitutes a feature is not biased by the specific anomalies present in the contaminated target training set. Jakob Bozic confirmed this with the Anomaly Detection Robustness (ADR) metric, showing that pre-trained features provide a "buffer" against local data pollution.

Strategy 3: Robust Representation Learning

Other researchers focus on changing the learning objective itself to be "contamination-resistant."

  • Contrastive Learning: Gaoang Wang and Xinchao Wang developed HSCL, which uses hierarchical semi-supervised contrastive learning. By optimizing sample-to-prototype relations, the model can group normal samples together while pushing outliers—even unlabeled ones—away from the core clusters.
  • Normalizing Flows: For time series, Haoyu Liu and Jiming Chen introduced MTGFlow. This method uses entity-aware normalizing flows to model complex sensor interdependencies. By treating anomalies as rare, low-density events in a probabilistic space, the model can function effectively with "zero known labels" and significant training noise.
  • One-Class Anchoring: Lukas Ruff and Marius Kloft developed Deep SAD, which demonstrates that even a tiny amount of labeled data (both normal and anomalous) can act as an "anchor." These anchors prevent the decision boundary from expanding to include the hidden anomalies in the unlabeled portion of the training set.

From Pristine to Practical

The shift in research from assuming clean data to designing for contaminated data represents a maturation of the field. Whether through iterative cleaning (like SRR), robust feature priors (like DN2), or density-based modeling (like MTGFlow), the goal is to build systems that can establish a baseline of "normalcy" even when the baseline itself is noisy. As Christopher P. Ley notes, in industrial settings, ensuring a perfectly clean dataset is often "prohibitively expensive or physically impossible." Robustness is not just a feature; it is a requirement for real-world deployment.

Papers in this version

Showing 60 of 311 papers.

History & citationVersion 2 · 2026-10-04

Current · Permanent link

  1. Version 2 (latest) · 2026-10-04 · 515 papers
  2. Version 1 · 2026-10-04 · 311 papers
Cite this direction

Latest version (a living page):

@misc{lacuna_training_data_contamination_a3c7502f,
  title = {training data contamination},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/training-data-contamination/rdr_a3c7502fb2d945d8990c9af1a8d94845},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-12-04},
}

This exact version (version 1, frozen text):

@misc{lacuna_robust_anomaly_detection_under_training__a3c7502f_v1,
  title = {Robust Anomaly Detection Under Training Data Contamination},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/robust-anomaly-detection-under-training-data-contamination/rdr_a3c7502fb2d945d8990c9af1a8d94845/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-12-04},
}