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

Robust Semi-Supervised Anomaly Detection via Adversarially Learned Continuous Noise Corruption

Jack W Barker, Neelanjan Bhowmik, Yona Falinie A Gaus, Toby P BreckonarXiv 2023

TL;DR

Standard autoencoders often fail at anomaly detection because they learn a lazy "identity mapping" that reconstructs unseen anomalies just as well as normal data. This paper introduces Adversarially Learned Continuous Noise (ALCN), a method that trains a custom noise generator to intelligently corrupt training images. This forces a denoising autoencoder to learn robust, semantic features of normal data, significantly boosting anomaly detection performance while maintaining lightning-fast inference speeds.

What Problem Does This Paper Address?

In semi-supervised anomaly detection, models are trained exclusively on "normal" data because anomalous examples are rare, sporadic, and unpredictable. Deep autoencoders (AEs) are a popular choice for this task: they learn to compress and reconstruct normal data, meaning that an unseen anomaly should produce a high reconstruction error, flagging it as abnormal.

However, standard autoencoders suffer from a critical flaw: they easily overfit and converge to a pass-through identity function. Instead of learning the underlying structure of the data, they simply learn to copy input pixels directly to the output. When an anomaly appears at test time, the overfitted autoencoder reconstructs it perfectly, destroying the reconstruction error gap needed to detect it. Existing solutions either introduce generic noise (which is too easy to clean) or use complex adversarial training loops that are computationally prohibitive for real-world deployment.

Methods

The authors propose a framework that sets up a minimax game between two networks trained simultaneously:

  1. The Noise Generator ($G_{noise}$): This network takes standard Gaussian noise and generates a continuous noise mask tailored specifically to the training dataset. Its objective is to maximize the reconstruction error of the autoencoder by creating the most challenging corruption possible.
  2. The Denoising Autoencoder ($G_{denoise}$): This network takes the corrupted image and attempts to reconstruct the original, clean input, minimizing the reconstruction error.

To prevent the noise generator from completely obliterating the image, the input and the noise are combined using a linear blending operator: $$\text{noise}(x,n) = \alpha(x) + (1-\alpha)(n)$$ where the blending weight $\alpha$ is randomly sampled at each training step.

Furthermore, instead of relying on standard pixel-space loss ($L_2$), which often results in blurry reconstructions, the authors incorporate Focal Frequency Loss (FFL). FFL forces the autoencoder to match the frequency spectrum of the target image, ensuring that high-frequency spatial details are preserved.

Figure 1: Overview of adversarial noise learning architecture featuring: top-Noise Generator Module Gnoise, bottom- Denois- ing module Gdenoise.

Datasets

The model was rigorously evaluated across both synthetic benchmarks and challenging real-world datasets:

  • MNIST: Standard handwritten digits dataset, evaluated using two distinct "leave-one-out" protocols.
  • CIFAR-10: Low-resolution natural images across 10 object classes.
  • MVTec-AD: A real-world industrial quality control dataset consisting of 15 classes of defect-free objects and their anomalous counterparts.
  • Plant Village: An agricultural dataset containing images of healthy and diseased plant leaves, featuring high intra-class variance.

Key Insights and Ideas

  • Bespoke Noise Beats Generic Noise: Traditional denoising autoencoders use static noise (like Gaussian or salt-and-pepper). ALCN generates noise that adapts to the geometry and style of the dataset (e.g., mimicking the strokes of handwritten digits). This makes the denoising task significantly harder, forcing the network to learn deep semantic features rather than low-level pixel statistics.
  • Frequency Awareness is Crucial: Standard pixel losses struggle to capture fine textures. By optimizing in the Fourier domain using Focal Frequency Loss, the model becomes highly sensitive to structural anomalies, which is particularly beneficial for industrial defect detection.
Visualisation of frequency domain training with and without FFL
  • Simplicity Yields Efficiency: While complex Generative Adversarial Networks (GANs) can achieve high anomaly detection accuracy, they suffer from training instability and slow inference. ALCN achieves state-of-the-art results using a lightweight autoencoder backbone, making it practical for real-time applications.

Key Results

  • Benchmark Performance: On MNIST and CIFAR-10 (under Protocol 2), ALCN achieved state-of-the-art average Area Under the Curve (AUC) scores of 0.989 and 0.742, respectively, outperforming recent adversarial masking methods like OLED.
  • Real-World Success: On the challenging MVTec-AD industrial dataset, ALCN achieved the highest average AUC score of 0.83, outperforming baseline methods on 10 out of the 15 classes. On the Plant Village dataset, it matched the top-performing Skip-GANomaly architecture with an AUC of 0.77.
  • High Efficiency: ALCN demonstrated an inference speed of 4.54 ms per batch on MNIST and 5.23 ms on CIFAR-10—orders of magnitude faster than traditional GAN-based anomaly detection methods like AnoGAN (which clocks in at over 600 ms).

Limitations and Future Work

  • Training Overhead: While inference is incredibly fast, co-training the adversarial noise generator alongside the autoencoder adds a significant memory and computational bottleneck during the training phase.
  • Hyperparameter Tuning: The success of the method relies heavily on the continuous random sampling of the blending parameter $\alpha$ to prevent the noise generator from finding trivial adversarial solutions that completely destroy the input signal.

The authors suggest that future work could explore applying this continuous adversarial corruption strategy to more complex generative backbones beyond standard autoencoders.

Summary updated

BibTeX
@misc{barker2023robust,
  author = {Jack W Barker and Neelanjan Bhowmik and Yona Falinie A Gaus and Toby P Breckon},
  title = {{Robust Semi-Supervised Anomaly Detection via Adversarially Learned Continuous Noise Corruption}},
  year = {2023},
  eprint = {2303.03925},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2303.03925},
}

Loading related content...

Figure