Neural Bayesian Anomaly Mitigation: A Robust Loss that Doubles as an Unsupervised Contamination Classifier

2026-06-15Machine Learning

Machine Learning
AI summary

The authors present Neural Bayesian Anomaly Mitigation (NBAM), a method that not only helps models be robust to corrupted data but also identifies which specific data points are corrupted. NBAM works by combining a special loss function with a Bayesian model that learns to detect contamination without any extra labels. It improves on existing robust losses like Huber by giving a per-sample probability of corruption and understanding patterns in where errors happen. Tests on CIFAR-10 show that NBAM can separate clean and corrupted samples and recognize label errors better than other methods when contamination is moderate to high.

robust loss functionsHuber lossStudent-t lossBayesian latent-switch mixture modelcontamination detectionsupervised learninglabel noisemarginal likelihoodposterior probabilityCIFAR-10 dataset
Authors
S. A. K. Leeney, W. J. Handley, H. T. J. Bevins, E. de Lera Acedo
Abstract
Engineered robust losses such as Huber, Student-$t$, and generalised cross-entropy make supervised models tolerant of contamination but cannot answer which observations are corrupted. We introduce Neural Bayesian Anomaly Mitigation (NBAM), a general-purpose drop-in loss derived from a Bayesian latent-switch mixture model: the marginal likelihood defines a robust supervised loss, and the associated posterior defines an unsupervised contamination classifier. Like Huber or Student-$t$, NBAM can replace the standard training loss in any supervised pipeline; unlike them, it additionally learns a structured contamination model and returns a calibrated per-sample contamination posterior. A learned input-dependent prior $π_φ(x)$ captures the spatial locality of contamination, so that samples near known corruptions are more likely to be flagged, while an Occam penalty emerges automatically and regularises against over-flagging. On CIFAR-10 with asymmetric label contamination, NBAM recovers the structure of the corruption process without supervision: the contamination posterior separates clean from corrupted samples, and the learned anomaly head identifies the direction of every label-flip pair. Alongside these capabilities, NBAM outperforms the four robust-loss baselines considered here at contamination rates 0.2-0.6.