Trivializations for Gradient-Based Optimization on Manifolds

Mario Lezcano CasadoNeurIPS 2019

Optimizing deep learning models often becomes complicated when parameters must satisfy strict geometric constraints, such as maintaining orthogonal or positive definite matrices. This NeurIPS 2019 paper by Mario Lezcano-Casado introduces a novel framework called dynamic trivializations, which transforms constrained manifold optimization into a sequence of unconstrained Euclidean problems. This approach allows researchers to leverage powerful standard optimizers like Adam or RMSProp on manifolds while avoiding the geometric distortions that plague traditional fixed parametrizations.

The Challenge of Manifold Optimization

In many machine learning applications, matrices with specific properties are highly desirable. For example, in Recurrent Neural Networks (RNNs), using orthogonal matrices helps prevent gradients from exploding or vanishing, enabling the network to remember information over long sequences.

However, optimizing directly on these curved "manifolds" is notoriously difficult. Practitioners typically face two suboptimal choices:

  1. Riemannian Gradient Descent (RGD): While mathematically elegant, RGD is difficult to combine with modern adaptive optimizers (like Adam), which are inherently designed for flat Euclidean spaces.
  2. Static Trivializations: This involves mapping a flat Euclidean space onto the manifold (akin to using a 2D map to represent the 3D globe). The critical flaw here is the "cut locus"—as optimization moves far from the center of the map, the geometric "stretching" becomes so extreme that the optimizer can get trapped in artificial saddle points or local minima that do not actually exist on the manifold itself.

Dynamic Trivializations (DTRIV)

To achieve the "best of both worlds," the author proposes Dynamic Trivializations (DTRIV).

Instead of relying on a single, fixed map for the entire optimization process, DTRIV periodically "re-centers" the map. The algorithm works by lifting the problem to a tangent space (a flat plane touching the manifold at a specific point), optimizing there for $K$ steps using any standard Euclidean optimizer, and then "retracting" back to the manifold to establish a new base point.

Comparison of static trivialization and dynamic trivialization.

This method acts as a flexible bridge between existing techniques:

  • If you update the base point every single step ($K=1$), the method closely approximates Riemannian Gradient Descent.
  • If you never update the base point ($K=\infty$), it reverts to a classic static trivialization.

Technical Breakthrough: To make this practical for matrix manifolds, the author derived a formula for the gradient of the matrix exponential. This allows for machine-precision gradient computations, removing a significant prior bottleneck in manifold optimization.

Key Insights

  • Metric Distortion: The paper formalizes the concept that a trivialization is not merely a coordinate change; it alters the underlying "metric." Static maps fail because this metric becomes too distorted far from the origin.
  • Resetting the Clock: By dynamically updating the base point, the algorithm ensures the optimizer always operates in a region where the Euclidean approximation of the manifold remains highly accurate.
  • Optimizer Compatibility: DTRIV allows practitioners to seamlessly use the "bells and whistles" of modern optimization—such as momentum and adaptive learning rates—on manifolds without needing to reinvent them for non-Euclidean geometry.

Experimental Results

The method was rigorously evaluated on standard benchmarks designed to test long-term memory in neural networks, including Pixel-by-pixel MNIST, Permuted MNIST (P-MNIST), and the TIMIT speech dataset.

Performance of DTRIV compared to baseline models on MNIST and Permuted MNIST tasks.

The dynamic approach consistently outperformed both standard RGD and static trivializations:

  • State-of-the-Art Accuracy: On the challenging P-MNIST task, DTRIV achieved 96.8% accuracy, surpassing previous state-of-the-art orthogonal RNN methods like EXPRNN and SCORNN.
  • Error Reduction: On the TIMIT speech task (predicting the next log-magnitude of an audio signal), DTRIV reduced the Test Mean Squared Error (MSE) significantly—dropping from 5.30 with static maps to 1.97 with dynamic updates in the largest model size.
  • Stability: The authors found that updating the basis every 100 steps ($K=100$) or even every step ($K=1$) provided the highest stability and best results across different tasks.

Limitations and Future Work

While highly effective, DTRIV does introduce some computational overhead. Calculating matrix exponentials and their gradients remains more computationally expensive than standard matrix multiplication. Additionally, the frequency of updates ($K$) introduces a new hyperparameter, though experiments suggest the method is relatively robust to this choice.

Finally, the experimental focus of this paper was primarily on orthogonal matrices. While the underlying theory applies to any manifold, deriving efficient retractions and gradients for more exotic geometric structures remains an exciting avenue for future research.

Summary updated

BibTeX
@inproceedings{casado2019trivializations,
  author = {Mario Lezcano Casado},
  title = {{Trivializations for Gradient-Based Optimization on Manifolds}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2019},
}
Figure