The ability of the deep learning model to recognize when a sample falls outside its learned distribution is critical for safe and reliable deployment. Recent state-of-the-art out-of-distribution (OOD) detection methods leverage activation shaping to improve the separation between in-distribution (ID) and OOD inputs. These approaches resort to sample-specific scaling but apply a static percentile threshold across all samples regardless of their nature, resulting in suboptimal ID-OOD separability. In this work, we propose \textbf{AdaSCALE}, an adaptive scaling procedure that dynamically adjusts the percentile threshold based on a sample's estimated OOD likelihood. This estimation leverages our key observation: OOD samples exhibit significantly more pronounced activation shifts at high-magnitude activations under minor perturbation compared to ID samples. AdaSCALE enables stronger scaling for likely ID samples and weaker scaling for likely OOD samples, yielding highly separable energy scores. Our approach achieves state-of-the-art OOD detection performance, outperforming the latest rival OptFS by 14.94% in near-OOD and 21.67% in far-OOD datasets in average FPR@95 metric on the ImageNet-1k benchmark across eight diverse architectures. The code is available at: https://github.com/sudarshanregmi/AdaSCALE/
翻译:深度学习模型识别样本是否超出其学习分布的能力对于安全可靠部署至关重要。当前最先进的分布外检测方法利用激活塑形技术来提升分布内与分布外输入之间的分离度。这些方法采用样本特异性缩放策略,却对所有样本统一应用静态百分位阈值,忽略了样本特性差异,导致分布内外分离效果欠佳。本研究提出\textbf{AdaSCALE}——一种基于样本预估OOD概率动态调整百分位阈值的自适应缩放流程。该预估方法源于我们的关键发现:相较于分布内样本,分布外样本在轻微扰动下会于高强度激活区域呈现更显著的激活偏移。AdaSCALE通过对高概率分布内样本实施强缩放、对高概率分布外样本实施弱缩放,生成高度可分离的能量分数。本方法在ImageNet-1k基准测试中,跨越八种不同架构,以平均FPR@95指标计算,在近分布外数据集上超越最新竞品OptFS达14.94%,在远分布外数据集上领先21.67%,实现了最先进的分布外检测性能。代码已开源:https://github.com/sudarshanregmi/AdaSCALE/