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.
翻译:工程化设计的鲁棒损失函数(如Huber损失、Student-$t$损失及广义交叉熵损失)使监督模型能够容忍数据污染,但无法识别哪些观测值被破坏。我们提出神经网络贝叶斯异常缓解(NBAM),这是一种基于贝叶斯隐变量切换混合模型推导的通用即插即用损失函数:其边缘似然定义了一个鲁棒监督损失,而关联的后验分布定义了一个无监督污染分类器。与Huber或Student-$t$损失类似,NBAM可替代任何监督流水线中的标准训练损失;与其不同的是,NBAM还能额外学习一个结构化的污染模型,并返回经过校准的逐样本污染后验概率。通过学习输入依赖的先验分布$π_φ(x)$,该方法可捕捉污染的空间局部性,使邻近已知损坏区域的样本更可能被标记,同时自动产生奥卡姆惩罚项以抑制过度标记行为。在非对称标签污染的CIFAR-10数据集上,NBAM无需监督即可恢复污染过程的结构:污染后验分布能有效分离干净样本与受污染样本,且学习到的异常检测头可识别每个标签翻转对的方向。除具备这些功能外,在0.2-0.6污染率范围内,NBAM的性能优于本文考虑的四种鲁棒损失基线方法。