spd_learn.functional.pole_ladder#

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

Parallel transport via pole ladder approximation.

Pole ladder is a more efficient variant of Schild’s ladder that uses a single iteration with the geodesic midpoint as a “pole”. It provides a good approximation with less computation than multi-step Schild’s ladder.

The algorithm (following Lorenzi & Pennec 2014): 1. Compute x1 = exp_P(V), the endpoint of the tangent vector 2. Compute the geodesic midpoint M between P and Q (the “pole”) 3. Compute x1’ = exp_M(-log_M(x1)), reflecting x1 through M 4. Transported vector is log_Q(x1’)

This is essentially one step of Schild’s ladder but uses the full geodesic midpoint as the reflection center, which gives better accuracy.

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

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

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

Returns:

Approximately transported tangent vector at q, shape (…, n, n).

Return type:

torch.Tensor

Notes

Pole ladder has O(h^2) approximation error where h is the geodesic distance between P and Q. For small distances, it provides a good balance between accuracy and computational cost [Lorenzi and Pennec, 2014].

Examples

>>> import torch
>>> from spd_learn.functional import pole_ladder, parallel_transport_airm
>>> n = 3
>>> A = torch.randn(n, n)
>>> p = A @ A.T + torch.eye(n)
>>> B = torch.randn(n, n)
>>> q = B @ B.T + torch.eye(n)
>>> v = torch.randn(n, n)
>>> v = (v + v.T) / 2
>>> # Compare pole ladder with closed-form transport
>>> v_pole = pole_ladder(v, p, q)
>>> v_exact = parallel_transport_airm(v, p, q)

See also

parallel_transport_airm()

Closed-form parallel transport under AIRM.

schild_ladder()

Multi-step numerical approximation.

airm_geodesic()

Geodesic under AIRM.