Lion is an optimizer that uses only the sign ( or ) of a mix of the momentum and the current gradient for its update. The name stands for EvoLved Sign Momentum (sign momentum discovered through evolution). Chen et al. presented it in 2023.
Lion was not designed by hand; it was found automatically by representing optimizers as programs and running an evolutionary search. Candidates were searched on small proxy tasks, those that also held up on large tasks were selected, and unnecessary lines were removed to simplify them, leaving a short procedure.
Compared with AdamW, Lion has the following characteristics.
- The only state it keeps is the momentum: AdamW keeps two quantities, the average of the gradient and the average of its square, while Lion keeps one, so it uses less memory.
- The update magnitude is the same for every parameter: Because it takes the sign, apart from weight decay, the update for each element is times the learning rate. The principle differs from methods like AdamW, which adjust the magnitude per parameter by division.
- Fewer hyperparameters: AdamW's is not needed.
The paper reports that Lion improves the accuracy of ViT on ImageNet by up to 2%, and matches or beats AdamW on image-text contrastive learning, diffusion models, and language models.

