Skip to main content
QUICK REVIEW

[论文解读] Outside the Box: Abstraction-Based Monitoring of Neural Networks

Thomas A. Henzinger, Anna Lukina|KOPS (University of Konstanz)|Nov 20, 2019
Adversarial Robustness in Machine Learning被引用 5
一句话总结

本文提出了一种基于抽象的运行时监控框架,通过使用基于区间的“盒子”(对训练期间观察到的神经元值的过度近似)分析隐藏层激活,检测神经网络分类器中的新型输入。该方法在图像分类基准上,通过可调节的假阳性与漏检新颖输入之间的权衡,高效地识别分布外输入,其检测准确率和计算效率均优于基于球体和八边形的其他抽象方法。

ABSTRACT

Neural networks have demonstrated unmatched performance in a range of classification tasks. Despite numerous efforts of the research community, novelty detection remains one of the significant limitations of neural networks. The ability to identify previously unseen inputs as novel is crucial for our understanding of the decisions made by neural networks. At runtime, inputs not falling into any of the categories learned during training cannot be classified correctly by the neural network. Existing approaches treat the neural network as a black box and try to detect novel inputs based on the confidence of the output predictions. However, neural networks are not trained to reduce their confidence for novel inputs, which limits the effectiveness of these approaches. We propose a framework to monitor a neural network by observing the hidden layers. We employ a common abstraction from program analysis - boxes - to identify novel behaviors in the monitored layers, i.e., inputs that cause behaviors outside the box. For each neuron, the boxes range over the values seen in training. The framework is efficient and flexible to achieve a desired trade-off between raising false warnings and detecting novel inputs. We illustrate the performance and the robustness to variability in the unknown classes on popular image-classification benchmarks.

研究动机与目标

  • 为解决神经网络分类器中新颖性检测的关键挑战,即模型必须识别并拒绝来自未见类别的输入。
  • 克服基于黑箱置信度的方法的局限性,这些方法无法降低对新型输入的预测置信度。
  • 开发一种轻量级、高效且灵活的运行时监控系统,可无缝集成到现有神经网络流水线中。
  • 通过早期检测异常或分布外输入,实现对自动驾驶等安全关键应用中的可靠推理。
  • 提供一种适用于不同神经网络架构和数据集的通用解决方案。

提出的方法

  • 该框架监控特定的隐藏层——尤其是靠近输出的层——这些层中类别特定的特征模式最为显著。
  • 它通过将每个神经元在训练期间观察到的神经元激活范围的区间联合起来,构建盒子抽象。
  • 在推理阶段,该框架检查给定输入的激活向量是否位于预先计算的盒子抽象范围内;若不在,则将该输入标记为潜在新颖输入。
  • 通过缩放盒子大小(通过因子 γ)实现灵敏度的可调,从而在假阳性和真实新颖输入检测之间实现权衡。
  • 该方法计算效率高,每层仅需线性时间检查,适合实时部署。
  • 对球体和八边形等替代抽象进行了比较评估,结果显示盒子在准确率和速度方面均表现更优。

实验结果

研究问题

  • RQ1隐藏层激活的盒子抽象能否有效检测神经网络分类器中的分布外输入?
  • RQ2与球体和八边形等其他抽象类型相比,基于盒子的监控在检测准确率和计算成本方面的表现如何?
  • RQ3该框架在多大程度上可调节,以平衡假阳性率与新颖输入的检测?
  • RQ4监控多个层是否能显著提升新颖性检测性能,超越仅监控最终层的效果?
  • RQ5该框架能否在具有不同已知类和未知类数量的多样化图像分类基准上有效应用?

主要发现

  • 仅监控最终层在已知类别较多的数据集中即可实现强大的新颖性检测性能,但在已知类别较少的数据集中,结合多个层可显著提升检测效果。
  • 与球体和八边形抽象相比,该框架在检测性能上表现更优,盒子能检测到更多真实新颖输入,同时引发更少的错误警告。
  • 基于盒子的监控计算成本极低,MNIST基准上仅需2秒,而基于八边形的监控需121秒,充分体现了其高效性。
  • 通过统一将盒子扩大 γ 倍,可调节框架以实现期望的假阳性率,γ = 0.09 在MNIST基准中已足以完全消除假阳性。
  • 即使在已知类别数量较少的情况下,该方法仍保持高检测能力,且在这些场景下优于仅监控单一层的方法。
  • 该框架对未知类别的变化具有鲁棒性,如在多个已知与未知类别分布均衡的基准上所展示的那样。

更好的研究,从现在开始

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

无需绑定信用卡

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