Towards Real Unsupervised Anomaly Detection Via Confident Meta-Learning
Muhammad Aqeel, Shakiba Sharifi, Marco Cristani, Francesco Setti
TL;DR
This paper tackles the gap in unsupervised anomaly detection by showing that the common assumption of entirely nominal training data is impractical. It introduces CoMet, a Confident Meta-Learning framework that combines Soft Confident Learning to downweight ambiguous samples and a MAML-inspired meta-learning loop to stabilize updates under uncertainty. The approach is model-agnostic and demonstrated to achieve state-of-the-art results on MVTec-AD, VIADUCT, and KSDD2 with two backbones, Normalizing Flows and SimpleNet, while being robust to anomalies present in the training data. The work offers a practical pathway toward truly unsupervised defect detection in industrial settings, with code made publicly available for reproducibility and wider adoption.
Abstract
So-called unsupervised anomaly detection is better described as semi-supervised, as it assumes all training data are nominal. This assumption simplifies training but requires manual data curation, introducing bias and limiting adaptability. We propose Confident Meta-learning (CoMet), a novel training strategy that enables deep anomaly detection models to learn from uncurated datasets where nominal and anomalous samples coexist, eliminating the need for explicit filtering. Our approach integrates Soft Confident Learning, which assigns lower weights to low-confidence samples, and Meta-Learning, which stabilizes training by regularizing updates based on training validation loss covariance. This prevents overfitting and enhances robustness to noisy data. CoMet is model-agnostic and can be applied to any anomaly detection method trainable via gradient descent. Experiments on MVTec-AD, VIADUCT, and KSDD2 with two state-of-the-art models demonstrate the effectiveness of our approach, consistently improving over the baseline methods, remaining insensitive to anomalies in the training set, and setting a new state-of-the-art across all datasets. Code is available at https://github.com/aqeeelmirza/CoMet
