arXiv:2411.04036cs.LG2024-11NeurIPS被引 4

用前向梯度实现边缘设备低功耗训练,突破模型部署最后一公里

Stepping Forward on the Last Mile

论文配图:Stepping Forward on the Last Mile
图 1 · 摘自论文原文
  • 基于两次前向传播计算方向导数,避免反向传播内存开销
  • 在视觉与音频任务中达到接近反向传播的精度,内存占用大幅降低
  • 适合资源受限的嵌入式设备,如NPU、MCU等无训练能力的硬件

在资源受限的边缘设备上持续适应预训练模型以适配本地数据,是模型部署的“最后一公里”。然而,随着模型规模增大,反向传播需要大量内存,难以在边缘设备上运行。此外,多数低功耗神经处理引擎(如NPU、DSP、MCU)仅支持定点推理,缺乏训练能力。近期提出的前向梯度方法仅依赖两次前向传播计算方向导数,显著节省计算与内存开销。但量化训练中使用定点前向梯度的性能仍不明确。本文在视觉与音频等多个深度学习基准任务上,系统研究了在边缘设备上使用定点前向梯度进行训练的可行性。提出一系列算法优化,进一步降低内存占用并缩小与反向传播的精度差距。同时通过实证分析前向梯度在损失曲面上的探索机制。结果表明,在边缘设备模型定制化场景下,定点前向梯度训练是一种可行且实用的方法。

原文摘要 · Abstract (English)

Continuously adapting pre-trained models to local data on resource constrained edge devices is the $\emph{last mile}$ for model deployment. However, as models increase in size and depth, backpropagation requires a large amount of memory, which becomes prohibitive for edge devices. In addition, most existing low power neural processing engines (e.g., NPUs, DSPs, MCUs, etc.) are designed as fixed-point inference accelerators, without training capabilities. Forward gradients, solely based on directional derivatives computed from two forward calls, have been recently used for model training, with substantial savings in computation and memory. However, the performance of quantized training with fixed-point forward gradients remains unclear. In this paper, we investigate the feasibility of on-device training using fixed-point forward gradients, by conducting comprehensive experiments across a variety of deep learning benchmark tasks in both vision and audio domains. We propose a series of algorithm enhancements that further reduce the memory footprint, and the accuracy gap compared to backpropagation. An empirical study on how training with forward gradients navigates in the loss landscape is further explored. Our results demonstrate that on the last mile of model customization on edge devices, training with fixed-point forward gradients is a feasible and practical approach.

边缘计算前向梯度量化训练模型部署

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