
摘要
单类分类(One-Class Classification, OCC)旨在学习一种有效的数据描述,以涵盖所有正常训练样本,并基于数据偏离该描述的程度来检测异常。当前最先进的OCC模型通过最小化超球体(hyper-sphere minimisation)来学习紧凑的正常数据描述,但在训练数据量较小或训练集被异常样本污染时,往往容易出现过拟合问题。为解决这一挑战,本文提出一种新型OCC模型——插值高斯描述符(Interpolated Gaussian Descriptor, IGD),该模型通过对抗性插值生成的训练样本,训练一个单类高斯异常分类器。该高斯异常分类器根据样本到高斯中心的距离及其距离的标准差,对训练样本进行区分,从而在训练过程中赋予模型对给定样本的判别能力。对抗性插值机制能够确保即使在训练数据稀疏或包含异常样本的情况下,仍能持续学习到平滑且稳定的高斯描述符。这使得模型能够基于具有代表性的正常样本构建数据描述,而非受边缘样本或异常样本的干扰,从而显著提升正常性描述的准确性。在多个主流基准数据集上的大量实验表明,包括MNIST、Fashion MNIST、CIFAR10、MVTec AD以及两个医学数据集,IGD在异常检测准确率上均优于现有最先进模型。此外,IGD在训练集规模小或数据被污染等挑战性场景下也展现出更强的鲁棒性。代码已开源,地址为:https://github.com/tianyu0207/IGD。
代码仓库
tianyu0207/IGD
官方
pytorch
GitHub 中提及
基准测试
| 基准 | 方法 | 指标 |
|---|---|---|
| anomaly-detection-on-fashion-mnist | IGD (scratch) | ROC AUC: 92.01 |
| anomaly-detection-on-fashion-mnist | IGD (pre-trained ImageNet) | ROC AUC: 93.57 |
| anomaly-detection-on-fashion-mnist | IGD (pre-trained SSL) | ROC AUC: 94.41 |
| anomaly-detection-on-hyper-kvasir-dataset | IGD | AUC: 0.939 |
| anomaly-detection-on-lag | IGD | AUC: 0.796 |
| anomaly-detection-on-mnist | IGD (pre-trained ImageNet) | ROC AUC: 99.27 |
| anomaly-detection-on-mnist | IGD (scratch) | ROC AUC: 98.69 |
| anomaly-detection-on-mvtec-ad | IGD | Detection AUROC: 93.4 |
| anomaly-detection-on-mvtec-ad | IGD (pre-trained ImageNet) | Detection AUROC: 92.6 Segmentation AUROC: 91 |
| anomaly-detection-on-mvtec-ad | IGD (pre-trained SSL) | Detection AUROC: 93.4 Segmentation AUROC: 93.0 |
| anomaly-detection-on-one-class-cifar-10 | IGD (pre-trained SSL) | AUROC: 91.25 |
| anomaly-detection-on-one-class-cifar-10 | IGD (scratch) | AUROC: 74.33 |
| anomaly-detection-on-one-class-cifar-10 | IGD (pre-trained ImageNet) | AUROC: 83.68 |