Source-linked AI summary
SoftPatch: Unsupervised Anomaly Detection with Noisy Data
Xi Jiang, Ying Chen, Qiang Nie, Yong Liu, Jianlin Liu, Bin-Bin Gao, Jun Liu, Chengjie Wang, Feng Zheng
TL;DR
Unsupervised anomaly detection commonly assumes clean training data, although real-world training sets can contain noise. SoftPatch uses patch-level denoising and coreset reweighting to address this setting. It reports consistent performance across noise settings, outperforming other methods on the cited benchmarks while remaining comparable without noise.
Problem
Unsupervised anomaly-detection methods rely on clean training data, but noisy samples can make their estimated normal boundary unreliable and degrade detection.
Source: §1 · p. 2Method
SoftPatch assigns patch-level outlier factors for denoising before coreset construction and stores the factors as weights to reweight coreset examples.
Source: §1 · p. 2Results
SoftPatch shows consistent performance across noise settings, outperforming other methods on MVTecAD and achieving optimal results on the original BTAD dataset.
Source: §1 · p. 2, §5 · p. 10Takeaways & Limitations
The paper establishes a baseline for unsupervised anomaly detection with noisy data that also performs well in general settings without noise.
Source: §1 · p. 2The nearest-neighbor baseline assumes noisy samples are much fewer than clean samples.
Source: §3.2.1 · p. 5
Abstract
from arXiv · showhide
Although mainstream unsupervised anomaly detection (AD) algorithms perform well in academic datasets, their performance is limited in practical application due to the ideal experimental setting of clean training data. Training with noisy data is an inevitable problem in real-world anomaly detection but is seldom discussed. This paper considers label-level noise in image sensory anomaly detection for the first time. To solve this problem, we proposed a memory-based unsupervised AD method, SoftPatch, which efficiently denoises the data at the patch level. Noise discriminators are utilized to generate outlier scores for patch-level noise elimination before coreset construction. The scores are then stored in the memory bank to soften the anomaly detection boundary. Compared with existing methods, SoftPatch maintains a strong modeling ability of normal data and alleviates the overconfidence problem in coreset. Comprehensive experiments in various noise scenes demonstrate that SoftPatch outperforms the state-of-the-art AD methods on the MVTecAD and BTAD benchmarks and is comparable to those methods under the setting without noise.
1 Introduction
SoftPatch addresses the vulnerability of unsupervised anomaly detection to noisy training data with patch-level denoising and coreset reweighting. The paper reports stronger results than state-of-the-art methods on noisy benchmarks and a baseline that also performs well without noise.
1 Introduction
- Noisy training data can make the estimated normal boundary unreliable, and existing unsupervised anomaly-detection methods are not designed to be robust to it.In industrial settings, noise can enter through inherent data shift or human misjudgment.Source: §1 · p. 2
- SoftPatch outperforms state-of-the-art methods on MVTecAD and achieves optimal results on the original BTAD dataset.It also establishes a baseline that performs well with additional noise and in general settings without noise.Source: §1 · p. 2
- The paper identifies image sensory anomaly detection with noisy data as a practical setting that had seldom been investigated.The authors describe their work as the first to focus on this setting.Source: §1 · p. 2
- Patch-level denoising removes noisy patches before coreset construction, while outlier factors reweight coreset examples to reduce the impact of noise.The patch-level strategy improves data usage compared with sample-level denoising.Source: §1 · p. 2
2 Related Work
Prior unsupervised anomaly-detection work includes self-supervised tasks, agnostic methods, and feature modeling, while noisy-label recognition methods commonly rely on labeled data. This paper distinguishes its focus on noisy image sensory anomaly detection from semantic and video anomaly detection.
2.1 Unsupervised Anomaly Detection
- Self-supervised anomaly methods use transformations or synthetic defects, but the mismatch between synthetic and real anomalies can limit generalization.CutPaste simulates defects by clipping and pasting image patches, while DRAEM uses Perlin Noise.Source: §2.1 · pp. 2–3
- Agnostic methods include knowledge distillation and image reconstruction, but their long training stages can hinder rapid deployment.The cited methods use teacher–student representation differences or reconstruction errors to detect anomalies.Source: §2.1 · p. 3
- Feature modeling includes distribution estimation, distribution transformation, pretrained-model adaptation, and memory storage; PatchCore uses a coreset memory bank but is described as overconfident and poorly robust to noise.The passage notes that Gaussian modeling can be inadequate for complex data cases.Source: §2.1 · p. 3
2.2 Learning with Noisy Data
- Noisy-label recognition methods for classification and object detection use filtering, relabeling, or expert-model-assisted strategies, but rely on labeled data to correct noise.SoftPatch instead targets noise robustness without introducing labor annotations.Source: §2.2 · pp. 3–4
- The paper focuses on single-image sensory anomaly detection rather than video or semantic anomaly detection, where noise is more similar to normal data and presents greater challenges.The passage also notes that some universal covariate-shift approaches use structures weaker than rapidly developed sensory anomaly-detection methods.Source: §2.2 · p. 4
3 The Proposed Method
SoftPatch filters noisy patches before coreset construction and retains their outlier scores to reweight anomaly scoring at inference. Its patch-level design follows PatchCore’s memory-bank pipeline while addressing noise in the training set.
3.1 Overview
- SoftPatch filters noisy patches before PatchCore-style coreset construction, then uses the remaining denoising scores to scale anomaly scores at inference.Features are grouped by position for noise discrimination; noisy patches are removed while the rest of each image's data is retained.Source: §3.1 · pp. 4–5
3.2 Noise Discriminative Coreset Selection
- Position-grouped patch outlier scores identify noise, and features with the top τ percent scores are removed before coreset sampling.The method groups features by position because an increasingly large feature memory makes noise discrimination using overall statistics infeasible.Source: §3.2 · p. 5, §3.1 · p. 5
3.2.1 Nearest Neighbor
- Nearest-neighbor distance flags large-distance patches as outliers, but uneven cluster spacing can cause clean patches from distant clusters to be mistakenly removed.This baseline assumes noisy samples are much less numerous than clean samples.Source: §3.2.1 · p. 5
3.2.2 Multi-Variate Gaussian
- The multivariate Gaussian method uses batch feature distributions to normalize clean-image features, but small clusters can be classified as outliers when a prominent cluster dominates.A high Mahalanobis distance indicates a high outlier score.Source: §3.2.2 · pp. 5–6
3.2.3 Local Outlier Factor (LOF)
- LOF compares local patch densities to treat clusters more equally, and the experiments found it performed best among the three noise-reduction methods.Its local-density approach also targets high-dimensional patch features and limits the overwhelming effect of large clusters.Source: §3.2.3 · p. 6
3.3 Anomaly Detection based on SoftPatch
- At inference, SoftPatch reweights nearest-memory patch anomaly scores with stored outlier factors and uses the largest reweighted patch score as the image score.Unlike PatchCore, which treats patches equally, SoftPatch's local outlier factors account for the local relationship around the nearest memory node.Source: §3.3 · pp. 6–7
4 Experiments
Experiments evaluate SoftPatch under injected-noise settings on MVTecAD and BTAD, including overlap and no-overlap tests. Results show strong noise robustness, with SoftPatch-LOF achieving the best overall performance among the SoftPatch variants.
4.1 Experimental Details
- Experiments use MVTecAD and BTAD; MVTecAD noise settings inject anomalous test images into training, and evaluation reports image- and pixel-level AUROC plus noisy-to-clean performance gaps.The MVTecAD tests include settings with and without the injected anomalies in the test set.Source: §4.1 · p. 7
4.2 Anomaly Detection Performance with Noise
- On MVTecAD with 10% anomalous training samples, SoftPatch is more robust than other methods for detection and localization, and SoftPatch-LOF performs best among its variants.The comparison covers image-level anomaly detection and pixel-level localization.Source: Table 1 · p. 7, Table 2 · p. 8, §4.2 · p. 8
- SoftPatch achieves a new state-of-the-art result on BTAD without added noise and maintains leading performance when noise is added artificially.BTAD-02 already contains noisy training samples, usually small scratches.Source: Table 3 · p. 8, §4.2 · p. 8
- PatchCore loses up to 3.7% pixel-level AUROC under No overlap and up to 40% AUROC at both levels under Overlap, while SoftPatch-LOF shows no significant drop as noise rises.No overlap removes injected anomalies from the test set; Overlap retains them.Source: §4.2 · pp. 8–9, Figure 3 · p. 9
4.3.1 Effectiveness of the Proposed Modules
- Ablations show the noise discriminator improves pixel-level AUROC robustness, LOF best balances robustness and capacity, and soft weighting adds only minor gains for SoftPatch-Nearest.Soft weighting is used alongside the noise discriminator to further improve final results.Source: §4.3.1 · p. 9, Table 4 · p. 9
4.3.2 Parameter Selection
- Performance is comparatively insensitive to LOF-k above 5, while higher τ improves AUROC under Overlap; experiments fix LOF-k at 6 and τ at 0.15 despite class- and noise-dependent optima.A too-small LOF-k estimates local density poorly, while a large value can connect distinct clusters.Source: §4.3.2 · p. 10, Figure 4 · p. 10
5 Conclusions
SoftPatch maintains consistent performance across noisy settings and outperforms other methods, while the paper emphasizes the practical importance of studying noise in unsupervised anomaly detection.
5 Conclusions
- SoftPatch shows consistent performance across noise settings and outperforms other methods.The paper emphasizes the practical value of investigating noisy data in unsupervised anomaly detection.Source: §5 · p. 10
- Existing methods show slight decreases in some scenes but more significant, potentially catastrophic decreases in others.The paper reports this variation across methods and noisy scenes.Source: §5 · p. 10
- Injected training noise breaks the assumption that training samples are normal and exposes models to anomaly distributions; noisy-data AD needs further research.The passage discusses industrial inspection systems as an application requiring robustness.Source: §5 · p. 10
A.1 Visualization of Coreset
The coreset visualization contrasts how PatchCore, randomly sampled PatchCore, and SoftPatch handle noisy patches and nominal features.
A.1 Visualization of Coreset
- SoftPatch removes noisy patches and models nominal data properly, unlike the two compared methods.Its coreset is described as clean and decentralized.Source: §A.1 · p. 14, Figure 5 · p. 14
- SoftPatch retains some features from noisy samples when they conform to the normal distribution, preserving normal patches from abnormal images.The stated purpose is to enhance model perception.Source: §A.1 · p. 14
A.2 Details of Experimental Results
Table 6 is identified as reporting anomaly-localization performance for all classes on MVTecAD-noise-0.1.
A.2 Details of Experimental Results
- Table 6 covers anomaly-localization performance across all classes on MVTecAD-noise-0.1.The supplied caption does not state the table's cell values or comparisons.Source: Table 6 · p. 14
A.3 Performance Trends in Noise
Performance trends are reported across overlap and no-overlap noise levels: PatchCore declines most visibly as noise increases, while SoftPatch remains consistent.
A.3 Performance Trends in Noise
- Across noise levels, PatchCore declines most visibly, CFLOW and PaDiM are also affected less, and SoftPatch maintains consistent performance.The trends are shown for both no-overlap and overlap noise scenes.Source: §A.3 · pp. 14–15, Figure 6 · p. 15, Figure 7 · p. 15
- In noiseless scenes, SoftPatch is slightly weaker than PatchCore, possibly because its threshold is excessively conservative.The paper presents the threshold explanation as a possibility.Source: §A.3 · p. 15
A.4 Image-level Denoising V.S. Patch-level Denoising
The section compares removing noisy images before training with SoftPatch’s patch-level denoising. Image-level denoising improves existing methods in noisy settings, but remains behind SoftPatch.
A.4 Image-level Denoising V.S. Patch-level Denoising
- PaDiM* scores each training image and removes high-outlier samples using a threshold before training.It is a faster ResNet18-based simplification of PaDiM.Source: §A.4 · p. 15
- Image-level denoising dramatically improves existing state-of-the-art methods in the noisy scene.The comparison uses MVTecAD-noise-0.1 with overlap.Source: §A.4 · p. 15
- Despite those gains, image-level denoising still leaves a performance gap relative to SoftPatch.Source: §A.4 · p. 15
A.5 Computational Analysis
The computational analysis reports similar training and testing time for SoftPatch and PatchCore, while image-level denoising increases training time. Further experiments examine noisy examples and robustness under augmented overlap and on BTAD.
A.5 Computational Analysis
- Theoretical complexity analysis gives SoftPatch and PatchCore the same asymptotic complexity, O(N 2h2w2).SoftPatch’s noise discrimination is O(N 2hw), and it removes some patches as noise.Source: §A.5 · p. 15
- Excluding data-loading time, SoftPatch and PatchCore spend almost the same time training and testing, while image-level denoising increases training time.The timing experiment uses an RTX TITAN 24G GPU.Source: §A.5 · p. 15
A.6 The Noise in Existing Datasets
- Figure 8 shows misclassified anomalous samples in the normal sets of MVTecAD and BTAD; the paper says production noise is more serious.Source: §A.6 · p. 16, Figure 8 · p. 17
A.7 Performance in Augmented Overlap Setting
- SoftPatch remains more robust than PatchCore when overlapping training images are appearance- or structure-augmented, although PatchCore improves.Source: §A.7 · pp. 16–17, Table 10 · p. 17
A.8 Performance on BTAD with noise
- Tables 11–12 compare BTAD-noise-0.1 detection and localization; BTAD-03 is omitted because it lacks enough anomaly samples for the required noise-sample count.Source: §A.8 · p. 17, Table 11 · p. 17, Table 12 · p. 17