Papers › Can We Remove the Square-Root in Adaptive Gradient Methods? A Second-Order Perspective

Can We Remove the Square-Root in Adaptive Gradient Methods? A Second-Order Perspective

5 Feb 2024arXiv:2402.03496archive 2025-07-28

Wu Lin, Felix Dangel, Runa Eschenhagen, Juhan Bae, Richard E. Turner, Alireza Makhzani

Adaptive gradient optimizers like Adam(W) are the default training algorithms for many deep learning architectures, such as transformers. Their diagonal preconditioner is based on the gradient outer product which is incorporated into the parameter update via a square root. While these methods are often motivated as approximate second-order methods, the square root represents a fundamental difference. In this work, we investigate how the behavior of adaptive methods changes when we remove the root, i.e., strengthen their second-order motivation. Surprisingly, we find that such square-root-free adaptive methods close the generalization gap to SGD on convolutional architectures, while maintaining their root-based counterpart's performance on transformers. The second-order perspective also has practical benefits for developing non-diagonal methods that can incorporate arbitrary curvature approximations through the concept of preconditioner invariance. In contrast to root-based methods like Shampoo, root-free counterparts work well and fast with half-precision since they do not require numerically unstable matrix root decompositions and inversions. Overall, our findings provide new insights into the development of adaptive methods and raise important questions regarding the overlooked role of adaptivity in their success. (experiment code: https://github.com/yorkerlin/remove-the-square-root optimizer code: https://github.com/f-dangel/sirfshampoo)

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="2402.03496")

Code

Syntology Ran 9 of 10 code samples harvested from 2 repositories linked to this paper; 1 has no recorded run. Of those that ran: 2 ran · honoured contract; 7 ran with no contract checked.

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

f-dangel/sirfshampoo officialmentioned in papermentioned on GitHubpytorch report
yorkerlin/remove-the-square-root officialmentioned in papermentioned 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

10 samples harvested; 9 ran; 2 honoured the contract we drafted; 1 has no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · honoured contract
7ran
1unverified

Licence: 9 of the 10 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 2 repositories linked to this paper, official or community; each sample names its own and says which. “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.

are_states_equal yorkerlin/remove-the-square-root/distributed_shampoo/utils/optimizer_modules.py official repository ran no licence file found · pointer only · fbc54c48ccc1b867 · report
check_diagonal yorkerlin/remove-the-square-root/distributed_shampoo/utils/matrix_functions.py official repository ran no licence file found · pointer only · 8817b0124e846311 · report
count_parameters yorkerlin/remove-the-square-root/models/CNNs/main_search.py official repository ran · honoured contract no licence file found · pointer only · f6b944f50d3f15ae · report
distribute_buffer_sizes yorkerlin/remove-the-square-root/distributed_shampoo/utils/shampoo_dist_utils.py official repository ran no licence file found · pointer only · f3734c77315d1566 · report
flatten_state_dict yorkerlin/remove-the-square-root/distributed_shampoo/utils/shampoo_checkpoint_utils.py official repository ran no licence file found · pointer only · cc88d01d536d1d1f · report
get_batch_size f-dangel/sirfshampoo/sirfshampoo/optimizer.py official repository ran · honoured contract MIT (permissive) · 75657f6957e455f7 · report
get_dtype_size yorkerlin/remove-the-square-root/distributed_shampoo/utils/shampoo_dist_utils.py official repository ran no licence file found · pointer only · 42aea64d67efd3c6 · report
matrix_root_diagonal yorkerlin/remove-the-square-root/distributed_shampoo/utils/matrix_functions.py official repository ran no licence file found · pointer only · c1080dc0088b4e38 · report
split_local_dist_buffers yorkerlin/remove-the-square-root/distributed_shampoo/utils/shampoo_dist_utils.py official repository ran no licence file found · pointer only · 63647b62fc2b7f30 · report
matrix_inverse_root yorkerlin/remove-the-square-root/distributed_shampoo/utils/matrix_functions.py official repository unverified no licence file found · pointer only · c801b0432c4ae761 · report

Tasks

Second-order methods

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

SGD

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