Abstract
Training neural networks to serve as optimizers on Riemannian manifolds—spaces characterized by nonlinear constraints—traditionally requires unrolling long optimization trajectories. This process leads to massive memory and computational overhead. We introduce a method for computing meta-gradients via Riemannian Implicit Differentiation, which decouples the optimizer's training from the length of the optimization path. Our approach is up to 350x faster and significantly more memory-efficient than existing methods while achieving state-of-the-art accuracy across various manifold-constrained tasks.
Introduction: The Challenge of Riemannian Meta-Learning
Many critical machine learning problems involve optimization under nonlinear constraints, such as ensuring a matrix remains orthogonal or positive definite. These are best addressed through Riemannian optimization, which treats the search space as a smooth manifold rather than a flat Euclidean space.
Recently, meta-learning ("learning to optimize") has been applied to automatically discover superior Riemannian optimizers. However, training these meta-optimizers is computationally expensive. Standard techniques rely on backpropagation through time (BPTT), requiring the storage of every step in an optimization trajectory to calculate meta-gradients. As the number of iterations ($T$) increases, memory and time requirements grow linearly, often forcing a compromise on trajectory length that can lead to instability or poor performance.
Methods: Riemannian Implicit Differentiation
The core contribution of this work is a more efficient approach to meta-optimization by leveraging the Implicit Function Theorem within the context of Riemannian manifolds.
Key Technical Components
- Implicit Differentiation: Rather than differentiating through a sequence of $T$ steps, we derive a formula to calculate the meta-gradient based solely on the final state of the optimization. This effectively "decouples" the meta-learning process from the trajectory length.
- Two-Step Dependency: We demonstrate that the meta-gradient can be accurately computed using only the final two iterations of the inner optimization loop, drastically reducing the computational graph.
- Neumann Series Approximation: To avoid the prohibitive cost of inverting a large Hessian matrix required by implicit differentiation, we use a Neumann series to approximate the inversion through a series of efficient matrix-vector products.
- Architecture and Warmup: We employ a generalized matrix LSTM (gmLSTM) to parameterize the optimizer, ensuring structural properties of matrices are preserved. A "Parameter Warmup" stage using hand-designed optimizers provides a robust set of starting points for the meta-learner.
Key Results and Insights
The proposed method shifts the complexity of meta-optimization from linear to constant relative to the trajectory length. This allows for much deeper optimization during training without the typical memory explosion.
Performance Metrics
- Speed: In face recognition tasks with 525 inner-loop steps, our method was 350 times faster than previous state-of-the-art Riemannian meta-optimizers (RMM).
- Memory Efficiency: While RMM's memory usage scaled with the number of steps (up to 12GB), our method maintained a constant footprint (e.g., ~2.6GB for Face Recognition).
- Accuracy: The learned optimizer consistently outperformed hand-designed methods like RSGD or RASA. On the YaleB face recognition dataset (Stiefel manifold), it achieved 95.1% accuracy, compared to 90.2% for the next best meta-optimizer.
Discussion and Limitations
While highly effective, the theoretical derivation assumes the training loss function is strictly convex. Although the method performs well on non-convex neural network training in practice, the formal guarantees are currently limited to the convex case. Additionally, the method's success depends on the initial "warmup" pool; if hand-designed optimizers fail to find reasonable starting points, the meta-optimizer's learning may be hindered. Future work will explore applying this framework to more complex manifold-valued deep learning architectures and broader bi-level optimization problems.
Summary updated