Manuscript Offprint
arXiv:2610.12776Coordinate-Free Automatic Differentiation
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Alex Guerra Joshua Aduol Yaqian Tang Daniel Williams Ryan P. Adams Peter Orbanz
Department of Computer Science, Princeton University, Princeton, NJ 08540
ag5008@princeton.edu, jaduol@princeton.edu, yt1893@princeton.edu,
dw1978@princeton.edu, rpa@princeton.edu
Gatsby Computational Neuroscience Unit, University College London
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.
Existing extensions of AD beyond plain Euclidean arrays include forward-mode AD for multivector-valued functions [53, 54, 55], manifold and Lie-group AD methods that use e.g. charts or retractions to differentiate structured spaces [16, 50, 51], and recent work on jet functors and Weil algebras in JAX [49]. In these methods, the geometry enters through a chosen local representation of the space being differentiated. In our method, the derivative is first defined algebraically on multivectors; manifold structure enters afterward through projection onto the tangent space.
Geometric algebra, or Clifford algebra, combines the inner and outer products into the geometric product [26, 28]. Geometric calculus develops the associated multivector derivative and recovers many operators of Riemannian differential geometry without charts or Christoffel symbols [18, 27, 37]. It is closely related to other coordinate-free formalisms such as differential forms and exterior calculus, and complementary to discretized approaches such as DEC and FEEC [3, 14, 17, 31]. A broad ecosystem of GA libraries exists, e.g. [12, 25, 33, 34, 35, 46].
Geometric algebra in machine learning Geometric algebra has appeared in machine learning as a representation language for equivariant architectures, including Clifford neural layers, geometric Clifford algebra networks, the Geometric Algebra Transformer, and Clifford-steerable CNNs [10, 11, 15, 47, 48, 52, 56]. These works are not concerned with geometric calculus or automatic computation of differential operators; rather, they show that multivector representations are already useful in ML and provide natural downstream settings for our AD operators.
3 The Multivector Derivative
This section describes our approach. We define the multivector derivative and then translate this derivative into AD primitives. This allows us to compute a range of differential operators in “flat” spaces. In Section 3.5, we generalize the approach to manifolds via projections onto tangent spaces.
3.1. Definitions
We begin with an -dimensional vector space , with an inner product . The outer product of vectors represents an oriented, -dimensional volume element if the vectors are linearly independent (and vanishes otherwise), and is called a -blade. A sum of -blades is a grade multivector (also called a -vector). Geometric algebra adds an additional product operation to , called the geometric product and given by
(1)
Observe this implies and . Closing V under this product produces the geometric algebra . This is a vector space that contains the original vectors, but also oriented area elements, volume elements, and sums of these objects. If is a basis of V, a basis of can be obtained by forming every possible k-blade from the n basis vectors
We denote the subspace of grade-k elements , and the grade-k part of by . The inner product extends from to all of as the bilinear, scalar-valued form , and extends by grade selection for , . We also define the contraction , and is 0 if . These definitions are all standard; see e.g. Hestenes [28], Macdonald [39].
Any element X of can now be represented by expanding it in the basis above as
for scalar coefficients , called coordinates. We can always, of course, choose and set if does not contribute, but explicitly using a smaller set can be useful to restrict attention to certain types of objects. For example, if we choose as the set of singleton sets , then is an element of the original vector space .
Remark 1. We are interested in low dimensional geometry. In high dimensions, computational costs can become prohibitive, since the space has dimension .
3.2. The Multivector Derivative
We consider multivector functions , or functions defined on the linear subspace spanned by the basis blades for some index set . A nondegenerate on implicitly defines a reciprocal basis satisfying . The multivector derivative of indexed by is defined as
(2)
The multiplication in the sum is the geometric product. Four properties of are worth emphasizing:
• is coordinate-free. Eq. 2 depends only on this inner product (which defines the ), , and the geometric product, but not on the particular choice of basis spanning (Appendix A.1). The only requirement is that the inner product be non-degenerate on .
• is intrinsic to , in contrast to the Jacobian matrix of a function on , which lives in . In fact, can be a defined as a projection .
• All differential operators relevant to our purposes are special cases of .
• As we will see below, can be mapped to JAX primitives.
3.3. From the Definition to AD primitives
The derivative above can be implemented using AD primitives for Jacobian-vector products. In JAX, the relevant primitives are jvp and vjp. We stylize notation slightly, and write jvp(F, X, Z) for jvp(F, (X, ), (Z,)), etc. The Jacobian-vector product computed by forward-mode AD is the directional derivative, or differential applied to a tangent vector:
of at in direction . Reverse mode is more subtle; the vector-Jacobian product is meant to pull back an element of , a linear functional on . While this pullback is naturally defined (metric-free), AD stores this map as coordinate data where it assumes . For more general settings, we require the musical isomorphisms and , which are the identity on coordinates only when all are their own reciprocals. With these maps, we can define a “metric aware” vector-Jacobian product as:
(3)
With this reverse-mode primitive defined, we introduce the following elementary lemma, which shows how the multivector derivative arises from these primitives.
Lemma 2 Let be a differentiable function. Let be basis blades, with reciprocal blades , and . If ranges over the linear subspace of defined by , then
Similarly, if indexes a set of basis blades in the codomain of F, then
See Appendix A for the proof and Appendix B for implementation details.
Remark 3. If contains all input directions and all output directions present in , then , but costs may differ: Forward mode makes jvp calls, reverse mode vjp calls. If is scalar, for example, then and a single vjp suffices, recovering the familiar reverse-mode advantage of standard jax.grad.
3.4. The Vector Derivative
We are particularly interested in the case , where all indices are singletons. In this case, becomes the vector derivative . If we take the geometric product of and a grade-k function , Eq. 1 shows that the result splits into exactly two grades,
(4)
The grade-raising part is the exterior derivative. If is scalar valued, this is the ordinary gradient. If is vector valued, is the curl-like component of , and grade-lowering summand is the divergence-like component [27, 32, 37, 39]. The reason the case of the vector derivative is of primary importance is for computations on manifolds, as we expound on next.
3.5. From Flat Spaces to Manifolds
The approach developed so far assumes a “flat” ambient space. A simple construction generalizes it to curved manifolds. Let be an -dimensional manifold. We will represent as a “vector manifold” [29, 30], with points represented as vectors (in ), and a tangent space of at given by a blade of grade .¹ The projection of a function onto the tangent space at is given by
(5)
A grade function is called a field on if . By projecting the vector derivative operator , we obtain the intrinsic derivative:
(6)
Unfortunately, is not necessarily a field, even if is. This can be remedied by simply defining the covariant derivative to be the projection of :
(7)
The relevance of these definitions is:
• As we will see in more detail in Section 4, standard differential operators on manifolds can be expressed in terms of and . The curl and divergence on , for example, are of the form and . Both are nilpotent operators: (the GA form of from differential forms) and dually (codifferential ). This ensures that the Hodge-De Rham Laplacian is grade preserving, as .
Vector Manifolds motivate why the vector derivative is of primary concern for this work, as all functions on manifolds can now be viewed as functions from . One could in principle also attempt to study ‘bivector manifolds’, etc., but this does not embed cleanly into differential geometry.
• The projector Eq. 5 is easy to compute in an AD framework.
In short, differential operations on manifolds reduce to AD primitives via Eq. 5 and the lemma above.
Remark 4. Compositions of , , and give rise to the standard objects of differential geometry on (intrinsic differential operators, Laplacians, and curvature tensors), with no Christoffel symbols, coordinate charts, or dimension-specific formulas required. A parallel integration theory pairs with the directed volume field (the tangent space weighted by the Riemannian measure ) to give a single multivector-valued fundamental theorem subsuming the classical Stokes-type results [30]. Appendix B.3 develops these in full, showing the full ‘API’ for differential geometry.
4 Experiments
We present four sets of experiments. The first two concern manifold learning, using more standard differential geometric constructions. The second two go beyond differential geometry and show the application of our framework in physics and constrained optimization. These experiments are end-to-end demonstrations, not performance benchmarks. They show how a small collection of AD transformations can be reused and composed.
4.1. Explicit Manifold Learning
We can learn an explicit representation of a manifold by starting with a known simple one (a sphere, a disk, a flat square) and applying some smooth transformation to get a new manifold . This set of experiments work within this paradigm to solve various learning problems.

Figure 1: Icosidodecahedron pinwheel on . Target in black.

Figure 2: Rectified tiling gear on .
Non-Euclidean tilings. A general recipe for constructing a divergence-free vector field on a manifold is immediate in our framework. Start with an arbitrary 2-form, project to get a 2-field, and then apply to get a divergence-free vector field, recalling that . This generalizes the Euclidean neural conservation law construction [45]. In the particular case of a 2-surface, any 2-field must be a scalar multiple of , so we parameterize our field via for a scalar valued neural network , with the resulting divergence-free field given by . We can apply these divergence free flows to learn tilings on manifolds; this has proven useful in, e.g., the design of mechanical meta-materials [40]. Our framework gives us a recipe to do this on any manifold: start with a fixed tiling, apply the flow, and then minimize a loss on the resulting tiles (ours is MSE against a target shape). On we deform an icosidodecahedron into a chiral, -symmetric pinwheel target, see Fig. 1.
As a second example, on the Poincaré disk we deform a rectified tiling into a -symmetric gear, see Fig. 2. With the ambient Minkowski space spanned by , our framework immediately grants us access to the differential operators on once we write down the manifold transformation given by . The hyperbolic metric is induced by the ambient Minkowski inner product restricted to the tangent space of . The divergence free flow here preserves area with respect to this metric, which explains the distortion near the boundary. This also makes it impossible for the learned shape to fully align with the target shape. For complete details of the setup and training, see Appendix C.2.A.
Backprop through the Euler characteristic. As a fun learning demonstration enabled by our framework, consider the problem of learning to warp a flat square into a sphere. We can parameterize this warping as the flow of a neural ODE [13] acting on our initial manifold , and train it end to end so that the resulting manifold has certain geometric properties; see Appendix C.2.B for details. One way to characterize the sphere is by its constant curvature. A remarkable fact is that nearly all curvature-based properties of a manifold can be computed as compositions of and ; Hestenes's so-called shape operator measures how the projector changes as we move along the manifold, which turns out to encode a lot of information about the local geometry. In particular, scalar curvature can be read off almost immediately for a manifold of any dimension, and equals twice the Gaussian

Figure 3: Flat square (black) flowed under curvature loss (red) vs. with the added Gauss–Bonnet term (orange).
curvature, , on a surface. Training a flow to match the sphere’s curvature results in learning a small section of the sphere (see Fig. 3). To warp the square into a full sphere, we can augment this training objective with a differentiable estimate of the Euler characteristic of via the Gauss–Bonnet theorem for closed surfaces,
(8)
Again, this is not only easy to compute in our library, but differentiable, so we can directly optimize Eq. 8 to approach the Euler characteristic of the sphere . Of course, the square is not a closed manifold, and is invariant under diffeomorphisms (and hence the parameterized flow ). Nevertheless, this added loss is still able to guide the flow to something that is approximately closed, from which the Euler characteristic estimate is approximately 2 (see Fig. 3).
4.2. Implicit Manifold Learning
Explicit manifold learning ( ) requires a smooth invertible map between a known base manifold and the target, which restricts the types of architectures one can use. We can also learn an implicit representation, encoding the manifold as the support (or zero level set) of a learned field [41, 42].
Minimal surfaces and the Biot–Savart kernel. Given a closed boundary of dimension in , we learn the bounding -submanifold as the set on which a learned -form concentrates (extracted from as a level set or ridge, Appendix C.3.A) for an arbitrary -form parameterized by a neural network, refining the implicit-current representation of DeepCurrents [41]. The key observation is that the boundary constraint can be made structural through the GA-native Biot–Savart kernel:

Figure 4: Learned minimal surfaces for trefoil (left) and a saddle (right).
(9)
where is the fundamental solution to , also known as the Green's function of the Laplacian. With this choice, we guarantee that , hence this parameterization satisfies for any pair. DeepCurrents shows this for , which we show is easily replicated in our framework; see Fig. 4. The problem of generalizing the training to other is actually obstructed by the difficulty of computing the mass norm of the learned current, as we discuss next. Intuitively, the mass norm is a generalization of the measure of the manifold, which is why minimizing this quantity gives surfaces of minimal measure. Next, we discuss how the mass norm is computed pointwise for -forms; from this we can train the network by minimizing the integral of the mass norm over some ambient domain containing our surface.
The general way to define the (pointwise) mass norm of a k-form is to write as a sum of blades and then take the sum of the multivector norms of these blades. The true mass norm is the infimum of this quantity over all such decompositions. For a 1-form , all vectors are blades hence the mass norm coincides with the multivector norm. For a 2-form , the infimum is attained by writing as a sum of commuting simple bivectors [30]: with . The mass norm is then . The essence of this norm is that it penalizes bivectors which are not pure subspaces (blades).
exact


exact


learned
learned
Figure 5: A holomorphic graph over a disk in : exact minimal surface (top) vs. surface learned by minimizing the mass norm (bottom), at two projection angles.
Figure 6: A branched holomorphic disk bounding the torus knot, exact (top) vs. learned (bottom), as in Fig. 5.
Thus, a bivector like is penalized for being a superposition of two pure subspaces and and has mass norm 2. In contrast, the bivector is a pure subspace having mass norm . Under the multivector norm, and would have the same norm. Minimizing the mass norm thus pushes to be simple almost everywhere. Importantly, the mass norm on bivectors can be computed efficiently and is differentiable almost everywhere. Unfortunately, no closed form is known for the mass norm when , so we only attempt the case. To get an interesting family of ground truth minimal surfaces for this codimension 2 setting, we can note that any holomorphic curve in is mass-minimizing [22], hence defines a minimal surface for any boundary contained on it. We show these comparisons in Figs. 5 and 6. For the exact surfaces and their parameters, more examples, and detailed metrics, refer to Appendix C.3.A.
4.3. Inverse Design in Spacetime

Figure 7: Recovered trajectory (red) against the target helix, with intermediate training trajectories also plotted.
The spacetime algebra is a useful model for electromagnetism [19, 26]. In this algebra, the electromagnetic field collapses into a single bivector (electric E, magnetic B), the source 4-current is a single vector J, and the four classical Maxwell equations collapse to a single famous equation involving the multivector derivative: . The grade decomposition splits this into the source half and the homogeneous half (no magnetic monopoles). Applying the multivector derivative once more gives charge conservation for free: . The 4-potential factorization in turn exists because , and gauge freedom is the statement that A and produce the same F for any scalar . Picking a gauge (e.g. Lorenz, ) just selects a representa-
tive (usually ).
To demonstrate our framework in an inverse design problem, consider the problem of recovering a charged particle's trajectory from a sparse set of Faraday bivector observations at spacetime points .
To parameterize the particle’s worldline, we use a small MLP which outputs a 3-velocity in the lab frame such that (so the predicted worldline is timelike and future-directed at every step). Integrating gives the spatial trajectory , and hence the worldline . To get the Faraday bivector at an observation point , we first must find the retarded time such that is null, i.e., . Here is the lab time at which the particle emits the signal received at . We compute via bisection search, which can be differentiated (with respect to ) via implicit function theorem. Once we have , we can compute the Liénard–Wiechert potential and then the Faraday bivector . The entire

Figure 8: Projections of F field at t=2.
pipeline from to is differentiable, allowing us to backpropagate the relative MSE between predicted and observed Faraday bivectors to update the parameters of the MLP. The F field at a point is shown in Fig. 8 for a particle on a helical worldline, and the learned trajectory is shown in Fig. 7. Full details of the experiment, including the observation grid, input encoding, and optimizer schedule, are in Appendix C.4.
4.4. Optimization on Rotor Groups
Until now, all our examples have used the vector derivative ; we now show the utility of a different instance of the multivector derivative for optimization on rotor groups and the homogenous spaces they act on. While this is a well studied topic [2, 7, 16, 50], a GA-native medium allows for these spaces to be specified as data instead of code, making optimization procedures reusable and composable.
The rotors of a geometric algebra are even products of unit vectors satisfying . It is clear that rotors form a group under the geometric product called the rotor group . Homogeneous spaces like the Stiefel manifold or the Grassmannian can be realized as for some fixed multivector . Thus, optimizing a function over one of these spaces generally reduces to the problem of minimizing a function for some subgroup of .
To this end, we first need to specify . One way to specify a group is via a set of generators. However, because is a Lie group, we can instead provide generators of the corresponding Lie algebra . The utility of GA is that this Lie algebra will always be a bivector subspace, leading to a compact and uniform way to capture all matrix Lie groups (subgroups of ). With this choice of bivectors , suppose that we currently have a rotor and we would like to find an update such that . This can be done with the left trivialized differential , which can be implemented in terms of the multivector derivative as:
(10)
Intuitively, we can think of the multivector derivative as an element of , which we then right multiply by to get to the appropriate cotangent space at the identity, . To turn this covector into an update direction we need a map . For descent to work, the inner product inducing this map must be positive definite, meaning the usual multivector inner product won’t work. While AD implicitly uses the Euclidean inner product on coordinates, our framework lets any positive-definite choice be made explicitly. Once we have mapped our element to , exponentiating gives:
(11)
translation only, 3-dim
source P
target Y
aligned
final loss
2.8e+00
rigid (SE(d)), 6-dim
final loss
1.6e+00
similarity (SE(d) + dilation), 7-dim
final loss
4.0e-01
full conformal group, 10-dim
final loss
1.7e-21
Figure 9: Vectorized optimization over different subgroups: Given an object (gray) and a target conformal transformation (red), we simultaneously learn 4 rotors in different rotor groups corresponding to maskings of the 10-dimensional bivector space of CGA(3): translation (3D), rigid (6D), similarity (7D), and conformal (10D).
A ship measures a static charge's field

Recovery of
Figure 10: Recovering a Lorentz rotor from field measurements. Left: a ship crosses the lab frame at uniform velocity (dashed), past a static point charge, measuring the Faraday bivector in its own frame at events along its path, . In the ship frame the pure-electric Coulomb field tilts and compresses (electric part, blue) and acquires a circulating magnetic part (red). Right: training loss for recovering .
This update is valid for any Lie group embedded in . Existing tools like manopt [8] and geoopt [36] implement separate code for each manifold being optimized over, and additionally only work out of the box for Lie groups which are compact or the semidirect product of a compact Lie group with (e.g., ). geotorch [38] implements a similar trivialization procedure to ours, but even this library still assumes definite signature. See Appendix C.5 for further exposition.
With ‘groups as data’, we can use JAX’s vectorization to simultaneously optimize an objective across different groups. Consider the chain , which are all rotor subgroups of the conformal geometric algebra : each Lie algebra in the chain is a coordinate subspace of the 10-dimensional bivector algebra of the full conformal group. In Figure 9, we optimize the same point-cloud alignment loss on all four groups at once: each panel converges to the best approximation its subgroup admits (matching the centroid, Procrustes, and Umeyama closed forms), and the conformal panel recovers the target configuration exactly.
Next, we show how this same framework can support optimization over the Lorentz group of the spacetime algebra. Suppose that we are on a ship moving at some uniform unknown velocity and orientation, from which we can measure the (possibly noisy) electromagnetic field . We can then try to recover the Lorentz transformation that maps the lab frame to the ship frame by minimizing the loss between the mapped analytic field and the measured field . We plot the results of doing such an optimization in Figure 10. The optimization converges to the correct Lorentz transformation, and we can recover the ship's velocity from the optimized rotor . See Appendix C.5 for full training details.
5 Discussion and Conclusion
The experiments illustrate that a small set of geometric operators can support several apparently different workflows. The same implementation of the multivector derivative, exterior derivative, and tangent projection solves problems ranging from manifold learning, inverse problems in spacetime, and optimization on rotor groups. In each case, the geometric structure enters through the selected index set I, the multivector field being differentiated, and, on manifolds, the tangent pseudoscalar . This is the main practical benefit of the approach: geometric differential operators can be exposed as reusable AD transformations rather than re-derived for each coordinate system or application.
AI use statement
In this work, we used generative AI tools for three primary tasks: first, to collaborate and iterate on experiments. While early versions of all of the experiments were entirely human written, we found AI to increase our ability to iterate fast and find the right training settings to make things work. Second, we used AI to find relevant sources in the literature. We have carefully reviewed all of these sources to ensure that no citations are hallucinated. Third, we used generative AI to help revise the paper, improve the precision of mathematical statements, and for formatting purposes. The authors take full responsibility for all claims made in the paper.
References
[1] Martin Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Geoffrey Irving, Michael Isard, et al. TensorFlow: A system for large-scale machine learning. In OSDI, pages 265–283, 2016.
[2] P.-A. Absil, Robert Mahony, and Rodolphe Sepulchre. Optimization Algorithms on Matrix Manifolds. Princeton University Press, 2008.
[3] Douglas N. Arnold, Richard S. Falk, and Ragnar Winther. Finite element exterior calculus: From Hodge theory to numerical stability. Bulletin of the American Mathematical Society, 47(2):281–354, 2010.
[4] Atılım Güneş Baydin, Barak A. Pearlmutter, Alexey Andreyevich Radul, and Jeffrey Mark Siskind. Automatic differentiation in machine learning: A survey. Journal of Machine Learning Research, 18(153):1–43, 2018.
[5] Michael Betancourt. A geometric theory of higher-order automatic differentiation. arXiv preprint arXiv:1812.11592, 2018.
[6] Mathieu Blondel, Quentin Berthet, Marco Cuturi, Roy Frostig, Stephan Hoyer, Felipe Llinares-López, Fabian Pedregosa, and Jean-Philippe Vert. Efficient and modular implicit differentiation. In Advances in Neural Information Processing Systems (NeurIPS), 2022.
[7] Nicolas Boumal. An Introduction to Optimization on Smooth Manifolds. Cambridge University Press, 2023.
[8] Nicolas Boumal, Bamdev Mishra, P.-A. Absil, and Rodolphe Sepulchre. Manopt, a Matlab toolbox for optimization on manifolds. Journal of Machine Learning Research, 15(42):1455–1459, 2014.
[9] James Bradbury, Roy Frostig, Peter Hawkins, Matthew James Johnson, Chris Leary, Dougal Maclaurin, George Necula, Adam Paszke, Jake VanderPlas, Skye Wanderman-Milne, and Qiao Zhang. JAX: composable transformations of Python+NumPy programs, 2018. URL http://github.com/google/jax.
[10] Johannes Brandstetter, Rianne van den Berg, Max Welling, and Jayesh K. Gupta. Clifford neural layers for PDE modeling. In International Conference on Learning Representations (ICLR), 2023.
[11] Johann Brehmer, Pim de Haan, Sönke Behrends, and Taco Cohen. Geometric algebra transformer. In Advances in Neural Information Processing Systems (NeurIPS), 2023.
[12] Alan Bromborsky and Pygae community. galgebra: Symbolic geometric algebra/calculus for SymPy, 2019. URL https://github.com/pygae/galgebra.
[13] Ricky T. Q. Chen, Yulia Rubanova, Jesse Bettencourt, and David K. Duvenaud. Neural ordinary differential equations. In Advances in Neural Information Processing Systems (NeurIPS), 2018.
[14] Keenan Crane, Fernando de Goes, Mathieu Desbrun, and Peter Schröder. Digital geometry processing with discrete exterior calculus. In ACM SIGGRAPH 2013 Courses, page Article 7, 2013.
[15] Pim de Haan, Taco Cohen, and Johann Brehmer. Euclidean, projective, conformal: Choosing a geometric algebra for equivariant transformers. In AISTATS, pages 3088–3096, 2024.
[16] Jeremie Deray and Joan Solà. manif: A micro Lie theory library for state estimation in robotics applications. Journal of Open Source Software, 5(46):1371, 2020.
[17] Mathieu Desbrun, Anil N. Hirani, Melvin Leok, and Jerrold E. Marsden. Discrete exterior calculus. arXiv preprint math/0508341, 2005.
[18] Chris Doran. Geometric Algebra and its Application to Mathematical Physics. PhD thesis, University of Cambridge, 1994.
[19] Chris Doran and Anthony Lasenby. Geometric Algebra for Physicists. Cambridge University Press, 2003.
[20] Leo Dorst, Daniel Fontijne, and Stephen Mann. Geometric Algebra for Computer Science: An Object-Oriented Approach to Geometry. Morgan Kaufmann, 2007. ISBN 9780123694652.
[21] Conal Elliott. The simple essence of automatic differentiation. Proceedings of the ACM on Programming Languages, 2(ICFP):70:1–70:29, 2018.
[22] Herbert Federer. Geometric Measure Theory, volume 153 of Grundlehren der mathematischen Wissenschaften. Springer, 1969.
[23] Will Grathwohl, Ricky T. Q. Chen, Jesse Bettencourt, Ilya Sutskever, and David Duvenaud. FFJORD: Free-form continuous dynamics for scalable reversible generative models. In International Conference on Learning Representations (ICLR), 2019.
[24] Andreas Griewank and Andrea Walther. Evaluating Derivatives: Principles and Techniques of Algorithmic Differentiation. SIAM, 2nd edition, 2008.
[25] Hugo Hadfield, Eric Wieser, Alex Arsenovic, Robert Kern, and The Pygae Team. clifford: Numerical geometric algebra for Python, 2013. URL https://github.com/pygae/clifford.
[26] David Hestenes. Space-Time Algebra. Gordon and Breach, 1966. 2nd ed., Birkhäuser, 2015.
[27] David Hestenes. Multivector calculus. Journal of Mathematical Analysis and Applications, 24(2): 313–325, 1968.
[28] David Hestenes. New Foundations of Classical Mechanics. Kluwer Academic Publishers, Dordrecht, 2nd edition, 1999. ISBN 9780792355144.
[29] David Hestenes. The shape of differential geometry in geometric calculus. In Leo Dorst and Joan Lasenby, editors, Guide to Geometric Algebra in Practice, pages 393–410. Springer, 2011.
[30] David Hestenes and Garret Sobczyk. Clifford Algebra to Geometric Calculus: A Unified Language for Mathematics and Physics. Fundamental Theories of Physics. Springer Dordrecht, 1984.
[31] Anil N. Hirani. Discrete Exterior Calculus. PhD thesis, California Institute of Technology, 2003.
[32] Eckhard M. S. Hitzer. Multivector differential calculus. Advances in Applied Clifford Algebras, 12(2): 135–182, 2002.
[33] Eelco Hoogendoorn. Numga: Geometric algebra in JAX and NumPy, 2025. URL https://github.com/EelcoHoogendoorn/numga. GitHub repository.
[34] Robin Kahlow. JAXGA: Geometric algebra package for JAX, 2020. URL https://github.com/RobinKa/jaxga. GitHub repository.
[35] Robin Kahlow. TFGA: Geometric algebra package for TensorFlow 2, 2020. URL https://github.com/RobinKa/tfga.
[36] Max Kochurov, Rasul Karimov, and Serge Kozlukov. Geoopt: Riemannian optimization in PyTorch. arXiv preprint arXiv:2005.02819, 2020.
[37] A. N. Lasenby, C. J. L. Doran, and S. F. Gull. A multivector derivative approach to Lagrangian field theory. Foundations of Physics, 23(10):1295–1327, 1993.
[38] Mario Lezcano-Casado. Trivializations for gradient-based optimization on manifolds. In Advances in Neural Information Processing Systems, volume 32, 2019.
[39] Alan Macdonald. A survey of geometric algebra and geometric calculus. Advances in Applied Clifford Algebras, 27:853–891, 2017.
[40] Mehran Mirramezani, Anne S. Meeussen, Katia Bertoldi, Peter Orbanz, and Ryan P. Adams. Designing mechanical meta-materials by learning equivariant flows, 2024. URL https://arxiv.org/abs/2410.02385.
[41] David Palmer, Dmitriy Smirnov, Stephanie Wang, Albert Chern, and Justin Solomon. Deepcurrents: Learning implicit representations of shapes with boundaries, 2022. URL https://arxiv.org/abs/2111.09383.
[42] Jeong Joon Park, Peter Florence, Julian Straub, Richard Newcombe, and Steven Lovegrove. Deepsdf: Learning continuous signed distance functions for shape representation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019.
[43] Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al. PyTorch: An imperative style, high-performance deep learning library. In Advances in Neural Information Processing Systems, volume 32, 2019.
[44] Jason Rader, Terry Lyons, and Patrick Kidger. Optimistix: modular optimisation in JAX and Equinox. arXiv preprint arXiv:2402.09983, 2024.
[45] Jack Richter-Powell, Yaron Lipman, and Ricky T. Q. Chen. Neural conservation laws: A divergence-free perspective, 2022. URL https://arxiv.org/abs/2210.01741.
[46] Martin Roelfs. kingdon: The willing kingdon clifford algebra library. arXiv preprint arXiv:2503.10451, 2025.
[47] David Ruhe, Johannes Brandstetter, and Patrick Forré. Clifford group equivariant neural networks. In Advances in Neural Information Processing Systems (NeurIPS), 2023.
[48] David Ruhe, Jayesh K. Gupta, Steven De Keninck, Max Welling, and Johannes Brandstetter. Geometric Clifford algebra networks. In International Conference on Machine Learning (ICML), pages 29306–29337, 2023.
[49] Amandip Sangha. Jet functors and Weil algebras in automatic differentiation: A geometric analysis. arXiv preprint arXiv:2510.14342, 2025.
[50] Joan Solà, Jeremie Deray, and Dinesh Atchuthan. A micro Lie theory for state estimation in robotics. arXiv preprint arXiv:1812.01537, 2021.
[51] Hannes Sommer, Cédric Pradalier, and Paul Furgale. Automatic differentiation on differentiable manifolds as a tool for robotics. In Robotics Research: The 16th International Symposium ISRR, volume 114 of Springer Tracts in Advanced Robotics, pages 505–520. Springer, 2016.
[52] Jonas Spinner, Víctor Bresó, Pim de Haan, Tilman Plehn, Jesse Thaler, and Johann Brehmer. Lorentz-equivariant geometric algebra transformers for high-energy physics. In Advances in Neural Information Processing Systems (NeurIPS), 2024.
[53] Lars Tingelstad and Olav Egeland. Automatic multivector differentiation and optimization. Advances in Applied Clifford Algebras, 27:707–731, 2017.
[54] Lars Tingelstad and Olav Egeland. Motor estimation using heterogeneous sets of objects in conformal geometric algebra. Advances in Applied Clifford Algebras, 27:2035–2049, 2017.
[55] Lars Tingelstad and Olav Egeland. Motor parameterization. Advances in Applied Clifford Algebras, 28:34, 2018.
[56] Maksim Zhdanov, David Ruhe, Maurice Weiler, Ana Lučić, Johannes Brandstetter, and Patrick Forré. Clifford-steerable convolutional neural networks. In International Conference on Machine Learning (ICML), pages 61203–61228, 2024.
A Proofs
Throughout this section, we let be an -dimensional real vector space with a nondegenerate symmetric bilinear form of signature , its geometric algebra, and a basis of blades induced by a basis of . Given the multivector inner product , we can compute the reciprocal basis blades by first computing the gram matrix , and then setting . Note that that is how we implement the musical isomorphisms that we use to define our metric aware vjp. As a final remark, we mention that even for an orthonormal basis in a Euclidean GA , while the Gram matrix on vectors on vectors might be the identity, the full gram matrix will not: consider, for example, the basis vector . Then, . Nondegeneracy of ensures that is invertible.
Another frequent fact that we will use throughout is that we can write a multivector as coordinates in some basis. For any multivector A, we have:
(12)
In general, this is how we can express a multivector A in coordinates relative to a basis; we will use this expansion throughout.
A.1. Basis Independence of
Proposition 5 Let and take . The operator depends only on the subspace and the pairing, not on the basis chosen for .
Proof. Suppose that we had a different basis of . By virtue of being a basis for , every must be expressible as for some matrix . The reciprocals also form a basis, and thus should satisfy for some matrix . We can then note:
(13)
Therefore, .
Next, note that for an arbitrary multivector , we have:
(15)
This relates the coordinates and , and immediately implies:
(19)
With this established, we can easily simplify the following multivector derivative expressed in the basis as one expressed in the basis:
(20)
Remark 6. The condition that the span the same subspace as can be relaxed, but convolutes the proof slightly. As an example of such an instance, consider the conformal euclidean algebra with basis , and then consider the change of basis and . It is easy to verify that , meaning that the reciprocal of is . We can thus see that any space containing components without the components will have a reciprocal space that is not contained within it.
A.2. Proof of Lemma 2
Forward-mode proof. Take . Then by definition,
(25)
so
☐
Reverse-mode proof. Letting index the output blades, so that for all . Take to be the corresponding input index set over which varies. Note that the adjoint is defined implicitly by the property for the multivector inner product :
(26)
and we are done as our metric aware computes with respect to the multivector inner product instead of the Euclidean one.
Remark 7. If we assume that varies over the basis index set , and takes inputs which vary over the basis index set , then computing the forward mode requires jvp calls and geometric products. Computing the reverse mode requires vjp calls and geometric products. This implies that for computing multivector derivatives of scalar functions is most efficient in reverse mode, while most vector derivatives are more efficient to compute with the forward mode form since they only require jvp's.
B Software API and Implementation
Our implementation is written in JAX [9] to be natively differentiable, and begins with the basic means of constructing Geometric Algebras and the operators on them. This base functionality is similar to that of other libraries such as jaxga, clifford, numga, and galgebra. However, once we get into the more calculus heavy operations, the autodiff capability of JAX makes it possible to go further than what these libraries provide.
B.1. Algebras and Multivectors
In this work, we only consider geometric algebras over real vector spaces (though in principle we could support complex vector spaces as this is natively supported in JAX). Such an algebra is specified by nonnegative integers , with denoting the number of positive basis vectors , denoting the number of negative basis vectors , and denoting the number of zero basis vectors . We write this geometric algebra as . Because many of the autodiff primitives require a nondegenerate metric, we will oftentimes assume that to satisfy this condition. Below, we give an example where we first create the spacetime algebra , and then create some multivectors and perform some basic operations on them:
from ga_core.ga import Algebra st = Algebra(1, 3, 0, ['e0', 'e1', 'e2', 'e3']) # Cl(1,3): e0^2 = +1, e_i^2 = -1 a = -st.e0 + st.e1 + 2st.e2 b = st.e2 - st.e3 ab # -2 - e02 + e03 + e12 - e13 - 2 e23 (geometric product) (a*b).grade(0) # -2 (<ab>_0, the inner product) a ^ b # -e02 + e03 + e12 - e13 - 2 e23 (outer product) (a ^ b) * st.I # 2 e01 - e02 - e03 + e12 + e13 (dual w.r.t. I = e0123) ~(a ^ b) # e02 - e03 - e12 + e13 + 2 e23 (reverse)
The Algebra class stores all the operators on as sparse tensors. Thus, the above operations are all implemented as sparse tensor contractions, and thus run efficiently on GPU and are natively differentiable.
Just as JAX provides mapping utilities to make extending a function to a batch of inputs easy, we write our MVArray as a JAX pytree so that it natively pairs with vmap:
def f(x): return x*x
xs = st.array([ 1 + st.e01, st.e0 + st.e12, st.e01 + st.e23, ]) xs.shape # (3,) f(xs[0]) # 2 + 2 e01 jax.vmap(f)(xs) # [2 + 2 e01, 2 e012, 2 e0123]
We also provide general helper functions for the constructions used in the experiments. Given Algebra(p,q,0), we can conformalize it to Algebra(p+1,q+1,0). For example, for the experiments in Section 4.4, we use conformalized , . This class provides utilities like conformal embedding for points, and ways of creating various translation and rotation rotors. (Note that translations cannot be expressed as rotors in the base algebra , only rotations can). Other geometric primitives are also easily accessible in this class: for example spheres in the conformal euclidean case and lightcones in conformal spacetime. For further exposition, see Doran and Lasenby [19], Dorst et al. [20].
For all Algebra classes, we also provide utilities for easy manipulation of rotors, general exponential and log maps (not closed form), Cayley transforms, along with the trivialization toolbox to easily map (co)tangents between tangent spaces.
B.2. The Multivector Derivative as a Function Transformation
Lemma 2 gives us a recipe to implement the multivector derivative in a few lines of code within our library. For a function which takes in a single multivector and outputs a single multivector, the general multivector derivative can be implemented as:
def mv_deriv_fwd(f, input_blade_ids=None): """partial_I f(X) = sum_{J in I} b^J * jvp(f, X, b_J)""" def df(X): alg = X.algebra idxs = input_blade_ids if input_blade_ids is not None else arange(2 ** alg.n) b_lo = alg.basis_blades[idxs] # MVAarray [b_J] b_up = alg.recip_basis_blades[idxes] # MVAarray [b^J] jvp = lambda A: jax.jvp(f, (X, ), (A,)) [1] # dF_X[A] # Note below that '*' is a broadcasted geometric product! return (b_up * jax.vmap(jvp)(b_lo)).sum() return df
def mv_deriv_rev(f, output_blade_ids=None): """partial_0 f(X) = sum_{K in O} vjp_<,>(f, X, b^K) * b_K""" def df(X): alg = X.alg idxes = input_blade_ids if input_blade_ids is not None else arange(2 ** alg.n) b_lo = alg.basis_blades[idxs] # MVAarray [b_J] b_up = alg.recip_basis_blades[idxes] # MVAarray [b^J] _, f_vjp = jax.vjp(f, X) # metric-aware vjp: vjp(f, X, C^flat)^sharp = dF_X^[C] adj = lambda C: alg.sharp(f_vjp(alg.flat(C))[0]) # Note below that '' is a broadcasted geometric product! return (jax.vmap(adj)(b_up) * b_lo).sum() return df
We provide two methods, mv_deriv_fwd and mv_deriv_rev which generalize this to functions which may have arbitrary pytrees of multivectors as inputs and outputs. Both methods are extensionally equal in the value they compute, but do so via forward and reverse mode AD, respectively. As mentioned in the text, you can choose which one to use depending on the context of the derivatives you are computing.
B.3. Vector Manifolds and their Transformations
Much of this work revolves around doing calculations on VectorManifold objects. This enables us to easily compute differential operators on the manifold, and with some mild additional assumptions, a way to also perform Monte Carlo integration on these manifolds.
Below, we give the API for this class to demonstrate the capabilities of this class, where we have simplified what is written down from the actual code for the purposes of pedagogy. We emphasize the relative simplicity of the library juxtaposed with the rich, varied set of applications enabled by this framework. The derivative functions simply call mv_deriv_fwd with different arguments, and everything else are mere compositions of the projection operator proj and these derivatives.
We stress that geometric quantities like curvature information about the manifold come directly downstream from the shape operator . The s indicate what is being differentiated (in our library we achieve this by applying a stop_grad to ). The curvature tensors are built from its grade-raising part, the curl tensor . For tangent vectors and , the Riemann curvature is a bivector-valued function of the tangent bivector , from which one can compute the Ricci tensor and the scalar curvature:
(31)
where is the commutator, is any tangent frame, and for a definite ambient metric and -1 for an indefinite one [30, Eqs. 5-1.5a, 5-1.19, 5-1.21]. The sectional curvature of the tangent plane is
(32)
where the minus sign accounts for a Euclidean 2-blade squaring to -1; for a surface, is the Gaussian curvature. With these conventions the unit sphere has and , and , , and all come out correctly signed. None of these require a chart or Christoffel symbols, and are coherent in any dimension and signature.
As an example of how we used this library for the experiments, see these examples which build on the API we provide:
(1) Divergence-free flow on any 2-manifold
v = M.derivative(lambda x: phi_theta(x) * M.I_fn(x), deriv_type='inner') # nabla_M / (phi I) M.derivative(v, deriv_type='inner') # = 0 identically
(2) Hyperbolic plane from a flat disk in Cl(2,1)
Geodesic polar coordinates on the hyperboloid H^2
in Cl(2,1): apex e_n, e_n^2 = -1
def polar_to_hyperboloid(u): r = norm(u) return cosh(r) * e_n + sinh(r) * u
def hyperboloid_to_polar(x): x_s = x.grade(1) - x_n(x) * e_n s = norm(x_s) return (arcsinh(s) / s) * x_s
H2 = disk.transform(polar_to_hyperboloid, hyperboloid_to_polar)
(3) Differentiable Euler characteristic of a learned surface
M1 = square.transform(flow_theta, flow_theta_inv) chi = M1.integrate(lambda x: M1.I_fn(x).inverse(), G=lambda x: M1.scalar_curvature(x) / (4*pi)) jax.grad(loss)(theta) # loss built from chi, differentiated end to end
class VectorManifold: def init(...): # There are various ways to construct a Vector Manifold, # but every vector manifold must provide: self.alg = ... # The ambient Algebra object self.I_fn = ... # Function M -> unit k blade of self.alg
If we can sample points on M (with a density),
# then we provide a Monte Carlo, multivector valued
# integration method
self.sample_pts = ...
self.dX_fn = ... # (scalar valued density)
Finally, we might have a bounding VectorManifold
# to compute, e.g., normal derivatives
self.bdry = ...
def factorize(self, A): """ Given some -field which is everywhere a blade, return a list of vector factors [a1, ..., ak]: """
def proj(self, F): """ The projection operator Given F : M -> Cl, returns P(F) = (F | I.inverse()) | I"""
def derivative(self, F, cov=True, deriv_type='full'): """ The manifold derivative operator Given F : M -> Cl, returns the following operators D@F, where: - D in [partial_M, nabla_M] # Intrinsic or covariant - @ in [*, ^, |] # 'full', 'outer', 'inner'"""
def laplacian(self, F, cov = True): """ Second order manifold derivatives Given F : M -> Cl, returns one of: - nabla^2 F (Hodge Laplacian, grade preserving) - partial^2 F"""
def shape_operator(self, F): """ Hestenes's shape operator Given F: M -> Cl, S(F) = partial_M P(stop_grad(F))"""
def riemann_curvature(self, a, b): """ Riemann curvature bivector R(a ^ b) = sigma * P(S_a x S_b), with which Ric(a) and scalar curvature can be defined."""
def integrate(self, F, G=None): """ Directed Monte Carlo integral Given F, G : M -> Cl, estimates int_M G dX F, dX = I |dX|"""
def transform(self, f, f_inv): """ Manifold transformation operator Given a right invertible f and a section f_inv, we can create a new VectorManifold M"""
With the directed measure and the corresponding measure on (if it exists), the fundamental theorem of multivector calculus becomes:
(33)
for fields F, G [19, 30]. Its grade components recover Stokes', Green's, and the divergence theorem in any dimension. Our toolkit provides a computational way to approximate either side of this equation. In addition to giving you the ability to solve PDEs, this theorem also gives rise to constructive ways to approximate both inverse functions via the inverse function theorem or implicit functions via the implicit function theorem.
C Experiment Details
C.1. Shared Setup
All experiments are implemented in JAX with 64-bit floats. Except for the implicit-surface networks of Appendix C.3.A, every experiment runs on CPU; wall-clock times quoted below are from an Apple M3 laptop unless stated otherwise. The implicit-surface networks were trained on a cluster with one Nvidia L40 GPU for speed (but the training also could be done on the laptop).
C.2. Explicit Manifold Learning
C.2.A. Non-Euclidean Tilings
Symmetries This experiment requires 3 inputs: a manifold (as a VectorManifold object), a symmetry group acting on that manifold, and a target shape. On , the group is the icosahedral rotation group of order 60, generated by rotations of order 5, 3 and 2 about a vertex, a face centre and an edge midpoint of the icosahedron. The initial tiling, the icosidodecahedron (12 pentagons and 20 triangles), is the orbit of one pentagonal and one triangular seed tile under this group. On the group is the (2, 3, 7) Coxeter group, generated by the reflections in the sides of a hyperbolic triangle with angles , and . Each reflection is a single vector versor in the conformal algebra (in fact in its subalgebra spanned by ) [19, 20]. The rectified tiling is the orbit of a seed tile under this group. This construction easily generalizes to any hyperbolic tiling, i.e. any with . Because this group is infinite, for the figures we enumerate it breadth-first up to hyperbolic radius , for a total of 304 tiles (208 triangles and 96 heptagons); see Fig. 11.
Model and Loss Recall that we desire a divergence free 1-field on our 2 dimensional manifold , and achieve this via for a scalar valued neural network , which guarantees is divergence free by construction. This network is a random-Fourier-feature network (64 frequencies giving 128 features, with scale 4.0 on and 2.5 on ) followed by an MLP of width 64, depth 2 and GELU activations. It depends only on position and not on time, so is an autonomous vector field whose time-1 flow is a diffeomorphism. To make the flow equivariant under the tiling's symmetry, we symmetrize the potential,
(34)
where for orientation-reversing : a reflection flips , so must be odd under reflections for to be equivariant. On , is the full rotation group. On , is a finite patch of 96 group elements (those mapping the origin into the 8 nearest tiles), so equivariance there is only approximate.
On we work on the hyperboloid in , parameterized by the geodesic polar coordinates of Appendix B.3, and display the result on the Poincaré disk by stereographic projection. To realize our tiling, we take the boundary of a single seed tile and integrate between and acting on these points using a fixed step size RK4 integrator (15 steps, ). On the points are reprojected onto the sphere after every step; on we integrate in the parameter , pushing forward by the differential of the inverse parameterization (a single jvp), so no reprojection is needed.
Let be the points on the boundary of the seed tile (7 per edge, so on and on ), and let denote the RK4 flow map. Each is matched to the target point at the same polar angle about the tile centre. The targets are given by the radius profiles on (a chiral, -symmetric pinwheel) and on (a -symmetric gear), each mapped onto the manifold by the exponential map at the tile centre, with the mean radius of the seed pentagon on and the circumradius of the seed heptagon on . We minimize
(35)
where is the Euclidean norm in on and in Poincaré-disk coordinates on .
Training & Metrics We optimize the parameters of the neural network with the Adam optimizer with a learning rate of and gradient clipping at global norm 2, for 80 full-batch steps (seed 42). We achieve final losses of on the sphere and on the disk. We show how the tiling looks during the integration, along with the training loss curves, in Fig. 12. Training for each took < 1 hour on the laptop.
Initial icosidodecahedron tiling on (orbits of icos. rotation group I, 12 pentagons + 20 triangles)

Initial rectified tiling on (208 3-gons at face centres + 96 7-gons at vertices)

Figure 11: Initial tilings. Left: the icosidodecahedron on . Right: the rectified tiling of the Poincaré disk up to hyperbolic radius 3.5.

Figure 12: The tilings under the learned divergence-free flow at . Top: pentagons (blue) deformed into a chiral pinwheel on , under the icosahedral rotation group. Bottom: heptagons (blue) deformed into a gear on , under the Coxeter group. In both, the triangles (orange) flow under the same trained velocity field, and the dashed curve at is the target. The rightmost panels show the training loss (log scale) against the training step.
C.2.B. Backpropagation Through the Euler Characteristic
Flow Parameterization We parameterize a velocity field on as a Concat-Squash MLP [23] with three layers and tanh activations, where each layer computes , so that time enters through gating and bias. Integrating from to with fixed-step RK4 (4 steps) gives the flow map , a diffeomorphism of [13]. As a corollary, any manifold flowing under will be diffeomorphically mapped to a new manifold ; our AD toolbox immediately gives us access to all the differential operators on . Additionally, if is compact, then will also be and so we can integrate on this manifold. This is what allows us to estimate quantities such as the Euler characteristic of the manifold. For the particular experiment in the main text, we took to be the square , parameterized by .
Loss For the experiment in the paper, we compute the scalar curvature (Appendix B.3) at each sampled point of the surface, using the pushed-forward coordinate vectors , as the tangent frame:
(36)
On a 2-manifold the scalar curvature is simply a rescaling of the Gaussian curvature, ; Gaussian curvature, however, is only defined for 2-manifolds, whereas is defined in any dimension and signature and our library computes it with no dimension-specific code. We estimate the Euler characteristic from uniform samples via Eq. 8:
(37)
So, the loss function we minimize, matching the unit sphere's scalar curvature , is:
(38)
As stated in the text, we optimize this function with and without the Gauss–Bonnet term ( ), and see the difference in the learned manifold . For these experiments, we train with B = 96 fresh samples per step and evaluate with B = 4096.
It may seem paradoxical that changes during training at all, since should be invariant with respect to any diffeomorphism. The resolution is that Gauss–Bonnet for a surface with boundary reads
(39)
with the geodesic curvature of the boundary. Since the square has , our estimator satisfies . Driving therefore forces , i.e. the boundary must shrink to a small loop that pinches the surface closed, which is exactly the behavior in Fig. 3.
Training & Metrics We train the parameters via the Adam optimizer with a learning rate of and gradient clipping at global norm 5 (seed 0), for 4000 iterations with the Gauss–Bonnet term and 150 iterations without it. We show loss curves, along with the intermediate Euler characteristic estimates, in Figs. 13 and 14. The final Euler characteristic estimate (on evaluation samples) comes out to , with surface area 12.29 (98% of ) and area-weighted mean Gaussian curvature 1.006, indicating that the learned is pretty close to a fully closed unit sphere, whereas without the Gauss–Bonnet term the square collapses to a small spherical cap with , area 0.34 and mean curvature 0.98. On an Apple M3 laptop CPU, training takes 444s with the Gauss–Bonnet term (4000 iterations) and 78s without it (150 iterations). We also show more intermediate steps of the final learned flows being applied in the top rows of the same figures.





Figure 13: The square under the curvature loss alone ( ). Top: the learned flow at , which collapses the square into a small spherical cap. Bottom: training loss (left) and the Monte Carlo Euler characteristic estimate (right) over training; without the topological term, stays far from the sphere's value of 2.

Figure 14: The square under the curvature loss with the Gauss–Bonnet term ( ). Top: the learned flow at , which closes the square into a sphere. Bottom: training loss (left) and the Monte Carlo Euler characteristic estimate (right) over training, which approaches 2.
C.3. Implicit Manifold Learning
C.3.A. Minimal Surfaces
Surface Representation As stated in the text, the idea of this experiment is to parameterize an -dimensional surface with boundary via the -form where is the Biot-Savart field of Eq. 9. Here is the Green's function of the Laplacian in , with the area of the unit -sphere, so . Computationally, we evaluate the integral on a fixed closed polyline discretization of , summing over segment midpoints and segment vectors and dualizing. We use 120 segments in codimension one; in codimension two we use 480 segments for the torus knot and 320 for the polynomial graph, and regularize the kernel by replacing with , . is a random-Fourier-feature network (Gaussian frequencies, sin and cos features) followed by a softplus MLP producing a -form: in codimension one, a scalar potential with 1024 frequencies at scale 2.0 and an MLP of width 256 and depth 4; in codimension two, a 1-form with 96 frequencies at scale 0.5 and an MLP of width 128 and depth 3 whose last layer is initialized to zero, so that training starts from . Again using , this parameterization ensures that , which is equivalent to the condition that the represented surface has boundary .
The Mass Norm As stated in the text, the objective that we minimize is the mass norm of . While we gave an informal definition for the mass norm, the formal definition is:
(40)
There is no closed form for this infimum for , so this is why we focus our experiments on the and . For the mass norm is the Euclidean norm. For the case, there is a closed form [22] that is easily differentiable almost everywhere: splitting into its self-dual and anti-self-dual parts ,
(41)
Minimizing this loss ends up turning into an approximately simple bivector (one that is a blade). In practice we smooth the pointwise norm as , and minimize a Monte Carlo estimate of its integral over a box ,
(42)
with . For the first of training is uniform on ; afterwards it is a mixture of uniform samples and samples from a lattice with cell probabilities proportional to , refreshed every 250 steps. The box is in codimension one and a cube of half-width in codimension two. In codimension one is fixed; in codimension two is annealed log-linearly from to over training.
Extraction The learned surface is read off from the alone; the extractor never sees the closed-form surface. In codimension one, with the learned scalar potential, and the surface is the level set of at its mean value on , computed by marching cubes on a grid. We keep only the faces where the Biot–Savart field and point the same way and the total field is large, i.e. where the current actually concentrates, then clean the mesh (largest component, hole filling), smooth it, and snap its rim onto . In codimension two the surface is the ridge of . We seed points on a grid around (keeping the top by mass) and on itself, and move each by a few Newton steps that maximize within the normal plane of (a simple determines its own tangent and normal planes). We keep points at a local maximum inside a neighbourhood of the convex hull of , densify the result by advancing along the tangent planes, and discard points that are not a maximum relative to a ring of radius in the normal plane. For rendering only, the points are meshed by local Delaunay triangulation in their tangent planes.
Training & Metrics We use Adam with gradient clipping at global norm 1 and a staircase exponential learning-rate decay. In codimension one we train for steps with learning rate , decayed by 0.6 every steps, which takes about 40 minutes per boundary on one GPU. In codimension two we train for 27,000 steps with learning rate , decayed by 0.7 every 2,700 steps (seed 0). The codimension-two ground truths are the graph of over (, ; exact area ) and the branched disk , (, ; exact area ), whose boundary is the torus knot. Both are holomorphic curves and hence mass-minimizing [22]. Table 1 compares the extracted point clouds against dense samples of the exact surfaces.
Table 1: Extracted codimension-two surfaces against the exact minimal surfaces. Chamfer is the symmetric mean nearest-neighbour distance; Hausdorff distances are one-sided (extraction to reference); coverage is the fraction of the reference within 0.03 of the extraction, and spurious the fraction of extracted points farther than 0.03 from the reference. Area is that of the render mesh.
| boundary | Chamfer | Hausdorff (95%) | Hausdorff (max) | coverage | spurious | area (exact) |
|---|---|---|---|---|---|---|
| torus knot | 0.0099 | 0.014 | 0.050 | 94.8% | 0.13% | 5.53 (5.44) |
| polynomial graph | 0.0150 | 0.028 | 0.046 | 99.96% | 1.51% | 5.12 (5.21) |
| graph | 0.0123 | 0.023 | 0.041 | 100.0% | 0.42% | 4.69 (4.58) |
| annulus | 0.0083 | 0.016 | 0.034 | 100.0% | 0.08% | 3.24 (3.08) |
| two disks | 0.0126 | 0.021 | 0.048 | 97.4% | 1.04% | 5.80 (5.75) |
In addition to the two surfaces shown in the main text, we tested three further boundaries, with results in Table 1 and Fig. 16: the holomorphic graph over (exact area 4.584); two circles , on the curve ( , , ), which with opposite orientations bound the holomorphic annulus (area 3.079) and with equal orientations bound the pair of anti-holomorphic disks (area 5.749). In every case the extraction matches the exact surface closely. Fig. 15 shows the two surfaces of the main text at more projection angles.

branched disk bounding the torus knot

graph
Figure 15: The two codimension-two surfaces of Figs. 5 and 6 at four projection angles . Each block shows the exact minimal surface (top row) and the surface extracted from the learned field (bottom row).

graph
annulus zw = c
two disks
Figure 16: The three further codimension-two boundaries of Table 1 at four projection angles . Each block shows the exact minimal surface (top row) and the surface extracted from the learned field (bottom row), rendered as in Fig. 15.
C.4. Inverse Design in Spacetime
Forward Simulator We work in the spacetime algebra with basis with , . We parameterize the particle's spatial velocity in lab time via an MLP (width 64, depth 3, GELU activations) of the Fourier features with 8 frequencies evenly spaced in , and constrain the raw output to , which enforces . The reason for this is that we want the resulting worldline to be timelike (slower than speed of light), which any particle with mass should obey. The spatial position is the trapezoidal integral of on 341 knots over , with cubic Hermite interpolation between knots so that exactly, and the particle's 4-velocity is proportional to . Then, suppose we observe something at spacetime location . We desire to find the retarded time , the time at which the particle emitted the signal that the observer at receives, i.e. the root of on the past light cone of . This boils down to a 1 dimensional root finding problem, which we solve with a differentiable bisection search on to a tolerance of using Optimistix [44]. The root is differentiated with respect to the trajectory via the implicit function theorem [6, 24]. This allows us to compute the Liénard–Wiechert potential
(43)
with ; the normalization of cancels between numerator and denominator. From this, the Faraday bivector is the single call . Using the decomposition with pseudoscalar , where and , we get a recipe to read off the and fields in the frame, which is how we generate the streamline plots in Fig. 8. The final loss is a relative mean squared error between the predicted and observed over the observation events,
(44)
where is the Euclidean norm on the bivector coefficients. We normalize per event because spans more than four orders of magnitude across the observation events (a factor of about 200 between the 5th and 95th percentiles).
Training & Metrics The target trajectory worldline is the helix in lab time , and we reconstruct it over the window . To provide data for the model, we evaluate the exact field on a spatial grid of points covering at 21 evenly spaced times in , excluding events within a radius 1 of the true worldline where the potential is singular; this leaves 1944 noise-free training events. The 20 midpoint time slices (1848 events) are held out for model selection. The observation times extend past the reconstruction window because an observation at time and distance from the particle constrains the worldline only at the retarded time . We optimize the trajectory with Adam for 7000 full-batch steps, with gradient clipping at global norm 1 and a learning rate warmed up over 100 steps to and then cosine-decayed to (seed 1), keeping the checkpoint with the lowest held-out loss.
The recovered worldline has a mean position error of and a maximum of over , i.e. 0.2% and 0.3% of the orbit radius. Training takes 6 minutes on an Apple M3 laptop CPU. As a check of the forward model, the vacuum Maxwell residual learned worldline (proj.)
particle at t
velocity v(t)
target worldline (proj.)

plane
plane
plane
(a) After 50 training steps.
learned worldline (proj.)
particle at t
velocity v(t)
target worldline (proj.)

plane
plane
plane
(b) After 70 training steps.
learned worldline (proj.)
particle at t
velocity v(t)
target worldline (proj.)

plane
plane
plane
(c) Final learned worldline, which reproduces the field of the target (Fig. 8).
Figure 17: Field of the learned worldline during training, at : with in-plane streamlines (top) and the out-of-plane component of with in-plane streamlines (bottom), on the , and planes through the target particle. The learned worldline is drawn solid and the target dashed.
at 16 random events away from the worldline has maximum and mean , against field magnitudes of order one, consistent with the root-finder tolerance.
Causal coverage matters: training the same recipe on observation slices confined to the reconstruction window [1, 4] (12 slices) recovers the early worldline (mean error on [1, 2]) but not the tail, which no observation can see: on [3, 4] the mean error is (maximum 0.25), against (maximum ) with the extended observation window.
Fig. 17 shows how the field of the learned worldline evolves during training, at t = 2 and on the same three planes through the target particle as Fig. 8, with shared colour scales. After 50 steps (mean position error 0.48) the learned particle is nearly at rest, so E is almost radial and B is weak. After 70 steps (error 0.22) the worldline has picked up the helical motion and the field begins to wind into a spiral. The final model reproduces the target field, including the sharp spiral wavefront emitted by the orbiting charge.
C.5. Optimization on Rotor Groups
Multiplicative Descent Let be a rotor group whose Lie algebra is spanned by bivectors , with reciprocal basis in . The left-trivialized differential of at is the covector on . Writing and using that the scalar part is cyclic, , so its coordinates in the basis are
(45)
This is Eq. 10 of the main text, where the restriction to is made explicit by is a general even multivector, and only its pairing with the generators enters the update. For a scalar loss, is a single vjp (Lemma 2). In practice we feed the coordinates to Adam, whose step is exponentiated, . This ensures every iterate is a valid rotor. The exponential is the algebra's general multivector exponential; in we evaluate it as the matrix exponential of the left-multiplication operator , which JAX differentiates exactly. A subgroup of spanned by a subset of the generators is selected by a 0/1 mask on the coordinates , so several subgroups of the same algebra can be optimized in a single vectorized call.
Choosing a Positive Definite Metric As discussed in the main text, must come from a positive-definite inner product on for to be a descent direction, since then . The multivector inner product fails this in every case we consider. The metric on it is negative definite, since Euclidean bivector blades square to , so the “natural” step would be an ascent step. On it is indefinite (boosts square to , rotations to ), and on the translation subalgebra of CGA(3) it vanishes identically, since the generators are null and mutually orthogonal. Nor is there a canonical alternative: non-compact groups admit no bi-invariant metric, so some non-invariant choice is unavoidable. We declare the chosen generators orthonormal,
(46)
which is the identity on coordinates. This coincides with the choice a coordinate-array AD system makes implicitly, but here it is an explicit, replaceable ingredient.
Chart-based baselines We compare against two updates that keep chart coordinates , , as the optimizer state. The static chart (static trivialization, the recipe of Lezcano-Casado [38]) runs Adam on directly. Its gradient is not : with , and , the chart gradient is , which agrees with only at . The corrected chart undoes this factor, applying to the gradient and to the Adam step; it agrees with the multiplicative update to first order and differs only in the retraction. We evaluate by a block matrix exponential. Both chart updates break down where is singular.
Subgroups of the conformal group The ten bivector generators of CGA(3) = Cl(4,1), written in the null basis , , split into three rotations , three translations , three transversions , and the dilation . The four groups of Fig. 9 are coordinate subspaces of this basis: translations (dimension 3), rigid motions (rotations and translations, dimension 6), similarities Sim(3) (rigid motions and dilation, dimension 7), and the full conformal group (dimension 10). The source cloud has 29 points along three perpendicular arms of lengths 1.5, 1.0 and 0.5, so that chirality and per-axis scale are visible. A single teacher motor is drawn from the full conformal algebra (seed 13; coefficient scales 0.5 for translations, 0.3 for rotations, 0.25 for the dilation and 0.12 for transversions), and the target is , where . The loss is the sum of squared residuals over the coordinates. All four groups start from the same masked initialization and are optimized in one vectorized run of 500 multiplicative Adam steps at learning rate 0.1, which takes about 4s on an Apple M3 laptop CPU. As references we run BFGS on each group's active coordinates and, for the three restricted groups, the closed-form optima (centroid alignment, Procrustes, and Umeyama).
Table 2 lists the final losses. The three restricted groups reach their closed-form optima, and the conformal group recovers the teacher: noise-free, the final motor matches to a relative error of , while the static chart stalls at a loss of and recovers the teacher coefficients only to . With noise , all methods reach the same losses, and the conformal loss sits near the expected floor of . The difference between the updates is starker away from the identity: started from a rotation of 4 rad, the descent path crosses , a conjugate point of exp at which every chart is singular. The multiplicative update passes through and converges (to , the same transformation) with loss , whereas the static chart stalls at 0.41 and the corrected chart diverges (Fig. 18). Finally, the renormalization trick , which works in (see below), is not a retraction in : there has a grade-4 part, the iterate leaves the group , and the loss stalls near .
Lorentz frame recovery We work in with timelike, as in Appendix C.4, and spanned by the three boosts and three rotations . A static unit charge at the origin produces the Coulomb field at events on the shell . The unknown ship frame is the rotor combining a boost of generator rapidity 0.8 along with a rotation of 0.7 rad about , and the ship measures , with Gaussian noise at 5% of the RMS signal ( per bivector coefficient). We minimize , whose noise floor is . We compare the multiplicative update against the static and corrected charts, BFGS on the chart coordinates, and three parameterizations one would write without a Lorentz-group library: (i) the eight even-grade coefficients of , renormalized after every step by (in , with , so this is a complex
Table 2: Final losses for the four subgroups of the conformal group of Fig. 9, fitted to one shared conformal target, noise-free (top) and with noise (bottom).
| group | dim | multiplicative (ours) | static chart | BFGS | closed form |
|---|---|---|---|---|---|
| 3 | |||||
| 6 | |||||
| 7 | |||||
| conformal | 10 | ||||
| 6 | |||||
| 7 | |||||
| conformal | 10 |

Figure 18: Training loss on the full conformal group under the multiplicative update (ours), the static chart, and the corrected chart. Left: from the default initialization near the identity. Right: from an initialization at a rotation of 4 rad, where the descent path crosses the conjugate point of exp.
inverse square root that must be re-derived for each algebra); (ii) a matrix with the penalty , with the Minkowski metric and ; and (iii) the same matrix projected onto its polar factor after every step, the standard retraction of compact-manifold libraries, which projects onto . Every method runs 400 Adam steps from the same initialization, with the learning rate chosen from as the smallest one within of the best final loss. We read the observer's rapidity off the recovered rotor from the image of the time axis; the ground truth is 0.7957 (speed 0.662c), which differs from by the Baker–Campbell–Hausdorff cross terms between the non-parallel boost and rotation. The whole comparison, including the learning-rate sweeps, takes 20 s on an Apple M3 laptop CPU.
Table 3 reports the results. Every on-group method reaches the noise floor, and on this task the three trivialized updates agree to all printed digits. The penalized matrix also reaches the floor but leaves the group (constraint violation ). The polar projection stalls at with violation 1.7, because contains no boosts.
Table 3: Lorentz frame recovery from 48 noisy Faraday bivectors in (400 Adam steps; noise floor ). Violation is for the vector representation of the recovered transformation; error is ; rapidity error is against the ground truth 0.7957.
| method | loss/ | violation | error | rapidity error |
|---|---|---|---|---|
| multiplicative (ours) | 1.03 | |||
| static chart | 1.03 | |||
| corrected chart | 1.03 | |||
| chart, BFGS (40 steps) | 1.03 | - | ||
| even multivector + renormalize | 1.06 | |||
| matrix + penalty () | 1.03 | |||
| matrix + polar projection | 47.8 | 1.7 | 0.64 | 0.23 |