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

SoftPatch+: Fully Unsupervised Anomaly Classification and Segmentation

Chengjie Wang, Xi Jiang, Bin-Bin Gao, Zhenye Gan, Yong Liu, Feng Zheng, Lizhuang Ma · DOI

Abstract

Traditional unsupervised anomaly detection (AD) models often assume a perfectly "clean" training set, a condition rarely met in real-world industrial environments where datasets are frequently polluted with defective samples. This paper introduces SoftPatch+, a robust framework designed for fully unsupervised AD that remains effective even under significant data contamination. By employing a patch-level denoising strategy and a multi-discriminator fusion approach, SoftPatch+ constructs a soft-weighted memory bank that mitigates the influence of noisy training samples. Experimental results on MVTecAD, ViSA, and BTAD benchmarks demonstrate that SoftPatch+ maintains high performance—achieving an image-level AUROC of 0.982 on MVTecAD with 10% noise—and remains stable even when the training set contains up to 40% anomalies.

Introduction: The Challenge of Noisy Training Data

In academic research, unsupervised anomaly detection typically starts with an idealized training set containing only "normal" samples. However, on a real-world factory floor, it is nearly impossible to guarantee a 100% clean dataset; defective products inevitably enter the training pool. Existing state-of-the-art methods, such as PatchCore, are often "overconfident," assuming every sample in their memory bank is normal. When defects like scratches or dents are present in the training data, these models learn to treat them as normal, leading to a catastrophic drop in detection performance during testing.

Conceptual comparison of SoftPatch+ against previous methods showing how it handles noisy training data.

SoftPatch+ addresses this by treating the training process as a denoising task, allowing the model to distinguish anomalies despite being trained on a noisy, unlabelled mixture of normal and abnormal samples.

Methodology: Patch-Level Denoising and Soft-Weighting

SoftPatch+ builds upon the popular memory-bank-based AD framework but introduces three critical layers of noise-awareness:

  1. Patch-level Denoising: Instead of discarding entire images (which might still contain 90% "normal" pixels), the authors analyze data at the patch level. This maximizes data usage by preserving the healthy parts of a defective image.
  2. Multi-Discriminator Fusion: To identify which patches are noisy, SoftPatch+ fuses three distinct types of discriminators: Nearest Neighbor (distance-based), Multi-Variate Gaussian (statistical distribution), and Local Outlier Factor (LOF) (density-based). This fusion provides a robust solution that adapts to varying levels of data pollution.
  3. Soft-Weighting Memory Bank: Rather than a binary "keep or toss" approach, the model assigns an "outlier score" to each patch. During inference, these scores act as soft weights, down-weighting the influence of suspicious patches when calculating the final anomaly score for a test image.
Detailed architecture of the SoftPatch+ framework, illustrating the flow from feature grouping to noise discovery and denoising.

Experimental Results

The authors evaluated SoftPatch+ on major industrial benchmarks including MVTecAD, ViSA, and BTAD. To simulate real-world conditions, they introduced noise ratios ranging from 2% to 40%.

  • Superior Robustness: On MVTecAD with 10% noise, SoftPatch+ achieved an image-level AUROC of 0.982, nearly matching the performance of models trained on perfectly clean data.
  • Resilience to High Noise: While PatchCore’s performance drops toward 70% AUROC as noise increases, SoftPatch+ remains stable. Even at 40% noise, it maintains high accuracy where other models fail.
  • Efficiency: Despite the extra denoising steps, SoftPatch+ maintains an inference speed of 12 FPS on a V100 GPU, making it suitable for real-time industrial applications.

Conclusion and Future Work

SoftPatch+ effectively bridges the gap between idealized research settings and the realities of industrial data collection. By shifting the focus to patch-level denoising and soft-weighting, it provides a resilient framework for fully unsupervised anomaly detection. Future work will focus on extending these methods to dynamic video data and improving computational efficiency for even larger-scale datasets.

Summary updated

BibTeX
@article{wang2024softpatch,
  author = {Chengjie Wang and Xi Jiang and Bin-Bin Gao and Zhenye Gan and Yong Liu and Feng Zheng and Lizhuang Ma},
  title = {{SoftPatch+: Fully Unsupervised Anomaly Classification and Segmentation}},
  journal = {Pattern Recognition},
  year = {2024},
  doi = {10.1016/j.patcog.2024.111295},
}
Figure