Faster proximal algorithms for matrix optimization using Jacobi-based eigenvalue methods

Hamza Fawzi, Harry GoulbourneNeurIPS 2021

Matrix optimization algorithms are frequently bottlenecked by the need to compute expensive eigenvalue decompositions at every iteration. In this NeurIPS 2021 paper, Hamza Fawzi and Harry Goulbourne explore a clever way to accelerate these algorithms by reviving a classical numerical linear algebra technique: the Jacobi method. By leveraging "warm starts" and high parallelization on GPUs, the authors achieve 5-10x speedups while providing new theoretical guarantees for convergence with approximate decompositions.

The Bottleneck in Matrix Optimization

Many machine learning and statistics problems—such as low-rank matrix recovery, kernel learning, and sparse covariance estimation—are formulated as convex optimization over matrices. To solve these, researchers typically use "proximal splitting" algorithms like Alternating Direction Method of Multipliers (ADMM) or Proximal Gradient Descent.

The major computational hurdle in these algorithms is the proximal operator. When dealing with "spectral functions" (functions that depend on the eigenvalues or singular values of a matrix, such as the nuclear norm or the indicator function for positive semidefiniteness), evaluating this operator requires a full Eigenvalue Decomposition (EVD) or Singular Value Decomposition (SVD). Standard libraries (like LAPACK) use methods that cost $O(n^3)$ and must start from scratch at every iteration. This "memoryless" approach makes scaling to large matrices incredibly slow.

The Jacobi Method: A Classical Solution

To overcome this, the authors propose replacing standard EVD/SVD routines with the Jacobi method, a technique dating back to 1846. While often considered slower than modern QR-based methods for a single "cold" computation, its structure is perfectly suited for iterative optimization.

Algorithm 1: The Jacobi method for diagonalizing a symmetric matrix

The Jacobi method offers three distinct advantages in this context:

  1. Warm-starting: In an optimization loop, the matrix at iteration $k$ is usually very similar to the matrix at iteration $k-1$. The Jacobi method can use the eigenvectors from the previous step as a starting point. In practice, the algorithm often needs only a single "sweep" to reach sufficient accuracy.
  2. Parallelism: The "cyclic" Jacobi method can be easily parallelized. Many independent rotations can be performed simultaneously, making it a natural fit for modern GPU hardware.
  3. Accuracy Trade-off: The method has a simple termination criterion based on the "off-diagonalness" of the matrix. You can stop early if a perfect decomposition is not required.

Theoretical Guarantees: The authors provide new theoretical bounds proving that proximal algorithms remain convergent even when the EVD/SVD is only approximate. They show that the error in the proximal operator is directly bounded by the off-diagonal magnitude of the matrix produced by the Jacobi method.

Experimental Results

The authors evaluated their approach on three common matrix optimization problems: Sparse Inverse Covariance Selection, Semidefinite Programming (SDP), and Nuclear Norm Minimization. They compared CPU and GPU implementations using standard libraries versus the Jacobi-based approach.

Performance comparison of default EVD/SVD methods versus the Jacobi method (1 sweep) on GPUs

Key Performance Insights:

  • Raw Speed: On a GPU, a single Jacobi sweep is roughly 10x faster than default EVD methods for matrices of size $n \approx 500$.
  • End-to-End Efficiency: In Sparse Covariance Selection, the Jacobi-based update was up to 10x faster per iteration than standard GPU routines. The projection step in SDP saw a 5x speedup.
  • Large-Scale Viability: In Nuclear Norm Minimization for large matrices ($n=4000$), the Jacobi method completed the task while standard methods exceeded the one-hour time limit. After the first few iterations, the Jacobi method consistently required only ~1 sweep per iteration to maintain the required tolerance.

Limitations and Future Work

While highly effective, the approach has a few limitations:

  • Scaling Issues for Symmetric Matrices: As seen in the performance tables, for very large symmetric matrices ($n > 2000$), the specific NVIDIA implementation of the symmetric Jacobi solver (syevj) showed some performance degradation compared to default GPU SVD routines (which remained highly performant).
  • Numerical Drift: Over many thousands of iterations, the accumulation of floating-point errors can cause the eigenvector matrix to lose its orthogonality. The authors suggest periodic re-orthonormalization (using a standard QR decomposition) to mitigate this.
  • Scope: This technique is specifically beneficial for spectral functions. If the proximal operator does not involve an EVD/SVD, this method provides no benefit.

Summary updated

BibTeX
@inproceedings{fawzi2021faster,
  author = {Hamza Fawzi and Harry Goulbourne},
  title = {{Faster proximal algorithms for matrix optimization using Jacobi-based eigenvalue methods}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
}
Figure