Near-Linear Runtime for a Classical Matrix Preconditioning Algorithm

Xufeng Cai, Jason M. Altschuler, Jelena Diakonikolas · DOI

Introduction

For over six decades, Osborne’s algorithm has served as the industry standard for matrix balancing—a critical preconditioning step used to improve the numerical stability of eigenvalue computations. Despite its ubiquity in major linear algebra libraries such as LAPACK, MATLAB, and Julia, a rigorous theoretical understanding of its efficiency remained elusive. While recent breakthroughs provided runtime guarantees for randomized or greedy variants of the algorithm, the original deterministic "cyclic" version—the one actually used in practice—lacked a near-linear time proof. This paper bridges that 60-year gap, proving that the classical cyclic Osborne algorithm is theoretically optimal and matches the performance of its modern variants.

The Matrix Balancing Problem

Matrix balancing is a preconditioning technique that seeks a diagonal scaling matrix $D$ such that, for a given matrix $A$, the matrix $B = DAD^{-1}$ has row and column norms that are approximately equal. This transformation preserves the eigenvalues of the original matrix but significantly reduces the sensitivity of those eigenvalues to numerical errors during computation.

In 1960, E.E. Osborne proposed a simple iterative scheme: cycle through the rows and columns of the matrix, balancing each one individually. This approach is highly favored in practice because it is cache-friendly and involves minimal computational overhead. However, analyzing its convergence is difficult because balancing one row can "unbalance" others, potentially leading to a long sequence of dependencies.

Methods: Reframing as Convex Optimization

The authors analyze Osborne’s algorithm by interpreting it as a form of cyclic exact coordinate descent applied to a specific convex objective function. To overcome the challenges of tracking progress in a cyclic update schedule, the research introduces several key innovations:

  1. Aggregate Progress Analysis: Rather than attempting to measure the improvement of a single row update, the authors analyze the cumulative progress made over a full "cycle" (one complete pass through all $n$ rows).
  2. The Imbalance Lemma: A central contribution of the paper is a new lemma proving that the total imbalance remaining at the end of a cycle is bounded by the sum of the imbalances corrected during that cycle. This provides a mechanism to bound the total number of iterations required.
  3. Two-Phase Convergence: The analysis demonstrates that in any given cycle, the algorithm either makes a massive leap toward the optimal solution or is already within a negligible distance of the target tolerance $\epsilon$.

Key Insights and Theoretical Results

The paper establishes that the cyclic Osborne algorithm achieves a near-linear runtime of $\tilde{O}(m)$, where $m$ is the number of non-zero entries in the matrix. This result is significant for several reasons:

  • Theoretical Parity: It proves that the deterministic algorithm is just as efficient as randomized versions, which often require more complex memory access patterns.
  • Computational Efficiency: The runtime is fast enough to ensure that preconditioning never dominates the $O(n^3)$ cost of the subsequent eigenvalue decomposition.
  • Bit Complexity and Precision: The authors show the algorithm remains robust even with low-precision arithmetic. This explains why the common practice of rounding scaling factors to the nearest power of two—done to avoid rounding errors in floating-point arithmetic—does not hinder convergence.
  • Hardware Alignment: By confirming the efficiency of the cyclic order, the paper validates the use of sequential memory access, which is significantly faster on modern CPU architectures than the random or greedy selection methods proposed in previous theoretical works.

Empirical Performance

While primarily a theoretical work, the paper includes numerical simulations on random matrices and known "hard" instances (e.g., matrices designed by Kalantari et al. to force extreme scaling). The results consistently show that the original cyclic Osborne algorithm outperforms greedy and randomized variants in wall-clock time. Furthermore, the analysis extends to parallel environments; by using graph coloring to identify independent sets of rows, multiple rows can be balanced simultaneously without sacrificing the near-linear convergence guarantee.

Limitations and Future Directions

While the paper provides a definitive answer for $\ell_1$ and $\ell_2$ balancing, some areas remain open for exploration:

  • $\ell_\infty$ Balancing: Max-balancing (the $\ell_\infty$ norm) involves non-smooth properties that this specific coordinate descent analysis does not fully cover.
  • Graph Diameter: The runtime bound includes a dependency on the diameter $d$ of the matrix's sparsity graph. While $d$ is typically small for real-world data, the bound could theoretically increase for highly elongated graph structures.
  • Connectivity: The current proof assumes the matrix is balanceable (i.e., its underlying graph is strongly connected). Although non-balanceable matrices can be pre-processed into balanceable components in linear time, a single unified analysis for the general case is a potential area for future refinement.

By providing the first near-linear runtime guarantee for this 60-year-old algorithm, the authors have finally aligned the theoretical understanding of matrix balancing with the practical reality of high-performance linear algebra.

Summary updated

BibTeX
@article{cai2026near,
  author = {Xufeng Cai and Jason M. Altschuler and Jelena Diakonikolas},
  title = {{Near-Linear Runtime for a Classical Matrix Preconditioning Algorithm}},
  journal = {J. ACM},
  year = {2026},
  doi = {10.1145/3779224},
}
Figure