[论文解读] Block Selection Method for Using Feature Norm in Out-of-distribution Detection
本文提出了一种新颖的后训练分布外(OOD)检测方法,通过使用特征归一化(FeatureNorm,即特征图的范数)和归一化比率(NormRatio,即分布内(ID)与伪分布外(pseudo-OOD)数据之间特征归一化的比率),选择最优网络模块用于OOD检测。通过生成拼图图像作为伪分布外数据,以识别具有最大NormRatio的模块,该方法实现了最先进性能,在CIFAR-10上将FPR95降低高达52.77%,在ImageNet上降低高达48.53%。
Detecting out-of-distribution (OOD) inputs during the inference stage is crucial for deploying neural networks in the real world. Previous methods commonly relied on the output of a network derived from the highly activated feature map. In this study, we first revealed that a norm of the feature map obtained from the other block than the last block can be a better indicator of OOD detection. Motivated by this, we propose a simple framework consisting of FeatureNorm: a norm of the feature map and NormRatio: a ratio of FeatureNorm for ID and OOD to measure the OOD detection performance of each block. In particular, to select the block that provides the largest difference between FeatureNorm of ID and FeatureNorm of OOD, we create Jigsaw puzzle images as pseudo OOD from ID training samples and calculate NormRatio, and the block with the largest value is selected. After the suitable block is selected, OOD detection with the FeatureNorm outperforms other OOD detection methods by reducing FPR95 by up to 52.77% on CIFAR10 benchmark and by up to 48.53% on ImageNet benchmark. We demonstrate that our framework can generalize to various architectures and the importance of block selection, which can improve previous OOD detection methods as well.
研究动机与目标
- 解决在真实神经网络部署中检测分布外(OOD)输入的挑战,因为未见数据的误分类可能导致危险后果。
- 探究中间网络模块的特征图范数是否可作为OOD检测的可靠指标,挑战最终层为最优的假设。
- 开发一种后训练框架,无需在部署时访问真实OOD数据,即可选择最具区分性的模块用于OOD检测。
- 通过利用模块特定的特征范数统计信息和一种新颖的模块选择策略,提升现有OOD检测方法的性能。
提出的方法
- 引入FeatureNorm作为特定网络模块特征图的L2范数,用作OOD得分指标。
- 定义NormRatio为分布内(ID)数据与伪分布外(pseudo-OOD)数据的FeatureNorm之比,用于评估模块在OOD检测中的适用性。
- 通过从ID训练图像中使用拼图增强(Jigsaw augmentation)生成伪分布外数据,以模拟分布外输入,而无需依赖外部OOD数据。
- 基于各模块中NormRatio的最大值,选择具有最强ID与OOD特征范数分离能力的模块作为OOD检测的最优模块。
- 在推理阶段使用所选模块的FeatureNorm,若其范数低于学习到的阈值,则将输入分类为OOD。
- 以后训练方式应用该框架,无需模型微调或架构修改,可与预训练模型兼容。

实验结果
研究问题
- RQ1中间网络模块的特征图范数是否比最终层更有效地作为OOD检测信号?
- RQ2神经网络中是否存在某个特定模块,其基于特征范数的ID与OOD输入区分能力更强?
- RQ3能否利用从分布内样本生成的伪分布外数据,可靠地选择用于OOD检测的最优模块,而无需访问真实OOD数据?
- RQ4通过NormRatio选择最佳性能模块,是否相比使用最终层或默认模块,能显著提升OOD检测性能?
- RQ5该模块选择与基于特征范数的检测框架是否可在不同架构和基准上实现泛化?
主要发现
- ResNet18的倒数第二层模块在OOD分离方面显著优于最终层,表现为ID与OOD输入在FeatureNorm上的差距更大。
- 所提出的基于拼图生成的伪分布外数据的模块选择策略,成功识别出用于OOD检测的最优模块,实现了最先进性能。
- 在CIFAR-10基准上,该方法相比最佳基线将FPR95降低高达52.77%,显著提升了OOD检测性能。
- 在ImageNet基准上,该方法相比最佳基线将FPR95降低高达48.53%,证实其在大规模数据集上的有效性。
- 该框架在多种架构上具有泛化能力,且作为后训练增强应用于现有OOD检测方法时,性能得到提升。
- 消融实验与理论分析证实,经过良好选择的模块的特征图范数,作为OOD指标比输出概率或基于能量的分数更可靠。

更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。