Skip to main content
QUICK REVIEW

[Paper Review] Semi-supervised Anomaly Detection using AutoEncoders

Manpreet Singh Minhas, John Zelek|arXiv (Cornell University)|Jan 6, 2020
Anomaly Detection Techniques and ApplicationsComputer Science10 references26 citations
TL;DR

This paper proposes a semi-supervised anomaly detection method using a U-Net-like convolutional autoencoder trained exclusively on normal (defect-free) images. By reconstructing input images and analyzing pixel-wise residuals between input and reconstruction, the method detects anomalies through thresholding, achieving an average F1 score of 0.885 across two datasets, with strong performance on synthetic crack defects and moderate noise in real-world rail surface data.

ABSTRACT

Anomaly detection refers to the task of finding unusual instances that stand out from the normal data. In several applications, these outliers or anomalous instances are of greater interest compared to the normal ones. Specifically in the case of industrial optical inspection and infrastructure asset management, finding these defects (anomalous regions) is of extreme importance. Traditionally and even today this process has been carried out manually. Humans rely on the saliency of the defects in comparison to the normal texture to detect the defects. However, manual inspection is slow, tedious, subjective and susceptible to human biases. Therefore, the automation of defect detection is desirable. But for defect detection lack of availability of a large number of anomalous instances and labelled data is a problem. In this paper, we present a convolutional auto-encoder architecture for anomaly detection that is trained only on the defect-free (normal) instances. For the test images, residual masks that are obtained by subtracting the original image from the auto-encoder output are thresholded to obtain the defect segmentation masks. The approach was tested on two data-sets and achieved an impressive average F1 score of 0.885. The network learnt to detect the actual shape of the defects even though no defected images were used during the training.

Motivation & Objective

  • To develop an anomaly detection method that requires only normal (defect-free) training data, addressing the scarcity of labeled anomalous instances in industrial inspection.
  • To automate defect detection in industrial optical inspection and infrastructure asset management, reducing reliance on slow, error-prone manual inspection.
  • To enable detection of diverse defect shapes and geometries without prior exposure to anomalous samples during training.
  • To evaluate the method’s robustness and sensitivity to threshold selection and illumination variations on real and synthetic datasets.

Proposed method

  • A U-Net-inspired convolutional autoencoder architecture is used, with encoder and decoder blocks using progressively smaller filter sizes and transposed convolutions for reconstruction.
  • Batch normalization and ReLU activation are applied after every convolutional and deconvolutional layer to stabilize training and improve feature learning.
  • The model is trained using mean squared error (MSE) loss between the original input image and the autoencoder’s reconstructed output, with Adam optimizer over 50 epochs.
  • Anomalies are detected by computing a residual map as the pixel-wise difference between input and reconstructed image: R = X − AE(X).
  • Thresholding the residual map produces final defect segmentation masks, with detection sensitivity dependent on threshold choice.
  • The method is trained solely on normal samples, making it suitable for semi-supervised settings where anomalous data is scarce or unavailable.

Experimental results

Research questions

  • RQ1Can a deep autoencoder trained only on normal images detect diverse defect shapes and geometries without any anomalous training data?
  • RQ2How effective is residual-based anomaly detection using autoencoder reconstruction error on real-world and synthetic industrial defect datasets?
  • RQ3How sensitive is the method’s performance to the choice of threshold in the residual map segmentation step?
  • RQ4To what extent do illumination variations and image noise affect false positive detection in real-world data?
  • RQ5Can the method generalize to detect defects of varying shapes and sizes even when not explicitly trained on them?

Key findings

  • The method achieved an F1 score of 0.96 on the synthetic DAGMC8 dataset, demonstrating strong performance in detecting crack defects with minimal noise.
  • On the real-world RSDDsI dataset, the F1 score was 0.81, indicating effective detection but with increased noise and sensitivity to thresholding.
  • The autoencoder successfully learned to reconstruct normal textures and produced meaningful residual maps that highlighted actual defect shapes despite no anomalous training data.
  • The method was sensitive to threshold selection, where small changes led to large variations in segmentation output, indicating a need for robust thresholding strategies.
  • Illumination variations in the RSDDsI dataset were sometimes misclassified as defects, leading to false positives, highlighting limitations in robustness to lighting changes.
  • The approach demonstrated the ability to detect defects with varying geometric shapes and extents, suggesting potential for metric-based defect analysis in industrial applications.

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.