Geodesics and the spray
A geodesic is a stationary curve of the energy. For a non-reversible metric, reversing a geodesic need not give another geodesic, and the costs in the two directions need not agree. Initial- and boundary-value problems expose different parts of this geometry.
Two questions under one name
Two quite different questions travel under the name of finding a geodesic, and reaching for the wrong solver is usually a matter of not having noticed which one is being asked. Point the boat in a direction, open the throttle and let it run: where does it end up? That is an initial value problem, an ordinary differential equation in the position and the velocity, and it is answered by integrating. Name two harbours instead and ask for the cheapest crossing between them, and the problem changes character entirely — it becomes an optimisation over the space of paths joining two fixed ends, and no amount of integrating produces the answer directly, because the direction to set out in is part of what we are trying to find.
The equation underlying both has the same shape it has in the Riemannian case. Writing for the energy, the stationary curves of satisfy
with a single object, the spray , carrying all of the geometry. The one structural difference from the Riemannian case is that need not be quadratic in the velocity. That is not the same property as asymmetry and the two are independent — a Randers metric whose drift is parallel with respect to is asymmetric and still has a quadratic spray, which is the Berwald case — but wherever the spray is non-quadratic, every connection coefficient below it inherits a dependence on the velocity that has no Riemannian counterpart, and most of the difficulty in the subject lives there. finslerax never asks anyone to write the spray down, since it is a derivative of the energy and can be taken as one: a metric defined by a neural network has a geodesic equation the moment is defined, and there are no Christoffel symbols to derive by hand or to get wrong.
Loading geodesic-shooting…
geodesic-shooting
Reversal
In Riemannian geometry the reverse of a geodesic is again a geodesic, and . A non-reversible Finsler metric guarantees neither statement. Some special metrics or endpoint pairs still have the same path in both directions, but a solver must not assume this. The outbound path reversed is a useful initial guess for the return solve, not a substitute for that solve.
Loading zermelo-navigation…
zermelo-navigation
The directional cost difference is also data. On the final concept page it separates exact drift terms that path shapes alone cannot identify.
Four routes, and when each applies
The library exposes one initial-value integrator, two boundary-value solvers with different numerical trade-offs, and a continuation driver for difficult initialisations.
ExponentialMapinitial value- Integrates the geodesic equation forward from a point and an initial velocity. It answers where a chosen direction leads; reaching a prescribed endpoint requires an outer shooting method.
AVBDSolverboundary value, local- Discretises the path and relaxes it with Gauss–Seidel sweeps over the vertices, optionally using a two-colouring so independent vertices can be updated together under vmap. Equality constraints enter through an augmented Lagrangian. Like relaxation of a one-dimensional Laplacian, it can require O(N²) sweeps to communicate a low-frequency correction across a path of N vertices. After Giles, Díaz and Yuksel, SIGGRAPH 2025.
GaussNewtonGeodesicboundary value, global- The discrete path energy couples only neighbouring vertices, so its Hessian is block-tridiagonal with D×D blocks and a damped Newton step costs O(N·D³) by the block-Thomas algorithm. The global step avoids the diffusive propagation of a local relaxation. Its implementation uses ambient coordinates and projection, making it best suited to Euclidean domains and latent spaces; AVBD is the safer choice on a strongly curved embedded manifold.
solve_continuationstiff metrics- A damped Newton solve remains sensitive to its initial path in a stiff, non-convex problem. Continuation can anneal the metric from a gentler version, refine the path from coarse to fine, or combine both. Each stage resamples the previous path and passes it through init_path.
The Euler–Lagrange equations of reduce to with spray coefficients
They are positively homogeneous of degree two in for an exact Finsler metric. In the Riemannian case is quadratic and this is the familiar equation; in general the spray is homogeneous but not quadratic.
The implementation never forms . Writing , it solves
for directly. This is cheaper than an explicit inverse and better conditioned near directions where the fundamental tensor approaches degeneracy, which for a Randers metric means near the causal boundary and for a learned metric means early in training.