arXiv:2610.12776cs.LGOct 2026

Manuscript Offprint

arXiv:2610.12776

Coordinate-Free Automatic Differentiation

Alex Guerra, Joshua Aduol, Yaqian Tang, Daniel Williams, Ryan P. Adams, Peter Orbanz

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Alex Guerra 1^{1} Joshua Aduol 1^{1} Yaqian Tang 1^{1} Daniel Williams 1^{1} Ryan P. Adams 1^{1} Peter Orbanz 2^{2}

1^{1}Department of Computer Science, Princeton University, Princeton, NJ 08540

ag5008@princeton.edu, jaduol@princeton.edu, yt1893@princeton.edu,

dw1978@princeton.edu, rpa@princeton.edu

2^{2}Gatsby Computational Neuroscience Unit, University College London

porbanz@gatsby.ucl.ac.uk

Abstract. Automatic differentiation (AD) is a cornerstone of modern machine learning. Since all AD frameworks implicitly fix a basis of Euclidean space to define gradients and Jacobians, they natively process mathematical objects that are arrays of a fixed set of coordinates. This makes it awkward to express objects such as rotations, volume forms, and curvatures that arise, for example, in applications of AI to science. Bespoke workarounds lack reusability. We show that (i) a single, basis-independent derivative operator can represent many geometric differential operations, and (ii) this operator can be expressed entirely in terms of existing AD primitives. This reusable transformation can be composed with JAX batching, compilation, and hardware acceleration. Geometry enters as algebraic data. We experimentally demonstrate its reuse across different manifold operators, its composition through a spacetime inverse-problem pipeline, and its use in optimization over different rotor subgroups.

1 Introduction

Automatic differentiation (AD) plays a pivotal role in modern machine learning. On the one hand, it provides convenience and efficiency: forward computations efficiently and automatically compute gradients and tangents via the chain rule. On the other hand, it is a powerful programming abstraction that turns differentiation into a function transformation: if a function is implemented using differentiable primitives, it can be turned into another function that computes its local linearization, its adjoint, or higher-order variants, and these transformed functions can be composed with batching, compilation, and optimization. One-off calculations involving derivatives become reusable software objects [4, 9].

Current AD systems are built around coordinate arrays, which work well if derivatives are standard Euclidean Jacobians; this is often the case for the high-dimensional scalar objectives common in deep learning. Simple coordinate arrays do not, however, directly cover other geometric objects and operators, such as fields on manifolds, rotations and rigid motions, curvature, volume forms, divergence, curl, or covariant derivatives. These objects depend on additional geometric structure, such as a metric, an orientation, or a tangent space, none of which is carried by the differential that AD computes. Consequently, in domains where such objects are central, including physics, graphics, and engineering, differentiation is often not fully automatic. We address the problem by identifying a single, common source of the difficulty. Because the differential carries no geometric structure, that structure must be supplied by hand via a representation: Christoffel symbols in a chart, cotangent weights on a mesh, a stiffness matrix for a basis. Once this representation is fixed, the resulting operator is tied to it, and the same underlying operator must be re-derived for each new space. From a mathematical point of view, basis dependence is not inherent: coordinate-free formalisms, such as differential forms and exterior calculus, avoid this by describing geometric objects and operators independently of any particular coordinates.

We extend the AD philosophy of composable function transformations from flat-space AD to a fully coordinate-free formalism. The formalism used here is known as geometric algebra [19, 28]. It (i) provides a coordinate-free multivector derivative that incorporates all relevant metric and orientation information algebraically, and (ii) aligns with the geometric-algebra representations already used in parts of machine learning [10, 11, 48]. Concretely, our contributions are:

• We show how the multivector derivative can be represented in terms of JAX primitives. It can therefore be implemented as a composable JAX transformation that supports forward and reverse mode AD, higher-order differentiation, and batched evaluation.

• By specializing this derivative, we obtain automatic computation of curl, divergence, covariant derivatives, shape operators, curvature tensors and related operators on any (pseudo-) Riemannian manifold, in any number of dimensions.

• We demonstrate (i) the framework’s feasibility and (ii) reuse across applications in physics and machine learning, such as divergence-free flows on manifolds, electromagnetic inverse problems, and rotor-group optimization.

Just as jax.grad transforms a scalar function into its Euclidean gradient, our framework transforms a multivector function into its coordinate-free derivative. Because it is built entirely from JAX primitives, it composes with other JAX transformations and models.

References (39)