Computing CNN Loss and Gradients for Pose Estimation with Riemannian Geometry

Benjamin Hou, Nina Miolane, Bishesh Khanal, Matthew C. H. Lee, Amir Alansary, Steven McDonagh, Joseph V. Hajnal, Daniel Rueckert, Ben Glocker, Bernhard Kainz

Introduction

Pose estimation—the task of predicting a 3D rigid transformation consisting of rotation and translation—is a cornerstone of medical image analysis. Applications range from aligning MRI slices and tracking motion to registering 2D X-rays with 3D CT scans. Traditionally, deep learning models have treated rotation and translation as independent outputs, penalizing errors using standard Euclidean $L_2$ norms.

However, the space of 3D rigid transformations, known as the Special Euclidean group $SE(3)$, is a non-linear manifold. Applying linear metrics to non-linear spaces is mathematically inconsistent; for instance, two quaternions may have a small Euclidean distance while representing significantly different rotations. This geometric mismatch often leads to sub-optimal network updates and requires tedious hyperparameter tuning to balance rotation and translation losses.

Riemannian Formulation for Pose Estimation

This paper proposes a novel, architecture-agnostic Riemannian formulation for pose estimation. By leveraging the Lie group structure of $SE(3)$, the authors introduce a loss function that respects the underlying geometry of the transformation space.

Riemannian Geodesic Loss

Instead of separate $L_2$ norms, the loss is defined as the geodesic distance on the $SE(3)$ manifold equipped with a left-invariant Riemannian metric. This approach naturally couples rotation and translation components into a single, mathematically rigorous distance measure. Poses are represented as elements of the Lie algebra $\mathfrak{se}(3)$, a 6D vector representing the tangent space at the identity element.

Figure 1: Overview of the proposed framework, where any CNN architecture can be trained using the Riemannian geodesic loss $d_{SE(3)}$ on the $SE(3)$ manifold.

Analytical Gradients and Data-Adaptive Weighting

To facilitate backpropagation, the authors derived exact analytical gradients of the Riemannian loss with respect to the predicted pose on the tangent space. Furthermore, they introduced a data-adaptive weighting method. By analyzing the covariance matrix of the training dataset's poses (specifically their Riemannian logarithms), the optimal weighting between rotation and translation can be calculated intrinsically, bypassing the need for expensive grid searches.

Experimental Evaluation

The method was evaluated across three distinct domains:

  1. Natural Images (PoseNet Dataset): A benchmark for outdoor metric localization using the King's College dataset.
  2. C-Arm X-Ray to CT Alignment: A medical dataset involving 2D/3D registration for both healthy and pathological patient subsets.
  3. Fetal Brain MRI: A dataset focused on motion compensation and slice-to-volume registration.

Key Results

The experiments demonstrated that manifold-aware losses consistently outperform Euclidean baselines. In the natural image domain, the $SE(3)$ loss achieved a geodesic distance error of 14.97, compared to 23.62 for the baseline PoseNet. Similar improvements were observed in the C-Arm to CT registration task, particularly in pathological cases where the $SE(3)$ loss reduced the geodesic distance error by approximately 16% over PoseNet.

Figure 6: Quantitative results for the Fetal MRI dataset, showing significant improvements across all image similarity and geometric metrics using the $SE(3)$ loss.

The most dramatic results were seen in the Fetal MRI experiments. As shown in the table above, the $SE(3)$ loss nearly halved the geodesic distance error (dropping from 18.17 to 10.08) and significantly improved image similarity metrics such as PSNR and SSIM.

Conclusion and Future Work

By respecting the Lie group structure of $SE(3)$, this Riemannian approach prevents incorrect penalization during training, leading to better convergence and more accurate physical representations of 3D distance. While the data-adaptive weighting technique proved empirically successful, the authors note that applying different weights to rotation components technically alters the Riemannian metric. Future work will explore the formal mathematical properties of these modified distance metrics and their implications for manifold-based learning.

Summary updated

BibTeX
@inproceedings{hou2018computing,
  author = {Benjamin Hou and Nina Miolane and Bishesh Khanal and Matthew C. H. Lee and Amir Alansary and Steven McDonagh and Joseph V. Hajnal and Daniel Rueckert and Ben Glocker and Bernhard Kainz},
  title = {{Computing CNN Loss and Gradients for Pose Estimation with Riemannian Geometry}},
  booktitle = {International Conference on Medical Image Computing and Computer-Assisted Intervention},
  year = {2018},
  doi = {10.1007/978-3-030-00928-1\_85},
}
Figure