{"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/a-multi-power-law-for-loss-curve-prediction","title":"A Multi-Power Law for Loss Curve Prediction Across Learning Rate Schedules","arxiv_id":"2503.12811","date":"2025-03-17","proceeding":null,"authors":["Kairong Luo","Haodong Wen","Shengding Hu","Zhenbo Sun","Zhiyuan Liu","Maosong Sun","Kaifeng Lyu","WenGuang Chen"],"abstract":"Training large models is both resource-intensive and time-consuming, making it crucial to understand the quantitative relationship between model performance and hyperparameters. In this paper, we present an empirical law that describes how the pretraining loss of large language models evolves under different learning rate schedules, such as constant, cosine, and step decay schedules. Our proposed law takes a multi-power form, combining a power law based on the sum of learning rates and additional power laws to account for a loss reduction effect induced by learning rate decay. We extensively validate this law on various model sizes and architectures, and demonstrate that after fitting on a few learning rate schedules, the law accurately predicts the loss curves for unseen schedules of different shapes and horizons. Moreover, by minimizing the predicted final pretraining loss across learning rate schedules, we are able to find a schedule that outperforms the widely used cosine learning rate schedule. Interestingly, this automatically discovered schedule bears some resemblance to the recently proposed Warmup-Stable-Decay (WSD) schedule (Hu et al, 2024) but achieves a slightly lower final loss. We believe these results could offer valuable insights for understanding the dynamics of pretraining and designing learning rate schedules to improve efficiency.","url_abs":"https://arxiv.org/abs/2503.12811v1","url_pdf":"https://arxiv.org/pdf/2503.12811v1.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":"a-multi-power-law-for-loss-curve-prediction","repo_url":"https://github.com/thu-yao-01-luo/multipowerlaw","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[{"method_slug":"step-decay","method_name":"Step Decay"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2503.12811","atlas_url":"https://app.syntology.ai/?focus=2503.12811","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2503.12811"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/thu-yao-01-luo/multipowerlaw","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":7,"unverified":2},"by_repo_kind":{"official":{"samples":9,"ran":7,"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":"0f6305535337d38c","entry":"const_lrs","repo":"thu-yao-01-luo/multipowerlaw","repo_kind":"official","path":"src/lr_schedules.py","file_url":"https://github.com/thu-yao-01-luo/multipowerlaw/blob/HEAD/src/lr_schedules.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0f6305535337d38c"}},{"code_sha256_prefix":"00660cbc28acb453","entry":"cosine_lrs","repo":"thu-yao-01-luo/multipowerlaw","repo_kind":"official","path":"src/lr_schedules.py","file_url":"https://github.com/thu-yao-01-luo/multipowerlaw/blob/HEAD/src/lr_schedules.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"00660cbc28acb453"}},{"code_sha256_prefix":"cd6f7ee1b324e473","entry":"generate_init_params","repo":"thu-yao-01-luo/multipowerlaw","repo_kind":"official","path":"src/fitting.py","file_url":"https://github.com/thu-yao-01-luo/multipowerlaw/blob/HEAD/src/fitting.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cd6f7ee1b324e473"}},{"code_sha256_prefix":"72abd9f687e8eaaa","entry":"huber_loss","repo":"thu-yao-01-luo/multipowerlaw","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/thu-yao-01-luo/multipowerlaw/blob/HEAD/src/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"72abd9f687e8eaaa"}},{"code_sha256_prefix":"2e1fc14a90913b68","entry":"preprocess_data","repo":"thu-yao-01-luo/multipowerlaw","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/thu-yao-01-luo/multipowerlaw/blob/HEAD/src/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2e1fc14a90913b68"}},{"code_sha256_prefix":"68cfdcc1f7b3559f","entry":"torch_huber","repo":"thu-yao-01-luo/multipowerlaw","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/thu-yao-01-luo/multipowerlaw/blob/HEAD/src/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"68cfdcc1f7b3559f"}},{"code_sha256_prefix":"bf5b813192b4d050","entry":"two_stage_lrs","repo":"thu-yao-01-luo/multipowerlaw","repo_kind":"official","path":"src/lr_schedules.py","file_url":"https://github.com/thu-yao-01-luo/multipowerlaw/blob/HEAD/src/lr_schedules.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bf5b813192b4d050"}},{"code_sha256_prefix":"f787cc931f766988","entry":"initialize_params","repo":"thu-yao-01-luo/multipowerlaw","repo_kind":"official","path":"src/fitting.py","file_url":"https://github.com/thu-yao-01-luo/multipowerlaw/blob/HEAD/src/fitting.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f787cc931f766988"}},{"code_sha256_prefix":"57b2ae61ea02dcf2","entry":"load_data","repo":"thu-yao-01-luo/multipowerlaw","repo_kind":"official","path":"src/data_loader.py","file_url":"https://github.com/thu-yao-01-luo/multipowerlaw/blob/HEAD/src/data_loader.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"57b2ae61ea02dcf2"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}