SLERP Direction Arithmetic
- SLERP direction arithmetic is a framework that defines addition, subtraction, and scalar multiplication for unit sphere directions using SLERP, exponential, and logarithm maps.
- It underpins efficient geometric integrators like SCN and SBE by providing projection-free, structure-preserving updates in manifold-constrained ODE solvers.
- The method maintains unit length and preserves intrinsic geometry, ensuring robust, numerically stable computations for applications in numerical analysis and low-precision machine learning.
SLERP Direction Arithmetic refers to the suite of geometric operations—addition, subtraction, and scalar multiplication of directions—on the unit sphere , defined via the spherical linear interpolation (SLERP) and the sphere’s exponential and logarithm maps. This framework allows for a complete, affine-analogous arithmetic of directions that respects the sphere’s intrinsic geometry, preserves unit length, and admits efficient algorithms, including for low-precision computation. SLERP direction arithmetic underpins state-of-the-art geometric integrators for differential equations on spheres and provides a robust approach to direction-preserving numerical linear algebra and quantization.
1. Mathematical Formulation of SLERP, Exponential, and Logarithm Maps
The explicit SLERP formula for two unit vectors with geodesic distance and interpolation parameter is:
as detailed in (Leung, 22 Mar 2025). This interpolates along the unique shortest geodesic joining and .
The geometric foundation is given by the Riemannian exponential and logarithm maps. For , (the tangent space at ), the exponential map is:
0
which follows the geodesic flow for time 1. The inverse logarithm map, for 2, is:
3
The SLERP can be equivalently written as 4 (Leung et al., 2024).
2. Spherical Direction Arithmetic: Formal Operations
SLERP direction arithmetic extends vector-space operations to the sphere using exp–log–SLERP composition:
- Addition (editor's term): Given 5 and non-negative weights 6, define their weighted geodesic mean as
7
For 8, 9 (Leung et al., 2024).
- Subtraction: The "difference" or relative direction from 0 to 1 is 2.
- Scalar multiplication: For unit 3 and 4,
5
so for 6, 7.
These three operations encompass all affine-like direction combinations, remaining exactly on 8. Iterated SLERP (via a tree of binary interpolants or weighted Riemannian Fréchet mean) enables higher-order and symmetric combinations (Leung et al., 2024).
3. Algorithmic Realization and Numerical Considerations
SLERP and exponential/logarithm-based “direction arithmetic” are central to geometric integrators for ODEs on spheres, such as the spherical backward Euler (SBE), projected backward Euler (PBE), and spherical Crank-Nicolson (SCN) methods (Leung, 22 Mar 2025).
Key algorithmic details:
- Implicit integrator steps: For SCN, at each step solve for 9 such that 0 (with 1 the geodesic midpoint) and 2, using Newton iterations in 3 with Jacobians from Exp and SLERP derivatives.
- Projection-free updates: Every Exp or SLERP output is automatically unit-normed; no extra normalization required.
- Computational efficiency: Once 4 is known, SLERP requires two sine evaluations and two linear vector combinations, i.e., 5 per call.
- Robustness: For small 6, Taylor expansion of 7 avoids numerical instability; near-antipodal 8 require careful branching.
These properties facilitate accurate and stable time integration for manifold-constrained dynamics, outperforming classical projection-based methods in stability and symmetry (Leung, 22 Mar 2025).
4. Low-Precision SLERP Arithmetic and Directional Coverage
In low-precision contexts, such as block-quantized machine learning, SLERP direction arithmetic is adapted using product code quantization. For an alphabet 9 of size 0 and block size 1, all available directions are:
2
as in Definition 2.2 of (Zadeh et al., 8 May 2026). The worst-case coverage error is
3
directly quantifying angular error in low-precision SLERP.
A practical recipe for low-precision SLERP (Zadeh et al., 8 May 2026):
- Block quantize endpoints: Quantize 4 to alphabet 5 (coordinatewise), renormalize.
- Estimate interpolation angle: Compute 6 and angle 7.
- Perform SLERP: Compute 8 in low precision:
9
and form 0, optionally re-normalized.
- Error control: Each endpoint direction is within 1 of the true, and the interpolation angle adds at most 2 error; total SLERP error is 3.
Experimental results demonstrate that, for 4 and 5 bits (e.g., with NVIDIA’s E2M1 format), 6, ensuring cumulative error under 7. Increased bit-width or reduced block size further improves accuracy.
5. Directional Coverage Optimality and Format Comparison
Optimal directional quantization is limited by the covering radius, with strict gaps between product-code and (unconstrained) spherical codes. For alphabet size 8, no product code can match the 9-point spherical code’s minimal covering radius; for large 0,
1
Within product codes, common number formats (e.g., two’s-complement, fixed-point, IEEE floating-point) are provably suboptimal in covering performance (Zadeh et al., 8 May 2026). For a 2-bit floating-point alphabet, Theorem 5.5 gives:
3
compared to the optimal sign-symmetric alphabet:
4
Empirically, numerically optimized 4-bit alphabets achieve lowest 5; notably, NVIDIA’s E2M1 nearly attains the optimum at practical block sizes, with worst-case angular error close to the theoretical bound (e.g., 6 vs 7 at 8).
6. Applications and Geometric Integrators
SLERP direction arithmetic is integral to manifold-constrained ODE solvers and low-precision numerical algorithms:
- Spherical integrators: The spherical Crank-Nicolson (SCN) and backward Euler (SBE) methods, as in (Leung, 22 Mar 2025), leverage SLERP and Exp for projection-free, structure-preserving updates. SCN exhibits 9 global error and preserves Hamiltonians to machine precision on 0, even in the stiff regime, while SBE is less stable and drifts.
- Lie group methods: Direction arithmetic generalizes to arbitrary geodesically complete Riemannian manifolds, but the SLERP and exp–log simplifications are unique to constant-curvature spaces like spheres (Leung et al., 2024).
- Machine learning: Direction-preserving quantization formats directly improve gradient, activation, and weight calculations in low-precision deep learning, controlling maximal error via the analytically characterized 1.
7. Composability, Generalizations, and Higher-Order Combinations
The direction arithmetic suite is composable and supports higher-order operations:
- Iterated addition: For three or more directions, repeated binary SLERP, parallel transport, or Riemannian Fréchet mean computations recover weighted means on the sphere.
- Parallel transport identities: As shown in (Leung et al., 2024), the identities
2
(with 3 the parallel transport) enable building complex direction operations.
- Extensibility: These principles provide a direction arithmetic applicable broadly across Riemannian geometry, with explicit, efficient formulas for spheres and natural generalization to product and block architectures for quantized implementations.
SLERP direction arithmetic thus furnishes an exact, efficient, and numerically stable toolkit for direction operations on spheres, foundational to modern geometric numerical analysis, machine learning quantization strategies, and projection-free optimization frameworks (Leung, 22 Mar 2025, Leung et al., 2024, Zadeh et al., 8 May 2026).