Hogwild! over Distributed Local Data Sets with Linearly Increasing Mini-Batch Sizes

Nhuong V. Nguyen, Toan N. Nguyen, Phuong Ha Nguyen, Quoc Tran-Dinh, Lam M. Nguyen, Marten van Dijk

Introduction

In the era of large-scale machine learning, training data is frequently distributed across diverse local nodes, such as mobile devices or edge servers. This decentralized nature necessitates efficient communication between nodes and a central aggregator. Traditional Stochastic Gradient Descent (SGD) methods often struggle with communication bottlenecks and data heterogeneity. This paper introduces a communication-efficient variant of the "Hogwild!" asynchronous SGD algorithm, specifically designed for distributed environments with biased data.

The Challenge of Distributed SGD

Standard distributed SGD faces three primary obstacles:

  1. Communication Overhead: Frequent synchronization between local nodes and the central server creates significant latency.
  2. Data Heterogeneity: Real-world data is rarely independent and identically distributed (i.i.d.). Non-i.i.d. (biased) data distributions across nodes often degrade the convergence of standard algorithms.
  3. Theoretical Inconsistencies: Many existing convergence proofs rely on the "bounded gradient" assumption, which posits that gradients never exceed a certain magnitude. However, this assumption is mathematically inconsistent with the property of strong convexity, a common setting for optimization analysis.

Methodology: Linearly Increasing Mini-Batches

The authors propose an asynchronous framework based on Hogwild!, where threads update a shared model without the need for locking mechanisms. The core innovation is the implementation of a linearly increasing mini-batch strategy.

Instead of employing a fixed mini-batch size throughout training, local nodes begin with small batches and gradually increase their size over time. This approach balances the need for frequent updates in the early stages of training (to establish the general direction of the minimum) with the need for high-precision updates in the later stages (to ensure convergence without excessive communication).

Furthermore, the paper introduces a "delay function" $\tau(t)$ to quantify the algorithm's tolerance for asynchrony. The analysis demonstrates that the system can remain stable under significantly larger delays than previously theorized—specifically, delays that scale with $\sqrt{t}$.

Theoretical Advancements

A major contribution of this work is a novel convergence analysis for strongly convex problems that avoids the restrictive bounded gradient assumption. The authors prove that their algorithm achieves an optimal convergence rate of $O(1/K)$, matching the theoretical lower bound for first-order stochastic algorithms.

Crucially, by utilizing increasing mini-batch sizes, the number of communication rounds is reduced to $O(\sqrt{K})$. This represents a substantial improvement over constant-batch methods, where communication rounds typically scale linearly with the total number of computations.

Empirical Results

The proposed algorithm was evaluated using several benchmarks:

  • Phishing Dataset: Applied to logistic regression (convex) and regularized logistic regression (strongly convex).
  • MNIST Dataset: Used to train a LeNet neural network, testing the algorithm's performance in non-convex settings.
  • Data Bias Simulation: The researchers tested both biased and unbiased data splits to simulate heterogeneous federated learning environments.

The experiments confirmed that the increasing mini-batch approach reaches high accuracy significantly faster than fixed-batch methods in terms of communication rounds. Notably, the algorithm demonstrated high robustness to data bias, performing nearly as well on non-i.i.d. data as on i.i.d. data.

Conclusion

This paper provides a robust and communication-efficient framework for distributed asynchronous SGD. By integrating linearly increasing mini-batch sizes and providing a more consistent theoretical analysis, the authors bridge the gap between optimization theory and the practical realities of large-scale, heterogeneous machine learning. Future work may extend these "tight" theoretical guarantees to non-convex landscapes and explore the integration of second-order stochastic methods.

Summary updated

BibTeX
@inproceedings{nguyen2021hogwild,
  author = {Nhuong V. Nguyen and Toan N. Nguyen and Phuong Ha Nguyen and Quoc Tran-Dinh and Lam M. Nguyen and Marten van Dijk},
  title = {{Hogwild! over Distributed Local Data Sets with Linearly Increasing Mini-Batch Sizes}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2021},
}
Figure