Geoopt: Riemannian Optimization in PyTorch
Max Kochurov, Rasul Karimov, Serge Kozlukov
TL;DR
Geoopt tackles integrating Riemannian optimization into PyTorch by treating manifold-valued parameters as first-class citizens and providing geometry-aware optimizers. It defines a robust abstract interface and a ManifoldTensor, enabling efficient updates via retractions and parallel transport within standard PyTorch workflows. The package supports multiple manifolds (Sphere, Stiefel, Birkhoff, Poincaré ball, Lorentz) and optimizers (RiemannianAdam, Sparse variants, RiemannianSGD), with advanced hyperbolic learning capabilities. Its design emphasizes numerical stability, broadcasting, and extensibility, making Geoopt a versatile tool for geometric deep learning across NLP, CV, time-series, and hyperbolic representations.
Abstract
Geoopt is a research-oriented modular open-source package for Riemannian Optimization in PyTorch. The core of Geoopt is a standard Manifold interface that allows for the generic implementation of optimization algorithms. Geoopt supports basic Riemannian SGD as well as adaptive optimization algorithms. Geoopt also provides several algorithms and arithmetic methods for supported manifolds, which allow composing geometry-aware neural network layers that can be integrated with existing models.
