Hybrid Decentralized Optimization: First- and Zeroth-Order Optimizers Can Be Jointly Leveraged For Faster Convergence

Shayan Talaei, Giorgi Nadiradze, Dan Alistarh · OpenReview

Abstract

Distributed optimization is a cornerstone of modern machine learning, typically relying on first-order (FO) gradient-based methods. However, many edge devices are computationally constrained and can only perform zeroth-order (ZO) function evaluations. We introduce Hybrid Decentralized Optimization (HDO), a framework where FO and ZO nodes collaborate. Our analysis demonstrates that integrating noisy, biased ZO agents into a decentralized system can actually accelerate convergence rather than hindering it. Experimental results on standard tasks, including ResNet-18 and Transformers, confirm that HDO is a practical and scalable approach for heterogeneous hardware environments.

Introduction: The Challenge of Heterogeneous Networks

In decentralized machine learning, it is often assumed that all participating nodes possess the computational capacity to perform backpropagation and compute gradients. In reality, networks like IoT ecosystems consist of diverse hardware. "Weak" nodes—sensors or older devices—may only be capable of zeroth-order optimization, where they evaluate loss but cannot compute gradients.

Historically, these ZO nodes were either ignored or treated as noise sources because their gradient estimators are inherently biased and noisy. The central question of this research is whether these biased estimators can be integrated into a gossip-based decentralized system to improve overall performance.

The HDO Framework

The proposed HDO algorithm utilizes a decentralized gossip-based approach to synchronize a heterogeneous population of $n_1$ FO nodes and $n_0$ ZO nodes.

  1. Local Updates: FO nodes compute standard stochastic gradients. ZO nodes employ a gradient-free estimator by evaluating the objective function at perturbed points.
  2. Parameter Averaging: Nodes are randomly paired to exchange and average their model parameters, a process that helps mitigate the individual biases of ZO agents.

A key theoretical contribution is a new potential argument that proves convergence despite the systematic bias introduced by ZO nodes. This analysis shows that with proper learning rate tuning, the collective averaging process allows the network to "withstand" and benefit from the additional information provided by ZO nodes.

Key Insights: Why "Weak" Nodes Help

The most significant finding is the "More is Better" principle. Even though ZO information is of lower quality than FO gradients, the increased volume of data and computation provided by these nodes outweighs their noise.

Accuracy over steps for various node populations. A hybrid configuration (1 FO + 5 ZO) outperforms a single first-order node, illustrating the additive benefit of zeroth-order information.

As shown in Figure 3, a hybrid setup (1 FO + 5 ZO) achieves higher accuracy faster than a single FO node alone. This suggests that ZO nodes contribute non-redundant information that aids the global optimization process. Furthermore, ZO nodes are highly memory-efficient as they do not store intermediate activations, making them ideal for "forward-only" training on tiny devices.

Experimental Results

The HDO algorithm was validated across several benchmarks, including MNIST, CIFAR-10 (fine-tuning ResNet-18), and synthetic language tasks (Transformers). The experiments consistently showed that hybrid populations outperform pure FO populations of the same size.

Training loss comparison across different node configurations. The hybrid setup (24 FO + 256 ZO) achieves the lowest loss, demonstrating that adding zeroth-order nodes significantly accelerates convergence.

In Figure 2, the configuration with 24 FO nodes and 256 ZO nodes reaches a significantly lower loss than the 24 FO nodes alone. This empirical evidence supports the theoretical claim of almost-linear speedup as more nodes—even weak ones—are added to the network.

Conclusion and Future Work

HDO proves that decentralized optimization can be inclusive of computationally limited hardware. By leveraging both first- and zeroth-order information, we can achieve faster convergence and better scalability. Future research will focus on extending this analysis to fixed network topologies and exploring advanced forward-mode differentiation to further refine the contributions of ZO agents.

Summary updated

BibTeX
@misc{talaei2022hybrid,
  author = {Shayan Talaei and Giorgi Nadiradze and Dan Alistarh},
  title = {{Hybrid Decentralized Optimization: First- and Zeroth-Order Optimizers Can Be Jointly Leveraged For Faster Convergence}},
  year = {2022},
  eprint = {2210.07703},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2210.07703},
}
Figure