TL;DR
ASGO is a novel optimization algorithm that treats neural network parameters as matrices rather than vectors, exploiting their natural low-rank gradient and block-diagonal Hessian structures. It achieves superior convergence rates compared to established methods like Shampoo and full-matrix AdaGrad, while remaining computationally efficient enough for large-scale foundation model training.
The Problem with Vectorized Optimizers
Most popular optimizers, such as Adam and AdaGrad, treat neural network parameters as long, flattened vectors. This approach ignores the inherent mathematical structure of deep neural networks (DNNs), where parameters are naturally represented as matrices or tensors.
Research has shown that in modern DNNs, gradients are often low-rank (meaning they can be compressed without much loss of information) and Hessians (which describe the curvature of the loss surface) are approximately block-diagonal. While the "Shampoo" optimizer was designed to exploit this, its theoretical convergence is often slower than standard SGD in high dimensions. Furthermore, Shampoo is computationally expensive because it requires two preconditioner matrices per layer. ASGO aims to bridge this gap by providing a theoretically sound and practically efficient way to use matrix structure for faster training.
The ASGO Approach
The core of ASGO is a single-side preconditioner that adaptively updates using structured gradients.
- The Update Rule: Unlike Shampoo, which applies preconditioners to both sides of a gradient matrix, ASGO uses a single-side update.
- Efficiency via Newton-Schultz: To avoid the massive computational cost of Singular Value Decomposition (SVD) for computing inverse square roots, the authors use the Newton-Schultz (NS) iterative method (and a variant called PolarExpress). This reduces the operation to a series of matrix multiplications, which are highly optimized on modern GPUs.
- Transformer-Specific Design: For Transformer models, the authors introduce a "head-wise" optimization for Query and Key matrices. By reshaping these into 3D tensors and optimizing each head's subspace independently, they significantly reduce memory and computational overhead.
- DASGO: The authors also propose a lightweight diagonal version (DASGO) for resource-constrained environments.
Key Insights
- Single-Side Superiority: Theoretically, the authors prove that single-side preconditioning can actually be faster than double-sided preconditioning at exploiting low-rank gradients.
- The "Right" Side Matters: Through an ablation study, they found that applying the preconditioner to the right side of the gradient (corresponding to the input weights of a neuron) significantly outperforms left-side preconditioning. This aligns with the observed block-diagonal structure of DNN Hessians.
- Connection to Muon: The paper reveals a deep link between ASGO and the recently popular Muon optimizer. ASGO can be viewed as a "smoother," adaptive version of Muon, much like how AdaGrad relates to SignSGD.
Key Results
The authors evaluated ASGO across several standard language modeling benchmarks, including Shakespeare (NanoGPT), OpenWebText (GPT-2 124M), and WikiText-2 (GPT-2 Large fine-tuning).
As demonstrated in the training loss trajectories, ASGO variants converge noticeably faster than standard optimizers. Theorem 1 of the paper formally proves that ASGO converges faster than full-matrix AdaGrad and Shampoo.
In GPT-2 pretraining, ASGO-PolarExpress achieved a validation loss of 3.342, matching the state-of-the-art Muon optimizer and significantly outperforming AdamW (3.455) and Shampoo (3.417).
Despite the matrix operations, ASGO only adds about 8.6% wall-clock overhead per training step compared to AdamW. This is a small price to pay for the significant gains in convergence. Furthermore, in GPT-2 Large fine-tuning on WikiText-2, ASGO and its diagonal variant (DASGO) achieved lower perplexity than both Muon and AdamW across different training objectives.
Limitations and Future Work
- Computational Intensity: While optimized, matrix operations are still more demanding than the element-wise operations used in Adam. The authors suggest "lazy" updates (performing matrix operations every few iterations) as a potential fix.
- Tensor Extension: The current framework is primarily designed for 2D matrices. Extending the theory and implementation to higher-order tensors remains an open challenge.
- Damping Sensitivity: The algorithm shows some sensitivity to the damping parameter, particularly in sparse layers like embeddings, where standard SVD-based approaches might be more stable than iterative ones.
Summary updated