Two-Stream Decoder Feature Normality Estimating Network for Industrial Anomaly Detection

Chaewon Park, Minhyeok Lee, Suhwan Cho, Donghyeong Kim, Sangyoun Lee

In the world of automated manufacturing, spotting a hairline crack on a tile or a tiny scratch on a metal nut is a high-stakes game of "Where’s Waldo?" Traditional deep learning approaches often use Autoencoders (AEs) for this task. The logic is simple: train a model to reconstruct "normal" images perfectly. When it encounters an anomaly, it should fail to reconstruct it, leaving a high error that signals a defect.

However, there is a catch: modern neural networks are too good at their jobs. They generalize so well that they often reconstruct the defects they’ve never seen before, rendering them invisible to the system. A new paper from researchers at Yonsei University, titled "Two-stream Decoder Feature Normality Estimating Network (TSDN)," proposes a clever architectural fix to this "perfect generalization" problem.

TL;DR

The TSDN framework prevents autoencoders from accidentally reconstructing defects by using a "Feature Normality Estimator" (FNE) that identifies and suppresses abnormal features in real-time. By combining synthetic anomaly generation (SURF) with a two-stream decoder, the model achieves state-of-the-art results on industrial benchmarks, particularly in texture-based defect detection.

What Problem Does This Paper Address?

The core challenge in industrial anomaly detection is data imbalance. You have millions of "normal" samples but very few examples of actual defects (cracks, stains, etc.). Consequently, models are usually trained in a "one-class" setting—learning only what "normal" looks like.

The authors identify a major flaw in the popular U-Net style architectures used for this task. While skip connections (which pass high-resolution features from the encoder directly to the decoder) are great for preserving detail, they also act as a "highway" for abnormal features. If a test image has a scratch, the skip connection carries that scratch information straight to the output, allowing the model to reconstruct the defect perfectly. This makes the anomaly impossible to detect via reconstruction error.

Methods

The researchers introduced three key components to break this cycle:

  1. SURF (Superpixel Random Filling): Since real anomalies are rare, the authors create "fake" ones during training. They divide an image into superpixels and fill some with random colors. This teaches the model to recognize what a "distorted" region looks like.
  2. TSDN (Two-stream Decoder Network): Instead of one decoder, they use two:
  3. $DCD_A$ (Abnormality Decoder): Specifically trained to predict a binary mask of where the anomalies (the SURF distortions) are located.
  4. $DCD_N$ (Normality Decoder): Tasked with reconstructing the original, clean image.
  5. FNE (Feature Normality Estimator): This is the "secret sauce." It sits between the two decoders. It compares the predicted anomaly mask from $DCD_A$ with the feature maps in the encoder. If a specific feature channel looks too much like the anomaly mask, the FNE suppresses it (multiplies it by a low weight) before it reaches the Normality Decoder. This forces the model to "fill in" the abnormal area using only normal features from the surrounding context.

Datasets

The model was evaluated on the MVTec AD dataset, the gold standard for industrial anomaly detection. It contains 15 categories:

  • 5 Textures: Carpet, Grid, Leather, Tile, Wood.
  • 10 Objects: Bottle, Cable, Capsule, Hazelnut, Metal nut, Pill, Screw, Toothbrush, Transistor, Zipper.

Key Insights and Ideas

  • The Skip Connection Paradox: The paper proves that while skip connections are usually a "must-have" for image tasks, they are a liability for anomaly detection unless carefully gated.
  • Channel-wise Gating: The FNE doesn't just blur the image; it operates on the channels of the feature maps. It identifies which specific "neurons" are firing in response to the defect and turns them off.
  • Self-Supervised Synergy: By training the model to both detect a mask and reconstruct the image simultaneously, the two tasks reinforce each other. The mask tells the reconstructor where to be skeptical of its input data.

Key Results

The TSDN model showed significant improvements over previous state-of-the-art (SOTA) methods:

  • Image-level Detection: On the MVTec benchmark, TSDN achieved an average AUC of 92.8%, outperforming other popular models like RIAD (91.7%) and DivA (89.5%).
  • Texture Mastery: The model was particularly dominant in texture categories, achieving 98.2% AUC, a significant jump over previous methods.
  • Ablation Success: The authors showed that adding skip connections to a standard AE actually dropped performance (from 87.3% to 70.7% on some metrics), but adding their FNE module not only recovered that loss but pushed the performance to new heights (93.9%).

Limitations and Future Work

While the model is a powerhouse for textures, its performance on complex objects (like the "Transistor" category) was lower than some specialized competitors. Objects often have complex geometries where a "normal" part of the object might be mistaken for an anomaly if the alignment isn't perfect.

The authors suggest that future work could involve refining how the model handles these structural complexities, perhaps by incorporating more geometric priors or improving the "filling" capability of the normality decoder when large chunks of an object are missing or distorted.

Paper Citation: Park, C., Lee, M., Cho, S., Kim, D., & Lee, S. (2023). Two-stream Decoder Feature Normality Estimating Network for Industrial Anomaly Detection. arXiv:2302.09794v1 [cs.CV].

Summary updated

Abstract

Image reconstruction-based anomaly detection has recently been in the spotlight because of the difficulty of constructing anomaly datasets. These approaches work by learning to model normal features without seeing abnormal samples during training and then discriminating anomalies at test time based on the reconstructive errors. However, these models have limitations in reconstructing the abnormal samples due to their indiscriminate conveyance of features. Moreover, these approaches are not explicitly optimized for distinguishable anomalies. To address these problems, we propose a two-stream decoder network (TSDN), designed to learn both normal and abnormal features. Additionally, we propose a feature normality estimator (FNE) to eliminate abnormal features and prevent high-quality reconstruction of abnormal regions. Evaluation on a standard benchmark demonstrated performance better than state-of-the-art models.
BibTeX
@inproceedings{park2023two,
  author = {Chaewon Park and Minhyeok Lee and Suhwan Cho and Donghyeong Kim and Sangyoun Lee},
  title = {{Two-Stream Decoder Feature Normality Estimating Network for Industrial Anomaly Detection}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2023},
  url = {https://openreview.net/forum?id=O7F-SVTYJbg},
}

Loading related content...

Figure