Skip to main content
QUICK REVIEW

[论文解读] Offloading Algorithms for Maximizing Inference Accuracy on Edge Device Under a Time Constraint

Andrea Fresa, Jaya Prakash Champati|arXiv (Cornell University)|Dec 21, 2021
IoT and Edge/Fog Computing被引用 4
一句话总结

本文提出 AMR²,一种用于在边缘设备(ED)与边缘服务器(ES)之间卸载机器学习推理作业的近似算法,旨在时间约束 T 下最大化推理准确率。通过使用线性规划松弛和舍入方法,AMR² 确保完成时间不超过 2T,并实现接近最优的准确率,在基于 Raspberry Pi 运行 MobileNet 和 ResNet 模型的实验中,相比贪婪基线方法平均提升 40%。

ABSTRACT

With the emergence of edge computing, the problem of offloading jobs between an Edge Device (ED) and an Edge Server (ES) received significant attention in the past. Motivated by the fact that an increasing number of applications are using Machine Learning (ML) inference, we study the problem of offloading inference jobs by considering the following novel aspects: 1) in contrast to a typical computational job, the processing time of an inference job depends on the size of the ML model, and 2) recently proposed Deep Neural Networks (DNNs) for resource-constrained devices provide the choice of scaling the model size. We formulate an assignment problem with the aim of maximizing the total inference accuracy of n data samples available at the ED, subject to a time constraint T on the makespan. We propose an approximation algorithm AMR2, and prove that it results in a makespan at most 2T, and achieves a total accuracy that is lower by a small constant from optimal total accuracy. As proof of concept, we implemented AMR2 on a Raspberry Pi, equipped with MobileNet, and is connected to a server equipped with ResNet, and studied the total accuracy and makespan performance of AMR2 for image classification application.

研究动机与目标

  • 为解决在边缘设备与边缘服务器之间卸载机器学习推理作业时,平衡推理准确率与执行时间的挑战。
  • 建模边缘计算中模型大小(影响处理时间与准确率)与通信开销之间的权衡。
  • 提出一种新颖的一般性分配问题,旨在满足完成时间约束 T 的前提下最大化总推理准确率。
  • 设计一种高效的近似算法(AMR²),适用于异构、尺寸缩放的机器学习模型,具备有界完成时间与接近最优的准确率。
  • 当所有数据样本相同时,提供一种最优的动态规划解法(AMDP)

提出的方法

  • 将卸载问题建模为整数线性规划(ILP),以在时间约束 T 下最大化总推理准确率。
  • 对 ILP 应用线性规划松弛,获得分数解,随后通过舍入过程将作业分配至 ED 或 ES。
  • 采用两阶段舍入策略:首先将分数解中的作业分配至 ES,然后通过贪婪重分配步骤修正可能产生的完成时间越界问题。
  • 证明 AMR² 可保证完成时间不超过 2T,且总准确率损失不超过 2(与最优解相比)。
  • 当所有作业相同时,提出 AMDP,一种伪多项式时间复杂度的动态规划算法,可计算最优调度。
  • 在 Raspberry Pi 上通过真实处理时间与通信时间(基于图像分类工作负载)对 AMR² 进行实验评估。

实验结果

研究问题

  • RQ1当边缘设备支持多种不同大小的模型(具有不同的准确率与处理时间)时,如何在严格时间约束下最大化推理准确率?
  • RQ2针对具有可变模型大小与通信延迟的推理作业卸载问题,其近似算法的理论性能边界是什么?
  • RQ3在真实边缘部署场景中,所提出的 AMR² 算法与贪婪基线方法相比,在准确率与完成时间方面表现如何?
  • RQ4在舍入导致的偏差下,基于 LP 松弛的方法在何种条件下仍能实现接近最优的准确率?
  • RQ5当所有数据样本相同时,能否高效计算出最优解?此类解法的时间复杂度是多少?

主要发现

  • AMR² 保证完成时间不超过 2T,确保在放宽的时间约束下具有可行性。
  • AMR² 的总推理准确率最多比最优解低 2 分,且在典型情况下,准确率损失被限制在最大模型与最小模型准确率之差(a_{m+1} - a_1)范围内。
  • 在 Raspberry Pi 上的真实实验中,AMR² 平均比 Greedy-RRA 基线方法高出 40% 的总推理准确率。
  • 当 T = 0.5 秒时,AMR² 相较于 Greedy-RRA 实现了 20–60% 的准确率增益,但随着 T 减小,由于可卸载机会有限,增益降低。
  • 当 T = 4 秒时,AMR² 相较于 Greedy-RRA 实现了 40–50% 的准确率提升,表明在更大时间预算下具有良好的可扩展性。
  • 在 Raspberry Pi 上实测的完成时间与算法中估计的完成时间高度吻合,证实了所用定时模型的准确性。

更好的研究,从现在开始

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

无需绑定信用卡

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