Gaussian Elimination with Randomized Complete Pivoting

Christopher Melgaard, Ming Gu · DOI

Abstract

Gaussian elimination with partial pivoting (GEPP) has long been among the most widely used methods for computing the LU factorization of a given matrix. However, this method is also known to fail for matrices that induce large element growth during the factorization process. In this paper, we propose a new scheme, Gaussian elimination with randomized complete pivoting (GERCP) for the efficient and reliable LU factorization of a given matrix. GERCP satisfies GECP (Gaussian elimination with complete pivoting) style element growth bounds with high probability, yet costs only marginally higher than GEPP. Our numerical experimental results strongly suggest that GERCP is as reliable as GECP and as efficient as GEPP for computing the LU factorization.

Introduction

Gaussian Elimination (GE) is a fundamental algorithm in scientific computing for solving linear systems of the form $Ax=b$. To ensure numerical stability, pivoting strategies are employed to avoid division by small diagonal elements. The industry standard, Gaussian Elimination with Partial Pivoting (GEPP), performs row swaps to maintain stability. While computationally efficient, GEPP is susceptible to exponential "element growth" in specific adversarial matrices, such as Wilkinson matrices, leading to significant rounding errors.

Conversely, Gaussian Elimination with Complete Pivoting (GECP) swaps both rows and columns, providing exceptional stability. However, GECP is rarely used in practice due to its $O(n^3)$ comparison overhead, which significantly degrades performance on modern hardware. This paper introduces Gaussian Elimination with Randomized Complete Pivoting (GERCP), a method that achieves GECP-level stability with computational costs comparable to GEPP.

Methodology: Randomized Complete Pivoting

The core of GERCP is the replacement of exhaustive searches for pivots with a randomized approach. The algorithm follows the general structure of LU factorization with both row and column pivoting, as shown in the generic framework below:

Generic LU factorization algorithm with placeholders for pivoting rules.

GERCP innovates on steps 1 and 3 of this framework using Successive Schur Sketching (SSS). Instead of searching the entire remaining submatrix (the Schur complement) for the largest element, the algorithm utilizes random projections:

  1. Random Projection (Sketching): The matrix is multiplied by a small random Gaussian matrix $\Omega$, projecting high-dimensional columns into a lower-dimensional space (sampling dimension $r$).
  2. Johnson-Lindenstrauss (JL) Lemma: According to the JL Lemma, column lengths are approximately preserved in this lower-dimensional sketch. The algorithm identifies the largest column in the sketch to serve as the pivot.
  3. Efficient Updates: To avoid the $O(n^3)$ cost of re-sketching at every step, the authors developed an incremental update formula that maintains the sketch in $O(n^2)$ time.
  4. Hybrid Stability: After selecting a column via randomization, the algorithm performs deterministic partial pivoting on the rows. This ensures that even in the rare case of a poor random selection, the method remains at least as stable as GEPP.

Experimental Results

The authors evaluated GERCP against standard benchmarks, including Wilkinson matrices, Volterra integral equation matrices, and random Gaussian matrices.

  • Reliability: GERCP successfully factored matrices that cause GEPP to fail, maintaining backward errors near machine precision. It effectively "tames" the exponential element growth seen in adversarial cases.
  • Performance: Benchmarks show that the randomization overhead is minimal. For a matrix size of $N=3000$, GERCP was only 12% slower than GEPP. This overhead decreased to approximately 5% as the matrix size grew to $N=11,000$.
  • Accuracy: On average, GERCP produced relative residuals roughly twice as accurate as those from GEPP for random matrices, indicating superior solution quality even for standard problems.

Conclusion

GERCP bridges the gap between the efficiency of partial pivoting and the robustness of complete pivoting. By leveraging randomized dimensionality reduction, it provides a practical solution for high-stakes numerical simulations where GEPP might fail. Future work includes optimizing the implementation for high-performance libraries like Intel MKL and extending these techniques to rank-revealing LU factorizations.

Summary updated

Abstract

Gaussian elimination with partial pivoting (GEPP) has long been among the most widely used methods for computing the LU factorization of a given matrix. However, this method is also known to fail for matrices that induce large element growth during the factorization process. In this paper, we propose a new scheme, Gaussian elimination with randomized complete pivoting (GERCP) for the efficient and reliable LU factorization of a given matrix. GERCP satisfies GECP (Gaussian elimination with complete pivoting) style element growth bounds with high probability, yet costs only marginally higher than GEPP. Our numerical experimental results strongly suggest that GERCP is as reliable as GECP and as efficient as GEPP for computing the LU factorization.
BibTeX
@misc{melgaard2015gaussian,
  author = {Christopher Melgaard and Ming Gu},
  title = {{Gaussian Elimination with Randomized Complete Pivoting}},
  year = {2015},
  eprint = {1511.08528},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1511.08528},
}
Figure