acceptodds
Under review as a conference paper at ICLR 2027

Weil-R: Automatic Differentiation of Exact Riemannian Hessians

Abstract

On matrix manifolds such as the sphere, the Stiefel manifold, and the symmetric positive-definite cone, second-order optimization requires Riemannian Hessians that account for both objective curvature and the geometry of the constraint set. We introduce Weil-R, a framework that lifts finite-dimensional Weil algebras through constraint-preserving manifold retractions to extract Riemannian Hessians in a single forward pass, without a finite-difference step size or nested differentiation. Our covariant extraction theorem shows that the mixed algebra coefficient equals the Riemannian Hessian whenever the retraction acceleration vanishes or is orthogonal to the gradient, covering the exponential map, the QR retraction on Stiefel, and the projection retraction on the sphere. A modular JAX library implements the construction with matrix-free Hessian-vector products and memory linear in the algebra dimension. On five of seven constrained benchmarks, Newton and trust-region with the Weil-R Hessian reach machine precision; on the Stiefel Rayleigh quotient they converge in iterations versus for PyManopt trust-region ( fewer). Fifty-one geometric consistency checks pass at tolerance , and extracted derivatives agree with reference Hessians to machine precision. These results connect algebraic differentiation and Riemannian optimization for learning with geometric constraints.

Then back it, or bet against it.

Related papers

Open the market on this paper to see 7 more related papers.