Skip to main content
QUICK REVIEW

[Paper Review] Self-Supervised Training with Autoencoders for Visual Anomaly Detection

Alexander Bauer, Nakajima, Shinichi|arXiv (Cornell University)|Jun 23, 2022
Anomaly Detection Techniques and ApplicationsComputer Science5 citations
TL;DR

This paper proposes a self-supervised autoencoder framework for visual anomaly detection that improves reconstruction-based anomaly scoring by training on corrupted inputs using two objectives inspired by neural image inpainting. The method achieves state-of-the-art performance on the MVTec AD dataset, especially on texture categories, by learning to reconstruct normal patterns while filtering out anomalies through local consistency, enabling highly accurate detection and localization with a single forward pass.

ABSTRACT

We focus on a specific use case in anomaly detection where the distribution of normal samples is supported by a lower-dimensional manifold. Here, regularized autoencoders provide a popular approach by learning the identity mapping on the set of normal examples, while trying to prevent good reconstruction on points outside of the manifold. Typically, this goal is implemented by controlling the capacity of the model, either directly by reducing the size of the bottleneck layer or implicitly by imposing some sparsity (or contraction) constraints on parts of the corresponding network. However, neither of these techniques does explicitly penalize the reconstruction of anomalous signals often resulting in poor detection. We tackle this problem by adapting a self-supervised learning regime that exploits discriminative information during training but focuses on the submanifold of normal examples. Informally, our training objective regularizes the model to produce locally consistent reconstructions, while replacing irregularities by acting as a filter that removes anomalous patterns. To support this intuition, we perform a rigorous formal analysis of the proposed method and provide a number of interesting insights. In particular, we show that the resulting model resembles a non-linear orthogonal projection of partially corrupted images onto the submanifold of uncorrupted samples. On the other hand, we identify the orthogonal projection as an optimal solution for a number of regularized autoencoders including the contractive and denoising variants. We support our theoretical analysis by empirical evaluation of the resulting detection and localization performance of the proposed method. In particular, we achieve a new state-of-the-art result on the MVTec AD dataset -- a challenging benchmark for visual anomaly detection in the manufacturing domain.

Motivation & Objective

  • To address the limitation of standard autoencoders in distinguishing anomalous from normal regions due to similar reconstruction errors.
  • To improve anomaly detection and localization by incorporating discriminative information during self-supervised training without requiring anomaly annotations.
  • To design a training regime that explicitly discourages reconstruction of anomalous patterns by leveraging data manifold structure.
  • To enable efficient inference via a single forward pass, avoiding memory-intensive mechanisms like feature memory banks.
  • To demonstrate state-of-the-art performance on the MVTec AD benchmark, particularly on texture and texture-like object categories.

Proposed method

  • Train a deep convolutional autoencoder on partially corrupted images using two self-supervised objectives derived from neural image inpainting.
  • Use objective (1) to regularize locally consistent reconstructions, acting as a filter that replaces irregularities with plausible normal patterns.
  • Use objective (4) to jointly minimize reconstruction error on normal regions and maximize error on anomalous regions, resembling a segmentation objective.
  • Apply data augmentations such as occlusions and rotations to generate corrupted inputs during training, enhancing robustness to diverse anomaly types.
  • Formally analyze the model as approximating a non-linear orthogonal projection onto the manifold of normal examples, justifying reconstruction error as an anomaly score.
  • Train using end-to-end backpropagation with a trade-off hyperparameter λ to balance reconstruction and anomaly-aware regularization.

Experimental results

Research questions

  • RQ1Can self-supervised training with autoencoders improve anomaly detection by explicitly discouraging reconstruction of anomalous patterns?
  • RQ2How does training with inpainting-inspired objectives compare to standard reconstruction loss in detecting subtle anomalies close to the data manifold?
  • RQ3Does combining local consistency regularization with anomaly-aware loss improve localization performance without overfitting to specific corruption patterns?
  • RQ4To what extent does the choice of image corruption method affect model generalization and overfitting?
  • RQ5Can a single forward pass inference with no memory banks achieve state-of-the-art performance in visual anomaly detection?

Key findings

  • The proposed method achieves state-of-the-art performance on the MVTec AD dataset, particularly on the texture subset, outperforming recent methods in both detection and localization tasks.
  • On the texture subset, the method consistently surpasses existing approaches by a significant margin, demonstrating superior generalization to subtle and complex anomalies.
  • The model trained with objective (1) acts as a filter that replaces anomalous patterns with locally consistent reconstructions, enabling detection of anomalies lying close to the normal data manifold.
  • The model trained with objective (4) achieves higher localization accuracy by amplifying reconstruction error on anomalous regions, approaching segmentation-like performance.
  • Despite higher sensitivity to corruption method and hyperparameter tuning, objective (4) yields substantial improvements in localization, as shown in Figure 11 for glue drops on wood.
  • Ensembling models trained with objectives (1) and (4) shows potential for further performance gains, suggesting complementary strengths in detection and localization.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.