Large-scale Log-determinant Computation through Stochastic Chebyshev Expansions

Insu Han, Dmitry Malioutov, Jinwoo Shin

TL;DR

This paper introduces a randomized, linear-time algorithm to approximate the log-determinant of massive matrices—a task that usually requires prohibitive cubic time. By combining Chebyshev polynomial expansions with the Hutchinson stochastic trace estimator, the researchers enable high-accuracy computations for matrices with tens of millions of variables, outperforming traditional methods by orders of magnitude.

What Problem Does This Paper Address?

The "log-determinant" ($\log \det B$) is a mathematical cornerstone in machine learning. It acts as the normalization constant for Gaussian distributions and appears in everything from Gaussian Processes to metric learning and counting spanning trees in graphs.

The problem is scale. The standard way to compute a log-determinant is via Cholesky decomposition, which has a computational complexity of $O(d^3)$, where $d$ is the number of variables. If you have 10,000 variables, it’s manageable; if you have 10 million, it’s impossible. This paper aims to break that cubic-time barrier, providing a way to handle "big data" scale matrices where $d$ is in the millions.

Methods

The authors propose a two-step approximation strategy:

  1. Chebyshev Polynomial Expansion: The log-determinant of a matrix $B$ can be expressed as the trace of the logarithm of that matrix: $\log \det B = \text{tr}(\log B)$. Since calculating the log of a matrix is hard, they approximate the scalar $\log(1-x)$ function using Chebyshev polynomials. This transforms the problem into calculating the traces of various powers of the matrix.
  2. Hutchinson’s Trace Estimator: Even with polynomials, computing the trace of matrix powers (like $A^k$) is expensive. To avoid this, they use a stochastic trick: they multiply the matrix by a series of random "Rademacher" vectors ($v^T A v$). This provides an unbiased estimate of the trace using only matrix-vector multiplications.

Why this is clever: Matrix-vector multiplication is highly efficient, especially for sparse matrices, and is easily parallelized. By using the recursive property of Chebyshev polynomials, they can compute these products without ever explicitly calculating $A^k$.

Datasets

The researchers evaluated their algorithm on several fronts:

  • Large Sparse Random Matrices: Synthetic matrices ranging from $10^3$ to $3 \times 10^7$ dimensions to test scaling.
  • Synthetic GMRF: A Gaussian Markov Random Field on a $5000 \times 5000$ grid, resulting in 25 million variables.
  • Ozone Satellite Data: Real-world spatial data from NASA's Total Ozone Mapping Spectrometer (TOMS), involving a field of over 6 million variables.
  • Graph Laplacians: Used for the application of counting spanning trees in large graphs.

Key Insights and Ideas

  • Chebyshev > Taylor: Most previous stochastic attempts used Taylor series expansions. The authors show that Chebyshev polynomials provide much better accuracy because they minimize the maximum error over an interval, whereas Taylor series are only accurate near a single point.
  • Condition Number is Key: The algorithm’s performance and the required polynomial degree ($n$) depend on the matrix's condition number (the ratio of the largest to smallest eigenvalues). If the matrix is "well-conditioned," the algorithm is incredibly fast.
  • Linear Complexity: For sparse matrices, the time complexity is $O(m \cdot n \cdot \text{nnz}(B))$, where $m$ is the number of random samples, $n$ is the polynomial degree, and $\text{nnz}$ is the number of non-zero entries. This makes the approach truly linear relative to the size of the input data.

Key Results

  • Speed: On a single commodity computer, the algorithm computed the log-determinant of a matrix with 30 million variables in just 500 seconds.
  • Accuracy: In comparisons with exact methods (on smaller matrices where exact computation was possible), the algorithm achieved 99.9% accuracy.
  • Scalability: The experiments demonstrated a clear linear scaling in running time as the matrix dimension increased, while traditional Cholesky methods failed early due to memory and time constraints.
  • Superiority over Taylor: The Chebyshev approach reached high accuracy with a much lower polynomial degree than Taylor-based methods.

Limitations and Future Work

  • Eigenvalue Bounds: The algorithm requires some knowledge (even if loose) of the range of the matrix's eigenvalues ($\sigma_{min}$ and $\sigma_{max}$). While $\sigma_{max}$ is often easy to estimate, $\sigma_{min}$ can be trickier for certain applications.
  • Ill-conditioned Matrices: If a matrix is nearly singular (very small $\sigma_{min}$), the polynomial degree $n$ must increase to maintain accuracy, which slows down the algorithm.
  • General Non-singular Matrices: While the paper extends the method to general matrices (Algorithm 2), the most robust results and theoretical bounds are focused on positive definite matrices. Further exploration into highly non-symmetric or complex-valued matrices could be a future path.

Summary updated

BibTeX
@inproceedings{han2015large,
  author = {Insu Han and Dmitry Malioutov and Jinwoo Shin},
  title = {{Large-scale Log-determinant Computation through Stochastic Chebyshev Expansions}},
  booktitle = {International Conference on Machine Learning},
  year = {2015},
  url = {https://openreview.net/forum?id=ryWvyiWd-r},
}
Figure