Skip to main content
QUICK REVIEW

[论文解读] ViM: Out-Of-Distribution with Virtual-logit Matching

Haoqi Wang, Zhizhong Li|arXiv (Cornell University)|Mar 21, 2022
Advanced Neural Network Applications被引用 7
一句话总结

该论文提出了一种名为虚拟对数匹配(ViM)的新颖分布外(OOD)检测方法,通过将特征级残差与类别相关对数几率相结合,从特征残差生成一个虚拟OOD对数几率,并通过缩放将其与平均最大对数几率进行匹配。ViM在使用BiT-S模型的情况下,在四个具有挑战性的OOD基准上实现了90.91%的平均AUROC,性能优于先前方法4个百分点。

ABSTRACT

Most of the existing Out-Of-Distribution (OOD) detection algorithms depend on single input source: the feature, the logit, or the softmax probability. However, the immense diversity of the OOD examples makes such methods fragile. There are OOD samples that are easy to identify in the feature space while hard to distinguish in the logit space and vice versa. Motivated by this observation, we propose a novel OOD scoring method named Virtual-logit Matching (ViM), which combines the class-agnostic score from feature space and the In-Distribution (ID) class-dependent logits. Specifically, an additional logit representing the virtual OOD class is generated from the residual of the feature against the principal space, and then matched with the original logits by a constant scaling. The probability of this virtual logit after softmax is the indicator of OOD-ness. To facilitate the evaluation of large-scale OOD detection in academia, we create a new OOD dataset for ImageNet-1K, which is human-annotated and is 8.8x the size of existing datasets. We conducted extensive experiments, including CNNs and vision transformers, to demonstrate the effectiveness of the proposed ViM score. In particular, using the BiT-S model, our method gets an average AUROC 90.91% on four difficult OOD benchmarks, which is 4% ahead of the best baseline. Code and dataset are available at https://github.com/haoqiwang/vim.

研究动机与目标

  • 为解决现有OOD检测方法依赖单一信息源(如特征、对数几率或Softmax概率)的局限性,通过结合多种信息源来提升性能。
  • 提升对OOD样本巨大多样性的鲁棒性,这些样本在某一空间(如特征空间)中可能容易被检测,但在另一空间(如对数几率空间)中则难以识别。
  • 开发一种快速、推理高效的OOD评分函数,无需微调或重新训练,可直接应用于预训练模型。
  • 构建一个大规模、人工标注的、真实的ImageNet-1K OOD基准,以实现OOD检测方法的公平且有意义的评估。

提出的方法

  • ViM通过计算输入特征与训练特征主子空间之间的残差,构建一个虚拟OOD类别。
  • 该残差通过缩放转换为对数几率,使其与训练样本中最大对数几率的平均值对齐。
  • OOD得分定义为该虚拟对数几率的Softmax概率,作为OOD样本置信度的度量。
  • 该方法同时利用了来自特征残差的类别无关信息和来自原始对数几率的类别相关信息,实现互补检测。
  • 缩放因子为可学习常数,用于将虚拟对数几率的均值与训练集中平均最大对数几率对齐。
  • 该方法兼容CNN和视觉Transformer模型,且无需模型微调或重新训练。
Figure 1 : The AUROC (in percentage) of nine OOD detection algorithms applied to a BiT model trained on ImageNet-1K. The OOD datasets are ImageNet-O ( $x$ -axis) and OpenImage-O ( $y$ -axis). Methods marked with box $\Box$ use the feature space; methods with triangle $\triangle$ use the logit; and m
Figure 1 : The AUROC (in percentage) of nine OOD detection algorithms applied to a BiT model trained on ImageNet-1K. The OOD datasets are ImageNet-O ( $x$ -axis) and OpenImage-O ( $y$ -axis). Methods marked with box $\Box$ use the feature space; methods with triangle $\triangle$ use the logit; and m

实验结果

研究问题

  • RQ1结合特征级与对数几率级信号是否能够使OOD检测性能超越单一信息源的方法?
  • RQ2所提出的虚拟对数几率匹配机制在准确率与效率方面相较于现有OOD评分函数表现如何?
  • RQ3使用大规模、人工标注的OOD基准对OOD检测模型的评估有何影响?
  • RQ4ViM方法在不同架构(如ResNets与视觉Transformer)上是否具备泛化能力?
  • RQ5基于语义分类体系的分组策略对ViM性能有何影响,特别是在视觉Transformer上的表现如何?

主要发现

  • 当应用于BiT-S模型时,ViM在四个具有挑战性的OOD基准上实现了90.91%的平均AUROC,优于最佳基线方法4个百分点。
  • 在新构建的OpenImage-O数据集上(规模为现有基准的8.8倍,且为人工标注),ViM实现了97.61%的AUROC和12.61%的FPR95。
  • 在测试的四种最具竞争力的OOD方法中,ViM是推理速度最快的,OpenImage-O上的推理时间为1.49秒,远低于KL匹配(249.97秒)和马氏距离(2135.13秒)。
  • 该方法在应用于视觉Transformer时依然表现优异,在OpenImage-O上实现了97.64%的AUROC,且在多数设置下优于MSP和MaxGroup。
  • 基于语义分类体系的分组策略对ViT上的ViM性能提升微乎其微,表明ViM的性能具有鲁棒性,对类别层级结构不敏感。
  • 可视化结果表明,ViM检测到的OOD样本与基于特征的方法(如Residual)和基于对数几率的方法(如KL Matching)不同,证实了其互补检测能力。
Figure 2 : Comparison of AUROC for OOD detection algorithms that are based on probability (marked with diamond $\Diamond$ ), logit ( $\triangle$ ), and feature ( $\Box$ ) of 9 OOD detection algorithms applied to a BiT model trained on ImageNet-1K. The OOD datasets are Texture ( $x$ -axis) and iNatur
Figure 2 : Comparison of AUROC for OOD detection algorithms that are based on probability (marked with diamond $\Diamond$ ), logit ( $\triangle$ ), and feature ( $\Box$ ) of 9 OOD detection algorithms applied to a BiT model trained on ImageNet-1K. The OOD datasets are Texture ( $x$ -axis) and iNatur

更好的研究,从现在开始

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

无需绑定信用卡

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