HackerPapers

arXiv:2411.16085cs.LG

Cautious Optimizers: Improving Training with One Line of Code

Kaizhao Liang, Lizhang Chen, Bo Liu, Qiang Liu

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

Abstract

AdamW has been the default optimizer for transformer pretraining. For many years, our community searched for faster and more stable optimizers with only constrained positive outcomes. In this work, we propose a \textbf{one-line modification in Pytorch} to any momentum-based optimizer, which we rename cautious optimizer, e.g. C-AdamW and C-Lion. Our theoretical result shows that this modification preserves Adam's Hamiltonian function and it does not break the convergence guarantee under the Lyapunov analysis. In addition, a whole new family of optimizers is revealed by our theoretical insight. Among them, we pick the simplest one for empirical experiments, showing not only consistent speed-up on LLM pretraining, but also image classification, with minimum extra tuning on hyperparameters. Code is available at https://github.com/kyleliang919/C-Optim.

arXiv comments
Journal reference
DOI
Subjects
cs.LGMachine Learning cs.AIArtificial Intelligence cs.CLComputation and Language cs.CVComputer Vision and Pattern Recognition cs.DMDiscrete Mathematics

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from May 2026 to May 2026. Found in 2 HN submissions from Nov 2024 to Mar 2025. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments1 thread

  1. A Theory of Deep Learning 1 comment
    • Theres been multiple papers discussing how only updating parameters that have high agreement in update direction leads to less overfitting and better generalization. Lemme see if I can find em. https://arxiv.org/abs/2411.16085 - set updates to 0 where theres disagreement in the…

      minimaltomView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.