Abstract
Computing probabilities for high-dimensional Multivariate Normal (MVN) and Student-t (MVT) distributions is a cornerstone of spatial statistics and environmental modeling. However, traditional methods like the Genz algorithm suffer from a cubic computational bottleneck. The R package tlrmvnmvt introduces a scalable framework using Tile-Low-Rank (TLR) matrix approximations and Morton order variable reordering. These innovations allow for the evaluation of probabilities in dimensions exceeding 10,000, where conventional tools fail. Benchmarks demonstrate significant speedups and improved numerical stability for log-probability estimation.
Introduction
A common problem in statistics involves calculating the probability that a set of correlated variables falls within a specific high-dimensional "box." For instance, estimating the likelihood that temperatures across thousands of sensor locations remain below a critical threshold requires integrating a complex probability density function.
The standard approach, the Genz algorithm, relies on Cholesky decomposition ($O(n^3)$) and Monte Carlo sampling ($O(n^2)$ per sample). As the dimensionality $n$ increases, these costs become prohibitive. While established R packages like mvtnorm are effective for hundreds of dimensions, they struggle with the memory and computational demands of problems involving thousands of variables.
Methods
The tlrmvnmvt package overcomes these limitations through two primary technical innovations:
Tile-Low-Rank (TLR) Representation
Rather than processing the covariance matrix as a single dense block, the package partitions it into smaller "tiles." In many applications, such as spatial statistics, correlations decay with distance. This property allows off-diagonal tiles to be compressed into a low-rank format ($UV^\top$), drastically reducing the cost of matrix-vector operations.
Morton Order Reordering
The efficiency of the integration process is highly sensitive to the ordering of variables. The authors employ Morton order (Z-order) to group spatially proximal variables into the same tiles. This reordering preserves the hierarchical low-rank structure of the covariance matrix, facilitating more efficient compression and faster Monte Carlo convergence.
The package is built with a high-performance C++ backend using Rcpp and the Eigen library, ensuring computational efficiency.
Results and Discussion
The package was evaluated against synthetic benchmarks and real-world spatial data, including constant correlation matrices and 2D spatial grids.
Scalability and Performance
In a high-dimensional test involving 16,384 variables, tlrmvnmvt successfully estimated the probability in approximately 133 seconds. In contrast, competing packages like mvtnorm and TruncatedNormal were unable to complete the task due to memory constraints or excessive runtimes. For a 4,000-dimensional spatial problem, the TLR-based method achieved a 20-fold speedup over traditional dense matrix approaches.
Numerical Stability
In high dimensions, raw probabilities often fall below machine epsilon. The authors demonstrate that estimating the log-probability is significantly more robust, maintaining lower relative error and providing meaningful results in extreme tail scenarios.
Conclusion
The tlrmvnmvt package represents a significant advancement in high-dimensional statistical computing. By exploiting the spatial structure of covariance matrices through TLR and Morton reordering, it enables researchers to tackle problems previously considered intractable. Future work may explore even more efficient hierarchical matrix formats, such as H-matrices, or GPU acceleration to further push the boundaries of dimensionality.
Summary updated