{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/rotational-optimizers-simple-robust-dnn","title":"Rotational Equilibrium: How Weight Decay Balances Learning Across Neural Networks","arxiv_id":"2305.17212","date":"2023-05-26","proceeding":null,"authors":["Atli Kosson","Bettina Messmer","Martin Jaggi"],"abstract":"This study investigates how weight decay affects the update behavior of individual neurons in deep neural networks through a combination of applied analysis and experimentation. Weight decay can cause the expected magnitude and angular updates of a neuron's weight vector to converge to a steady state we call rotational equilibrium. These states can be highly homogeneous, effectively balancing the average rotation -- a proxy for the effective learning rate -- across different layers and neurons. Our work analyzes these dynamics across optimizers like Adam, Lion, and SGD with momentum, offering a new simple perspective on training that elucidates the efficacy of widely used but poorly understood methods in deep learning. We demonstrate how balanced rotation plays a key role in the effectiveness of normalization like Weight Standardization, as well as that of AdamW over Adam with L2-regularization. Finally, we show that explicitly controlling the rotation provides the benefits of weight decay while substantially reducing the need for learning rate warmup.","url_abs":"https://arxiv.org/abs/2305.17212v4","url_pdf":"https://arxiv.org/pdf/2305.17212v4.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"rotational-optimizers-simple-robust-dnn","repo_url":"https://github.com/epfml/req","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"rotational-optimizers-simple-robust-dnn","repo_url":"https://github.com/epfml/rotational-optimizers","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"l2-regularization","task_name":"L2 Regularization"}],"methods":[{"method_slug":"adam","method_name":"Adam"},{"method_slug":"adamw","method_name":"AdamW"},{"method_slug":"lion","method_name":"Lion"},{"method_slug":"sgd","method_name":"SGD"},{"method_slug":"weight-decay","method_name":"Weight Decay"},{"method_slug":"weight-standardization","method_name":"Weight Standardization"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2305.17212","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2305.17212"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/epfml/rotational-optimizers","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/epfml/req","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":6},"by_repo_kind":{"official":{"samples":6,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"3495cd35e847ebc6","entry":"adamw_etar_func","repo":"epfml/rotational-optimizers","repo_kind":"official","path":"shared/optimizers/rotational_wrapper.py","file_url":"https://github.com/epfml/rotational-optimizers/blob/HEAD/shared/optimizers/rotational_wrapper.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3495cd35e847ebc6"}},{"code_sha256_prefix":"9a921670ba1c664b","entry":"adamw_get_update","repo":"epfml/rotational-optimizers","repo_kind":"official","path":"shared/optimizers/rotational_wrapper.py","file_url":"https://github.com/epfml/rotational-optimizers/blob/HEAD/shared/optimizers/rotational_wrapper.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9a921670ba1c664b"}},{"code_sha256_prefix":"e2a65770c3727465","entry":"adamw_init_state_get_lists","repo":"epfml/rotational-optimizers","repo_kind":"official","path":"shared/optimizers/rotational_wrapper.py","file_url":"https://github.com/epfml/rotational-optimizers/blob/HEAD/shared/optimizers/rotational_wrapper.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e2a65770c3727465"}},{"code_sha256_prefix":"ff83a6f9e3d14c9c","entry":"dot_product","repo":"epfml/rotational-optimizers","repo_kind":"official","path":"shared/optimizers/rotational_frozen_adamw.py","file_url":"https://github.com/epfml/rotational-optimizers/blob/HEAD/shared/optimizers/rotational_frozen_adamw.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ff83a6f9e3d14c9c"}},{"code_sha256_prefix":"387cc762c45a1178","entry":"tensor_norm","repo":"epfml/rotational-optimizers","repo_kind":"official","path":"shared/optimizers/rotational_frozen_adamw.py","file_url":"https://github.com/epfml/rotational-optimizers/blob/HEAD/shared/optimizers/rotational_frozen_adamw.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"387cc762c45a1178"}},{"code_sha256_prefix":"74807e06c82deb88","entry":"zero_mean","repo":"epfml/rotational-optimizers","repo_kind":"official","path":"shared/optimizers/rotational_frozen_adamw.py","file_url":"https://github.com/epfml/rotational-optimizers/blob/HEAD/shared/optimizers/rotational_frozen_adamw.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"74807e06c82deb88"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}