Generalizing Adam to Manifolds for Efficiently Training Transformers
cs.LG, math.DG
Submitted: 2023-05-26
Updated: 2026-09-16
Comments: 40 pages, 9 figures (some of which contain subfigures), presented at Enumath2023 and Enumath2025
Code: https://github.com/JuliaGNI/GeometricMachineLearning.jl
License: http://creativecommons.org/licenses/by/4.0/
The gist: One of the primary reasons behind the success of neural networks has been the emergence of an array of new, highly-successful optimizers, perhaps most importantly the Adam optimizer.
Terminology
Abstract
One of the primary reasons behind the success of neural networks has been the emergence of an array of new, highly-successful optimizers, perhaps most importantly the Adam optimizer. It is widely used for training neural networks, yet notoriously hard to interpret. Lacking a clear physical intuition, Adam is difficult to generalize to manifolds. Some attempts have been made to directly apply parts of the Adam algorithm to manifolds or to find an underlying structure, but a full generalization has remained elusive. In this work a new approach is presented that leverages the special structure of the manifolds which are relevant for optimization of neural networks, such as the Stiefel manifold, the symplectic Stiefel manifold and the Grassmann manifold: all of these are homogeneous spaces and as such admit a global tangent space representation. This is a common vector space, often called the Lie subspace, that makes the generalization of all steps in the Adam optimizer (as well as other optimizers) possible. It is thus possible to extend the Adam optimizer to manifolds without a projection step, something that was not possible before. The resulting algorithm is then applied to train transformers and a symplectic autoencoder for which orthogonality constraints are enforced up to machine precision and we conclusively demonstrate the advantage of the proposed optimizer over existing methods.
Sources
- Layer Normalization
- Riemannian Adaptive Optimization Methods
- The real symplectic Stiefel and Grassmann manifolds: metrics, geodesics and applications
- A Grassmann Manifold Handbook: Basic Geometry and Computational Aspects
- Symplectic Autoencoders for Model Reduction of Hamiltonian Systems
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Adam: A Method for Stochastic Optimization
- Momentum Stiefel Optimizer, with Applications to Suitably-Orthogonal Attention, and Optimal Transport
- Efficient Riemannian Optimization on the Stiefel Manifold via the Cayley Transform
- Simplifying Momentum-based Positive-definite Submanifold Optimization with Applications to Deep Learning
- How to generate random matrices from the classical compact groups
- Parallel transport on matrix manifolds and Exponential Action
- Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms
Related papers
- Polynomial-Augmented Neural Networks (PANNs) with Weak Orthogonality Constraints for Enhanced Function and PDE Approximation
- AIRL-S: Unifying Reinforcement Learning and Search-Based Test-Time Scaling via Adversarial Inverse Reinforcement Learning
- Transformers as Bayesian In-Context Experimenters: Smoothness-Adaptive Efficient ATE Estimation
- Convergence issues in Relational Concept Analysis based on AOC-posets
- Beliefs Beyond Posteriors: Local-Consistency Optimisation for Bayesian Neural Networks
- Understanding Diffusion Models via Ratio-Based Function Approximation with SignReLU Networks