Skip to main content
QUICK REVIEW

[论文解读] Partial and Asymmetric Contrastive Learning for Out-of-Distribution Detection in Long-Tailed Recognition

Haotao Wang, Aston Zhang|arXiv (Cornell University)|Jul 4, 2022
Anomaly Detection Techniques and Applications被引用 10
一句话总结

本文提出部分且非对称的监督对比学习(PASCL),以改善长尾识别中的分布外(OOD)检测性能,标准方法因尾类分布内样本与OOD样本混淆而失效。通过仅对尾类应用对比损失,并强制实现非对称学习(将同类别尾类样本拉近,同时将其与OOD样本推开),并使用辅助分支微调以提升分布内准确率,PASCL在CIFAR10-LT、CIFAR100-LT和ImageNet-LT上实现了SOTA性能,FPR与准确率分别提升1.29%–7.89%。

ABSTRACT

Existing out-of-distribution (OOD) detection methods are typically benchmarked on training sets with balanced class distributions. However, in real-world applications, it is common for the training sets to have long-tailed distributions. In this work, we first demonstrate that existing OOD detection methods commonly suffer from significant performance degradation when the training set is long-tail distributed. Through analysis, we posit that this is because the models struggle to distinguish the minority tail-class in-distribution samples, from the true OOD samples, making the tail classes more prone to be falsely detected as OOD. To solve this problem, we propose Partial and Asymmetric Supervised Contrastive Learning (PASCL), which explicitly encourages the model to distinguish between tail-class in-distribution samples and OOD samples. To further boost in-distribution classification accuracy, we propose Auxiliary Branch Finetuning, which uses two separate branches of BN and classification layers for anomaly detection and in-distribution classification, respectively. The intuition is that in-distribution and OOD anomaly data have different underlying distributions. Our method outperforms previous state-of-the-art method by $1.29\%$, $1.45\%$, $0.69\%$ anomaly detection false positive rate (FPR) and $3.24\%$, $4.06\%$, $7.89\%$ in-distribution classification accuracy on CIFAR10-LT, CIFAR100-LT, and ImageNet-LT, respectively. Code and pre-trained models are available at https://github.com/amazon-research/long-tailed-ood-detection.

研究动机与目标

  • 为解决在长尾分布训练数据下OOD检测性能显著下降的问题,其中尾类分布内样本常被误判为OOD。
  • 识别现有OOD检测方法因特征空间重叠而无法区分尾类分布内样本与OOD样本。
  • 提出一种对比学习框架,显式分离尾类分布内特征与OOD特征,同时保持头部类的判别能力。
  • 通过解耦批归一化与分类头优化,实现分布内分类准确率的提升,而不损害OOD检测性能。

提出的方法

  • 提出部分且非对称的监督对比学习(PASCL),仅对尾类分布内样本与OOD样本应用对比损失,不作用于头部类别。
  • 通过将同类别尾类样本聚为正样本对,同时避免OOD样本聚类(将其视为负样本),实现非对称性。
  • 将尾类定义为频率最低的k%类别(默认k=50%),实现聚焦于难以区分的尾类样本的部分对比学习。
  • 使用辅助分支微调(ABF)分别训练用于OOD检测和分布内分类的独立批归一化(BN)层与分类头,以更好地匹配分布内与OOD数据的分布差异。
  • 结合交叉熵损失用于分类任务与对比损失用于特征空间分离,为每个任务分支分别优化BN统计量。
  • 通过消融实验验证部分性、非对称性与ABF的必要性,并调优超参数如尾类阈值(k)。

实验结果

研究问题

  • RQ1为何现有OOD检测方法在长尾训练集上性能显著下降,尤其在区分尾类分布内样本与OOD样本方面?
  • RQ2能否通过显式建模尾类分布内特征与OOD特征的差异,将对比学习适配于长尾识别中的OOD检测?
  • RQ3在对比学习中强制非对称性(即OOD样本不被拉近)是否能提升模型泛化能力与OOD检测性能?
  • RQ4通过辅助分支微调解耦批归一化与分类头优化,能否在不降低OOD检测性能的前提下提升分布内分类准确率?
  • RQ5所提方法对尾类阈值(k)的选择是否敏感?在部分对比学习中应包含多少比例的类别为最优?

主要发现

  • 与先前SOTA相比,PASCL在CIFAR10-LT上将FPR95提升1.29%,在CIFAR100-LT上提升1.45%,在ImageNet-LT上提升0.69%。
  • 在CIFAR10-LT上实现3.24%更高的分布内分类准确率,CIFAR100-LT上为4.06%,ImageNet-LT上为7.89%。
  • 部分性(仅对尾类应用对比损失)至关重要,若对所有类别应用对比损失,由于头部类别样本占主导,性能反而下降。
  • 非对称对比学习(OOD样本不被聚类)带来显著性能提升,尤其在与部分性结合时效果更佳。
  • 辅助分支微调(ABF)在CIFAR10-LT上将分布内准确率提升最高达4.17个百分点,在ImageNet-LT上达4.12个百分点,且模型尺寸增加极少。
  • 该方法对超参数选择具有鲁棒性:在k=50%时性能最优,且在k∈[40%,60%]范围内表现稳定,ABF优于全模型微调。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。