arXiv:2501.02508cs.LGcs.AI2025-01被引 12

通过后训练方式添加早退出分支,实现推理速度与精度的灵活权衡。

PTEENet: Post-Trained Early-Exit Neural Networks Augmentation for Inference Cost Optimization

  • 在预训练模型上附加早退出分支,不修改原始权重。
  • 实验显示平均推理计算成本显著降低,且可动态调控速度与精度平衡。
  • 适合部署资源受限场景,如移动端或边缘设备推理。

在实际应用中,深度神经网络推理的高计算成本可能难以接受。适度降低整体推理精度可换取显著减少的计算资源需求。本文提出一种在DNN前向推理过程中引入“捷径”的方法,尽可能跳过昂贵的计算步骤。该方法基于BranchyNet(Teerapittayanon et al., 2016)和EEnet(Demir, 2019)架构,但通过将分支附加到预训练模型上,避免修改原始网络权重。同时提出基于卷积模块的新分支结构,以适配大型DNN的训练能力。模型包含置信度头,用于预测各早退出分支的置信度水平。通过设定调整后的阈值,可在运行时实时控制每层分支的退出比例及整体速度-精度权衡。在SVHN和CIFAR10数据集上,使用ResNet、DenseNet、VGG等不同深度的架构进行实验,结果表明该方法能有效降低平均推理计算成本,并实现对精度与计算代价的灵活控制。

原文摘要 · Abstract (English)

For many practical applications, a high computational cost of inference over deep network architectures might be unacceptable. A small degradation in the overall inference accuracy might be a reasonable price to pay for a significant reduction in the required computational resources. In this work, we describe a method for introducing "shortcuts" into the DNN feedforward inference process by skipping costly feedforward computations whenever possible. The proposed method is based on the previously described BranchyNet (Teerapittayanon et al., 2016) and the EEnet (Demir, 2019) architectures that jointly train the main network and early exit branches. We extend those methods by attaching branches to pre-trained models and, thus, eliminating the need to alter the original weights of the network. We also suggest a new branch architecture based on convolutional building blocks to allow enough training capacity when applied on large DNNs. The proposed architecture includes confidence heads that are used for predicting the confidence level in the corresponding early exits. By defining adjusted thresholds on these confidence extensions, we can control in real-time the amount of data exiting from each branch and the overall tradeoff between speed and accuracy of our model. In our experiments, we evaluate our method using image datasets (SVHN and CIFAR10) and several DNN architectures (ResNet, DenseNet, VGG) with varied depth. Our results demonstrate that the proposed method enables us to reduce the average inference computational cost and further controlling the tradeoff between the model accuracy and the computation cost.

早退出推理优化模型压缩

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。