Skip to main content
QUICK REVIEW

[论文解读] Shallow-Deep Networks: Understanding and Mitigating Network Overthinking

Yiğitcan Kaya, Sanghyun Hong|arXiv (Cornell University)|Oct 16, 2018
Adversarial Robustness in Machine LearningComputer Science参考文献 31被引用 101
一句话总结

本文介绍了浅层-深层网络(SDNs),将内部分类器附加到现有的 DNN,以揭示预测在前向传播中的演变,量化过度思考,并通过基于置信度的提前退出和混淆度量来减轻浪费性和破坏性影响。

ABSTRACT

We characterize a prevalent weakness of deep neural networks (DNNs)---overthinking---which occurs when a DNN can reach correct predictions before its final layer. Overthinking is computationally wasteful, and it can also be destructive when, by the final layer, a correct prediction changes into a misclassification. Understanding overthinking requires studying how each prediction evolves during a DNN's forward pass, which conventionally is opaque. For prediction transparency, we propose the Shallow-Deep Network (SDN), a generic modification to off-the-shelf DNNs that introduces internal classifiers. We apply SDN to four modern architectures, trained on three image classification tasks, to characterize the overthinking problem. We show that SDNs can mitigate the wasteful effect of overthinking with confidence-based early exits, which reduce the average inference cost by more than 50% and preserve the accuracy. We also find that the destructive effect occurs for 50% of misclassifications on natural inputs and that it can be induced, adversarially, with a recent backdooring attack. To mitigate this effect, we propose a new confusion metric to quantify the internal disagreements that will likely lead to misclassifications.

研究动机与目标

  • 将过度思考表征为预测在 DNN 各层中的演变,并识别浪费性和破坏性的影响。
  • 提出 SDN 作为一种通用修改,用于在不改变核心权重的前提下向预训练网络添加内部分类器。
  • 证明 SDN 通过提前退出可以降低推理成本,并缓解由过度思考引起的错误分类。
  • 开发启发式方法(基于置信度的提前退出和混淆分析)以在实践中检测并减轻过度思考。
  • 在多种 CNN 架构下在 CIFAR-10、CIFAR-100 和 Tiny ImageNet 上展示该方法。

提出的方法

  • 在选定层之后附加内部分类器(ICs),并通过特征降维步骤保持 IC 的可扩展性。
  • 通过仅对 IC 进行训练或与 SDN 训练联动,在预训练网络上训练 IC,使用一个加权损失,使 IC 的重要性与其相对推理成本成正比。
  • 使用混合最大-平均池化策略进行特征降维,以维持 IC 的效率。
  • 在多个深度定义 IC,以生成若干内部预测和每个输入的最终预测。
  • 引入基于内部预测与最终预测之间的 L1 距离的混淆度量,以分析不对齐并预测错误分类。
  • 通过 FLOPs 和准确率(Top-1)在不同数据集和架构上评估推理成本。

实验结果

研究问题

  • RQ1在向 CNN 增加内部分类器时,预测准确性如何在整个网络中演变?
  • RQ2在自然数据集上,标准 CNN 中的过度思考(浪费性和破坏性)的普遍性与影响?
  • RQ3SDN 是否能够在不牺牲准确性的前提下降低平均推理成本,并且在对抗性/后门场景中是否能恢复性能?
  • RQ4基于置信度的提前退出和提出的混淆度量在缓解过度思考方面有多有效?
  • RQ5内部预测不一致是否能揭示错误源并有助于可解释性?

主要发现

  • 内部分类器提升或达到原始准确性,并揭示大多数输入可以提前退出,在若干任务中将推理成本降低超过 50%。
  • 过度思考很常见:多达约 95% 的输入导致浪费性计算,在自然输入上,约 50% 的 CNN 错误中会发生破坏性的错误分类。
  • 基于 SDN 的提前退出在不损失准确性的前提下将平均 FLOPs 降低约 50–75%,并且在恶意输入的后门网络上可将准确率从 12% 提升至 84%(恢复)。
  • 基于最终预测与内部预测之间的 L1 距离的新混淆度量能够可靠地指示可能的错误分类并帮助诊断错误。
  • 提前退出可以通过降低攻击者触发器的有效性来缓解后门攻击,混淆度量为安全运行提供了实用的错误指示。

阅读本论文

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

在 Nubint 中阅读本论文

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