How to optimize preconditioners for the conjugate gradient method: a stochastic approach

Ivan Oseledets, M.a. Botchev, Alexandr Katrutsa, Georgiy Ovchinnikov

TL;DR

This paper introduces a novel stochastic approach to optimize preconditioner parameters for the Conjugate Gradient (CG) method. By analyzing the mean convergence rate instead of the traditional worst-case rate, they propose a new functional that leads to better parameter choices, especially for complex problems where analytical solutions are unavailable.

What Problem Does This Paper Address?

The Conjugate Gradient (CG) method is a powerful iterative solver for linear systems, but its efficiency heavily relies on a good preconditioner. Preconditioners often have parameters that significantly impact convergence speed and robustness. While many methods exist to optimize these parameters, they typically rely on worst-case convergence estimates (e.g., based on the condition number of the preconditioned matrix). These estimates can be overly pessimistic, as they assume the "worst possible" initial guess. The authors question whether optimizing for the average or mean convergence rate, across a distribution of initial guesses, might yield better practical results. This is particularly relevant when analytical formulas for optimal parameters are either unavailable or computationally expensive to derive.

Methods

The core of this paper is the introduction of a stochastic convergence functional, denoted as $F_s$. This functional is computed by running the preconditioned CG method for a fixed number of iterations ($K$) using multiple random initial guess vectors. The average error norm across these runs serves as the functional's value.

The authors propose using this $F_s$ to optimize preconditioner parameters (e.g., $\alpha$ for RIC(0) or $\omega$ for SSOR) via a numerical optimization procedure, specifically Brent's method. This contrasts with traditional methods that might minimize the spectral condition number ($F_c$).

For stationary iterative methods, they show that the stochastic functional $F_s$ theoretically coincides with the spectral radius of the iteration matrix. However, for the non-stationary CG method, $F_s$ is shown to be a distinct and potentially more informative measure.

Datasets

The paper uses several test problems derived from:

  • Finite-difference approximations of diffusion problems: These are used to test the RIC(0) preconditioner. The problems vary in mesh size (52x52 and 102x102) and whether the diffusion coefficients are constant or discontinuous.
  • A structural mechanics problem (bcsstk16 from The SuiteSparse Matrix Collection): This problem is used to test the SSOR($\omega$) preconditioner.

The initial guess vectors are generated from:

  • Standard normal distribution: Entries are independent and identically distributed (i.i.d.) with mean 0 and standard deviation 1.
  • Stationary Gaussian random field: This is explored to assess the sensitivity of the approach to different initial guess distributions.

Key Insights and Ideas

  • Mean vs. Worst-Case Convergence: The paper argues that optimizing for the mean convergence rate, rather than the worst-case, can lead to better preconditioner parameters. This is because the worst-case scenario is often rare in practice.
  • Stochastic Functional ($F_s$) as a Practical Tool: The proposed $F_s$ provides a computable and effective way to estimate the mean convergence rate, even when analytical expressions are not available.
  • $F_s$ Outperforms $F_c$ in Practice: Numerical experiments consistently show that optimizing with $F_s$ yields better preconditioner parameters, leading to faster CG convergence compared to optimizing with the classical condition number functional ($F_c$).
  • Robustness to Initial Guess Distribution: The stochastic approach appears to be robust, performing well with both standard normal distributions and stationary Gaussian random fields for initial guess vectors.
  • Addressing the "Unavailability" of Analytical Solutions: The method is particularly valuable for preconditioners like SSOR($\omega$) where analytical formulas for optimal parameters are either complex or, as in one test case, the Jacobi iteration (needed for the formula) diverges.

Key Results

  • Improved Parameter Choices: In all tested scenarios, optimizing with the stochastic functional $F_s$ resulted in optimal or near-optimal preconditioner parameters that led to better CG convergence than parameters found by minimizing the spectral condition number ($F_c$).
  • Faster Convergence: Figures and tables demonstrate that CG preconditioned with parameters optimized by $F_s$ consistently achieved faster residual norm reduction compared to those optimized by $F_c$. For example, in Figure 4(d), the residual norm for $F_s$-optimized parameters drops significantly faster.
  • Eigenvalue Clustering: Analysis of eigenvalue distributions of preconditioned matrices showed that parameters optimized by $F_s$ often lead to better eigenvalue clustering, particularly in the lower part of the spectrum, which is beneficial for CG convergence.
  • Efficiency: While the stochastic optimization requires multiple runs, it is presented as more efficient than brute-force trial-and-error for finding optimal parameters. The authors found that around 25 optimization steps (using Brent's method) were sufficient for high accuracy, compared to potentially hundreds of trial runs.

Limitations and Future Work

  • Computational Cost: The stochastic optimization procedure is computationally expensive, requiring multiple CG runs for each evaluation of $F_s$. This cost is justified when solving many linear systems with the same matrix or when the optimization is performed offline.
  • Unknown $x^*$: For practical evaluation of $F_s$, the authors set the exact solution $x^*$ to zero. While this provides a tractable approach, it's an approximation.
  • Future Work:
    • Investigating other convergence estimates, particularly those demonstrating superlinear convergence.
  • Extending the approach to optimize preconditioners with multiple parameters (e.g., circulant preconditioners) using gradient-based methods and automatic differentiation.
  • Combining the stochastic optimization with Krylov subspace recycling techniques for solving multiple linear systems more efficiently.
  • Exploring "on-the-fly" optimization during the solution process.

Summary updated

Abstract

.. .., .., .., .. : -2018 .., .., .., ..
BibTeX
@inproceedings{oseledets2018how,
  author = {Ivan Oseledets and M.A. Botchev and Alexandr Katrutsa and Georgiy Ovchinnikov},
  title = {{How to optimize preconditioners for the conjugate gradient method: a stochastic approach}},
  booktitle = {Keldysh},
  year = {2018},
  doi = {10.20948/prepr-2018-164},
}
Figure