Weighted Quaternion Averaging
- Weighted quaternion averaging is a method to compute a representative unit quaternion from a set of weighted rotations, addressing the non-Euclidean nature of S³.
- It employs eigenvalue decomposition, fixed-point iterations, and gradient-flow algorithms to effectively minimize chordal or geodesic distances.
- Applications include 3D registration, sensor fusion, and deep learning ensembles, with optimized weight selection improving accuracy and stability.
Weighted quaternion averaging refers to the computation of a representative or "mean" quaternion, given a set of unit quaternions and associated weights. This operation is central in fields such as 3D registration, pose estimation, ensemble sensor fusion, and probabilistic rotation regression, where robust estimation of orientation from multiple sources or predictions is critical. Weighted quaternion averaging methods address the challenge of averaging on the non-Euclidean manifold of unit quaternions (), accounting for their double cover of and the specifics of rotational metric geometry.
1. Problem Statement and Metrics
Given a collection of unit quaternions with strictly positive weights , the objective is to compute a mean quaternion that optimally represents the set according to a chosen rotational metric. Canonical formulations include:
- Minimizing the weighted sum of squared chordal distances:
- Minimizing the weighted sum of squared geodesic distances:
Handling the antipodal identification is essential for well-posedness (Hanson, 2018, Peretroukhin et al., 2019).
2. Analytical and Algebraic Methods
A classical approach is to maximize
subject to . The weighted outer-product method constructs the (real symmetric) 0 matrix
1
and seeks the principal eigenvector: 2 The solution 3 is the normalized eigenvector associated with the largest eigenvalue of 4. This can be performed efficiently with standard eigensolvers or, for theoretical insights, the eigenproblem can be solved in closed form via quartic (Cardano–Ferrari) algebraic methods (Hanson, 2018). Block matrix expressions for 5 directly assemble the computation from quaternion components. In practice, quaternions may be hemisphere-aligned prior to averaging to preserve orientation consistency.
3. Riemannian Manifold (Karcher) Approaches
The minimization of the squared geodesic cost on 6 falls into the class of Karcher or Fréchet means on Riemannian manifolds. An explicit fixed-point iteration utilizes the exponential and logarithmic maps on 7: 8 where 9 and 0 have closed forms relying on principal angles and tangent space projections. The algorithm typically converges in a few iterations for moderate 1 and is well-suited for contexts such as deep ensemble networks or sensor fusion where direct probabilistic uncertainty injection in the tangent space is meaningful (Peretroukhin et al., 2019).
4. Dynamical Systems and Gradient-Flow Algorithms
Weighted quaternion averaging can be posed as the equilibrium of a negative gradient flow for a suitably chosen potential function. The non-Abelian Kuramoto model on 2 gives rise to a set of ODEs for 3 quaternions: 4 or, more invariantly,
5
Each iteration projects onto 6, and all 7 collapse to a common synchronization state almost globally asymptotically. The discrete-time Euler integration ("KLW quaternion algorithm") is practical, and convergence is tracked via an order parameter 8 (Kapić et al., 2021).
5. Weight Selection, Constraints, and Sensor Fusion
Weights 9 determine the influence of each quaternion in the ensemble. In probabilistic estimation, weights can reflect epistemic or aleatoric uncertainty—e.g., inversely proportional to the trace or determinant of predictive covariance (Peretroukhin et al., 2019). For physical sensor ensembles, e.g., multiple spatially separated IMUs, weights are determined by solving a quadratic program (QP) that minimizes aggregate measurement noise, enforces convexity (0, 1), and cancels lever-arm bias (2). In such sensor fusion frameworks, averaging is not performed directly in quaternion space but on frame-aligned gyroscope and accelerometer measurements, and the resulting rate is integrated to propagate the common orientation (Gao et al., 31 May 2025). This avoids direct closed-form expressions for the quaternion mean as a function of the input quaternions and weights in the presence of non-collocated sensors.
6. Practical Implementation and Stability Considerations
The eigenvalue-based approach is computationally efficient, requiring 3 operations to form 4 and constant-time symmetric eigendecomposition. Fixed-point (Karcher mean) iteration converges rapidly when initialization is close to consensus or when orientations are not near antipodal. Chordal versus geodesic metrics yield nearly indistinguishable results except when orientations are highly dispersed on 5. The dynamical (gradient-flow/Kuramoto) method provably converges for positive-definite weights and is robust against initialization except for a measure zero of degenerate cases (Hanson, 2018, Kapić et al., 2021).
Direct mean-by-summation (6) following hemisphere-alignment is numerically less stable when sample orientations are broadly distributed due to the loss of convexity on 7. In contrast, the outer-product and gradient-based methods are robust and yield consistent average orientations and covariances.
7. Applications and Experimental Outcomes
Weighted quaternion averaging underpins:
- Batch and recursive pose estimation in robotics and vision.
- Sensor fusion involving multiple attitude sources (e.g., multi-IMU arrays), where QP-based weight selection additionally suppresses noise and enforces spatial constraints (Gao et al., 31 May 2025).
- Probabilistic regression pipelines, with applications in deep learning ensemble methods, which leverage quaternion averaging for rotation prediction and covariance extraction (Peretroukhin et al., 2019).
- Rotational registration and 3D data alignment in computer vision (Hanson, 2018).
Performance results show that, for sensor fusion, increasing the number of fused IMUs and optimizing weights via QP can reduce rotational mean absolute error (MAE) by approximately 35% and positional MAE by around 20% in simulation, and halve positional error in real-world datasets (Gao et al., 31 May 2025). For direct averaging and registration, the eigenvalue-based and gradient-flow methods are observed to match geometric averaging performance and yield robust estimates across a range of datasets (Hanson, 2018, Kapić et al., 2021).