Multi-Cue Anomaly Detection and Localization under Data Contamination

Anindya Sundar Das, Monowar BhuyanarXiv 2026

TL;DR

Most visual anomaly detection models assume perfectly clean training data and zero access to labeled anomalies—two assumptions that rarely hold true in real-world industrial settings. This paper introduces a robust framework that leverages a handful of labeled anomalies alongside an adaptive sample reweighting mechanism to neutralize training data contamination. By fusing statistical deviation, predictive uncertainty, and spatial segmentation cues, the model achieves state-of-the-art anomaly detection and explainable localization even under heavy data corruption.

What Problem Does This Paper Address?

In an ideal world, visual anomaly detection (VAD) models for industrial quality control or medical imaging are trained on perfectly curated datasets containing only "normal" samples. In reality, training data is frequently contaminated with unlabeled anomalies due to sensor errors, legacy system issues, or human mislabeling.

When unsupervised models are exposed to this contaminated data, they mistakenly learn to treat defects as normal behavior, severely degrading their performance. Furthermore, purely unsupervised methods miss out on the valuable discriminative insights that even a tiny number of real anomaly examples can provide. The authors tackle this dual challenge: how can we build a VAD system that is robust to training data contamination while effectively exploiting limited (few-shot) anomaly supervision?

Methods

The authors propose a multi-cue framework built on top of an adaptive deviation learning backbone. The architecture is split into three tightly coupled components:

Fig. 1: Overview of the proposed framework. During training, a segmentation branch, a deviation module, and an uncertainty (entropy) module are learned using synthetic anomaly generation and limited anomaly supervision. At inference, anomaly detection is obtained via tri-signal score fusion, while anomaly localization is produced by a separate gradient-based fusion module that aggregates signal-specific gradients to generate a spatial heatmap.
  1. Contamination-Robust Backbone: The model uses a pre-trained CNN feature encoder to extract multi-scale representations. To handle contaminated training data, it employs Adaptive Sample Importance Learning. Using an $\alpha$-divergence formulation, the framework dynamically calculates loss values during minibatches and down-weights high-loss samples (which are highly likely to be contaminated outliers), preventing them from corrupting the network.
  2. Multi-Cue Anomaly Scoring: Instead of relying on a single brittle metric, the system extracts three complementary signals during inference and fuses them using a weighted geometric mean:
  3. Deviation Score ($s_{dev}$): Measures how far a sample's features depart from a normal statistical reference distribution.
  4. Uncertainty Score ($s_{ent}$): Derived from the entropy of an auxiliary classification branch, capturing predictive inconsistency.
  5. Segmentation Score ($s_{seg}$): A pixel-level activation score highlighting spatial abnormalities.
  6. Gradient-Based Localization: To make the model explainable, the framework backpropagates the gradients of all three anomaly signals relative to the input image and intermediate features. These signal-specific gradients are aggregated, upsampled, and smoothed to form a final saliency map ($H(x)$) that visually highlights the defect.

Supervision is augmented by combining synthetically generated pseudo-anomalies (via Perlin noise) with a very small set ($m=10$) of real few-shot anomaly anchors.

Datasets

The framework was evaluated on two widely accepted visual anomaly detection benchmarks:

  • MVTec AD: Contains 15 industrial categories spanning texture and object-based inspection tasks (5,354 total images).
  • VisA: Consists of 12 categories featuring more complex, irregular, and multi-object structures (9,621 total images).

To rigorously test robustness, the authors implemented a Contaminated Training Protocol, deliberately injecting noise-perturbed anomalous samples into the clean training sets at ratios ranging from 5% to 20%.

Key Insights and Ideas

  • The Power of the Geometric Mean: Fusing the three anomaly cues via a weighted geometric mean acts as a natural filter for false positives. If an individual cue generates a spurious response but the other two remain low, the geometric mean heavily penalizes the inconsistency, yielding a much more stable final score.
  • Few-Shot Anchors Prevent Overfitting: While synthetic anomalies (like Perlin noise) help teach the model what a generic deviation looks like, they often contain generation artifacts. Introducing just 10 real anomalies acts as sparse but reliable "anchors" that guide the deviation objective toward the true anomaly manifold without causing the model to overfit to a specific defect type.

Key Results

The proposed framework consistently outperformed state-of-the-art baselines (including PatchCore, PaDiM, and DestSeg) under varying levels of data corruption.

Fig. 3: Robustness evaluation: Image-level and pixel-level AUROC under varying anomaly contamination rates on the MVTec and VisA datasets.

As shown in the robustness curves above, standard feature-based methods like PatchCore and PaDiM experience sharp performance drops as contamination increases from 5% to 20%. In contrast, the proposed method degrades gracefully, maintaining stable and high image-level AUROC scores even when 20% of the training data is corrupted.

Qualitatively, the gradient-based fusion mechanism delivers highly accurate and visually coherent localization maps across diverse defect types:

Fig. 2: Anomaly localization examples showing input images, ground-truth masks, predicted heatmaps, predicted masks, and segmentation outputs for both MVTec AD and VisA.

Limitations and Future Work

While the framework demonstrates excellent robustness and competitive localization performance, the authors note that pixel-level localization remains highly challenging on datasets like VisA, where anomalies are naturally fragmented, sparse, or possess ambiguous boundaries. Because the model focuses on learning deviation-consistent scores rather than directly optimizing dense pixel-wise boundaries, dedicated segmentation models still hold a slight edge in boundary precision.

The authors plan to explore adaptive weighting mechanisms for the multiple anomaly signals and integrate tighter semantic-aware localization to improve pixel-level precision on more complex, general-purpose datasets.

Summary updated

BibTeX
@misc{das2026multi,
  author = {Anindya Sundar Das and Monowar Bhuyan},
  title = {{Multi-Cue Anomaly Detection and Localization under Data Contamination}},
  year = {2026},
  eprint = {2601.22913},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2601.22913},
}
Figure