DSparse:一种基于稀疏更新的边缘集群分布式训练方法
DSparse: A Distributed Training Method for Edge Clusters Based on Sparse Update
-
摘要:研究背景 边缘计算范式通过将计算任务移至数据源附近,缓解了万物互联时代云计算集中处理模式的网络带宽压力,降低了计算任务的处理时延。然而,边缘设备异构的硬件架构和受限的算力资源使其在处理以分布式训练为代表的智能计算任务时,仍然存在一定的性能挑战。现有的分布式训练框架未能充分考虑边缘设备受限的算力资源和网络带宽,导致分布式训练任务中频繁的梯度聚合操作加剧了边缘设备网络的不稳定性。尽快联邦平均、梯度量化、梯度稀疏化等方法可以有效降低训练中的通信开销,但会降低模型训练的收敛速度,且部分实现依赖高性能参数服务器,限制了其在边缘环境中的应用。目的 本研究提出了一种基于稀疏更新的分布式训练方法DSparse,旨在解决边缘计算环境中分布式训练的性能挑战,通过最大化边缘集群内各设备的内存资源利用率,并减少参数聚合过程中的通信频率,来提升分布式训练效率。该方法可以有效实现边缘环境下的分布式训练,支撑人工智能模型在资源受限环境下的增量学习。方法 本研究提出了一种针对具有不同内存容量的边缘集群设计的分布式稀疏更新方法DSparse。在该方法中,每个设备根据其可用内存选择性地更新最关键的层,从而减少训练过程中的内存消耗和通信数据量,加速了分布式训练过程。此外,DSparse还包含一种基于多个进程组的参数聚合方法,以适应不同设备中更新层和通道的变化。该方法通过跨多个节点的进程组,充分利用边缘训练环境中的资源,其中每个组内的进程可能分布在不同的节点上。通过将参数聚合任务划分为全归约(all-reduce)和广播(broadcast)操作,该方法有效降低了通信频率,从而提升了边缘分布式训练中参数聚合的效率。结果 DSparse显著降低了内存消耗和参数聚合时间,加速了分布式训练过程,同时保持了模型精度。在使用MobileNetV2对CIFAR-10数据集进行数据并行训练时,DSparse将7台设备的内存消耗从1284 MB减少至平均519 MB,实现了59.6%的内存节省;批处理时间从28.98秒缩短至7.14秒,参数聚合时间节省了75.4%,与梯度融合结合使用时,训练时间进一步缩短至5.60秒。通过减少内存消耗和处理时间,同时提升参数聚合效率,DSparse显著提升了训练速度,验证了其在边缘计算环境中的有效性。结论 本研究提出的DSparse方法有效解决了边缘集群中内存限制和通信延迟问题。通过分布式稀疏更新,DSparse使设备能够优先更新关键层,最大化内存资源利用并减少不必要的通信,从而加速分布式训练过程。此外,基于多组的参数聚合机制减少了通信频率,提高了聚合速度。实验结果表明,DSparse在保持模型准确性的同时,显著降低了内存消耗并提升了训练效率。本研究未来的工作将关注通信优化策略,解决边缘环境中网络不稳定对分布式训练的性能影响,并针对设备移动性设计更高效的容错机制和任务分配算法,以进一步提高分布式训练方法面向真实边缘环境的适应性。Abstract: Edge machine learning creates a new computational paradigm by enabling the deployment of intelligent applications at the network edge. It enhances application efficiency and responsiveness by performing inference and training tasks closer to data sources. However, it encounters several challenges in practice. The variance in hardware specifications and performance across different devices presents a major issue for the training and inference tasks. Additionally, edge devices typically possess limited network bandwidth and computing resources compared with data centers. Moreover, existing distributed training architectures often fail to consider the constraints of resources and communication efficiency in edge environments. In this paper, we propose DSparse, a method for distributed training based on sparse update in edge clusters with various memory capacities. It aims at maximizing the utilization of memory resources across all devices within a cluster. To reduce memory consumption during the training process, we adopt sparse update to prioritize the updating of selected layers on the devices in the cluster, which not only lowers memory usage but also reduces the data volume of parameters and the time required for parameter aggregation. Furthermore, DSparse utilizes a parameter aggregation mechanism based on multi-process groups, subdividing the aggregation tasks into AllReduce and Broadcast types, thereby further reducing the communication frequency for parameter aggregation. Experimental results using the MobileNetV2 model on the CIFAR-10 dataset demonstrate that DSparse reduces memory consumption by an average of 59.6% across seven devices, with a 75.4% reduction in parameter aggregation time, while maintaining model precision.