{"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/topology-aware-generalization-of","title":"Topology-aware Generalization of Decentralized SGD","arxiv_id":"2206.12680","date":"2022-06-25","proceeding":null,"authors":["Tongtian Zhu","Fengxiang He","Lan Zhang","Zhengyang Niu","Mingli Song","DaCheng Tao"],"abstract":"This paper studies the algorithmic stability and generalizability of decentralized stochastic gradient descent (D-SGD). We prove that the consensus model learned by D-SGD is $\\mathcal{O}{(N^{-1}+m^{-1} +\\lambda^2)}$-stable in expectation in the non-convex non-smooth setting, where $N$ is the total sample size, $m$ is the worker number, and $1+\\lambda$ is the spectral gap that measures the connectivity of the communication topology. These results then deliver an $\\mathcal{O}{(N^{-(1+\\alpha)/2}+ m^{-(1+\\alpha)/2}+\\lambda^{1+\\alpha} + \\phi_{\\mathcal{S}})}$ in-average generalization bound, which is non-vacuous even when $\\lambda$ is closed to $1$, in contrast to vacuous as suggested by existing literature on the projected version of D-SGD. Our theory indicates that the generalizability of D-SGD is positively correlated with the spectral gap, and can explain why consensus control in initial training phase can ensure better generalization. Experiments of VGG-11 and ResNet-18 on CIFAR-10, CIFAR-100 and Tiny-ImageNet justify our theory. To our best knowledge, this is the first work on the topology-aware generalization of vanilla D-SGD. Code is available at https://github.com/Raiden-Zhu/Generalization-of-DSGD.","url_abs":"https://arxiv.org/abs/2206.12680v5","url_pdf":"https://arxiv.org/pdf/2206.12680v5.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":"topology-aware-generalization-of","repo_url":"https://github.com/raiden-zhu/generalization-of-dsgd","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2206.12680","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2206.12680"}},"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/raiden-zhu/generalization-of-dsgd","reach":null}],"summary":{"ran":3,"ran_honours":1,"ran_draft_wrong":3,"unverified":6},"by_repo_kind":{"official":{"samples":13,"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":13,"samples":[{"code_sha256_prefix":"f0583db318f5fe5f","entry":"ResNet18","repo":"raiden-zhu/generalization-of-dsgd","repo_kind":"official","path":"gpu_work.py","file_url":"https://github.com/raiden-zhu/generalization-of-dsgd/blob/HEAD/gpu_work.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f0583db318f5fe5f"}},{"code_sha256_prefix":"863458be04c46970","entry":"TinyImageNet","repo":"raiden-zhu/generalization-of-dsgd","repo_kind":"official","path":"gpu_work.py","file_url":"https://github.com/raiden-zhu/generalization-of-dsgd/blob/HEAD/gpu_work.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"863458be04c46970"}},{"code_sha256_prefix":"215fe918cf02296c","entry":"VGG","repo":"raiden-zhu/generalization-of-dsgd","repo_kind":"official","path":"gpu_work.py","file_url":"https://github.com/raiden-zhu/generalization-of-dsgd/blob/HEAD/gpu_work.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"215fe918cf02296c"}},{"code_sha256_prefix":"7c5424293f47d826","entry":"generate_P","repo":"raiden-zhu/generalization-of-dsgd","repo_kind":"official","path":"gpu_work.py","file_url":"https://github.com/raiden-zhu/generalization-of-dsgd/blob/HEAD/gpu_work.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7c5424293f47d826"}},{"code_sha256_prefix":"f44366385c61c247","entry":"make_layers","repo":"raiden-zhu/generalization-of-dsgd","repo_kind":"official","path":"gpu_work.py","file_url":"https://github.com/raiden-zhu/generalization-of-dsgd/blob/HEAD/gpu_work.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f44366385c61c247"}},{"code_sha256_prefix":"b2f2784ae1a49376","entry":"tiny_imagenet","repo":"raiden-zhu/generalization-of-dsgd","repo_kind":"official","path":"gpu_work.py","file_url":"https://github.com/raiden-zhu/generalization-of-dsgd/blob/HEAD/gpu_work.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b2f2784ae1a49376"}},{"code_sha256_prefix":"617b89aca9a6c336","entry":"vgg11_bn","repo":"raiden-zhu/generalization-of-dsgd","repo_kind":"official","path":"gpu_work.py","file_url":"https://github.com/raiden-zhu/generalization-of-dsgd/blob/HEAD/gpu_work.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"617b89aca9a6c336"}},{"code_sha256_prefix":"8c708d78a177641d","entry":"cifar10","repo":"raiden-zhu/generalization-of-dsgd","repo_kind":"official","path":"gpu_work.py","file_url":"https://github.com/raiden-zhu/generalization-of-dsgd/blob/HEAD/gpu_work.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8c708d78a177641d"}},{"code_sha256_prefix":"766cdf9454c0f265","entry":"cifar100","repo":"raiden-zhu/generalization-of-dsgd","repo_kind":"official","path":"gpu_work.py","file_url":"https://github.com/raiden-zhu/generalization-of-dsgd/blob/HEAD/gpu_work.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"766cdf9454c0f265"}},{"code_sha256_prefix":"685e6a1f0a9518b3","entry":"get_dataset","repo":"raiden-zhu/generalization-of-dsgd","repo_kind":"official","path":"gpu_work.py","file_url":"https://github.com/raiden-zhu/generalization-of-dsgd/blob/HEAD/gpu_work.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"685e6a1f0a9518b3"}},{"code_sha256_prefix":"44aebc902ffcb019","entry":"get_model","repo":"raiden-zhu/generalization-of-dsgd","repo_kind":"official","path":"gpu_work.py","file_url":"https://github.com/raiden-zhu/generalization-of-dsgd/blob/HEAD/gpu_work.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"44aebc902ffcb019"}},{"code_sha256_prefix":"acc4272edbc8772e","entry":"run","repo":"raiden-zhu/generalization-of-dsgd","repo_kind":"official","path":"gpu_work.py","file_url":"https://github.com/raiden-zhu/generalization-of-dsgd/blob/HEAD/gpu_work.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"acc4272edbc8772e"}},{"code_sha256_prefix":"78b8a746ed7dd0f8","entry":"test_all","repo":"raiden-zhu/generalization-of-dsgd","repo_kind":"official","path":"gpu_work.py","file_url":"https://github.com/raiden-zhu/generalization-of-dsgd/blob/HEAD/gpu_work.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"78b8a746ed7dd0f8"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}