{"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/model-contrastive-federated-learning","title":"Model-Contrastive Federated Learning","arxiv_id":"2103.16257","date":"2021-03-30","proceeding":"CVPR 2021 1","authors":["Qinbin Li","Bingsheng He","Dawn Song"],"abstract":"Federated learning enables multiple parties to collaboratively train a machine learning model without communicating their local data. A key challenge in federated learning is to handle the heterogeneity of local data distribution across parties. Although many studies have been proposed to address this challenge, we find that they fail to achieve high performance in image datasets with deep learning models. In this paper, we propose MOON: model-contrastive federated learning. MOON is a simple and effective federated learning framework. The key idea of MOON is to utilize the similarity between model representations to correct the local training of individual parties, i.e., conducting contrastive learning in model-level. Our extensive experiments show that MOON significantly outperforms the other state-of-the-art federated learning algorithms on various image classification tasks.","url_abs":"https://arxiv.org/abs/2103.16257v1","url_pdf":"https://arxiv.org/pdf/2103.16257v1.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":"model-contrastive-federated-learning","repo_url":"https://github.com/adap/flower","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"tf","reach":null},{"paper_slug":"model-contrastive-federated-learning","repo_url":"https://github.com/QinbinLi/MOON","is_official":0,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"model-contrastive-federated-learning","repo_url":"https://github.com/KarhouTam/FL-bench","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"GPL-3.0"}},{"paper_slug":"model-contrastive-federated-learning","repo_url":"https://github.com/Koukyosyumei/AIJack","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"model-contrastive-federated-learning","repo_url":"https://github.com/yjlee22/cyclicaggregation","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"model-contrastive-federated-learning","repo_url":"https://github.com/TsingZ0/PFL-Non-IID","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"},{"task_slug":"federated-learning","task_name":"Federated Learning"},{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"image-classification","task_name":"image-classification"},{"task_slug":"model","task_name":"model"}],"methods":[{"method_slug":"contrastive-learning","method_name":"Contrastive Learning"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2103.16257","atlas_url":"https://app.syntology.ai/?focus=2103.16257","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2103.16257"}},"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/yjlee22/cyclicaggregation","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/adap/flower","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/TsingZ0/PFL-Non-IID","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/KarhouTam/FL-bench","reach":{"status":"ok","spdx":"GPL-3.0"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/QinbinLi/MOON","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Koukyosyumei/AIJack","reach":null}],"summary":{"ran_draft_wrong":2,"ran":5,"unverified":2},"by_repo_kind":{"named_in_paper":{"samples":2,"ran":2,"repositories":1},"listed":{"samples":7,"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":"d9def42110729a85","entry":"conv1x1","repo":"QinbinLi/MOON","repo_kind":"named_in_paper","path":"resnetcifar.py","file_url":"https://github.com/QinbinLi/MOON/blob/HEAD/resnetcifar.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d9def42110729a85"}},{"code_sha256_prefix":"160bb14bd76201b4","entry":"conv3x3","repo":"QinbinLi/MOON","repo_kind":"named_in_paper","path":"resnetcifar.py","file_url":"https://github.com/QinbinLi/MOON/blob/HEAD/resnetcifar.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"160bb14bd76201b4"}},{"code_sha256_prefix":"17038838dfc15bda","entry":"csv_reader","repo":"yjlee22/cyclicaggregation","repo_kind":"listed","path":"exp0.py","file_url":"https://github.com/yjlee22/cyclicaggregation/blob/HEAD/exp0.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":"17038838dfc15bda"}},{"code_sha256_prefix":"19ab64bb591f0a02","entry":"csv_reader","repo":"yjlee22/cyclicaggregation","repo_kind":"listed","path":"exp2.py","file_url":"https://github.com/yjlee22/cyclicaggregation/blob/HEAD/exp2.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":"19ab64bb591f0a02"}},{"code_sha256_prefix":"9db1d39396c6173b","entry":"noniid","repo":"yjlee22/cyclicaggregation","repo_kind":"listed","path":"utils/sampling.py","file_url":"https://github.com/yjlee22/cyclicaggregation/blob/HEAD/utils/sampling.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":"9db1d39396c6173b"}},{"code_sha256_prefix":"cef7a737bbb9e0c3","entry":"restricted_softmax","repo":"yjlee22/cyclicaggregation","repo_kind":"listed","path":"src/update.py","file_url":"https://github.com/yjlee22/cyclicaggregation/blob/HEAD/src/update.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":"cef7a737bbb9e0c3"}},{"code_sha256_prefix":"2bea7f2b80b97b55","entry":"server_opt","repo":"yjlee22/cyclicaggregation","repo_kind":"listed","path":"src/aggregation.py","file_url":"https://github.com/yjlee22/cyclicaggregation/blob/HEAD/src/aggregation.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":"2bea7f2b80b97b55"}},{"code_sha256_prefix":"ac7a4bfb5211f401","entry":"load_data","repo":"yjlee22/cyclicaggregation","repo_kind":"listed","path":"utils/dataset.py","file_url":"https://github.com/yjlee22/cyclicaggregation/blob/HEAD/utils/dataset.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":"ac7a4bfb5211f401"}},{"code_sha256_prefix":"9e54cc90c5f2698e","entry":"tabulate_events","repo":"yjlee22/cyclicaggregation","repo_kind":"listed","path":"tb2csv.py","file_url":"https://github.com/yjlee22/cyclicaggregation/blob/HEAD/tb2csv.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":"9e54cc90c5f2698e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}