On the Continuity of Rotation Representations in Neural Networks

Yi Zhou, Connelly Barnes, Jingwan Lu, Jimei Yang, Hao Li

Introduction

In the fields of computer vision, robotics, and computer graphics, estimating 3D rotations is a fundamental task. Whether determining the orientation of an object from an image or calculating joint angles for a robotic manipulator, neural networks are the primary tool for these regression problems. However, standard representations of rotation—such as Euler angles, axis-angle, and quaternions—often lead to suboptimal performance and training instability. This paper identifies a fundamental topological mismatch between these representations and the continuous nature of neural networks, proposing a novel, continuous alternative in higher dimensions.

The Discontinuity Problem

The core issue addressed by the authors is that all common 3D rotation representations in four or fewer dimensions are mathematically discontinuous. Neural networks are continuous functions; they struggle to learn mappings that contain "jumps" or singularities.

Mathematically, the space of 3D rotations, denoted as $SO(3)$, cannot be embedded into a Euclidean space of dimension four or less without creating discontinuities. For example, in an angular representation like $[0, 2\pi]$, a rotation of $0$ and $2\pi$ are identical in physical space, but they are at opposite ends of the representation space.

Extracted figure from page 3 of On the Continuity of Rotation Representations in Neural Networks

As shown in the figure above, a continuous path of rotations in the original space (the circle) can map to a disconnected set in the representation space. When a network's target value must suddenly jump from $2\pi$ to $0$ for a tiny change in input, the optimization process experiences massive error spikes, hindering convergence and limiting final accuracy.

Proposed Continuous Representations

To resolve this, the authors leverage topological theorems proving that $SO(3)$ can be continuously embedded in 5D or 6D spaces. They propose a general framework where the neural network outputs a vector in a higher-dimensional representation space $R$, which is then mapped to the original rotation space $X$ using a continuous function $f$.

General framework for learning rotation representations. The neural network maps input signals to a representation space R, which is then transformed into the original space X via a continuous mapping f.

The 6D Representation

The most effective and practical solution presented is the 6D representation. Instead of predicting a quaternion or Euler angles, the network outputs two 3D vectors, $a_1$ and $a_2$. These vectors are then transformed into a full $3 \times 3$ rotation matrix through a differentiable Gram-Schmidt-like process:

  1. Normalize $a_1$ to obtain the first column $b_1$.
  2. Orthogonalize $a_2$ with respect to $b_1$ and normalize to obtain the second column $b_2$.
  3. Compute the cross-product $b_3 = b_1 \times b_2$ to obtain the third column.

This mapping is continuous everywhere, ensuring that small changes in the network's output always correspond to small changes in the resulting rotation.

The 5D Representation

The authors also derive a 5D representation using stereographic projection. While theoretically more compact (the minimum dimension for a continuous embedding of $SO(3)$), it introduces non-linearities that can make the optimization landscape more complex compared to the 6D version.

Experimental Evaluation

The proposed representations were tested against standard methods (quaternions, Euler angles, axis-angle) across three tasks:

  1. Synthetic Autoencoder: In a simple regression task on random rotation matrices, the 6D representation achieved a mean error of 0.49°, significantly lower than quaternions (3.32°) and Euler angles (6.98°). Crucially, while quaternions exhibited maximum errors near 180° at discontinuity points, the 6D representation's maximum error remained below 2°.
  2. Point Cloud Pose Estimation: Using the ShapeNet dataset, the 6D model demonstrated superior convergence speed, reaching lower error in 500k iterations than the quaternion model achieved in 2.5 million.
  3. Inverse Kinematics (IK): On the CMU Motion Capture Database, the 6D representation reduced mean joint error to 1.9cm, compared to 3.3cm for quaternions.

Conclusion

This research highlights that the "difficulty" of a deep learning task is often rooted in the underlying topology of the data representation. By moving to a continuous 6D representation, researchers can eliminate artificial discontinuities that plague standard methods, leading to faster training and more accurate 3D pose estimation. This work provides a robust foundation for any neural network architecture dealing with spatial rotations.

Summary updated

BibTeX
@inproceedings{zhou2019continuity,
  author = {Yi Zhou and Connelly Barnes and Jingwan Lu and Jimei Yang and Hao Li},
  title = {{On the Continuity of Rotation Representations in Neural Networks}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2019},
  doi = {10.1109/cvpr.2019.00589},
}
Figure