{"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/structured-cooperative-learning-with","title":"Structured Cooperative Learning with Graphical Model Priors","arxiv_id":"2306.09595","date":"2023-06-16","proceeding":null,"authors":["Shuangtong Li","Tianyi Zhou","Xinmei Tian","DaCheng Tao"],"abstract":"We study how to train personalized models for different tasks on decentralized devices with limited local data. We propose \"Structured Cooperative Learning (SCooL)\", in which a cooperation graph across devices is generated by a graphical model prior to automatically coordinate mutual learning between devices. By choosing graphical models enforcing different structures, we can derive a rich class of existing and novel decentralized learning algorithms via variational inference. In particular, we show three instantiations of SCooL that adopt Dirac distribution, stochastic block model (SBM), and attention as the prior generating cooperation graphs. These EM-type algorithms alternate between updating the cooperation graph and cooperative learning of local models. They can automatically capture the cross-task correlations among devices by only monitoring their model updating in order to optimize the cooperation graph. We evaluate SCooL and compare it with existing decentralized learning methods on an extensive set of benchmarks, on which SCooL always achieves the highest accuracy of personalized models and significantly outperforms other baselines on communication efficiency. Our code is available at https://github.com/ShuangtongLi/SCooL.","url_abs":"https://arxiv.org/abs/2306.09595v2","url_pdf":"https://arxiv.org/pdf/2306.09595v2.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":"structured-cooperative-learning-with","repo_url":"https://github.com/shuangtongli/scool","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"GPL-3.0"}}],"tasks":[{"task_slug":"stochastic-block-model","task_name":"Stochastic Block Model"},{"task_slug":"variational-inference","task_name":"Variational Inference"},{"task_slug":"model","task_name":"model"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2306.09595","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2306.09595"}},"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":"deterministic:regex_extraction","url":"https://github.com/ShuangtongLi/SCooL","reach":{"status":"ok","spdx":"GPL-3.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/shuangtongli/scool","reach":{"status":"ok","spdx":"GPL-3.0"}}],"summary":{"ran":8,"ran_draft_wrong":2,"ran_honours":3,"ran_fixture":3,"unverified":11},"by_repo_kind":{"official":{"samples":27,"ran":16,"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":27,"samples":[{"code_sha256_prefix":"94405d260fe4287c","entry":"SBM","repo":"shuangtongli/scool","repo_kind":"official","path":"SCooL_SBM.py","file_url":"https://github.com/shuangtongli/scool/blob/HEAD/SCooL_SBM.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"94405d260fe4287c"}},{"code_sha256_prefix":"cbb3676d764783b5","entry":"convert_targets","repo":"shuangtongli/scool","repo_kind":"official","path":"SCooL_SBM.py","file_url":"https://github.com/shuangtongli/scool/blob/HEAD/SCooL_SBM.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"cbb3676d764783b5"}},{"code_sha256_prefix":"c0fdb29350b47fef","entry":"expand_label_group","repo":"shuangtongli/scool","repo_kind":"official","path":"SCooL_SBM.py","file_url":"https://github.com/shuangtongli/scool/blob/HEAD/SCooL_SBM.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"c0fdb29350b47fef"}},{"code_sha256_prefix":"de96e9b005b53e0f","entry":"flatten_tensors","repo":"shuangtongli/scool","repo_kind":"official","path":"SCooL_SBM.py","file_url":"https://github.com/shuangtongli/scool/blob/HEAD/SCooL_SBM.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"de96e9b005b53e0f"}},{"code_sha256_prefix":"ce8985f9c6ff5d7a","entry":"fusion_index_by_partition","repo":"shuangtongli/scool","repo_kind":"official","path":"SCooL_SBM.py","file_url":"https://github.com/shuangtongli/scool/blob/HEAD/SCooL_SBM.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"ce8985f9c6ff5d7a"}},{"code_sha256_prefix":"3b4d375bb85e7531","entry":"gen_graph","repo":"shuangtongli/scool","repo_kind":"official","path":"SCooL_SBM.py","file_url":"https://github.com/shuangtongli/scool/blob/HEAD/SCooL_SBM.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"3b4d375bb85e7531"}},{"code_sha256_prefix":"41e093b5840c3c8e","entry":"get_gamma_mask1","repo":"shuangtongli/scool","repo_kind":"official","path":"SCooL_SBM.py","file_url":"https://github.com/shuangtongli/scool/blob/HEAD/SCooL_SBM.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"41e093b5840c3c8e"}},{"code_sha256_prefix":"787c57c7462ef291","entry":"get_local_testset_index","repo":"shuangtongli/scool","repo_kind":"official","path":"SCooL_SBM.py","file_url":"https://github.com/shuangtongli/scool/blob/HEAD/SCooL_SBM.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"787c57c7462ef291"}},{"code_sha256_prefix":"14913b47dc804fc9","entry":"my_dataset","repo":"shuangtongli/scool","repo_kind":"official","path":"SCooL_SBM.py","file_url":"https://github.com/shuangtongli/scool/blob/HEAD/SCooL_SBM.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"14913b47dc804fc9"}},{"code_sha256_prefix":"2dfa877d72134757","entry":"select_partition","repo":"shuangtongli/scool","repo_kind":"official","path":"SCooL_SBM.py","file_url":"https://github.com/shuangtongli/scool/blob/HEAD/SCooL_SBM.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"2dfa877d72134757"}},{"code_sha256_prefix":"6feffb04f2f14bd0","entry":"select_partition_rand_non_iid","repo":"shuangtongli/scool","repo_kind":"official","path":"SCooL_SBM.py","file_url":"https://github.com/shuangtongli/scool/blob/HEAD/SCooL_SBM.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"6feffb04f2f14bd0"}},{"code_sha256_prefix":"c2e4eda6ed62704b","entry":"show_partition_labels","repo":"shuangtongli/scool","repo_kind":"official","path":"SCooL_SBM.py","file_url":"https://github.com/shuangtongli/scool/blob/HEAD/SCooL_SBM.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"c2e4eda6ed62704b"}},{"code_sha256_prefix":"a0c77613eca8be1d","entry":"split_non_iid_dataset_tiny","repo":"shuangtongli/scool","repo_kind":"official","path":"SCooL_SBM.py","file_url":"https://github.com/shuangtongli/scool/blob/HEAD/SCooL_SBM.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"a0c77613eca8be1d"}},{"code_sha256_prefix":"f26491b89ba8cbd1","entry":"test","repo":"shuangtongli/scool","repo_kind":"official","path":"SCooL_SBM.py","file_url":"https://github.com/shuangtongli/scool/blob/HEAD/SCooL_SBM.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"f26491b89ba8cbd1"}},{"code_sha256_prefix":"bc928d693ea619a6","entry":"test_fast","repo":"shuangtongli/scool","repo_kind":"official","path":"SCooL_SBM.py","file_url":"https://github.com/shuangtongli/scool/blob/HEAD/SCooL_SBM.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"bc928d693ea619a6"}},{"code_sha256_prefix":"349c36e737eadfe1","entry":"unflatten_tensors","repo":"shuangtongli/scool","repo_kind":"official","path":"SCooL_SBM.py","file_url":"https://github.com/shuangtongli/scool/blob/HEAD/SCooL_SBM.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":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"349c36e737eadfe1"}},{"code_sha256_prefix":"5ee024da6c8949f5","entry":"CIFAR10","repo":"shuangtongli/scool","repo_kind":"official","path":"SCooL_SBM.py","file_url":"https://github.com/shuangtongli/scool/blob/HEAD/SCooL_SBM.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"5ee024da6c8949f5"}},{"code_sha256_prefix":"d77445da3ef0a1dd","entry":"Communicator","repo":"shuangtongli/scool","repo_kind":"official","path":"SCooL_SBM.py","file_url":"https://github.com/shuangtongli/scool/blob/HEAD/SCooL_SBM.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"d77445da3ef0a1dd"}},{"code_sha256_prefix":"d876497e00e6c106","entry":"GradientCommunicator","repo":"shuangtongli/scool","repo_kind":"official","path":"SCooL_SBM.py","file_url":"https://github.com/shuangtongli/scool/blob/HEAD/SCooL_SBM.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"d876497e00e6c106"}},{"code_sha256_prefix":"18c8289cf4a4ed2f","entry":"Recorder","repo":"shuangtongli/scool","repo_kind":"official","path":"SCooL_SBM.py","file_url":"https://github.com/shuangtongli/scool/blob/HEAD/SCooL_SBM.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"18c8289cf4a4ed2f"}},{"code_sha256_prefix":"addd1210c4f11516","entry":"get_child_rank_list","repo":"shuangtongli/scool","repo_kind":"official","path":"SCooL_SBM.py","file_url":"https://github.com/shuangtongli/scool/blob/HEAD/SCooL_SBM.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"addd1210c4f11516"}},{"code_sha256_prefix":"794e7158191ec7b9","entry":"get_mixing_mat","repo":"shuangtongli/scool","repo_kind":"official","path":"SCooL_SBM.py","file_url":"https://github.com/shuangtongli/scool/blob/HEAD/SCooL_SBM.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"794e7158191ec7b9"}},{"code_sha256_prefix":"773b2394ca8b41a9","entry":"get_true_correlation","repo":"shuangtongli/scool","repo_kind":"official","path":"SCooL_SBM.py","file_url":"https://github.com/shuangtongli/scool/blob/HEAD/SCooL_SBM.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"773b2394ca8b41a9"}},{"code_sha256_prefix":"5fd2e83393abbe88","entry":"partition_non_iid_determine_dataset","repo":"shuangtongli/scool","repo_kind":"official","path":"SCooL_SBM.py","file_url":"https://github.com/shuangtongli/scool/blob/HEAD/SCooL_SBM.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"5fd2e83393abbe88"}},{"code_sha256_prefix":"c54edd3381deb898","entry":"partition_non_iid_random_dataset","repo":"shuangtongli/scool","repo_kind":"official","path":"SCooL_SBM.py","file_url":"https://github.com/shuangtongli/scool/blob/HEAD/SCooL_SBM.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"c54edd3381deb898"}},{"code_sha256_prefix":"66a8ff916b55511a","entry":"run","repo":"shuangtongli/scool","repo_kind":"official","path":"SCooL_SBM.py","file_url":"https://github.com/shuangtongli/scool/blob/HEAD/SCooL_SBM.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"66a8ff916b55511a"}},{"code_sha256_prefix":"e1199bb49610617a","entry":"split_device","repo":"shuangtongli/scool","repo_kind":"official","path":"SCooL_SBM.py","file_url":"https://github.com/shuangtongli/scool/blob/HEAD/SCooL_SBM.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"e1199bb49610617a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}