
摘要
近域外样本检测(Near Out-of-Distribution, Near OOD)是深度神经网络面临的一项重大挑战。本文表明,大规模预训练的Transformer模型能够在多种数据模态下的多个近域外检测任务中显著提升当前最先进(State-of-the-Art, SOTA)性能。例如,在CIFAR-100与CIFAR-10的域外检测任务中,我们利用在ImageNet-21k上预训练的视觉Transformer(Vision Transformer),将AUROC(受试者工作特征曲线下面积)从当前SOTA的85%提升至超过96%。在一项具有挑战性的基因组学域外检测基准测试中,通过采用Transformer架构并结合无监督预训练,AUROC从66%提升至77%。为进一步提升检测性能,我们探索了少样本异常样本暴露(few-shot outlier exposure)设置,即仅能获取少量来自异常类别(outlier classes)的样本。实验结果表明,预训练的Transformer模型在异常样本暴露场景下表现尤为出色:在CIFAR-100 vs CIFAR-10任务中,仅需每类异常样本1张图像,AUROC即可达到98.7%;当每类提供10张图像时,AUROC进一步提升至99.46%。此外,针对多模态图像-文本预训练模型(如CLIP),我们提出一种新方法——仅使用异常类别名称作为唯一信息源,无需任何对应图像。实验表明,该方法在标准视觉域外检测基准任务上超越了以往所有SOTA方法,展现出强大的泛化能力与信息利用效率。
代码仓库
stanislavfort/exploring_the_limits_of_OOD_detection
jax
GitHub 中提及
基准测试
| 基准 | 方法 | 指标 |
|---|---|---|
| out-of-distribution-detection-on-cifar-10-vs | R+ViT finetuned on CIFAR-10 | AUPR: 97.75 AUROC: 98.52 |
| out-of-distribution-detection-on-cifar-10-vs | ViT finetuned on CIFAR-10 | AUPR: 97.68 AUROC: 98.42 |
| out-of-distribution-detection-on-cifar-10-vs | MLP-Mixer finetuned on CIFAR-10 | AUPR: 96.28 AUROC: 97.85 |
| out-of-distribution-detection-on-cifar-100-vs | Ensemble of ViTs | AUROC: 98.11 |
| out-of-distribution-detection-on-cifar-100-vs | ViT_B-16 finetuned on CIFAR-100 | AUPR: 91.89 AUROC: 95.53 |
| out-of-distribution-detection-on-cifar-100-vs | MLP-Mixer_B-16 finetuned on CIFAR-100 | AUPR: 90.22 AUROC: 95.31 |
| out-of-distribution-detection-on-cifar-100-vs | ViT-L_16 finetuned on CIFAR-100 | AUROC: 97.98 |
| out-of-distribution-detection-on-cifar-100-vs | R50+ViT_B-16 finetuned on CIFAR-100 | AUPR: 92.08 AUROC: 96.23 |
| out-of-distribution-detection-on-cifar-100-vs | CLIP using class name words describing the two distributions | AUROC: 94.68 |