spd_learn.functional.parallel_transport_log_cholesky#

spd_learn.functional.parallel_transport_log_cholesky(v, p, q)[source]#

Parallel transport of tangent vector under the Log-Cholesky metric.

Transports a tangent vector \(V \in T_P \mathcal{M}\) from the tangent space at \(P\) to the tangent space at \(Q\) using the Log-Cholesky metric [Lin, 2019] (Proposition 7).

Transport Formula

Given Cholesky decompositions \(P = L_P L_P^T\) and \(Q = L_Q L_Q^T\):

  1. Pull back \(V\) to the Cholesky tangent space: \(S = L_P^{-1} V L_P^{-T}\), then \(B = \operatorname{strictly\_lower}(S) + \frac{1}{2}\operatorname{diag}(S)\) and \(dL = L_P B\).

  2. Convert to log-Cholesky coordinates: \(dY = \operatorname{strictly\_lower}(dL) + \operatorname{diag}(\operatorname{diag}(dL) / \operatorname{diag}(L_P))\)

  3. Transport in flat log-Cholesky space is the identity: \(dY\) stays the same.

  4. Convert back at \(Q\): \(dL_Q = \operatorname{strictly\_lower}(dY) + \operatorname{diag}(\operatorname{diag}(dY) \cdot \operatorname{diag}(L_Q))\)

  5. Push forward: \(V' = dL_Q L_Q^T + L_Q dL_Q^T\)

Parameters:
  • v (torch.Tensor) – Tangent vector at p, shape (…, n, n). Must be symmetric.

  • p (torch.Tensor) – Source point on SPD manifold, shape (…, n, n).

  • q (torch.Tensor) – Target point on SPD manifold, shape (…, n, n).

Returns:

Transported tangent vector at q, shape (…, n, n).

Return type:

torch.Tensor

Examples

>>> import torch
>>> from spd_learn.functional import parallel_transport_log_cholesky
>>> n = 3
>>> A = torch.randn(n, n, dtype=torch.float64)
>>> p = A @ A.T + torch.eye(n, dtype=torch.float64)
>>> B = torch.randn(n, n, dtype=torch.float64)
>>> q = B @ B.T + torch.eye(n, dtype=torch.float64)
>>> v = torch.randn(n, n, dtype=torch.float64)
>>> v = (v + v.T) / 2
>>> v_transported = parallel_transport_log_cholesky(v, p, q)
>>> # Self-transport should be identity
>>> v_self = parallel_transport_log_cholesky(v, p, p)
>>> torch.allclose(v, v_self, atol=1e-6)
True

Notes

While the Log-Cholesky metric makes the SPD manifold globally flat in the log-Cholesky coordinates, transport is non-trivial when expressed in the ambient SPD space for tangent vectors represented as symmetric matrices. This implementation follows Proposition 7 of [Lin, 2019].

See also

parallel_transport_airm()

Parallel transport under AIRM.

parallel_transport_lem()

Parallel transport under Log-Euclidean.

log_cholesky_distance()

Distance under Log-Cholesky metric.

log_cholesky_mean()

Mean under Log-Cholesky metric.