NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Leveraging Learning Bias for Noisy Anomaly Detection*

Yuxin Zhang, Yunkang Cao, Yuqi Cheng, Yanan Sun, Weiming Shen

TL;DR

This paper tackles the challenge of anomaly detection when the training data itself is contaminated with anomalies (Fully Unsupervised Image Anomaly Detection or FUIAD). They propose a novel two-stage framework that cleverly exploits the inherent "learning bias" of neural networks – how they naturally learn normal patterns better than anomalies – to first clean the training data and then train a robust anomaly detector.

What Problem Does This Paper Address?

Traditional anomaly detection methods assume that the training data is perfectly "clean," meaning it contains only normal examples. However, in real-world scenarios, especially in industrial settings, it's very common for training datasets to be contaminated with unlabeled anomalies. This contamination can cause anomaly detection models to mistakenly learn these anomalous patterns as normal, severely degrading their performance when encountering actual anomalies during testing. The paper focuses on the "Fully Unsupervised Image Anomaly Detection" (FUIAD) problem, where the goal is to detect anomalies without any labeled anomaly data during training, and crucially, without assuming the training data is anomaly-free.

Methods

The core of the proposed solution is a two-stage framework that leverages what the authors call "inherent learning bias" in neural networks. This bias arises from two key observations:

  1. Statistical Dominance of Normal Samples: Normal samples are usually far more numerous than anomalies in training data. This imbalance naturally leads models to prioritize learning stable normal patterns.
  2. Feature-Space Divergence: Normal samples tend to have high consistency within their feature representations, while anomalies are often diverse and scattered in feature space. This makes anomalies harder for models to learn consistently.

The framework works as follows:

  • Stage 1: Contamination-Resilient Screening:
    • The contaminated training dataset ($D_{train}$) is randomly partitioned into multiple smaller subsets.
  • A separate "sub-model" is trained on each subset.
  • Each sub-model is then used to predict anomaly scores for all samples in the original training set.
  • The key insight here is that sub-models trained on partial data will be very confident about normal patterns (which are well-represented in their subset) but will struggle with anomalies, assigning them higher scores. When these scores are aggregated across all sub-models, normal samples consistently receive low scores, while anomalies receive higher, more varied scores.
  • By selecting the top $t\%$ of samples with the lowest aggregated anomaly scores, a "purified" dataset ($D_{pure}$) is created, significantly reducing contamination.
  • Stage 2: Anomaly Detection via Cleaned Dataset:
    • A final anomaly detection model is trained from scratch on the purified dataset ($D_{pure}$).
  • Since $D_{pure}$ is much cleaner, this final model can learn more discriminative features for anomaly detection without being misled by anomalous patterns.

The authors note that this framework is model-agnostic, meaning it can be applied to various existing unsupervised anomaly detection backbones. They use Dinomaly (a Transformer-based reconstruction model) as their base for experiments.

Datasets

  • Real-IAD: This is the primary dataset used for evaluation. It's described as a large-scale, real-world, multi-view industrial anomaly detection benchmark with 150,000 images across 30 industrial object categories. It's notable for its substantial number of anomalous samples and larger defect proportions compared to some other benchmarks, making it suitable for evaluating robust anomaly detection methods. The training sets are designed with controlled anomaly contamination levels.

Key Insights and Ideas

  • Leveraging "Bad" Data to Clean Data: The most striking insight is turning the problem of contaminated training data into an advantage. Instead of just trying to ignore anomalies, the method uses the way models learn from noisy data to identify and remove those noisy samples.
  • Learning Bias as a Feature Filter: The paper reframes the inherent limitations of neural networks (difficulty learning sparse, diverse data) as a beneficial characteristic for anomaly detection in noisy settings. This "bias" acts as a natural filter.
  • Consensus is Key: Aggregating predictions from multiple sub-models trained on different data partitions is crucial. This cross-model consensus helps to reliably distinguish between consistently learned normal patterns and inconsistently learned anomalous ones.
  • Model Agnosticism: The framework's ability to work with any unsupervised anomaly detection backbone is a significant practical advantage, allowing for easy integration into existing pipelines.

Key Results

  • State-of-the-Art Performance: The proposed method achieves state-of-the-art (SOTA) performance in anomaly detection (I-AUROC) under low noise conditions ($\alpha=0.0$ and $\alpha=0.1$) on the Real-IAD benchmark. It also achieves the second-best result at $\alpha=0.2$.
  • Exceptional Anomaly Localization: The method consistently achieves SOTA performance for anomaly localization (AUPRO) across all evaluated noise ratios ($\alpha \in \{0, 0.1, 0.2, 0.4\}$), even under high contamination levels ($\alpha \geq 0.2$), maintaining AUPRO scores exceeding 94%.
  • Contamination Resilience: Ablation studies (Fig. 4) demonstrate that the aggregated anomaly scoring strategy effectively reduces the number of anomalous samples in the purified dataset ($D_{pure}$) compared to using individual sub-models, highlighting the framework's robustness to noise.
  • Optimal Subset Count: The study found that using 5 subsets ($k=5$) provided the best balance for contamination suppression and effective learning, avoiding issues with too few or too many subsets.

Limitations and Future Work

  • Performance Degradation with High Noise: While robust, the paper acknowledges that performance degrades as the noise ratio ($\alpha$) increases beyond 0.2. This is because the reduced dominance of normal samples weakens the learning bias, leading sub-models to assimilate more anomalous features.
  • Future Work: The authors suggest exploring adaptive subset partitioning (instead of random) and advanced fusion mechanisms to further enhance contamination resilience and improve performance at higher noise levels. They also plan to investigate how to further improve the model's ability to handle novel anomaly types.

Summary updated

BibTeX
@misc{zhang2025leveraging,
  author = {Yuxin Zhang and Yunkang Cao and Yuqi Cheng and Yanan Sun and Weiming Shen},
  title = {{Leveraging Learning Bias for Noisy Anomaly Detection*}},
  year = {2025},
  eprint = {2508.07441},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.07441},
}
Figure