[论文解读] Characterizing the Deep Neural Networks Inference Performance of Mobile Applications
本文提出 CNNSelect,一种动态模型选择算法,通过在运行时根据可变网络条件在预训练的卷积神经网络(CNN)模型之间进行选择,优化基于云的深度神经网络推理在移动应用中的表现,以在准确率和端到端延迟之间取得平衡。与贪婪选择相比,该方法在保持相近准确率的同时,将服务等级协议(SLA)遵守率提高了 88.5%。
Today's mobile applications are increasingly leveraging deep neural networks to provide novel features, such as image and speech recognitions. To use a pre-trained deep neural network, mobile developers can either host it in a cloud server, referred to as cloud-based inference, or ship it with their mobile application, referred to as on-device inference. In this work, we investigate the inference performance of these two common approaches on both mobile devices and public clouds, using popular convolutional neural networks. Our measurement study suggests the need for both on-device and cloud-based inferences for supporting mobile applications. In particular, newer mobile devices is able to run mobile-optimized CNN models in reasonable time. However, for older mobile devices or to use more complex CNN models, mobile applications should opt in for cloud-based inference. We further demonstrate that variable network conditions can lead to poor cloud-based inference end-to-end time. To support efficient cloud-based inference, we propose a CNN model selection algorithm called CNNSelect that dynamically selects the most appropriate CNN model for each inference request, and adapts its selection to match different SLAs and execution time budgets that are caused by variable mobile environments. The key idea of CNNSelect is to make inference speed and accuracy trade-offs at runtime using a set of CNN models. We demonstrated that CNNSelect smoothly improves inference accuracy while maintaining SLA attainment in 88.5% more cases than a greedy baseline.
研究动机与目标
- 量化移动应用中本地推理与基于云的深度神经网络推理之间的性能权衡。
- 识别影响推理性能的关键因素,包括移动硬件、网络条件以及模型压缩技术。
- 解决基于云的推理中可变网络条件导致端到端延迟增加和 SLA 合规性下降的挑战。
- 设计一种运行时模型选择算法,以适应动态移动环境,在推理准确率与延迟之间实现平衡。
- 评估所提出的 CNNSelect 算法在提升 SLA 达成率和性能效率方面的有效性。
提出的方法
- 作者在多种移动设备和云服务器上开展了实证测量研究,评估了不同 CNN 模型和框架(Caffe、TensorFlow)的端到端推理时间与资源消耗。
- 他们分析了移动硬件、深度学习框架、模型压缩以及网络条件对本地与基于云推理性能的影响。
- CNNSelect 采用基于概率的模型选择策略,根据实时网络传输时间和 SLA 约束选择最合适的 CNN 模型。
- 该算法维护一组预训练的、面向移动设备优化的 CNN 模型,其在准确率与推理速度之间具有不同的权衡特性。
- 它在运行时动态选择模型,以最小化端到端延迟,同时满足准确率和 SLA 要求,并能适应不断变化的网络条件。
- 评估包括端到端测试和广泛的仿真,以验证 CNNSelect 在多样化移动环境中的性能表现。
实验结果
研究问题
- RQ1影响移动应用中本地与基于云的 DNN 推理的关键性能因素有哪些?
- RQ2移动硬件、网络条件以及模型压缩技术如何影响推理延迟与准确率?
- RQ3可变网络条件在多大程度上会降低基于云的推理性能与 SLA 合规性?
- RQ4动态模型选择策略是否能在可变移动环境下提升 SLA 遵守率,同时保持高推理准确率?
- RQ5在 SLA 达成率与延迟降低方面,CNNSelect 与贪婪模型选择相比表现如何?
主要发现
- 对于运行移动优化 CNN 模型的新款移动设备,本地推理是可行的;但对于旧款设备或复杂模型,仍需依赖基于云的推理。
- 基于云的推理中模型启动延迟可能带来数量级的性能开销,必须在服务器部署中谨慎管理。
- 可变的移动网络条件会显著增加端到端云推理延迟,尤其在高波动性条件下更为明显。
- 与贪婪基线相比,CNNSelect 将 SLA 达成率提高了 88.5%,尤其在严格延迟预算下表现更优。
- 当 SLA 预算超过 250ms 时,CNNSelect 在保持相近准确率的同时,实现了高达 43% 的端到端延迟降低。
- 该算法通过根据实时网络与 SLA 条件动态调整模型选择,有效平衡了准确率与延迟。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。