Skip to main content
QUICK REVIEW

[论文解读] Early-exit Convolutional Neural Networks

Esra Demir, Emre Akbaş|arXiv (Cornell University)|Sep 9, 2024
Neural Networks and Applications被引用 5
一句话总结

论文提出早期退出CNNs (EENets),通过添加可学习的退出模块及置信分支来适应推理成本,在保持与标准ResNets相似的准确率的同时减少FLOPs(例如 CIFAR10 20%,SVHN 30%,Tiny-ImageNet 42%).

ABSTRACT

This paper is aimed at developing a method that reduces the computational cost of convolutional neural networks (CNN) during inference. Conventionally, the input data pass through a fixed neural network architecture. However, easy examples can be classified at early stages of processing and conventional networks do not take this into account. In this paper, we introduce 'Early-exit CNNs', EENets for short, which adapt their computational cost based on the input by stopping the inference process at certain exit locations. In EENets, there are a number of exit blocks each of which consists of a confidence branch and a softmax branch. The confidence branch computes the confidence score of exiting (i.e. stopping the inference process) at that location; while the softmax branch outputs a classification probability vector. Both branches are learnable and their parameters are separate. During training of EENets, in addition to the classical classification loss, the computational cost of inference is taken into account as well. As a result, the network adapts its many confidence branches to the inputs so that less computation is spent for easy examples. Inference works as in conventional feed-forward networks, however, when the output of a confidence branch is larger than a certain threshold, the inference stops for that specific example. The idea of EENets is applicable to available CNN architectures such as ResNets. Through comprehensive experiments on MNIST, SVHN, CIFAR10 and Tiny-ImageNet datasets, we show that early-exit (EE) ResNets achieve similar accuracy with their non-EE versions while reducing the computational cost to 20% of the original. Code is available at https://github.com/eksuas/eenets.pytorch

研究动机与目标

  • 目标是通过基于输入难易度的早期退出来降低 CNN 推理成本。
  • 引入具备独立置信和分类分支的多个退出块。
  • 构建一个同时优化准确性和计算成本的训练损失。
  • 演示与 ResNet 架构的兼容性,并在标准数据集上评估成本-准确率权衡。

提出的方法

  • 在选定的网络位置添加早期退出块(Plain、Pool、Bnpool)以创建 EENets。
  • 每个退出块具有置信分支(sigmoid)和软max分类分支;在推理过程中,当置信度超过阈值时触发退出(T=0.5)。
  • 在 Pool/Bnpool 退出中使用全局平均池化以减小特征图大小和计算量。
  • 使用联合损失 L = L_MC + lambda * L_Cost 进行训练,跨退出使用软/层级的成本定义;讨论两种变体 L_v1、L_v2,倾向于 L_v2 以防止死退出问题。
  • 使用 Pareto、Golden Ratio、Fine、Linear、Quadratic 等方案来分配退出块,以控制跨层的计算预算。
  • 表明 EENets 可以在单阶段进行训练,具备可学习的置信分数且不需要额外超参数如非终止惩罚。

实验结果

研究问题

  • RQ1实际中 EENets 是否在不同退出位置终止,且每个输入是否存在退出选择的多样性?
  • RQ2与非 EE 的 ResNets 相比,EENets 在降低计算成本的同时是否保持竞争力的准确性?
  • RQ3哪种退出块类型(Plain、Pool、Bnpool)具有更好性能?
  • RQ4退出块的分布策略如何影响不同数据集上的准确性和成本?

主要发现

退出块FLOPs相对成本#示例
EE-block05460.0847
EE-block118440.262247
Last Exit69821.007706
  • EENets 在减少计算量的同时,达到与其非 EE ResNet 相当的精度,例如 CIFAR10 的成本下降 20%,SVHN 的 30%,Tiny-ImageNet 的 42%(相对 FLOPs)。
  • 在 MNIST 及 MNIST 优化的 EENet-8 上,显式的退出块分布显示选择性早退出,整体竞争力的准确率(例如 96.55%,相对成本 0.82)。
  • 可学习的置信分支避免死单元问题,使用单阶段损失训练,权衡准确性与成本。
  • 实验中全局平均池化退出(Pool/Bnpool)通常比 Plain 退出在准确性-成本权衡上表现更佳。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

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