Abstract
The conjugate gradient method (CG) is a cornerstone of numerical linear algebra, typically paired with a preconditioner to enhance efficiency and robustness. Selecting optimal parameters for these preconditioners is traditionally done by minimizing the spectral condition number—a "worst-case" metric. However, this often fails to capture the actual performance of CG, which frequently exhibits superlinear convergence due to eigenvalue clustering. This paper proposes a stochastic approach that optimizes for the mean convergence rate using short trial runs with random initial guesses. Numerical experiments demonstrate that this method identifies superior parameter values compared to classical spectral optimization, particularly in scenarios where the same system must be solved repeatedly.
Introduction
The Conjugate Gradient (CG) method is widely used for solving large, sparse linear systems of the form $Ax = b$. To accelerate convergence, a preconditioner $M$ is applied, transforming the system into $M^{-1}Ax = M^{-1}b$. Many effective preconditioners, such as Relaxed Incomplete Cholesky (RIC) or Successive Over-Relaxation (SSOR), include tunable parameters that significantly impact the iteration count.
The standard theoretical approach to parameter tuning is to minimize the spectral condition number $\kappa(M^{-1}A)$. While mathematically sound for worst-case analysis, this metric ignores the distribution of eigenvalues. In practice, CG often converges much faster than the condition-number-based bounds predict, a phenomenon driven by eigenvalue clustering. By focusing solely on the extreme eigenvalues, practitioners often miss the opportunity to optimize for the more common "average" convergence behavior.
The Stochastic Convergence Functional
To bridge the gap between theory and practice, we introduce a stochastic convergence functional ($F_s$). Instead of performing expensive eigenvalue computations, the method relies on empirical data from trial runs:
- Random Initialization: Generate $n$ random initial guess vectors.
- Short Bursts: Execute the CG algorithm for a fixed, small number of iterations ($k$).
- Average Error: Calculate the average norm of the residual (or error) across these runs.
This functional $F_s$ acts as a proxy for the mean convergence behavior. We then utilize Brent’s method—a robust, derivative-free optimization algorithm—to minimize $F_s$ with respect to the preconditioner parameters. Theoretically, we prove that for CG, there exists a nonempty open set of initial guesses where convergence is strictly faster than the classical worst-case bound, justifying the shift toward an "average-case" optimization strategy.
Key Insights and Numerical Results
Our evaluation across diffusion problems and structural mechanics matrices (e.g., the bcsstk16 matrix) yielded several critical insights:
- Eigenvalue Clustering: The stochastic approach prioritizes eigenvalue clustering in the lower spectrum. While classical methods might achieve a smaller overall range of eigenvalues (lower $\kappa$), the stochastic method creates a distribution that the CG algorithm can "deflate" more easily, leading to faster convergence in later iterations.
- Efficiency: For the SSOR preconditioner, the stochastic approach identified optimal relaxation factors ($\omega$) nearly identical to those found by spectral methods but at a significantly lower computational cost, as it avoids the need for complex eigenvalue solvers.
- Robustness: The choice of random distribution for the initial guess (e.g., standard normal vs. Gaussian random field) had negligible impact on the resulting optimal parameters, suggesting the method is highly robust for general applications.
Conclusion
The stochastic approach offers a practical and efficient alternative to traditional preconditioner optimization. By focusing on the mean convergence rate rather than the worst-case scenario, it captures the benefits of superlinear convergence that spectral metrics ignore. While the method incurs an upfront cost due to trial runs, it is exceptionally well-suited for applications requiring the solution of multiple linear systems with the same matrix, such as time-stepping in physical simulations. Future work will explore extending this framework to multi-parameter optimization and integrating it with Krylov subspace recycling techniques.
Summary updated