TL;DR
Clifford algebra lets neural networks reason about points, vectors, planes, and volumes all in one unified mathematical space—except rotating those objects usually requires exponential compute or memory, trapping us in tiny dimensions. This paper introduces a clever mathematical bypass that applies these high-dimensional rotations directly from their compact parameters without ever building the massive intermediate matrices. The result is up to a 67× speedup and 229× memory reduction, finally letting geometric algebra scale to 30-billion-parameter LLMs.
What Problem Does This Paper Address?
In standard linear algebra, if you want to rotate a vector, you multiply it by a rotation matrix. Simple enough. But in physical simulations, robotics, and modern equivariant neural networks, we often care about higher-order geometric objects too: oriented planes (bivectors), volumes (trivectors), and beyond.
Clifford algebra unifies scalars, vectors, planes, and volumes into single objects called multivectors. In an $n$-dimensional base space, a multivector has $2^n$ components (called blades). To rotate a multivector coherently across all its geometric grades, you use an object called a rotor ($r$) and apply the rotor sandwich product: $x \mapsto rxr^\dagger$.
Here is the catch: a rotation in $n$ dimensions is fundamentally simple—it is completely specified by a bivector with just $\binom{n}{2}$ parameters (matching the degrees of freedom of a standard rotation). Yet, actually applying $rxr^\dagger$ has historically forced a painful choice:
- The Geometric Product Route: Multiply everything out directly. Because every $2^n$ blade interacts with every other $2^n$ blade, this costs $O(4^n)$ operations.
- The Matrix Route: Precompute the linear $2^n \times 2^n$ action matrix. Applying it is faster, eating fewer FLOPs, but constructing and storing this exponential beast blows up GPU memory.
Because of this bottleneck, Clifford-based machine learning has mostly been stuck in tiny playgrounds ($n \le 4$). The authors ask: Can we apply a rotor directly using its $\binom{n}{2}$ parameters, skipping the $2^n$-scale intermediate objects entirely?
Methods
The authors introduce the Wedge-Lifted Givens (WLG) algorithm. Instead of doing algebra inside the $2^n$-dimensional Clifford space, they step down into standard $n$-dimensional vector space, factor the rotation there, and lift only the tiny factors back up.
Here is how the pipeline works:
- Drop to $n$ dimensions: A bivector maps directly to an $n \times n$ skew-symmetric matrix $B$. Taking its matrix exponential gives a standard rotation matrix $S = \exp(2B) \in \mathrm{SO}(n)$. Because $n$ is small (e.g., $n=12$ vs. $2^{12}=4096$), this is dirt cheap.
- Factor into 2D planar rotations: Using classical Givens factorization, $S$ is broken down into a sequence of $\binom{n}{2}$ simple 2D planar rotations, each touching only two coordinates $(p, q)$.
- Lift the factors via exterior powers: Mathematically, the sandwich product on grade-$k$ blades is equivalent to the $k$-th exterior power ($\bigwedge^k S$) of the vector rotation. Because exterior powers distribute over multiplication, we can apply the lifted 2D Givens rotations sequentially. Crucially, a 2D planar rotation lifted to grade $k$ is ultra-sparse: it leaves most blades untouched and simply mixes disjoint pairs of "partner" blades!
- Hardware-aware memory layout: On a GPU, updating scattered blade pairs in shared memory causes severe "bank conflicts" (threads fighting over the same 32 memory slots). The authors design a custom binary linear permutation of blade indices and use König’s edge-coloring theorem on bipartite graphs to guarantee that every 32-thread GPU warp reads and writes completely conflict-free.
Datasets
- Synthetic Benchmarks: Random multivector batches across dimensions $n \in \{7, \dots, 13\}$ are used to measure raw speed and memory against existing libraries.
- C4 (Colossal Clean Crawled Corpus): Used to train (via layer-wise hidden-state MSE distillation) and evaluate (via log-perplexity) structured rotor replacements of linear layers inside Mixture-of-Experts (MoE) LLMs (
ERNIE-4.5-21B-A3BandQwen3-30B-A3B). No new datasets are introduced.
Key Insights and Ideas
- Don't materialize the algebra: Both existing paradigms fail because they pass a $\binom{n}{2}$-parameter transformation through an exponentially large $2^n$ bottleneck. Factoring before lifting keeps the working set tiny and drops the total complexity to $O(D \log^2 D)$ FLOPs (where $D=2^n$), which is optimal up to log factors since you at least have to read the input of size $D$.
- Static routing, dynamic angles: Which blades partner up—and with what $\pm 1$ algebraic signs—depends only on the dimension $n$ and rotation plane $(p,q)$, never on the learned weights or input data. The index and sign maps can be precomputed once and reused across all batches and training steps.
- Graph theory saves GPU kernels: Asymptotic FLOP reductions mean nothing if GPU memory stalls. Modeling shared-memory bank access as a regular bipartite multigraph and edge-coloring it into conflict-free matchings is what translates theoretical elegance into real wall-clock speed.
Key Results
Benchmarked against three recent rotor-sandwich implementations—CFL (geometric product), CARE (einsum/outer-product hybrid), and CLL (matrix multiplication):
- Massive Speedups:
CFLandCAREtime out (>1 second) past $n=9$. Against the strongest baseline (CLL) at $n=12$ and batch size 8192, WLG is 13.7× faster in inference (1.21 ms vs. 16.5 ms) and 66.5× faster in training (4.69 ms vs. 312 ms). - Tiny Memory Footprint: At $n=12$ (batch size 1), WLG uses 0.33 MB of peak GPU memory compared to
CLL’s 75.7 MB (a 229× reduction) andCARE’s 383 MB (1158× reduction). - Scaling to 30B MoEs: Prior rotor-based linear layer compression (
CLL) maxed out at replacing 9 matrices in 1B–3B dense models. Using WLG, the authors replace 9,216 linear projections (50% of all MoE layers) inQwen3-30B-A3B—1,024× more rotors—maintaining C4 log-perplexity at 2.834 vs. the 2.630 baseline (and 2.661 vs. 2.336 onERNIE-4.5-21B-A3B).
Limitations and Future Work
- Specialized to Rotations: WLG accelerates the rotor sandwich $rxr^\dagger$, not the general geometric product $ab$ between two arbitrary multivectors, which remains an expensive open bottleneck.
- Hardware Coupling: Achieving these speeds required writing a custom low-level CUDA kernel tailored to NVIDIA's 32-thread warp architecture. Porting to TPUs or non-NVIDIA hardware would require re-engineering the memory layout rank conditions.
- Euclidean Only (For Now): The math currently assumes Euclidean Clifford algebra $\mathrm{Cl}(n)$. Extending it to mixed-signature spaces like spacetime $\mathrm{Cl}(p, q)$—crucial for physics and relativistic PDEs—will require incorporating hyperbolic rotations and handling disconnected rotation groups.
Summary updated