For Deep Rotation Learning with Uncertainty
Total Page:16
File Type:pdf, Size:1020Kb
A Smooth Representation of Belief over SO(3) for Deep Rotation Learning with Uncertainty Valentin Peretroukhin,1;3 Matthew Giamou,1 David M. Rosen,2 W. Nicholas Greene,3 Nicholas Roy,3 and Jonathan Kelly1 1Institute for Aerospace Studies, University of Toronto; 2Laboratory for Information and Decision Systems, 3Computer Science & Artificial Intelligence Laboratory, Massachusetts Institute of Technology Abstract—Accurate rotation estimation is at the heart of unit robot perception tasks such as visual odometry and object pose quaternions ✓ ✓ q = q<latexit sha1_base64="BMaQsvdb47NYnqSxvFbzzwnHZhA=">AAACLXicbVDLSsQwFE19W9+6dBMcBBEcWh+o4EJw41LBGYWZKmnmjhMmbTrJrTiUfodb/QK/xoUgbv0NM50ivg4ETs65N/fmhIkUBj3v1RkZHRufmJyadmdm5+YXFpeW60almkONK6n0VcgMSBFDDQVKuEo0sCiUcBl2Twb+5R1oI1R8gf0EgojdxqItOEMrBc06cFQ66+XXm/RmseJVvQL0L/FLUiElzm6WHLfZUjyNIEYumTEN30swyJhGwSXkbjM1kDDeZbfQsDRmEZggK7bO6bpVWrSttD0x0kL93pGxyJh+FNrKiGHH/PYG4n9eI8X2QZCJOEkRYj4c1E4lRUUHEdCW0PbXsm8J41rYXSnvMM042qB+TLlPmDaQU7dZvJb1UmHD3JIM4X7LdJRGnqKp2lvuFukdFqBDsr9bkkP/K736dtXfqe6d71aOj8ocp8gqWSMbxCf75JickjNSI5z0yAN5JE/Os/PivDnvw9IRp+xZIT/gfHwCW8eo/g==</latexit> ⇤ ✓ estimation. Deep neural networks have provided a new way to <latexit sha1_base64="1dHo/MB41p5RxdHfWHI4xsZNFIs=">AAACXXicbVDBbtNAEN24FIopbdoeOHBZESFxaWRDqxIBUqVeOKEgkbRSHEXjzbhZde11d8cokeWP4Wu4tsee+itsHIMI5UkrvX1vZmfnxbmSloLgruVtPNp8/GTrqf9s+/nObntvf2h1YQQOhFbaXMRgUckMByRJ4UVuENJY4Xl8dbb0z7+jsVJn32iR4ziFy0wmUgA5adL+EA1RkDbldcU/8SgxIMrfUkQzJKiqMvqiTfpAribtTtANavCHJGxIhzXoT/ZafjTVokgxI6HA2lEY5DQuwZAUCis/KizmIK7gEkeOZpCiHZf1lhV/7ZQpT7RxJyNeq393lJBau0hjV5kCzey/3lL8nzcqKHk/LmWWF4SZWA1KCsVJ82VkfCqN21wtHAFhpPsrFzNwSZELdm3KPAdjseJ+VL9WXhfShX+ogHB+aGfakCjIdt2t8uv0ejX4ipwcNaQX/klv+LYbvusefz3qnH5sctxiL9kr9oaF7ISdss+szwZMsB/sJ7tht617b9Pb9nZWpV6r6Tlga/Be/ALwHroe</latexit> k k perform these tasks, and the choice of rotation representation is neural an important part of network design. In this work, we present a network novel symmetric matrix representation of the 3D rotation group, SO(3), with two important properties that make it particularly suitable for learned models: (1) it satisfies a smoothness property input data that improves convergence and generalization when regressing large rotation targets, and (2) it encodes a symmetric Bingham min qTA(✓)q q 4 2R belief over the space of unit quaternions, permitting the training our T symmetric subj.<latexit sha1_base64="QWFOECzMUM8db79oYlAKFLCkDGs=">AAAC73icdVLbbhMxEPUut7LcUnjkxSIqKkJd7ZJKgARSES+8ILWoSYviNJp1nMbUe4k9Roms/Q7eEK98DB/A3+BsA0oIjGTr+MyZGevYWaWkwST5GYRXrl67fmPrZnTr9p2791rb93umtJqLLi9VqU8zMELJQnRRohKnlRaQZ0qcZBdvF/mTz0IbWRbHOK/EIIfzQo4lB/TUsPWD5bIYOnZkAYUuPEeZ9OuDAHXm9uuaPmZTCyO6ojhjx5S9B9Ry5t7Uu6wnOJbaMZwIhPrJWi9Gd57+FmSbWt9qXR4xFDN0zS7RGZt9iimW/7vHavFrmg5b7SROmqCbIF2CNlnG4XA7iNio5DYXBXIFxvTTpMKBA42SK1FHzBpRAb+Ac9H3sIBcmIFrfK/pjmdGdFxqvwqkDbta4SA3Zp5nXpkDTszfuQX5r1zf4vjFwMmisigKfjlobJU3gi4ekY6k9j6quQfAtfR3pXwCGrj3Yn3KrAJtRE0j1nRzUyv9d9hT3rXZnpmUGrlFE/tTHTXuvVxE549Xm6D3LE47cedov33waunjFnlIHpFdkpLn5IC8I4ekS3jQCT4GWcDDafgl/Bp+u5SGwbLmAVmL8PsvSePvjA==</latexit> to q q =1 representation of uncertainty-aware models. We empirically validate the benefits matrix of our formulation by training deep neural rotation regressors differentiable QCQP layer on two data modalities. First, we use synthetic point-cloud data to show that our representation leads to superior predictive Fig. 1: We represent rotations through a symmetric matrix, A, that accuracy over existing representations for arbitrary rotation defines a Bingham distribution over unit quaternions. To apply this targets. Second, we use image data collected onboard ground representation to deep rotation regression, we present a differentiable and aerial vehicles to demonstrate that our representation is layer parameterized by A and show how we can extract a notion of amenable to an effective out-of-distribution (OOD) rejection uncertainty from the spectrum of A. technique that significantly improves the robustness of rotation estimates to unseen environmental effects and corrupted input images, without requiring the use of an explicit likelihood loss, stochastic sampling, or an auxiliary classifier. This capability is Both of these representations, however, are point representa- key for safety-critical applications where detecting novel inputs tions, and do not quantify network uncertainty—an important can prevent catastrophic failure of learned models. capability in safety-critical applications. In this work, we introduce a novel representation of SO(3) I. INTRODUCTION based on a symmetric matrix that combines these two impor- Rotation estimation constitutes one of the core challenges in tant properties. Namely, it robotic state estimation. Given the broad interest in applying 1) admits a smooth global section from SO(3) to the deep learning to state estimation tasks involving rotations representation space (satisfying the continuity property [4,7, 25–27, 30, 34, 36, 39], we consider the suitability of identified by the authors of [41]); different rotation representations in this domain. The question 2) defines a Bingham distribution over unit quaternions; arXiv:2006.01031v4 [cs.CV] 17 Jan 2021 of which rotation parameterization to use for estimation and and control problems has a long history in aerospace engineering 3) is amenable to a novel out-of-distribution (OOD) detec- and robotics [9]. In learning, unit quaternions (also known as tion method without any additional stochastic sampling, Euler parameters) are a popular choice for their numerical or auxiliary classifiers. efficiency, lack of singularities, and simple algebraic and Figure1 visually summarizes our approach. Our experiments geometric structure. Nevertheless, a standard unit quaternion use synthetic and real datasets to highlight the key advantages parameterization does not satisfy an important continuity prop- of our approach. We provide open source Python code1 of our erty that is essential for learning arbitrary rotation targets, as method and experiments. Finally, we note that our representa- recently detailed in [41]. To address this deficiency, the authors tion can be implemented in only a few lines of code in modern of [41] derived two alternative rotation representations that deep learning libraries such as PyTorch, and has marginal satisfy this property and lead to better network performance. computational overhead for typical learning pipelines. This material is based upon work that was supported in part by the Army Research Laboratory under Cooperative Agreement Number W911NF-17-2- 1Code available at https://github.com/utiasSTARS/ 0181. Their support is gratefully acknowledged. bingham-rotation-learning. II. RELATED WORK comparison of SE(3) representations for learning complex Estimating rotations has a long and rich history in computer forward kinematics is conducted in [15]. Although full SE(3) vision and robotics [17, 31, 35]. An in-depth survey of rotation pose estimation is important in most robotics applications, averaging problem formulations and solution methods that we limit our analysis to SO(3) representations as most pose deal directly with multiple rotation measurements is presented estimation tasks can be decoupled into rotation and translation in [16]. In this section, we briefly survey techniques that components, and the rotation component of SE(3) constitutes estimate rotations from raw sensor data, with a particular the main challenge. focus on prior work that incorporates machine learning into C. Learning Rotations with Uncertainty the rotation estimation pipeline. We also review recent work on differentiable optimization problems and convex relaxation- Common ways to extract uncertainty from neural networks based solutions to rotation estimation problems that inspired include approximate variational inference through Monte our work. Carlo dropout [11] and bootstrap-based uncertainty through an ensemble of models [20] or with multiple network heads A. Rotation Parameterization [24]. In prior work [26], we have proposed a mechanism that In robotics, it is common to parameterize rotation states extends these methods to SO(3) targets through differentiable as elements of the matrix Lie group SO(3) [2, 32]. This quaternion averaging and a local notion of uncertainty in the approach facilitates the application of Gauss-Newton-based tangent space of the mean. optimization and a local uncertainty quantification through Additionally, learned methods can be equipped with novelty small perturbations defined in a tangent space about an op- detection mechanisms (often referred to as out-of-distribution erating point in the group. In other state estimation contexts, or OOD detection) to help account for epistemic uncertainty. applications may eschew full 3 3 orthogonal matrices with An autoencoder-based approach to OOD detection was used positive determinant (i.e., elements× of SO(3)) in favour of on a visual navigation task in [28] to ensure that a safe control lower-dimensional representations with desirable properties policy was used in novel environments. A similar approach [9]. For example, Euler angles [33] are particularly well- was applied in [1], where a single variational autoencoder was suited to analyzing small perturbations in the steady-state used for novelty detection and control policy learning. See [23] flight of conventional aircraft because reaching a singularity for a recent summary of OOD methods commonly applied to is practically impossible [10]. In contrast, spacecraft control classification tasks. often requires large-angle maneuvers