Symmetric Positive Definite (SPD) matrices—often appearing as covariance matrices or kernels—are the bread and butter of many machine learning applications, from medical imaging to signal processing. However, because they live on a non-Euclidean manifold, standard deep learning tools don't quite fit.
A recent paper, "Fast and Stable Riemannian Metrics on SPD Manifolds via Cholesky Product Geometry," proposes a clever way to make SPD neural networks both faster and more robust by rethinking the geometry of Cholesky factors.
TL;DR
The authors uncover a simple "product structure" in the Cholesky manifold that allows for the design of new Riemannian metrics. By replacing unstable log/exp operations with power-based transformations, they introduce two new metrics (PCM and BWCM) that are significantly more numerically stable and computationally efficient than existing standards like Log-Cholesky or Affine-Invariant metrics.
What Problem Does This Paper Address?
To train neural networks on SPD matrices, we need Riemannian metrics to define "distance" and "direction" on the manifold. Existing metrics generally fall into two camps:
- SVD-based (e.g., AIM, LEM): These are mathematically elegant but computationally expensive because they require Eigen-decompositions, which scale poorly ($O(n^3)$ with high constants) and are hard to parallelize.
- Cholesky-based (e.g., LCM): These are much faster because Cholesky decomposition is cheap. However, the popular Log-Cholesky Metric (LCM) relies on diagonal logarithms and exponentiations. In deep learning, diagonal elements can become extremely small or large, causing these functions to "explode" or vanish, leading to numerical instability (NaNs).
The authors set out to find a metric that is as fast as Cholesky-based methods but as stable (or more so) than SVD-based ones.
Methods
The core insight is that the Cholesky manifold (the space of lower triangular matrices with positive diagonals) can be viewed as a product of two simpler spaces:
- A Euclidean space for the strictly lower triangular part.
- A Riemannian space (specifically $n$ copies of $\mathbb{R}_{++}$) for the diagonal elements.
By choosing different metrics for the diagonal part, the authors derive two new SPD metrics:
- Power-Cholesky Metric (PCM): Uses a power-based metric on the diagonals.
- Bures-Wasserstein-Cholesky Metric (BWCM): Adapts the Bures-Wasserstein geometry to the Cholesky factors.
Crucially, they introduce a diagonal power deformation ($\theta$). As $\theta \to 0$, these metrics converge to the standard Log-Cholesky, but for $\theta > 0$, they use power functions (like $x^\theta$) which are much better behaved numerically than $\log(x)$ or $\exp(x)$.
The authors also derive closed-form expressions for essential Riemannian operators—geodesics, parallel transport, and even the weighted Fréchet mean—which are often unavailable or iterative for other metrics.
Datasets
The metrics were evaluated on three standard SPD benchmarks:
- Radar: Synthetic radar signals for 3-class classification.
- HDM05: Motion capture data (skeleton-based) for human action recognition.
- FPHA: First-person hand action videos.
Key Insights and Ideas
- Numerical Stability via Power Functions: The "aha moment" is that $\log$ and $\exp$ are the primary culprits for instability in SPD networks. By using power transformations, the network can handle diagonal entries as small as $10^{-30}$ without failing, whereas Log-Cholesky fails at $10^{-3}$.
- Closed-form Fréchet Mean: Unlike the Bures-Wasserstein metric on the full SPD manifold, the BWCM on the Cholesky manifold has a simple, closed-form Fréchet mean. This makes "pooling" layers in neural networks much faster.
- The "Swelling Effect": In tensor interpolation (e.g., in medical imaging), Euclidean metrics often cause the interpolated matrix to have a determinant much larger than the endpoints (the "swelling effect"). PCM effectively mitigates this, producing results similar to the more expensive AIM.
Key Results
- Accuracy: PCM and BWCM consistently outperformed LCM and AIM across all datasets. For example, on the HDM05 dataset, BWCM and PCM demonstrated noticeable accuracy improvements over standard baselines like LCM.
- Speed: In high-dimensional settings ($512 \times 512$ matrices), PCM and BWCM were roughly 35x faster than SVD-based metrics (AIM/BWM) and even slightly faster than LCM.
- Robustness: In stress tests with tiny eigenvalues, PCM/BWCM maintained a 0% failure rate at scales where LCM had a 100% failure rate.
Limitations and Future Work
- Positivity Constraints: Some "gyro-operations" (algebraic structures used for the manifold) require diagonal elements to stay positive. While the authors suggest simple numerical tricks (like
max(d, epsilon)), a more intrinsic way to enforce this during optimization could be explored. - Hyperparameter Tuning: The deformation factor $\theta$ is a new hyperparameter. While the paper provides a range of effective values (typically between -1.5 and 1.0), it adds another knob to turn during model selection.
- Broader Metric Design: The product structure discovery opens the door to using any metric on $\mathbb{R}_{++}$ for the diagonal part, suggesting a vast unexplored space of potential Cholesky-based metrics.
Summary updated