Fast Sandwich Products in Clifford Algebra
Travis Pence ⋅ Daisuke Yamada ⋅ Jiaqi Mo ⋅ Chanyoung Moon ⋅ Karthikeyan Sankaralingam ⋅ Vikas Singh
Abstract
Clifford algebra is becoming increasingly common in machine learning, e.g., in neural operators, equivariant transformers, and structured linear layers. The main appeal is that scalars, vectors, oriented planes, volumes, and higher-grade quantities live together in a single algebraic space. In this setting, rotations are represented by \emph{rotors}, which are parametrized by bivectors, with only $\binom{n}{2}$ degrees of freedom. Most Clifford algebra-based models work only with small algebras, in part because of a bottleneck in the sandwich product, $x \mapsto r x r^\dagger$, a basic operation for applying rotations to multivectors. It is evaluated through geometric products or via a full action matrix, both of which scale poorly with the $2^n$-dimensional Clifford basis. We ask whether the $\binom{n}{2}$-parameter description can be carried all the way through application, and show that the answer is yes. The sandwich action decomposes grade-wise into exterior powers of the induced vector rotation. We factor this vector rotation into Givens rotations and apply their lifted actions as sparse updates on pairs of blades. The resulting algorithm never needs to form the rotor coefficients or the $2^n \times 2^n$ action matrix. Empirically, our algorithm achieves up to $64 \times$ wall-clock and $35\times$ memory improvements over existing rotor-sandwich implementations, enabling rotor-based layers at scales previously out of reach.
Chat is not available.
Successful Page Load