Avoiding Synchronization in First-Order Methods for Sparse Convex Optimization

Aditya Devarakonda, Kimon Fountoulakis, James Demmel, Michael W. Mahoney · DOI

Abstract

Large-scale machine learning often relies on first-order optimization methods like Block Coordinate Descent (BCD). However, on modern parallel architectures, the frequent synchronization required by these algorithms becomes a significant bottleneck due to network latency. This paper introduces "Synchronization-Avoiding" (SA) variants of popular optimization algorithms. By algebraically rearranging computations to "unroll" iterations, the frequency of inter-processor communication is reduced by a factor of $s$. Experimental results on a supercomputer demonstrate up to 5.1x speedups for Lasso and SVM tasks while maintaining numerical stability.

Introduction

In the era of big data, training models across hundreds or thousands of processors is standard practice. While computational power (FLOPs) has scaled rapidly, communication latency between processors has lagged. Standard iterative methods, such as BCD, are "communication-intensive," requiring global synchronization at every iteration. As the number of processors increases, systems eventually spend more time waiting for messages than performing computations, limiting scalability.

Methodology: Communication-Avoiding Optimization

The authors bridge the gap between Communication-Avoiding Numerical Linear Algebra (CA-NLA) and Convex Optimization. The core strategy involves "unrolling" the algorithm's update rules to perform multiple steps of local work between synchronizations.

Parallel workflow of the synchronization-avoiding algorithm, illustrating the partitioning of matrix A and the use of MPI_Allreduce for global synchronization.

The approach follows these key steps:

  1. Recurrence Unrolling: Update equations are algebraically manipulated to look $s$ steps ahead.
  2. Gram Matrix Computation: Processors compute a larger $s\mu \times s\mu$ Gram-like matrix upfront to enable these $s$ steps of local work.
  3. Communication-Computation Trade-off: The method intentionally increases local arithmetic operations and message size (bandwidth) to drastically reduce the total number of messages (latency).

These SA variants are mathematically equivalent to the original algorithms in exact arithmetic, ensuring that the same sequence of solutions is produced.

Experimental Setup and Datasets

The methods were evaluated using benchmark datasets from the LIBSVM repository, including news20, covtype, url, and epsilon for Lasso, and w1a, rcv1.binary, and gisette for SVM tasks. These datasets cover a wide range of sparsity and dimensionality. Experiments were conducted on a Cray XC30 supercomputer using up to 12,288 cores.

Key Results and Performance

The SA variants achieved significant performance gains by reducing the synchronization bottleneck.

Comparison of objective function value versus running time for the url dataset, showing that CA-accBCD variants achieve lower objectives significantly faster than standard methods.
  • Speedups: A maximum speedup of 5.1x was observed for Lasso on the covtype dataset.
  • Communication Efficiency: Total communication costs were reduced by factors between 4.2x and 10.9x.
  • Numerical Stability: Despite unrolling recurrences, the SA variants remained stable for values of $s$ up to 1000, with final relative objective errors near machine precision ($\approx 10^{-16}$).
  • Scalability: Unlike standard methods that hit a performance wall, SA methods continued to scale efficiently as more cores were added.

Discussion and Future Work

The parameter $s$ serves as a tunable "knob" to balance latency savings against increased local computation. While highly effective, finding the optimal $s$ currently requires manual tuning. Future work includes developing automated tuning mechanisms and improving load-balancing for extremely sparse datasets where data partitioning can lead to "stragglers." Additionally, the authors anticipate even greater benefits in cloud environments like Apache Spark, where communication latency is typically higher than on dedicated supercomputers.

Summary updated

BibTeX
@inproceedings{devarakonda2017avoiding,
  author = {Aditya Devarakonda and Kimon Fountoulakis and James Demmel and Michael W. Mahoney},
  title = {{Avoiding Synchronization in First-Order Methods for Sparse Convex Optimization}},
  booktitle = {IPDPS},
  year = {2017},
  doi = {10.1109/ipdps.2018.00051},
}
Figure