Linearly Convergent Randomized Iterative Methods for Computing the Pseudoinverse

Robert M. Gower, Peter Richtárik

Abstract

We develop the first stochastic incremental method for calculating the Moore-Penrose pseudoinverse of a real matrix. By leveraging three alternative characterizations of pseudoinverse matrices, we design three methods for calculating the pseudoinverse: two general-purpose methods and one specialized to symmetric matrices. The two general-purpose methods are proven to converge linearly to the pseudoinverse of any given matrix. For calculating the pseudoinverse of full-rank matrices, we present two additional specialized methods which enjoy a faster convergence rate than the general-purpose methods. We also indicate how to develop randomized methods for calculating approximate range space projections, a much-needed tool in inexact Newton-type methods or quadratic solvers when linear constraints are present. Finally, we present numerical experiments of our general-purpose methods for calculating pseudoinverses and show that our methods greatly outperform the Newton-Schulz method on large-dimensional matrices.

Introduction

The Moore-Penrose pseudoinverse ($A^\dagger$) is a fundamental tool in linear algebra, essential for solving overdetermined systems in neural networks, signal processing, and image denoising. However, calculating it for "big data" applications presents a significant computational challenge. Standard approaches like Singular Value Decomposition (SVD) are computationally expensive, scaling at $O(m^2n)$, while classical iterative methods like Newton-Schulz can fail when matrices are so large they exceed cache memory.

There has been a glaring gap in the literature: the lack of a fast, stochastic method that can handle massive, rank-deficient matrices by processing them in small, random chunks rather than all at once. This paper addresses this gap by introducing the first stochastic incremental methods for calculating the pseudoinverse, moving beyond traditional, memory-heavy algorithms.

The Sketch-and-Project Framework

The authors leverage the "sketch-and-project" framework to design three primary iterative methods based on different variational characterizations of the pseudoinverse. By projecting the current estimate onto a "sketch" (a random subspace) of the problem, the methods avoid the need to process the full matrix at every step.

1. SATAX

A general-purpose method derived from the identity $A^\top = A^\top AX$. This method is designed to converge to the pseudoinverse of any given matrix, regardless of rank or dimensions.

2. SAXAS

A specialized method for symmetric matrices based on the condition $AXA = A$. This method is unique because it naturally preserves the symmetry of the iterates without requiring extra constraints, a common pitfall in previous quasi-Newton approaches.

3. Full-Rank Variants

For matrices known to have full row or column rank, the authors provide specialized versions of the above methods that offer even faster convergence rates.

In all methods, the authors explore different sketching strategies, including Uniform $\tau$-batch sampling (picking random rows/columns) and Adaptive sketching (using the current iterate to inform the next sketch).

Key Insights and Theoretical Contributions

Duality and Projections

The authors demonstrate that finding the pseudoinverse—essentially a least-norm problem—has a dual formulation. This allows them to iteratively project onto affine spaces without needing to know the pseudoinverse a priori. This dual perspective is the "secret sauce" that enables linear convergence.

The Advantage of Rough Approximations

In many real-world applications, such as preconditioning, a perfect pseudoinverse is not required; a "good enough" approximation suffices. These stochastic methods reach a reasonable residual ($10^{-1}$ to $10^{-3}$) much faster than classical methods, making them ideal for large-scale preconditioning tasks.

Hybridization (NS-SATAX)

A key observation in the research is that while stochastic methods are fast at the start, the Newton-Schulz (NS) method possesses quadratic convergence once it gets close to the solution. The authors propose a hybrid "NS-SATAX" method: use SATAX to get in the ballpark of the solution rapidly, then switch to Newton-Schulz to "polish" the result to high precision.

Experimental Results

The methods were evaluated using several well-known benchmarks for sparse and large-scale matrices, including the UF Sparse Matrix Collection (e.g., LPnetlib, NYPA/Maragal) and LIBSVM Datasets (e.g., a9a, mushrooms, gisette_scale).

Key findings from the numerical experiments include:

  • Significant Speedup: On highly rectangular matrices, the SATAX methods were considerably faster than Newton-Schulz in terms of both wall-clock time and floating-point operations (FLOPs).
  • High Efficiency: For the lp_fit2d matrix, SATAX reached a residual of $10^{-14}$ while Newton-Schulz was still struggling at $10^{-1}$.
  • Robustness: The randomized methods proved less sensitive to the "ill-conditioning" (mathematical brittleness) of the input matrices compared to standard iterative techniques.
  • Symmetric Performance: On LIBSVM datasets, the SAXAS variants were orders of magnitude more efficient than Newton-Schulz, often reaching high precision in a fraction of the time.

Limitations and Future Work

While the stochastic methods are faster initially, the Newton-Schulz method eventually overtakes them if extreme precision (e.g., $10^{-16}$) is required, due to its quadratic local convergence. Additionally, the hybrid NS-SATAX method currently relies on a heuristic to ensure the starting condition for Newton-Schulz is met, which is not yet mathematically guaranteed.

Future research directions include the development of new "stochastic quasi-Newton" algorithms for optimization, where the pseudoinverse of a Hessian is updated incrementally as new data arrives, potentially revolutionizing how we train large-scale machine learning models.

Summary updated

Abstract

We develop the first stochastic incremental method for calculating the Moore-Penrose pseudoinverse of a real matrix. By leveraging three alternative characterizations of pseudoinverse matrices, we design three methods for calculating the pseudoinverse: two general purpose methods and one specialized to symmetric matrices. The two general purpose methods are proven to converge linearly to the pseudoinverse of any given matrix. For calculating the pseudoinverse of full rank matrices we present two additional specialized methods which enjoy a faster convergence rate than the general purpose methods. We also indicate how to develop randomized methods for calculating approximate range space projections, a much needed tool in inexact Newton type methods or quadratic solvers when linear constraints are present. Finally, we present numerical experiments of our general purpose methods for calculating pseudoinverses and show that our methods greatly outperform the Newton-Schulz method on large dimensional matrices.
BibTeX
@misc{gower2016linearly,
  author = {Robert M. Gower and Peter Richtárik},
  title = {{Linearly Convergent Randomized Iterative Methods for Computing the Pseudoinverse}},
  year = {2016},
  eprint = {1612.06255},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1612.06255},
}
Figure