• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

计算机工程与科学 ›› 2024, Vol. 46 ›› Issue (08): 1361-1371.

• 高性能计算 • 上一篇    下一篇

边缘侧神经网络块粒度领域自适应技术研究

辛高枫,刘玉潇,张青龙,韩锐,刘驰   

  1. (北京理工大学计算机学院,北京 100081)
  • 收稿日期:2023-11-10 修回日期:2023-12-29 接受日期:2024-08-25 出版日期:2024-08-25 发布日期:2024-09-02
  • 基金资助:
    国家重点研发计划(2021YFB3301500);国家自然科学基金 (62272046,62132019,61872337)

Block-grained domain adaptation for neural networks at edge

XIN Gao-feng,LIU Yu-xiao,ZHANG Qing-long,HAN Rui,LIU Chi   

  1. (School of Computer Science & Technology,Beijing Institute of Technology,Beijing 100081,China)
  • Received:2023-11-10 Revised:2023-12-29 Accepted:2024-08-25 Online:2024-08-25 Published:2024-09-02

摘要: 深度神经网络在边缘设备上运行时会面临模型缩放和域自适应2个挑战,现有的模型缩放技术和无监督在线域自适应技术存在缩放粒度粗、缩放空间小和在线域自适应时间长的问题。针对这2个挑战,提出一种块粒度的模型缩放和域自适应训练方法EdgeScaler,它包括离线和在线2个阶段。针对模型缩放挑战,离线阶段能够从各种DNN中检测和抽取块,并将其转换为多个派生块;在线阶段基于块和块之间的组合,提供大规模的缩放空间,解决模型缩放问题。针对域自适应挑战,设计了一种针对于块的残差 Adapter,在离线阶段将其插入块中;在线阶段当新的目标域到来时,对所有的Adapter进行训练,解决块粒度缩放空间中所有选项的域自适应问题。在真实的边缘设备 Jetson TX2上的测试结果表明,在提供大规模缩放选项的基础上,所提方法可以将域自适应训练时间平均减少 85.14%,训练能耗平均减少84.1%。

关键词: 深度神经网络, 边缘设备, 弹性缩放, 块, 域自适应

Abstract: Running deep neural networks on edge devices faces two challenges: model scaling and domain adaptation. Existing model scaling techniques and unsupervised online domain adaptation techniques suffer from coarse scaling granularity, limited scaling space, and long online domain adaptation time. To address these two challenges, this paper proposes a block-grained model scaling and domain adaptation training method called EdgeScaler, which consists of offline and online phases. For the model scaling challenge, in the offline phase, blocks are detected and extracted from various DNN and then are converted into multiple derived blocks. In the online phase, based on the combination of blocks and the connections between them, a large-scale scaling space is provided to solve the model scaling problem. For the domain adaptation challenge, a block-specific residual Adapter is designed, which is inserted into the blocks in the offline phase. In the online phase, when a new target domain arrives, all adapters are trained to solve the domain adaptation problem for all options in the block-grained scaling space. Test results on the real edge device, Jetson TX2, show that EdgeScaler can reduce the domain adaptation training time by an average of 85.14%  and reduce the training energy consumption by an average of 84.1%, while providing a large-scale scaling option.

Key words: deep neural network, edge device, elastic scaling, block, domain adaptation