arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.05336cs.CVcs.AI

早退卷积神经网络

Early-exit Convolutional Neural Networks

Middle East Technical University(中东科技大学)

Edanur Demir, Emre Akbas

AI总结:

提出EENets早退CNN,通过多个可学习置信度分支按输入动态停止推理,在保持ResNet准确率的同时将计算成本降至20%。

摘要:

本文旨在开发一种降低卷积神经网络(CNN)推理期间计算成本的方法。传统上,输入数据通过固定的神经网络架构。然而,简单样本可以在处理的早期阶段被分类,而传统网络并未考虑这一点。在本文中,我们提出了“早退CNN”(Early-exit CNNs),简称EENets,它通过在某些退出位置停止推理过程,根据输入调整其计算成本。在EENets中,存在多个退出块,每个退出块由一个置信度分支和一个softmax分支组成。置信度分支计算在该位置退出(即停止推理过程)的置信度分数;而softmax分支输出分类概率向量。两个分支均可学习,且其参数相互独立。在EENets训练期间,除经典分类损失外,还考虑推理的计算成本。因此,网络使其多个置信度分支适应输入,从而为简单样本耗费更少计算。推理过程与传统前馈网络相同,但当置信度分支的输出大于某个阈值时,该特定样本的推理停止。EENets的思想适用于ResNets等现有CNN架构。通过在MNIST、SVHN、CIFAR10和Tiny-ImageNet数据集上的综合实验,我们表明早退(EE)ResNets取得了与其非EE版本相似的准确率,同时将计算成本降低至原始成本的20%。代码可在https://github.com/eksuas/eenets.pytorch获取。

英文摘要:

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

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑