[Paper Review] Symbolic Discovery of Optimization Algorithms
The paper formulates optimization algorithm discovery as program search and identifies a simple, memory-efficient optimizer named Lion, which uses momentum tracking and a sign-based update to improve performance across vision, language, and diffusion tasks.
We present a method to formulate algorithm discovery as program search, and apply it to discover optimization algorithms for deep neural network training. We leverage efficient search techniques to explore an infinite and sparse program space. To bridge the large generalization gap between proxy and target tasks, we also introduce program selection and simplification strategies. Our method discovers a simple and effective optimization algorithm, $ extbf{Lion}$ ($ extit{Evo$ extbf{L}$ved S$ extbf{i}$gn M$ extbf{o}$me$ extbf{n}$tum}$). It is more memory-efficient than Adam as it only keeps track of the momentum. Different from adaptive optimizers, its update has the same magnitude for each parameter calculated through the sign operation. We compare Lion with widely used optimizers, such as Adam and Adafactor, for training a variety of models on different tasks. On image classification, Lion boosts the accuracy of ViT by up to 2% on ImageNet and saves up to 5x the pre-training compute on JFT. On vision-language contrastive learning, we achieve 88.3% $ extit{zero-shot}$ and 91.1% $ extit{fine-tuning}$ accuracy on ImageNet, surpassing the previous best results by 2% and 0.1%, respectively. On diffusion models, Lion outperforms Adam by achieving a better FID score and reducing the training compute by up to 2.3x. For autoregressive, masked language modeling, and fine-tuning, Lion exhibits a similar or better performance compared to Adam. Our analysis of Lion reveals that its performance gain grows with the training batch size. It also requires a smaller learning rate than Adam due to the larger norm of the update produced by the sign function. Additionally, we examine the limitations of Lion and identify scenarios where its improvements are small or not statistically significant. Lion is also successfully deployed in production systems such as Google search ads CTR model.
Motivation & Objective
- Motivate the discovery of new optimizers beyond handcrafted ones, aiming to improve training efficiency and generalization for deep neural networks.
- Formulate optimizer discovery as an executable program search problem to explore novel algorithm designs.
- Develop techniques to navigate an infinite, sparse search space and filter for generalizable solutions across large-scale tasks.
- Demonstrate the practical performance of the discovered optimizer across vision, language, and diffusion models.
Proposed method
- Represent optimizers as imperative programs operating on weight, gradient, and auxiliary state with a fixed train signature.
- Use a large search space of statements from a set of 45 math functions to encode candidate algorithms.
- Apply evolutionary search with warm-start (from AdamW) and restarts to explore the space.
- Employ abstract execution and caching to prune invalid/semantically equivalent programs and speed up evaluation.
- Use funnel selection and meta-validation on progressively larger proxy tasks to select algorithms that generalize to target tasks.
- Simplify discovered programs to Lion by removing redundancies and aligning the update to a sign-based momentum update.
Experimental results
Research questions
- RQ1Can optimization algorithms be effectively discovered by program search in an infinite, sparse space?
- RQ2Do automatically discovered optimizers generalize from proxy tasks to large-scale, state-of-the-art training settings?
- RQ3What are the properties and practical limits of the discovered optimizer across architectures and tasks?
- RQ4How does a simple sign-based update with momentum compare to AdamW and Adafactor in real-world training?
Key findings
- Lion is a simple, memory-efficient optimizer that tracks momentum and uses a sign update, achieving up to 2 percentage points higher ImageNet zero-shot accuracy and 0.1 percentage point higher fine-tuning accuracy than prior baselines in certain settings.
- Lion reduces pre-training compute on JFT by up to 5x and can speed up diffusion model training by approximately 2.3x.
- On ImageNet across multiple models, Lion outperforms AdamW, with larger gains on larger-capacity models and when strong batch sizes are used.
- In vision-language learning (LiT/BASIC setups), Lion improves zero-shot ImageNet accuracy by about 1.0–1.7 percentage points over AdamW and yields better retrieval results.
- Lion’s performance advantage grows with batch size and requires smaller learning rate and larger weight decay to maintain effective regularization.
- The search process identifies Lion among other optimizers and demonstrates that meta-overfitting later in proxy-task searches tends to generalize better to target tasks.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.