🤖 AI Summary
To address the challenge of integrating geometric algebra (GA) into modern scientific computing and deep learning workflows, this paper introduces the first input-type-agnostic, open-source Python GA library. The library unifies support for heterogeneous backends—including PyTorch tensors, NumPy arrays, and SymPy symbolic expressions—enabling seamless GA computation through a single, consistent interface. Methodologically, it pioneers symbolic operator optimization coupled with sparsity-aware just-in-time (JIT) compilation, leveraging Numba and PyTorch JIT to achieve both generality and high performance. It natively integrates with Jupyter notebooks and ganja’s WebGL-based geometric visualization. Experimental evaluation demonstrates competitive runtime performance relative to specialized GA libraries, while fully supporting automatic differentiation and symbolic derivation. The library has been validated in physics-based modeling and neural network architectures incorporating geometric priors, confirming its practical efficacy and extensibility.
📝 Abstract
Kingdon is an open-source Python package designed to seamlessly integrate Geometric Algebra (GA) into existing workflows. Unlike previous GA libraries, kingdon is input-type-agnostic, and hence supports GA's over e.g. PyTorch tensors, NumPy arrays, or SymPy symbolic expressions, to name but a few. Despite this refusal to specialize, it delivers high performance by symbolically optimizing operators and leveraging input sparsity for Just-In-Time compiled expressions. Additionally, its visualization capabilities in Jupyter notebooks using ganja align with the rapid prototyping workflow common to scientific research.