Abstract
Calculating derivatives of log-determinant terms is a primary computational bottleneck in Gaussian processes and Restricted Maximum Likelihood (REML) estimation. This paper presents an efficient method leveraging "selected inversion" via the Takahashi-Fagan-Chin formulae. By evaluating only the necessary elements of the inverse matrix corresponding to the sparsity pattern of the original matrix, the proposed approach achieves speedups of one to two orders of magnitude for large, sparse datasets compared to traditional dense methods.
Introduction
In many machine learning and statistical models—particularly Linear Mixed Models (LMMs) used in genomics, recommendation systems, and spatial analysis—researchers need to maximize a likelihood function. This process frequently involves calculating the derivative of a log-determinant term, such as $\log \det(C)$.
The standard way to find this derivative involves the trace of the inverse matrix: $\text{tr}(C^{-1} \frac{\partial C}{\partial \kappa})$. For a matrix of size $n \times n$, calculating the full inverse $C^{-1}$ generally requires $O(n^3)$ operations. Even if the original matrix $C$ is sparse, its inverse is almost always dense. For large-scale problems like Genome-Wide Association Studies (GWAS), computing and storing this full inverse is computationally prohibitive.
Methodology
The authors propose a pipeline that integrates several sophisticated sparse matrix techniques to bypass the need for a full inverse:
- $LDL^T$ Factorization: Instead of the standard Cholesky factorization, they use $LDL^T$ (where $L$ is a unit lower triangular matrix and $D$ is diagonal). This is numerically stable and allows for easy calculation of the log-determinant itself as $\sum \log d_{ii}$.
- Selected Inversion (Takahashi-Fagan-Chin Formulae): This is the core innovation. Since we only need the trace of $C^{-1}$ multiplied by the derivative of $C$, and the derivative of $C$ usually shares the same sparsity pattern as $C$, we only need the elements of $C^{-1}$ that correspond to the non-zero entries of $C$. The Takahashi-Fagan-Chin formulae allow for the calculation of these specific elements without ever computing the full inverse.
- Fill-in Reducing Ordering: To keep the $L$ factor as sparse as possible, the authors use Approximate Minimum Degree (AMD) reordering. This minimizes "fill-in"—zeros in the original matrix that become non-zeros during factorization. Reordering can reduce the number of non-zeros in the factorized matrix by a massive margin.
- Symbolic Analysis: Before computation, the algorithm performs a symbolic pass to predict memory requirements and data dependencies using elimination trees, allowing for efficient memory pre-allocation.
Experimental Evaluation
The paper evaluates the approach using two distinct sets of benchmarks: synthetic variety trials modeled after agricultural breeding and real-world matrices from the University of Florida Sparse Matrix Collection.
Key Results
- Speedup: For the variety trial benchmarks, the proposed method was significantly faster than standard LDU approaches. In the largest trial ("Prob 10"), the reordering and selected inversion took roughly 1.6 seconds, significantly outperforming traditional methods.
- Scaling: The sparse method remains 1–2 orders of magnitude more efficient than dense alternatives as matrix size grows, following a predictable power law relative to the memory size of the $L$ factor.
- Efficiency: For massive matrices like
G3_circuit(with over 1.5 million effects), the selected inversion remains tractable, whereas a full inverse would be impossible on standard hardware.
Conclusion
The integration of selected inversion with sparse matrix reordering provides a massive practical advantage for statisticians working with large-scale Gaussian processes. While performance is currently limited by memory bandwidth, future work could focus on better cache utilization and exploring multi-GPU or distributed implementations to further leverage the parallelism inherent in shorter, wider elimination trees.
Summary updated