SkipNet
代码:https://github.com/ucbdrive/skipnet
Abstract. (摘要)
While deeper convolutional networks are needed to achieve maximum accuracy in visual perception tasks, for many inputs shallower networks are sufficient. We exploit this observation by learning to skip convolutional layers on a per-input basis. We introduce SkipNet, a modified residual network, that uses a gating network to selectively skip convolutional blocks based on the activations of the previous layer. We formulate the dynamic skipping problem in the context of sequential decision making and propose a hybrid learning algorithm that combines supervised learning and reinforcement learning to address the challenges of non-differentiable skipping decisions. We show SkipNet reduces computation by 30 − 90% while preserving the accuracy of the original model on four benchmark datasets and outperforms the state-of-the-art dynamic networks and static compression methods. We also qualitatively evaluate the gating policy to reveal a relationship between image scale and saliency and the number of layers skipped.
尽管需要更深的卷积网络才能在视觉感知任务中获得更大的准确性,但对于大多数输入来说,较浅的网络就够了。
SkipNet是经过改进的残差网络,使用gating network根据前一层的激活有选择地跳过卷积层。我们在顺序决策(sequential decision)的背景下制定动态跳过(dynamic skipping)问题,并提出一种混合学习算法,将监督学习和强化学习相结合,以解决不可微分的跳过动态的问题。
计算量减少了30%至90%,同时在四个基准数据集上保留了原始模型的准确性,并且胜过了最新的动态网络和静态压缩方法。
定性评估gating策略,以揭示图像比例和显着性(saliency)与跳过的层数之间的关系。
Introduction(介绍)

动态选择在推理过程中应跳过卷积神经网络的哪些层,动态跳过问题-构造->顺序决策问题,其中前一层的输出决定是否绕过后一层。
动态跳过问题的目标是保留整个网络准确性的同时,跳过尽可能多的层。(减少参数量,观察每层的作用)
为了在保持准确性的同时减少计算量,我们需要正确绕过网络中不必要的层,学习有效的跳过策略也是一项挑战。
(同时因为会跳过层数,所以不能应用梯度的优化)
过程:将gating module明确分配给每组卷积层(each group of layers)。gating模块将前一层的激活映射到二进制决策,以跳过或执行后一层。我们分两个阶段训练门控模块。首先,我们通过采用重新参数化(reparametrization)技巧对二进制skip决策使用soft-max松弛,并结合原始模型使用的标准交叉熵损失一起训练layers and gates。然后,我们将概率gate输出视为初始跳过策略,并在不使用relaxation的情况下使用REINFORCE来优化策略。在后期阶段,我们共同优化跳过策略和预测误差,以稳定探索过程。
Related Work(相关工作)
加速现有的卷积网络:(训练初始网络后使用)权重稀疏化、滤波器修剪、矢量量化和蒸馏->将模型转移到较浅的网络上进行模型压缩
他人实验探索:通过提早终止来动态缩放计算、暂停循环网络以节省计算成本、在卷积网络中使用尽早终止、ResNets每组块中的提前终止
SkipNet并不会提早退出,而是根据处理层的输出有条件地绕过各个层,可以更好地权衡成本
SkipNet Model Design(模型构思)

对于给定输入有选择地包括或排除了各个层。 使用插入在各层之间的小型门控网络可以完成各层的按输入选择。 gating网络将前一层或一组层的输出映射到一个二进制决策,以执行或绕过后一层或一组层
对于a,当gating module独立的时候,情况变复杂的时候参数量变多