[论文解读] How to Exploit Hyperspherical Embeddings for Out-of-Distribution Detection?
本文提出 CIDER,一种超球面嵌入框架,结合色散和紧致损失以提升分布外检测,在 ID-OOD 可分离性和相对于前一方法的 FPR95 增益方面取得更好表现。
Out-of-distribution (OOD) detection is a critical task for reliable machine learning. Recent advances in representation learning give rise to distance-based OOD detection, where testing samples are detected as OOD if they are relatively far away from the centroids or prototypes of in-distribution (ID) classes. However, prior methods directly take off-the-shelf contrastive losses that suffice for classifying ID samples, but are not optimally designed when test inputs contain OOD samples. In this work, we propose CIDER, a novel representation learning framework that exploits hyperspherical embeddings for OOD detection. CIDER jointly optimizes two losses to promote strong ID-OOD separability: a dispersion loss that promotes large angular distances among different class prototypes, and a compactness loss that encourages samples to be close to their class prototypes. We analyze and establish the unexplored relationship between OOD detection performance and the embedding properties in the hyperspherical space, and demonstrate the importance of dispersion and compactness. CIDER establishes superior performance, outperforming the latest rival by 19.36% in FPR95. Code is available at https://github.com/deeplearning-wisc/cider.
研究动机与目标
- 通过利用超球面嵌入来改进 OOD 检测的表示学习的动机。
- 设计一个训练目标,在单位超球面上显式优化类间色散和类内紧凑性。
- 提供对嵌入的 von Mises-Fisher (vMF)混合分布的概率解释,以解释 OOD 检测性能。
- 证明增加的类间色散可以在不牺牲 ID 准确度的情况下改善 OOD 分离。
提出的方法
- 将嵌入建模于单位超球面,并通过 von Mises-Fisher (vMF) 分布来解释。
- 提出两种损失:色散损失用于最大化类原型之间的角距离,紧凑损失用于将样本拉向其类别原型。
- 使用组合的 CIDER 目标 L_CIDER = L_dis + lambda_c * L_comp 进行训练。
- 通过对归一化嵌入的指数滑动平均(EMA)来更新类别原型 mu_c。
- 在测试时使用非参数距离(基于余弦的 KNN)进行 OOD 评分,亦可选择 Mahalanobis 比较。
- 提供嵌入色散如何影响 ID-OOD 可分性之理论/实证分析。
实验结果
研究问题
- RQ1超球面嵌入如何影响同分布(ID)和分布外(OOD)数据的可分性?
- RQ2在类别原型之间显式色散是否可以在不损害 ID 分类性能的前提下改善 OOD 检测?
- RQ3共同优化色散和紧凑性对嵌入几何和 OOD 分数有何影响?
- RQ4基于 vMF 的表示是否为 OOD 检测在不同数据集和规模上提供一个有原则的解释和实际收益?
主要发现
- CIDER 在 OOD 检测上表现更优,包括在 CIFAR-100 上用 ResNet-34 相比 SSD+ 的 FPR95 下降 13.33%。
- CIDER 相较于 SupCon,在 CIFAR-10 上的 ID-OOD 可分离性实现了相对提升 42.36%(在多个 OOD 数据集上的平均值)。
- 类间色散是实现强劲 OOD 检测的关键;将色散损失与紧凑性结合时,增加色散可使 AUROC 提升约 2 个百分点。
- CIDER 在基于非参数(KNN)和基于参数(Mahalanobis)评分的两种评分范式下均能持续提升 OOD 分数。
- 嵌入质量指标在类间色散方面显示显著提升(相较于 SSD+ 提升 12.03 度)并改善 ID-OOD 可分离性。
- CIDER 在大规模任务(ImageNet-100)及不同批次大小和超参数下仍具备竞争力。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。