Skip to main content
QUICK REVIEW

[Paper Review] Adan: Adaptive Nesterov Momentum Algorithm for Faster Optimizing Deep Models

Xingyu Xie, Pan Zhou|arXiv (Cornell University)|Aug 13, 2022
Advanced Neural Network ApplicationsComputer Science63 citations
TL;DR

Adan introduces a Nesterov momentum estimation (NME) to adaptively estimate first- and second-order gradient moments, achieving faster convergence in nonconvex stochastic optimization and robust performance across vision, language, and RL tasks.

ABSTRACT

In deep learning, different kinds of deep networks typically need different optimizers, which have to be chosen after multiple trials, making the training process inefficient. To relieve this issue and consistently improve the model training speed across deep networks, we propose the ADAptive Nesterov momentum algorithm, Adan for short. Adan first reformulates the vanilla Nesterov acceleration to develop a new Nesterov momentum estimation (NME) method, which avoids the extra overhead of computing gradient at the extrapolation point. Then, Adan adopts NME to estimate the gradient's first- and second-order moments in adaptive gradient algorithms for convergence acceleration. Besides, we prove that Adan finds an $ε$-approximate first-order stationary point within $\mathcal{O}(ε^{-3.5})$ stochastic gradient complexity on the non-convex stochastic problems (e.g., deep learning problems), matching the best-known lower bound. Extensive experimental results show that Adan consistently surpasses the corresponding SoTA optimizers on vision, language, and RL tasks and sets new SoTAs for many popular networks and frameworks, e.g., ResNet, ConvNext, ViT, Swin, MAE, DETR, GPT-2, Transformer-XL, and BERT. More surprisingly, Adan can use half of the training cost (epochs) of SoTA optimizers to achieve higher or comparable performance on ViT, GPT-2, MAE, etc., and also shows great tolerance to a large range of minibatch size, e.g., from 1k to 32k. Code is released at https://github.com/sail-sg/Adan, and has been used in multiple popular deep learning frameworks or projects.

Motivation & Objective

  • Motivate the need for an optimizer that consistently speeds up training across diverse deep architectures.
  • Develop an efficient optimizer that combines Nesterov momentum with adaptive gradient methods without extra gradient extrapolation overhead.
  • Provide theoretical convergence guarantees and empirical evidence across vision, language, and RL tasks.
  • Show that adaptive regularization and decoupled weight decay improve generalization in practice.

Proposed method

  • Propose Nesterov momentum estimation (NME) that computes gradients at the current point and constructs a corrected gradient surrogate to emulate extrapolation without extra cost.
  • Define first- and second-moment updates using gk' = gk + (1-β1)(gk−gk−1) and integrate into an Adam-like update with m_k and n_k.
  • Introduce a proximal-inspired, decoupled regularization step that minimizes a first-order approximation with a dynamic regularizer Fk' that includes a weighted norm with n_k.
  • Provide algorithmic details (Algorithm 1) including restart conditions to stabilize momentum and enable effective convergence in practice.

Experimental results

Research questions

  • RQ1Can Adan’s NME provide faster convergence than existing Adam-type optimizers on nonconvex stochastic problems?
  • RQ2Does Adan achieve or approach the theoretical lower bounds for stochastic gradient complexity under Lipschitz gradient and Hessian assumptions?
  • RQ3Is Adan robust across diverse architectures and training settings, including large minibatch regimes and various dataset scales?
  • RQ4Does decoupled weight decay (as in AdamW) combine effectively with Adan to improve generalization?
  • RQ5How does Adan perform on vision, NLP, and RL benchmarks compared to SoTA optimizers?

Key findings

  • Adan attains stochastic gradient complexity of O(c∞^2.5 ε^-4) for ε-approximate first-order points, matching the known lower bound up to constants.
  • Under Lipschitz Hessian, Adan with restart achieves O(c∞^1.25 ε^-3.5) complexity, also aligning with the lower bound and improving over several prior methods.
  • Empirically, Adan consistently surpasses SoTA optimizers across vision, language, and RL tasks, achieving higher or comparable performance with roughly half the training cost in epochs for several architectures.
  • Adan demonstrates robustness to a wide range of minibatch sizes (e.g., 1k to 32k) and scales well across models like ViT, GPT-2, MAE, etc.
  • The method integrates seamlessly with decoupled weight decay (AdamW-style) and shows improved generalization.
  • Theoretical results hold without requiring large momentum hyperparameters, aligning with practical training settings where β1, β2 are small.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.