Skip to main content
QUICK REVIEW

[论文解读] Extremely Simple Activation Shaping for Out-of-Distribution Detection

Andrija Djurisic, Nebojsa Bozanic|arXiv (Cornell University)|Sep 20, 2022
Advanced Neural Network ApplicationsComputer Science被引用 23
一句话总结

ASH 是一种事后激活塑形方法,对晚期层激活进行剪枝并略微重塑,以在最小影响ID准确率的前提下提升OOD检测,在ImageNet上达到最先进的结果,在CIFAR上也有优秀表现。

ABSTRACT

The separation between training and deployment of machine learning models implies that not all scenarios encountered in deployment can be anticipated during training, and therefore relying solely on advancements in training has its limits. Out-of-distribution (OOD) detection is an important area that stress-tests a model's ability to handle unseen situations: Do models know when they don't know? Existing OOD detection methods either incur extra training steps, additional data or make nontrivial modifications to the trained network. In contrast, in this work, we propose an extremely simple, post-hoc, on-the-fly activation shaping method, ASH, where a large portion (e.g. 90%) of a sample's activation at a late layer is removed, and the rest (e.g. 10%) simplified or lightly adjusted. The shaping is applied at inference time, and does not require any statistics calculated from training data. Experiments show that such a simple treatment enhances in-distribution and out-of-distribution distinction so as to allow state-of-the-art OOD detection on ImageNet, and does not noticeably deteriorate the in-distribution accuracy. Video, animation and code can be found at: https://andrijazz.github.io/ash

研究动机与目标

  • 倡导无需重新训练即可提升部署时鲁棒性的事后解决方案。
  • 提出可在推理时应用的简单激活塑形操作。
  • 证明对晚层激活进行剪枝和轻度重塑可以在多个基准上提升OOD检测。
  • 展示 ASH 在提升OOD分离的同时保持在分布内(ID)准确率。

提出的方法

  • 在推理时应用 ASH,通过剪枝样本晚层激活的高百分位部分。
  • 用三种处理之一对剩余激活进行处理:ASH-P(仅剪枝),ASH-B(对剩余激活二值化),ASH-S(对剩余激活缩放)。
  • 使用基于能量的分数进行OOD检测,在将ASH作用于之后再路由到网络的其余部分之前应用。
  • 在 CIFAR-10/100 和 ImageNet 上,结合多种 OOD 数据集和网络架构(DenseNet-101,ResNet-50,MobileNetV2)评估 ASH。
  • 对放置位置、剪枝强度以及与其他方法(如 ReAct、DICE)的组合进行消融实验。

实验结果

研究问题

  • RQ1事后激活塑形是否能在不重新训练或无法获取训练分布的情况下提升OOD检测?
  • RQ2在不同剪枝水平和处理方式下,ASH 对在分布内准确率的影响如何?
  • RQ3在网络中应将 ASH 放置于何处以获得最佳的 ID-OOD 权衡?
  • RQ4将 ASH 与现有OOD检测方法结合时的相互作用如何?
  • RQ5ASH 是否兼容像 ImageNet 这样的大规模基准和像 CIFAR-10/100 这样的较小基准?

主要发现

  • ASH 实现了强烈的ID-OOD权衡,在 ImageNet 实验中形成的帕累托前沿优于基线方法。
  • ASH 变体(ASH-B 和 ASH-S)在多数据集上在 ImageNet 上建立了新的最先进 OOD 检测,同时保持ID准确率。
  • ASH-P(仅剪枝)也带来有竞争力的OOD提升,在某些设置中甚至优于 Energy、Softmax 和 ODIN。
  • ASH 在在分布内准确率方面保持良好,在中等剪枝下只有轻微下降,在某些变体中在较高剪枝水平仍具鲁棒性。
  • ASH 即插即用,可以与 ReAct 或 ODIN 等方法结合,带来即时改进。
  • ASH-RAND 实验表明即使未剪枝的激活取值为随机值也能保持较强的OOD性能,强调了表示的冗余性。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。