{"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-quadratic-synchronization-rule-for","title":"A Quadratic Synchronization Rule for Distributed Deep Learning","arxiv_id":"2310.14423","date":"2023-10-22","proceeding":null,"authors":["Xinran Gu","Kaifeng Lyu","Sanjeev Arora","Jingzhao Zhang","Longbo Huang"],"abstract":"In distributed deep learning with data parallelism, synchronizing gradients at each training step can cause a huge communication overhead, especially when many nodes work together to train large models. Local gradient methods, such as Local SGD, address this issue by allowing workers to compute locally for $H$ steps without synchronizing with others, hence reducing communication frequency. While $H$ has been viewed as a hyperparameter to trade optimization efficiency for communication cost, recent research indicates that setting a proper $H$ value can lead to generalization improvement. Yet, selecting a proper $H$ is elusive. This work proposes a theory-grounded method for determining $H$, named the Quadratic Synchronization Rule (QSR), which recommends dynamically setting $H$ in proportion to $\\frac{1}{\\eta^2}$ as the learning rate $\\eta$ decays over time. Extensive ImageNet experiments on ResNet and ViT show that local gradient methods with QSR consistently improve the test accuracy over other synchronization strategies. Compared with the standard data parallel training, QSR enables Local AdamW on ViT-B to cut the training time on 16 or 64 GPUs down from 26.7 to 20.2 hours or from 8.6 to 5.5 hours and, at the same time, achieves $1.16\\%$ or $0.84\\%$ higher top-1 validation accuracy.","url_abs":"https://arxiv.org/abs/2310.14423v2","url_pdf":"https://arxiv.org/pdf/2310.14423v2.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-quadratic-synchronization-rule-for","repo_url":"https://github.com/hmgxr128/qsr","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"deep-learning","task_name":"Deep Learning"}],"methods":[{"method_slug":"1x1-convolution","method_name":"1x1 Convolution"},{"method_slug":"adamw","method_name":"AdamW"},{"method_slug":"average-pooling","method_name":"Average Pooling"},{"method_slug":"batch-normalization","method_name":"Batch Normalization"},{"method_slug":"bottleneck-residual-block","method_name":"Bottleneck Residual Block"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"global-average-pooling","method_name":"Global Average Pooling"},{"method_slug":"kaiming-initialization","method_name":"Kaiming Initialization"},{"method_slug":"local-sgd","method_name":"Local SGD"},{"method_slug":"max-pooling","method_name":"Max Pooling"},{"method_slug":"relu","method_name":"ReLU"},{"method_slug":"residual-block","method_name":"Residual Block"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"sgd","method_name":"SGD"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2310.14423","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.14423"}},"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/hmgxr128/qsr","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":5,"unverified":1},"by_repo_kind":{"official":{"samples":6,"ran":5,"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":"cced6f501bdc212e","entry":"compute_param_diff","repo":"hmgxr128/qsr","repo_kind":"official","path":"train_utils.py","file_url":"https://github.com/hmgxr128/qsr/blob/HEAD/train_utils.py","link_basis":"first_harvest_node","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":"cced6f501bdc212e"}},{"code_sha256_prefix":"555bde0b9b97c6ec","entry":"get_flat_buffers_from","repo":"hmgxr128/qsr","repo_kind":"official","path":"distributed_utils.py","file_url":"https://github.com/hmgxr128/qsr/blob/HEAD/distributed_utils.py","link_basis":"first_harvest_node","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":"555bde0b9b97c6ec"}},{"code_sha256_prefix":"84c7866aff871121","entry":"get_flat_grad_from","repo":"hmgxr128/qsr","repo_kind":"official","path":"distributed_utils.py","file_url":"https://github.com/hmgxr128/qsr/blob/HEAD/distributed_utils.py","link_basis":"first_harvest_node","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":"84c7866aff871121"}},{"code_sha256_prefix":"cfe82136874645f0","entry":"get_flat_tensor_from_tensor_sequence","repo":"hmgxr128/qsr","repo_kind":"official","path":"localopt.py","file_url":"https://github.com/hmgxr128/qsr/blob/HEAD/localopt.py","link_basis":"first_harvest_node","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":"cfe82136874645f0"}},{"code_sha256_prefix":"faa36bfafa971e5b","entry":"get_mean_flat_tensor_from_tensor_sequences","repo":"hmgxr128/qsr","repo_kind":"official","path":"localopt.py","file_url":"https://github.com/hmgxr128/qsr/blob/HEAD/localopt.py","link_basis":"first_harvest_node","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":"faa36bfafa971e5b"}},{"code_sha256_prefix":"cd4a3d303c468161","entry":"is_bn","repo":"hmgxr128/qsr","repo_kind":"official","path":"train_utils.py","file_url":"https://github.com/hmgxr128/qsr/blob/HEAD/train_utils.py","link_basis":"first_harvest_node","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":"cd4a3d303c468161"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}