ElasticZO:结合零阶与一阶优化的内存高效端侧学习
ElasticZO: A Memory-Efficient On-Device Learning with Combined Zeroth- and First-Order Optimization
AI总结:
本文提出ElasticZO与ElasticZO-INT8端侧学习方法,通过混合BP和ZO优化及整数量化梯度计算,在低内存开销下提升准确率并降低训练耗时。
摘要:
零阶(ZO)优化正被视为标准的基于反向传播(BP)训练的一种简单而强大的替代方案。值得注意的是,ZO优化允许仅使用前向传播进行训练,并且占用(几乎)与推理相同的内存,这使其非常适合计算和内存资源有限的边缘设备。本文针对全精度和8位量化深度神经网络(DNN)提出了基于ZO的端侧学习(ODL)方法,即ElasticZO和ElasticZO-INT8。ElasticZO处于纯ZO方法和纯BP方法之间,其思想是对最后几层采用BP,对其余层采用ZO。ElasticZO-INT8通过引入一种从整数交叉熵损失值计算量化ZO梯度的新方法,首次实现了仅使用整数运算的基于ZO的训练。在分类数据集上的实验结果表明,ElasticZO有效解决了原始ZO收敛缓慢的问题,并缩小了与基于BP训练之间的准确率差距。与原始ZO相比,ElasticZO以仅0.072%至1.7%的内存开销实现了5.2%至9.5%的准确率提升,并且能够处理微调任务以及完整训练。ElasticZO-INT8进一步将内存使用量和训练时间分别降低了1.46至1.60倍和1.38至1.42倍,且没有损失准确率。这些结果表明,与纯ZO和纯BP方法相比,该方法在准确率和训练成本之间取得了更好的权衡,也凸显了ZO优化在端侧学习中的潜力。
英文摘要:
Zeroth-order (ZO) optimization is being recognized as a simple yet powerful alternative to standard backpropagation (BP)-based training. Notably, ZO optimization allows for training with only forward passes and (almost) the same memory as inference, making it well-suited for edge devices with limited computing and memory resources. In this paper, we propose ZO-based on-device learning (ODL) methods for full-precision and 8-bit quantized deep neural networks (DNNs), namely ElasticZO and ElasticZO-INT8. ElasticZO lies in the middle between pure ZO- and pure BP-based approaches, and is based on the idea to employ BP for the last few layers and ZO for the remaining layers. ElasticZO-INT8 achieves integer arithmetic-only ZO-based training for the first time, by incorporating a novel method for computing quantized ZO gradients from integer cross-entropy loss values. Experimental results on the classification datasets show that ElasticZO effectively addresses the slow convergence of vanilla ZO and shrinks the accuracy gap to BP-based training. Compared to vanilla ZO, ElasticZO achieves 5.2-9.5% higher accuracy with only 0.072-1.7% memory overhead, and can handle fine-tuning tasks as well as full training. ElasticZO-INT8 further reduces the memory usage and training time by 1.46-1.60x and 1.38-1.42x without compromising the accuracy. These results demonstrate a better tradeoff between accuracy and training cost compared to pure ZO- and BP-based approaches, and also highlight the potential of ZO optimization in on-device learning.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。