NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Design and Optimization of Hierarchical Gradient Coding for Distributed Learning at Edge Devices

Weiheng Tang, Jingyi Li, Lin Chen, Xu ChenIEEE Trans. Communications 2024

TL;DR

This paper tackles the challenge of stragglers (slow workers) in hierarchical distributed learning systems at the edge. They propose a novel hierarchical gradient coding scheme that significantly reduces training time by intelligently distributing computation and communication loads across workers, edge nodes, and the master, achieving optimal straggler tolerance with reduced overhead.

What Problem Does This Paper Address?

Distributed learning, where tasks are split across multiple devices, is crucial for handling large-scale machine learning models. Edge computing, which adds an intermediate layer of edge nodes (like gateways) between workers and the central master, promises to boost performance by offloading computation. However, this hierarchical structure introduces new complexities. The primary challenge is the "straggler effect," where slow or failing devices (workers or even edge nodes themselves) can drastically slow down the entire training process. Traditional gradient coding methods, designed for simpler master-worker setups, are insufficient for this hierarchical edge environment, leading to more severe straggler issues and suboptimal performance.

Methods

The authors introduce a Hierarchical Gradient Coding (HGC) framework that operates in two phases: encoding and decoding.

  • Encoding: This phase uses a two-layer coding strategy. The first layer encodes information between edge nodes and the master to handle edge stragglers. The second layer encodes information between workers and their respective edge nodes to manage worker stragglers. This dual-layer approach allows for better straggler tolerance with fewer computational loads compared to conventional single-layer methods.
  • Decoding: The decoding process mirrors the encoding, with edge nodes first decoding partial results from their workers, and then the master decoding the aggregated results from the edge nodes. This distributed decoding leverages the capabilities of both edge nodes and the master.
  • Optimization (JNCSS): To further enhance performance in heterogeneous (unequal capability) edge environments, they formulate a Jointly Node and Coding Scheme Selection (JNCSS) problem. This problem aims to minimize the total expected training time by optimally selecting which nodes participate and what coding scheme to use, considering varying computation and communication capabilities. They develop an algorithm to solve this complex optimization problem.

Datasets

The paper uses the following datasets for evaluation:

  • MNIST: A dataset of handwritten digits.
  • CIFAR-10: A dataset of 10 classes of small images.

These datasets are used with a logistic regression model and a Convolutional Neural Network (CNN). The data is partitioned into K=40 disjoint sub-datasets, and three levels of non-IID (non-independent and identically distributed) data distributions are simulated to test the robustness of the schemes.

Key Insights and Ideas

  • Hierarchical Stragglers are Worse: The paper highlights that edge stragglers can cause a cascading effect, implicating all workers connected to them, thus exacerbating the straggler problem in hierarchical systems.
  • Two-Layer Coding is Key: A hierarchical coding scheme that addresses both edge node and worker stragglers simultaneously is essential for optimal performance in these systems.
  • Edge Nodes as Decoders: Empowering edge nodes to perform partial decoding and aggregation significantly reduces the communication burden on the central master.
  • Trade-off Between Load and Tolerance: The authors derive a fundamental trade-off between the computational load on workers and the system's ability to tolerate stragglers. Their HGC scheme achieves this optimal trade-off.
  • Heterogeneity Demands Optimization: In real-world edge scenarios, devices have diverse capabilities. The JNCSS framework is crucial for adapting the coding and node selection strategy to these heterogeneous conditions to minimize training time.

Key Results

  • Significant Speedup: The proposed HGC scheme achieves substantial speedups. For MNIST, it shows up to 60.1% performance gain over conventional coded schemes and 59.8% over uncoded schemes in terms of runtime.
  • HGC-JNCSS Outperforms: The HGC-JNCSS, which optimizes straggler tolerance for heterogeneous environments, further improves upon HGC, demonstrating speed-ups of up to 1.64x on MNIST and 1.44x on CIFAR-10 compared to HGC.
  • Comparable Accuracy: Despite the speed improvements, all coded schemes (including HGC and HGC-JNCSS) achieve comparable accuracy to the uncoded scheme, indicating no loss in learning performance.
  • Reduced Communication: The hierarchical approach significantly reduces the communication load on the master compared to traditional master-worker architectures.
  • Greedy Scheme Limitations: The "Greedy" approach, which simply ignores potential stragglers, performs worse and often fails to achieve target accuracy, especially under non-IID conditions.

Limitations and Future Work

  • Unbalanced Workload Allocation: The current work assumes balanced training workload allocation among workers. The authors mention that exploring more involved cases of unbalanced allocation is a direction for future work.
  • Generalization: While the paper focuses on a specific hierarchical structure, generalizing the proposed scheme to more complex multi-layer distributed learning systems with varying numbers of layers and nodes could be explored.
  • Theoretical Bounds: The paper provides theoretical analysis and bounds for its algorithms. Further investigation into tighter bounds or more efficient optimization algorithms for the JNCSS problem could be beneficial.

Summary updated

BibTeX
@article{tang2024design,
  author = {Weiheng Tang and Jingyi Li and Lin Chen and Xu Chen},
  title = {{Design and Optimization of Hierarchical Gradient Coding for Distributed Learning at Edge Devices}},
  journal = {IEEE Trans. Communications},
  year = {2024},
}
Figure