Papers
Topics
Authors
Recent
Search
2000 character limit reached

SLERP: Spherical Linear Interpolation

Updated 25 February 2026
  • SLERP is a method for interpolating points on a unit sphere along great circles, ensuring constant angular velocity and preservation of unit norm.
  • It is applied in areas such as deep learning model merging, latent space interpolation in generative models, and molecular simulation to achieve smooth, realistic transitions.
  • Numerical implementations of SLERP emphasize stability by switching to linear interpolation for near-zero angles and careful handling of antipodal cases.

Spherical Linear intERPolation (SLERP) provides a geometric framework for interpolating between points on a unit sphere, producing paths that traverse constant-speed geodesics along great circles. Initially formulated in the context of geometry and computer graphics for interpolating rotations, SLERP is now foundational in diverse applications, including model merging in deep learning, variational autoencoders, molecular pathway generation, and numerical integration on manifolds. Its mathematical underpinning is the explicit parametrization of the geodesic curve connecting two points in Rn\mathbb{R}^n constrained to the unit sphere Sn1S^{n-1}, preserving unit norm and ensuring constant angular velocity throughout the interpolation.

1. Geometric Foundation and Formal Definition

Given two points u,vSn1Rnu, v \in S^{n-1} \subset \mathbb{R}^n (u=v=1\|u\|=\|v\|=1), the unique shortest path on the sphere (excluding the antipodal case) is the great-circle arc determined by their two-dimensional span. Let Ω=arccos(uv)[0,π]\Omega = \arccos(u \cdot v) \in [0,\pi] denote the central angle between uu and vv. The SLERP path γ(t)\gamma(t), with t[0,1]t \in [0,1], is given by

γ(t)=sin((1t)Ω)sinΩu+sin(tΩ)sinΩv.\gamma(t) = \frac{\sin((1 - t)\Omega)}{\sin \Omega} u + \frac{\sin(t \Omega)}{\sin \Omega} v.

This parametrization ensures γ(0)=u\gamma(0) = u, γ(1)=v\gamma(1) = v, and γ(t)=1\|\gamma(t)\| = 1 for all tt, traversing the shortest geodesic at uniform angular speed γ(t)=Ω\|\gamma'(t)\| = \Omega (Roychowdhury, 7 Nov 2025).

When uu and vv are nearly coincident (Ω0\Omega \approx 0), the formula becomes numerically unstable due to small denominator sinΩ\sin \Omega; in this limiting case, linear interpolation followed by normalization is used: γ(t)=(1t)u+tv(1t)u+tv.\gamma(t) = \frac{(1-t)u + tv}{\|(1-t)u + tv\|}.

For the antipodal case (v=uv = -u, Ω=π\Omega = \pi), the geodesic is not unique—any great circle orthogonal to uu can be chosen as the interpolation plane.

2. Algebraic Derivation and Specializations

The geometric construction extends naturally to higher dimensions since the geodesic remains confined within the plane spanned by uu and vv. Letting e1=ue_1 = u, w=v(uv)uw = v - (u \cdot v)u, e2=w/we_2 = w / \|w\|, the two-dimensional subspace enables a planar trigonometric parametrization: γ(t)=cos(tΩ)u+sin(tΩ)e2,\gamma(t) = \cos(t\Omega)u + \sin(t\Omega) e_2, and this can be algebraically recast to match the standard SLERP formula via the trigonometric identity sin((1t)Ω)=sinΩcos(tΩ)cosΩsin(tΩ)\sin((1-t)\Omega) = \sin \Omega \cos(t\Omega) - \cos \Omega \sin(t\Omega) (Roychowdhury, 7 Nov 2025).

For quaternion interpolation (rotations in SO(3)\mathrm{SO}(3) and higher), S3S^3 is identified with the space of unit quaternions, and SLERP performs constant-speed rotation interpolation: SLERP(q0,q1;t)=q0(q01q1)t.\operatorname{SLERP}(q_0, q_1; t) = q_0 (q_0^{-1}q_1)^t. Here, exponentiation is via the quaternion logarithm and exponential maps, and the resulting path matches the great-circle interpolant on S3S^3 (Kapić et al., 2021).

3. Numerical Implementation and Stability

Numerically robust SLERP implementations require:

  • Precomputing Ω=arccos(uv)\Omega = \arccos(u \cdot v) and sinΩ\sin \Omega.
  • Falling back to linear interpolant with normalization where sinΩ\sin \Omega is below a threshold (e.g., 10510^{-5}).
  • Ensuring all floating-point inner products are rounded or clamped to [1,1][-1, 1] prior to applying arccos\arccos (Gaikwad et al., 3 Aug 2025, Roychowdhury, 7 Nov 2025).

Pseudocode typically follows:

1
2
3
4
5
6
7
8
9
def slerp(u, v, t, eps=1e-6):
    dot = np.clip(np.dot(u, v), -1.0, 1.0)
    omega = np.arccos(dot)
    if np.abs(omega) < eps:
        return (1-t)*u + t*v
    sin_omega = np.sin(omega)
    a = np.sin((1-t)*omega) / sin_omega
    b = np.sin(t*omega) / sin_omega
    return a*u + b*v
This ensures both mathematical correctness and stability across all configurations (Gaikwad et al., 3 Aug 2025).

4. Applications Across Disciplines

4.1. Model Weight Interpolation and Merging (Deep Learning)

SLERP has become central to neural network merging strategies, such as weight-averaged rewarded policies (WARP) and model merging in the context of LLM adaptation. The goal is to interpolate between model parameters (or task vectors derived from parameter increments) following the hyperspherical geodesic, thus preserving angular geometry and maintaining network inductive biases. SLERP consistently outperforms naive linear averaging, particularly in preserving clustering structure, avoiding mode bridging artifacts, and balancing task specialization versus generalization (Kabane, 16 Nov 2025, Ramé et al., 2024).

4.2. Latent Space Interpolation in Generative Models

In variational autoencoders (VAEs), conditional VAEs (CVAEs), and diffusion models, SLERP ensures latent vectors remain on the high-density "shell" of the prior distribution (approximately Gaussian in high dimensions), resulting in smooth interpolations and realistic syntheses. Linear interpolation through Euclidean space would penetrate low-probability interior regions, inducing undesirable artifacts post-decoding, while SLERP respects the latent manifold's geometry (Gaikwad et al., 3 Aug 2025, Zheng et al., 2024).

4.3. Molecular and Materials Pathway Interpolation

In computational chemistry and solid-state physics, SLERP is applied to the interpolation of molecular orientations (e.g., using unit quaternions for fragments), yielding physically plausible, collision-free transition pathways for nudged-elastic band (NEB) algorithms. The hybridization of SLERP for rotation and linear interpolation for translations is prevalent in generating realistic reaction pathways and phase transitions in periodic systems (Goncharova et al., 2024).

4.4. Geometric Numerical Integration

SLERP is integral in numerical solvers for differential equations with manifold constraints (e.g., maintaining points on SnS^n). In "SLERP-TVDRK" schemes for solving ODEs on spheres, convex combinations (averages) required by Runge-Kutta stages are replaced by SLERP, eliminating the need for costly post-step projections and improving stability and accuracy. However, higher-order generalizations (order r4r \geq 4) are nontrivial due to SLERP's non-associativity, and require consideration of Riemannian means (Leung et al., 2024).

4.5. Rotation Interpolation and Animation

In computer graphics and robotics, SLERP is the standard for smoothly interpolating orientations represented as unit quaternions, ensuring constant-speed rotational motion and avoiding discontinuities inherent in Euler- or axis-angle interpolation. The non-Abelian Kuramoto model on S3S^3 confirms that the unique geodesic interpolant matches SLERP exactly (Kapić et al., 2021).

5. Limitations and Extensions

While SLERP preserves unit norm and constant angular velocity, several limitations and technical caveats arise:

  • For antipodal endpoints, infinite geodesics exist, and a unique path must be chosen by selecting an orthogonal direction.
  • Pairwise SLERP is not associative: successive interpolations are not rotationally invariant in higher-dimensional spaces, creating ambiguity in multi-way merges or convex combinations (Leung et al., 2024).
  • For points with nearly zero separation, the denominator sinΩ\sin \Omega is ill-conditioned, requiring fallback to linear interpolation for numerical robustness.
  • In generative modeling, the assumption that endpoints reside on the manifold's "shell" does not always hold for out-of-distribution data; preprocessing steps, such as noise re-injection and clipping (as in NoiseDiffusion), become necessary (Zheng et al., 2024).

6. Empirical Performance and Best Practices

Across application domains, SLERP has demonstrated:

  • Superior alignment between compositional endpoints in embedding spaces, supporting state-of-the-art zero-shot retrieval in vision-language tasks with optimal weighting coefficients (e.g., α=0.80.9\alpha=0.8-0.9 for text/image mixings) (Jang et al., 2024).
  • Robust model merging with preservation of base-model generalization and retention of specialized adaptation, evidenced by improved clustering-based metrics such as the Silhouette Score and Davies-Bouldin Index (Kabane, 16 Nov 2025).
  • Artifact-free, morphologically realistic interpolations in high-dimensional generative models and accurate intermediate-state prediction in materials science (Gaikwad et al., 3 Aug 2025, Goncharova et al., 2024).
  • Efficient and projection-free geometric numerical integration on SnS^n with first, second, and third-order explicit methods (Leung et al., 2024).

7. Table: Canonical SLERP Formulae Across Contexts

Domain Endpoints SLERP Formula (t ∈ [0,1])
Vector/Sphere u,vSn1u, v \in S^{n-1} sin((1t)Ω)sinΩu+sin(tΩ)sinΩv\frac{\sin((1-t)\Omega)}{\sin \Omega} u + \frac{\sin(t\Omega)}{\sin \Omega} v
Quaternion/Rotation q0,q1S3q_0, q_1 \in S^3 q0(q01q1)tq_0 (q_0^{-1} q_1)^t
Model Weights w0,w1Rdw_0, w_1 \in \mathbb{R}^d sin((1t)θ)sinθw0+sin(tθ)sinθw1\frac{\sin((1-t)\theta)}{\sin \theta} w_0 + \frac{\sin(t\theta)}{\sin \theta} w_1

Here, Ω=arccos(uv)\Omega = \arccos(u \cdot v); θ=arccos((w0w1)/(w0w1))\theta = \arccos((w_0^\top w_1)/(\|w_0\|\|w_1\|)); for quaternions, q01q1q_0^{-1} q_1 denotes the unit quaternion representing the relative rotation (Roychowdhury, 7 Nov 2025, Kabane, 16 Nov 2025, Kapić et al., 2021).


SLERP stands as the canonical method for geodesic interpolation on spheres, with unique solutions and closed-form implementation across vector, quaternion, and high-dimensional parameter spaces, combining geometric rigor with empirical effectiveness in modern computational pipelines.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Spherical Linear intERPolation (SLERP).