TL;DR
Anderson Mixing (AM) is a powerful tool for speeding up iterative solvers, but it is notoriously memory-intensive because it requires storing a long history of previous steps. This paper introduces ST-AM (Short-Term recurrence Anderson Mixing), a highly efficient variant that achieves the acceleration of full-memory AM while only storing two previous iterations. By applying this to deep learning, the authors created an optimizer that outperforms standard methods like Adam and SGD on tasks ranging from language modeling to training Transformers, all while maintaining a minimal memory footprint.
The Memory Bottleneck in Fixed-Point Iterations
Many problems in science, engineering, and machine learning are solved using fixed-point iterations, where a function is repeatedly applied ($x_{k+1} = g(x_k)$) until the output stabilizes. Anderson Mixing (AM) acts as an accelerator for these solvers by analyzing the last $m$ steps to extrapolate a more accurate subsequent guess.
However, in modern machine learning, the "guess" ($x$) often represents millions or billions of model parameters. Storing a history of $m=20$ or $m=50$ iterations requires massive amounts of RAM, which is frequently prohibitive on standard GPUs. While researchers often settle for "limited-memory" versions that discard older data, this truncation typically degrades performance. The authors of this paper sought to capture the benefits of a long iteration history without the associated memory overhead.
Introducing Short-Term Recurrence (ST-AM)
The authors introduce a novel family of algorithms called Short-Term recurrence Anderson Mixing (ST-AM). Their core breakthrough lies in enforcing specific mathematical properties—namely, orthogonality—on the iteration history. This allows the algorithm to update the current guess using only the last two steps combined with computationally cheap corrections.
The paper details three specific variants of the algorithm:
- Basic ST-AM: Designed for linear systems. The authors mathematically prove that this variant is equivalent to full-memory AM in strongly convex quadratic optimization, meaning it delivers the exact same result with a fraction of the memory.
- MST-AM (Modified): Tailored for general nonlinear problems. It incorporates a boundedness check to ensure the extrapolation remains stable when navigating complex, non-convex landscapes.
- RST-AM (Regularized): Optimized for Deep Learning. Because training neural networks involves stochastic (noisy) gradients, this version adds regularization and damping terms to maintain optimizer stability.
Key Insights and Mechanisms
- The Conjugate Gradient Connection: The authors drew inspiration from the Conjugate Gradient (CG) method. Just as CG uses a three-term recurrence to solve linear systems efficiently, ST-AM employs a similar mechanism to compress the history of Anderson Mixing.
- Drastic Memory Efficiency: Standard AM with a history size of 10 might consume 1.7x more memory than SGD. In contrast, RST-AM introduces less than 5% extra memory overhead compared to SGD, making it highly practical for massive models.
- Stability through Regularization: The stochastic nature of deep learning gradients can easily derail extrapolation. RST-AM solves this by adding a penalty term to the internal least-squares problem, preventing the optimizer from making overconfident, erratic jumps based on noisy data.
- Quasi-Newton Behavior: While SGD and Adam rely primarily on first-order gradient information, ST-AM acts similarly to a quasi-Newton method. It implicitly captures second-order information about the curvature of the loss surface without the heavy computational burden usually required to calculate it.
Empirical Results
The authors evaluated ST-AM across a rigorous suite of benchmarks, spanning classic mathematical problems (strongly convex quadratic optimization) to complex deep learning tasks (image classification on ImageNet, language modeling on Penn Treebank, and machine translation using Transformers).
Highlights of the results include: * Outperforming Classic Optimizers: On CIFAR-100, RST-AM achieved higher accuracy than SGDM, Adam, and AdaBelief across multiple architectures, including ResNet, ResNeXt, and DenseNet. * Faster Convergence in NLP: When training Transformers for machine translation (IWSLT14 DE-EN), RST-AM reached a superior BLEU score while reducing total training time by 10% compared to Adam. On the Penn Treebank dataset, it significantly lowered perplexity. * Adversarial Robustness: In adversarial training scenarios, RST-AM produced models that were not only more accurate on clean data but also more resistant to malicious attacks than standard SGD.
Limitations and Future Work
While ST-AM proves to be a highly effective and memory-efficient optimizer, the authors note a few areas for future exploration:
- Hyperparameter Sensitivity: Although a robust default setting was identified, the regularization parameter ($c_1$) can sometimes be sensitive to the specific task or architecture.
- Preconditioning Synergy: The paper demonstrates that ST-AM can be combined with other optimizers (e.g., using Adam as a preconditioner). However, identifying the optimal combination for diverse architectures remains an open research question.
- Theoretical Bounds: The authors successfully proved local linear convergence for nonlinear problems, but establishing a global convergence theory for highly complex, stochastic cases is still ongoing.
Summary updated