Table of Contents
Fetching ...

Manifolds.jl: An Extensible Julia Framework for Data Analysis on Manifolds

Seth D. Axen, Mateusz Baran, Ronny Bergmann, Krzysztof Rzecki

TL;DR

The paper introduces Manifolds.jl and the accompanying ManifoldsBase.jl as a fast, extensible framework for data analysis on Riemannian manifolds and Lie groups in Julia. It presents a unified, decorator-enabled API that supports multiple metrics, representations, and in-place versus allocating computations, with practical demonstrations in Bézier splines, manifold optimization, and tangent-space PCA. Comprehensive benchmarks show competitive to superior performance versus Python/ Matlab libraries and robust accuracy across a range of manifolds, especially at low dimensions, while highlighting trade-offs at very high dimensions where TensorFlow-based backends may outperform. The work enables geometry-aware data analysis in a high-level, expressive language, facilitating integration with existing Julia ecosystems and promoting broader adoption of manifold methods.

Abstract

We present the Julia package Manifolds$.$jl, providing a fast and easy-to-use library of Riemannian manifolds and Lie groups. This package enables working with data defined on a Riemannian manifold, such as the circle, the sphere, symmetric positive definite matrices, or one of the models for hyperbolic spaces. We introduce a common interface, available in ManifoldsBase$.$jl, with which new manifolds, applications, and algorithms can be implemented. We demonstrate the utility of Manifolds$.$jl using Bézier splines, an optimization task on manifolds, and principal component analysis on nonlinear data. In a benchmark, Manifolds$.$jl outperforms all comparable packages for low-dimensional manifolds in speed; over Python and Matlab packages, the improvement is often several orders of magnitude, while over C/C++ packages, the improvement is two-fold. For high-dimensional manifolds, it outperforms all packages except for Tensorflow-Riemopt, which is specifically tailored for high-dimensional manifolds.

Manifolds.jl: An Extensible Julia Framework for Data Analysis on Manifolds

TL;DR

The paper introduces Manifolds.jl and the accompanying ManifoldsBase.jl as a fast, extensible framework for data analysis on Riemannian manifolds and Lie groups in Julia. It presents a unified, decorator-enabled API that supports multiple metrics, representations, and in-place versus allocating computations, with practical demonstrations in Bézier splines, manifold optimization, and tangent-space PCA. Comprehensive benchmarks show competitive to superior performance versus Python/ Matlab libraries and robust accuracy across a range of manifolds, especially at low dimensions, while highlighting trade-offs at very high dimensions where TensorFlow-based backends may outperform. The work enables geometry-aware data analysis in a high-level, expressive language, facilitating integration with existing Julia ecosystems and promoting broader adoption of manifold methods.

Abstract

We present the Julia package Manifoldsjl, providing a fast and easy-to-use library of Riemannian manifolds and Lie groups. This package enables working with data defined on a Riemannian manifold, such as the circle, the sphere, symmetric positive definite matrices, or one of the models for hyperbolic spaces. We introduce a common interface, available in ManifoldsBasejl, with which new manifolds, applications, and algorithms can be implemented. We demonstrate the utility of Manifoldsjl using Bézier splines, an optimization task on manifolds, and principal component analysis on nonlinear data. In a benchmark, Manifoldsjl outperforms all comparable packages for low-dimensional manifolds in speed; over Python and Matlab packages, the improvement is often several orders of magnitude, while over C/C++ packages, the improvement is two-fold. For high-dimensional manifolds, it outperforms all packages except for Tensorflow-Riemopt, which is specifically tailored for high-dimensional manifolds.

Paper Structure

This paper contains 21 sections, 11 equations, 6 figures, 2 tables.

Figures (6)

  • Figure 1: Unit sphere in $\mathbb{R}^{3}$ with two points $p$, $q$. Tangent space at $p$ is labelled $T_{p}\mathbb{S}^{2}$, geodesic between $p$ and $q$ is the blue arc $\gamma(p, q)$, and the vector $X$ is the tangent vector from $T_{p}\mathbb{S}^{2}$ that points towards $q$. $Y$ is another vector from $T_{p}\mathbb{S}^{2}$ orthogonal to $X$. All tangent vectors are blue. Parallel transports of $X$ and $Y$ from $p$ to $q$ are shown as vector $\operatorname{PT}_{q \gets p} X$ and $\operatorname{PT}_{q \gets p} Y$, respectively.
  • Figure 2: Illustration of the De Casteljau algorithm to evaluate a Bézier curve on the Sphere $\mathbb{S}^{2}$. The initial points and their shortest geodesics (blue) yield three points (cyan) and two points (green) during the recursion, and their connecting geodesic the point on the Bézier curve (orange).
  • Figure 3:
  • Figure 4:
  • Figure 5:
  • ...and 1 more figures