An Asynchronous Parallel Randomized Kaczmarz Algorithm

Ji Liu, Stephen J. Wright, Srikrishna Sridhar · DOI

Abstract

We describe an asynchronous parallel variant of the randomized Kaczmarz (RK) algorithm for solving the linear system $Ax=b$. The analysis shows linear convergence and indicates that nearly linear speedup can be expected if the number of processors is bounded by a multiple of the number of rows in $A$.

Introduction

Solving the linear system $Ax = b$ is a fundamental task in science and engineering, appearing in applications such as medical imaging (CT scans) and signal processing. When the matrix $A$ is extremely large and sparse, traditional direct solvers often fail due to memory constraints. The Randomized Kaczmarz (RK) algorithm is a popular iterative choice because it processes only one row of the matrix at a time, making it highly memory-efficient.

However, standard RK is inherently sequential, creating a bottleneck in many-core computing environments. Previous parallelization attempts often relied on memory locking to prevent race conditions, which introduces significant overhead. This paper introduces AsyRK, an asynchronous parallel version of RK that allows multiple processors to update a shared solution vector without coordination, maintaining fast linear convergence and achieving near-linear speedup.

The AsyRK Algorithm

AsyRK stores the solution vector $x$ in a shared memory location accessible to all processor cores. Each core independently performs updates without expensive synchronization locks.

Algorithm 1: The Asynchronous Randomized Kaczmarz Algorithm (AsyRK) for solving linear systems.

The algorithm operates through three key mechanisms:

  1. Lock-Free Updates: Each core independently selects a random row, reads the current $x$ from shared memory, calculates a correction, and writes it back.
  2. Atomic Components: To handle "inconsistent reads," the analysis assumes each processor updates a single component of $x$ at a time.
  3. Handling Staleness: The mathematical proof accounts for delays ($\tau$) where a processor calculates an update based on an older version of $x$.

Theoretical Insights and Performance

A major contribution of this work is the proof that AsyRK preserves linear convergence, meaning the error decreases geometrically. This is a significant improvement over the sublinear rates typically found in other asynchronous stochastic methods.

The effectiveness of AsyRK is closely tied to matrix sparsity. In sparse matrices, the probability of two processors updating the same component of $x$ simultaneously is low, which naturally mitigates the negative effects of asynchrony. The theory also provides a bound on the number of processors that can be used effectively, which depends on the number of rows $m$ and the spectral properties of $A$.

Theoretical comparison of RK, AsySCD, and AsyRK algorithms across various performance metrics.

As shown in the table above, AsyRK maintains a computational cost per iteration of $O(\delta n)$, identical to the sequential RK. When compared to AsySCD (Asynchronous Stochastic Coordinate Descent), AsyRK demonstrates a significantly lower per-iteration cost, leading to wall-clock times that are an order of magnitude faster in practice.

Conclusion and Future Work

Experimental results confirm that AsyRK achieves nearly perfect linear speedup on multicore hardware, particularly for sparse systems. However, as matrix density increases, the "collision" rate between processors rises, leading to a slight degradation in speedup. Future research will focus on bridging the gap between the theoretical single-component update model and the high-performance multi-component implementation, as well as testing the algorithm on real-world datasets in fields like seismic imaging.

Summary updated

BibTeX
@misc{liu2014asynchronous,
  author = {Ji Liu and Stephen J. Wright and Srikrishna Sridhar},
  title = {{An Asynchronous Parallel Randomized Kaczmarz Algorithm}},
  year = {2014},
  eprint = {1401.4780},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1401.4780},
}
Figure