Papers › Cautious Optimizers: Improving Training with One Line of Code

Cautious Optimizers: Improving Training with One Line of Code

25 Nov 2024arXiv:2411.16085archive 2025-07-28

Kaizhao Liang, Lizhang Chen, Bo Liu, Qiang Liu

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 single-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 speed-up on Llama and MAE pretraining up to $1.47$ times, but also better results in LLM post-training tasks. Code is available at https://github.com/kyleliang919/C-Optim.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2411.16085")

Code

Syntology Ran 6 of 12 code samples harvested from 1 repository linked to this paper; 6 have no recorded run. Of those that ran: 1 ran · violated contract; 3 ran · our draft was wrong; 1 ran · fixture could not drive it; 1 ran with no contract checked.

By repository: official repository: 12 samples from 1 repository, 6 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

kyleliang919/c-optim officialmentioned in papermentioned on GitHubpytorchMIT report
huggingface/pytorch-image-models mentioned on GitHubpytorchApache-2.0 report
zhaoolee/garss mentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

12 samples harvested; 6 ran; 0 honoured the contract we drafted; 6 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · violated contract
3ran · our draft was wrong
1ran · fixture could not drive it
1ran
6unverified

Licence: 0 of the 12 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from kyleliang919/c-optim. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

apply_rotary_pos_emb kyleliang919/c-optim/peft_pretraining/modeling_llama.py official repository ran · fixture could not drive it MIT (permissive) · f725bc2d76076485 · report
exists kyleliang919/c-optim/c_lion.py official repository ran · violated contract MIT (permissive) · aa5486a3650902d8 · report
muon_update kyleliang919/c-optim/c_muon.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · cb1f2229e6a594f7 · report
pad_batch kyleliang919/c-optim/opt_utils.py official repository ran MIT (permissive) · c87588f218c6b548 · report
rotate_half kyleliang919/c-optim/peft_pretraining/modeling_llama.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · b99eea6376d1e212 · report
zeropower_via_newtonschulz5 kyleliang919/c-optim/c_muon.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 88b19bfaad9384f8 · report
adam_update kyleliang919/c-optim/c_muon.py official repository unverified MIT (permissive) · 9a4937c269491b61 · report
backward kyleliang919/c-optim/nanogpt_speedrun.py official repository unverified MIT (permissive) · b144323a9c6e08cd · report
get_model_and_dataloader kyleliang919/c-optim/moonlight_toy_train.py official repository unverified MIT (permissive) · 646a0d2ae6a22b76 · report
mm_backward_op kyleliang919/c-optim/nanogpt_speedrun.py official repository unverified MIT (permissive) · 2a9e445529f71938 · report
mm_op kyleliang919/c-optim/nanogpt_speedrun.py official repository unverified MIT (permissive) · 05ddce9e4507d60a · report
zeropower_via_newtonschulz5 kyleliang919/c-optim/muon.py official repository unverified MIT (permissive) · c6cbb0406b3d2e05 · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

LLaMAMAE

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections