[Paper Review] Data refinement for fully unsupervised visual inspection using pre-trained networks
This paper proposes SROC, a simple yet effective data refinement strategy for fully unsupervised visual anomaly detection using pre-trained networks. By iteratively identifying and removing defective samples from polluted training sets, SROC recovers significant performance—outperforming complex baselines like STOC—while demonstrating that KNN-based methods are inherently more robust to data pollution than Mahalanobis-based approaches due to embedding space distribution properties.
Anomaly detection has recently seen great progress in the field of visual inspection. More specifically, the use of classical outlier detection techniques on features extracted by deep pre-trained neural networks have been shown to deliver remarkable performances on the MVTec Anomaly Detection (MVTec AD) dataset. However, like most other anomaly detection strategies, these pre-trained methods assume all training data to be normal. As a consequence, they cannot be considered as fully unsupervised. There exists to our knowledge no work studying these pre-trained methods under fully unsupervised setting. In this work, we first assess the robustness of these pre-trained methods to fully unsupervised context, using polluted training sets (i.e. containing defective samples), and show that these methods are more robust to pollution compared to methods such as CutPaste. We then propose SROC, a Simple Refinement strategy for One Class classification. SROC enables to remove most of the polluted images from the training set, and to recover some of the lost AUC. We further show that our simple heuristic competes with, and even outperforms much more complex strategies from the existing literature.
Motivation & Objective
- To evaluate the robustness of pre-trained feature-based anomaly detection methods under fully unsupervised settings where training data may contain defective samples.
- To address the gap in existing literature by studying pre-trained methods in truly unsupervised contexts with polluted data.
- To propose a simple, agnostic refinement strategy (SROC) that removes defective samples from training sets to restore performance.
- To provide qualitative and quantitative insights into why certain methods (e.g., KNN) are more robust to data pollution than others (e.g., Mahalanobis).
Proposed method
- SROC uses the anomaly detector itself to score and rank training samples based on their anomaly scores from pre-trained features.
- It iteratively removes the most anomalous samples (those with highest anomaly scores) from the training set.
- The refined training set is then re-evaluated with the same detector to assess performance improvement.
- The method is applied to four pre-trained feature-based detectors: KNN, Mahalanobis, PaDiM, and PatchCore, all using EfficientNet-B4 as the backbone.
- The approach is designed to be agnostic to the downstream anomaly detection method, enabling broad applicability.
- It leverages the fact that defective samples in the embedding space are often far from healthy ones, allowing effective isolation and removal.
Experimental results
Research questions
- RQ1How robust are pre-trained feature-based anomaly detection methods to polluted training data containing defective samples in a fully unsupervised setting?
- RQ2Can a simple, heuristic-based refinement strategy effectively recover performance lost due to data pollution in unsupervised visual inspection?
- RQ3Why are KNN-based methods more robust to data pollution than Mahalanobis-based methods?
- RQ4Does SROC outperform more complex refinement strategies like STOC in recovering AUC on polluted datasets?
- RQ5Can the refinement strategy be generalized across different anomaly detection methods without requiring method-specific tuning?
Key findings
- SROC successfully recovers up to 80% of the maximum achievable AUC on the MVTec AD dataset when training data contains up to 20% defective samples.
- KNN and PatchCore are significantly more robust to data pollution than Mahalanobis and PaDiM, due to the sparsity of defective embeddings in the feature space.
- Defective samples are, on average, as far from each other as they are from healthy samples in the embedding space, which explains the robustness of nearest-neighbor methods.
- SROC outperforms the complex STOC strategy, which was designed for CutPaste, demonstrating that simplicity can match or exceed complexity in refinement tasks.
- The Mahalanobis-based methods show significant performance degradation under pollution, as defective samples shift closer to the center of the learned multivariate Gaussian distribution.
- Qualitative analysis confirms that the Mahalanobis distribution shifts substantially under pollution, while KNN-based methods maintain stable neighborhood structures.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.