Skip to main content
QUICK REVIEW

[论文解读] EBJR: Energy-Based Joint Reasoning for Adaptive Inference

Mohammad Kazem Akbari, Amin Banitalebi-Dehkordi|arXiv (Cornell University)|Oct 20, 2021
Advanced Neural Network Applications参考文献 48被引用 4
一句话总结

EBJR 提出了一种基于能量的联合推理框架,通过自适应地在轻量级学生模型与大型预训练教师模型之间路由输入,实现在显著降低延迟的同时接近教师模型的准确率。通过使用可学习的能量函数在不重新训练的情况下路由样本,EBJR 在 MS-COCO 上实现了最高 1.8 倍的加速,同时保持了教师模型 97% 的 mAP,优于先前的自适应推理方法。

ABSTRACT

State-of-the-art deep learning models have achieved significant performance levels on various benchmarks. However, the excellent performance comes at a cost of inefficient computational cost. Light-weight architectures, on the other hand, achieve moderate accuracies, but at a much more desirable latency. This paper presents a new method of jointly using the large accurate models together with the small fast ones. To this end, we propose an Energy-Based Joint Reasoning (EBJR) framework that adaptively distributes the samples between shallow and deep models to achieve an accuracy close to the deep model, but latency close to the shallow one. Our method is applicable to out-of-the-box pre-trained models as it does not require an architecture change nor re-training. Moreover, it is easy to use and deploy, especially for cloud services. Through a comprehensive set of experiments on different down-stream tasks, we show that our method outperforms strong state-of-the-art approaches with a considerable margin. In addition, we propose specialized EBJR, an extension of our method where we create a smaller specialized side model that performs the target task only partially, but yields an even higher accuracy and faster inference. We verify the strengths of our methods with both theoretical and experimental evaluations.

研究动机与目标

  • 为解决深度学习中推理延迟与模型准确率之间的权衡问题,通过在小型和大型预训练模型之间实现自适应路由。
  • 开发一种无需架构修改或现有模型微调的方法,实现即插即用的部署。
  • 通过根据输入复杂度动态选择最优模型路径,提升实际应用中的效率。
  • 探索仅专注于高频类别的专用学生模型,以进一步提升推理速度与准确率。
  • 为云边端推理提供一种灵活、可部署的解决方案,且内存开销极低。

提出的方法

  • 该方法采用基于能量的路由模块,为每个输入计算得分,决定将其路由至轻量级学生模型(快速、小型)还是大型教师模型(高准确率、大模型)。
  • 能量函数通过一次性的校准阶段使用小规模验证集学习,无需微调学生或教师模型。
  • 路由决策基于最小化一个平衡预测置信度与计算成本的能量函数。
  • 该框架兼容任意预训练的学生-教师模型对,支持即插即用式集成到现有系统中。
  • 引入 EBJR 的一种专用变体,其中学生模型仅在最常见类别上进行训练,以提升路由效率。
  • 该方法支持静态与动态路由,路由器根据每个样本的输入复杂度做出决策。

实验结果

研究问题

  • RQ1能否在不重新训练的情况下,有效结合预训练的学生模型与大型教师模型,实现在低延迟下保持高准确率?
  • RQ2如何设计一种基于能量的路由机制,以根据输入复杂度动态将样本路由至最合适模型?
  • RQ3在真实场景中,仅在高频类别上训练专用学生模型是否能提升推理效率与准确率?
  • RQ4在多种下游任务中,EBJR 与最先进自适应推理方法相比,在延迟-准确率权衡方面表现如何?
  • RQ5数据分布(如常见类与罕见类的比例)对专用 EBJR 性能有何影响?

主要发现

  • 在 MS-COCO 上,EBJR 实现了教师模型 97% 的 mAP,同时获得 1.8 倍的加速,优于基线 EfficientDet-D4 及先前的自适应方法。
  • 在相同 mAP 水平下,EBJR 相较于 Zhou 等人(2017)报告的 1.3 倍加速,在目标检测任务中实现了 1.8 倍的加速。
  • 在假设 75% 的输入属于前 50 个类别的情况下,专用 EBJR 相较于教师模型将 FLOPs 降低约 1.5 倍,同时保持相同准确率。
  • 当 50% 或以上输入属于前 50 个类别时,专用 EBJR 在 C̄=50 时达到最优效率,优于通用 EBJR 与标准模型。
  • 该方法与现有动态推理技术正交,当应用于 RS-Net 时,无需架构修改即可进一步提升性能。
  • 通过在边缘设备上部署最大可行的学生模型,并仅将困难样本路由至云端,内存开销可控,同时保持高准确率并最小化资源使用。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

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