Optimal Diagonal Preconditioning: Theory and Practice

Zhaonan Qu, Wenzhi Gao, Oliver Hinder, Yinyu Ye, Zhengyuan ZhouarXiv 2022 · OpenReview

Abstract

Preconditioning has long been a staple technique in optimization, often applied to reduce the condition number of a matrix and speed up the convergence of algorithms. Although there are many popular preconditioning techniques in practice, most lack guarantees on reductions in condition number. Moreover, the degree to which we can improve over existing heuristic preconditioners remains an important practical question. In this paper, we study the problem of optimal diagonal preconditioning that achieves maximal reduction in the condition number of any full-rank matrix by scaling its rows and/or columns. We first reformulate the problem as a quasi-convex problem and provide a simple algorithm based on bisection. Then we develop an interior point algorithm with $O(\log(1/\epsilon))$ iteration complexity, where each iteration consists of a Newton update based on the Nesterov-Todd direction. Next, we specialize to one-sided optimal diagonal preconditioning problems, and demonstrate that they can be formulated as standard dual SDP problems. We then develop efficient customized solvers and study the empirical performance of our optimal diagonal preconditioning procedures through extensive experiments on large matrices. Our findings suggest that optimal diagonal preconditioners can significantly improve upon existing heuristics-based diagonal preconditioners at reducing condition numbers and speeding up iterative methods. Moreover, our implementation of customized solvers, combined with a random row/column sampling step, can find near-optimal diagonal preconditioners for matrices up to size 200,000 in reasonable time, demonstrating their practical appeal.

Introduction: The Condition Number Bottleneck

In numerical linear algebra and optimization, the condition number ($\kappa$) of a matrix serves as the fundamental "speed limit" for iterative solvers. When solving linear systems of the form $Ax = b$ using methods such as Conjugate Gradient (CG) or Steepest Descent, a high condition number leads to slow convergence, requiring a prohibitive number of iterations to reach a desired tolerance.

Convergence rates of iterative methods as a function of the condition number $\kappa(A)$.

To mitigate this, preconditioning is employed to transform the system into a more "well-behaved" one, typically by scaling the matrix with diagonal matrices $D_1$ and $D_2$. While heuristics like Jacobi preconditioning (scaling by the diagonal) or Sinkhorn equilibration are widely used, they offer no guarantees of optimality. This research moves beyond these "rules of thumb" to establish a rigorous framework for finding the mathematically optimal diagonal preconditioner for any full-rank matrix.

Methodology

The core of the approach involves reformulating the search for optimal diagonal scaling as a quasi-convex optimization problem. The authors propose several algorithmic strategies:

  1. Bisection Algorithm: A baseline method that solves a sequence of feasibility problems to converge on the optimal condition number.
  2. Interior Point Method (IPM): A polynomial-time algorithm utilizing Nesterov-Todd directions, providing a theoretical guarantee of $O(\log(1/\epsilon))$ iteration complexity.
  3. Dual SDP Formulation: For one-sided preconditioning (scaling only rows or columns), the problem is shown to be equivalent to a standard dual Semi-Definite Program (SDP).
  4. Randomized Scaling for Large Systems: To address massive datasets, the authors developed a customized solver (HDSDP) integrated with a random row/column sampling scheme. This allows for the identification of near-optimal preconditioners by examining as little as 1% to 10% of the matrix data.

Experimental Evaluation

The methods were evaluated across a diverse set of real-world and synthetic benchmarks:

  • SuiteSparse Matrix Collection: 391 matrices representing various scientific domains.
  • Large-Scale Machine Learning: Datasets from LIBSVM (e.g., YearPredictionMSD) and OpenML (e.g., MNIST, credit, IMDB).
  • Scalability Tests: Randomly generated matrices designed to push the limits of the solvers.

Key Insights and Results

The empirical results highlight a significant "optimality gap" in existing practices. The authors found that optimal scaling can reduce condition numbers by orders of magnitude more than standard heuristics like Jacobi preconditioning.

Performance Highlights: * Condition Reduction: On the SuiteSparse dataset, the optimal approach improved the condition number of 50% of the matrices by at least a factor of 2.0x. In extreme cases, such as the m3plates matrix, the improvement exceeded $10^4$. * Outperforming Direct Solvers: In approximately 24% of tested cases, an iterative solver (CG) paired with the optimal preconditioner outperformed highly optimized direct solvers like Cholesky factorization. * Efficiency and Scalability: The customized solver successfully processed matrices with up to 200,000 rows. A key finding was that sampling a small fraction of rows often yields a preconditioner nearly as effective as one calculated from the full matrix. * Comparison to Ruiz Scaling: For two-sided preconditioning, the proposed method achieved a median improvement of 2.10x over the popular Ruiz scaling heuristic.

Conclusion and Future Directions

This work demonstrates that optimal diagonal preconditioning is not only theoretically sound but also practically viable for large-scale systems. The cost of finding the optimal preconditioner is often amortized in scenarios where the same system must be solved with multiple right-hand sides, such as in PDE solvers or Newton-type optimization.

Future research directions include extending these optimality guarantees to non-diagonal structures, such as sparse or block-diagonal preconditioners. Additionally, while one-sided preconditioning scales well, further optimization of first-order methods (e.g., projected subgradient descent) may be necessary to bring the same level of scalability to the two-sided preconditioning problem.

Summary updated

Abstract

Preconditioning has long been a staple technique in optimization, often applied to reduce the condition number of a matrix and speed up the convergence of algorithms. Although there are many popular preconditioning techniques in practice, most lack guarantees on reductions in condition number. Moreover, the degree to which we can improve over existing heuristic preconditioners remains an important practical question. In this paper, we study the problem of optimal diagonal preconditioning that achieves maximal reduction in the condition number of any full-rank matrix by scaling its rows and/or columns. We first reformulate the problem as a quasi-convex problem and provide a simple algorithm based on bisection. Then we develop an interior point algorithm with $O(\log(1/\epsilon))$ iteration complexity, where each iteration consists of a Newton update based on the Nesterov-Todd direction. Next, we specialize to one-sided optimal diagonal preconditioning problems, and demonstrate that they can be formulated as standard dual SDP problems. We then develop efficient customized solvers and study the empirical performance of our optimal diagonal preconditioning procedures through extensive experiments on large matrices. Our findings suggest that optimal diagonal preconditioners can significantly improve upon existing heuristics-based diagonal preconditioners at reducing condition numbers and speeding up iterative methods. Moreover, our implementation of customized solvers, combined with a random row/column sampling step, can find near-optimal diagonal preconditioners for matrices up to size 200,000 in reasonable time, demonstrating their practical appeal.
BibTeX
@misc{qu2022optimal,
  author = {Zhaonan Qu and Wenzhi Gao and Oliver Hinder and Yinyu Ye and Zhengyuan Zhou},
  title = {{Optimal Diagonal Preconditioning: Theory and Practice}},
  year = {2022},
  eprint = {2209.00809},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2209.00809},
}
Figure