{"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/salvaging-federated-learning-by-local","title":"Salvaging Federated Learning by Local Adaptation","arxiv_id":"2002.04758","date":"2020-02-12","proceeding":null,"authors":["Tao Yu","Eugene Bagdasaryan","Vitaly Shmatikov"],"abstract":"Federated learning (FL) is a heavily promoted approach for training ML models on sensitive data, e.g., text typed by users on their smartphones. FL is expressly designed for training on data that are unbalanced and non-iid across the participants. To ensure privacy and integrity of the fedeated model, latest FL approaches use differential privacy or robust aggregation. We look at FL from the \\emph{local} viewpoint of an individual participant and ask: (1) do participants have an incentive to participate in FL? (2) how can participants \\emph{individually} improve the quality of their local models, without re-designing the FL framework and/or involving other participants? First, we show that on standard tasks such as next-word prediction, many participants gain no benefit from FL because the federated model is less accurate on their data than the models they can train locally on their own. Second, we show that differential privacy and robust aggregation make this problem worse by further destroying the accuracy of the federated model for many participants. Then, we evaluate three techniques for local adaptation of federated models: fine-tuning, multi-task learning, and knowledge distillation. We analyze where each is applicable and demonstrate that all participants benefit from local adaptation. Participants whose local models are poor obtain big accuracy improvements over conventional FL. Participants whose local models are better than the federated model\\textemdash and who have no incentive to participate in FL today\\textemdash improve less, but sufficiently to make the adapted federated model better than their local models.","url_abs":"https://arxiv.org/abs/2002.04758v3","url_pdf":"https://arxiv.org/pdf/2002.04758v3.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":"salvaging-federated-learning-by-local","repo_url":"https://github.com/ebagdasa/federated_adaptation","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"salvaging-federated-learning-by-local","repo_url":"https://github.com/SanaAwan5/FTLSimulation","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"federated-learning","task_name":"Federated Learning"},{"task_slug":"knowledge-distillation","task_name":"Knowledge Distillation"},{"task_slug":"multi-task-learning","task_name":"Multi-Task Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2002.04758","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2002.04758"}},"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/SanaAwan5/FTLSimulation","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ebagdasa/federated_adaptation","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":8},"by_repo_kind":{"official":{"samples":7,"ran":0,"repositories":1},"listed":{"samples":1,"ran":0,"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":"e5d2ae1542e8323e","entry":"create_table","repo":"ebagdasa/federated_adaptation","repo_kind":"official","path":"utils/utils.py","file_url":"https://github.com/ebagdasa/federated_adaptation/blob/HEAD/utils/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":"e5d2ae1542e8323e"}},{"code_sha256_prefix":"51c7799aa4830ba9","entry":"criterion_ewc","repo":"ebagdasa/federated_adaptation","repo_kind":"official","path":"utils/utils.py","file_url":"https://github.com/ebagdasa/federated_adaptation/blob/HEAD/utils/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":"51c7799aa4830ba9"}},{"code_sha256_prefix":"5ce7fe7ffc86a845","entry":"eval_one_participant","repo":"ebagdasa/federated_adaptation","repo_kind":"official","path":"adapt.py","file_url":"https://github.com/ebagdasa/federated_adaptation/blob/HEAD/adapt.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":"5ce7fe7ffc86a845"}},{"code_sha256_prefix":"e655eb5653268285","entry":"fisher_matrix_diag","repo":"ebagdasa/federated_adaptation","repo_kind":"official","path":"utils/utils.py","file_url":"https://github.com/ebagdasa/federated_adaptation/blob/HEAD/utils/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":"e655eb5653268285"}},{"code_sha256_prefix":"acda036b841b1af4","entry":"get_word_list","repo":"ebagdasa/federated_adaptation","repo_kind":"official","path":"utils/text_load.py","file_url":"https://github.com/ebagdasa/federated_adaptation/blob/HEAD/utils/text_load.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":"acda036b841b1af4"}},{"code_sha256_prefix":"067dfdd931c5b6e2","entry":"test_globalmodel_local","repo":"ebagdasa/federated_adaptation","repo_kind":"official","path":"adapt.py","file_url":"https://github.com/ebagdasa/federated_adaptation/blob/HEAD/adapt.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":"067dfdd931c5b6e2"}},{"code_sha256_prefix":"2f2c95358bb2ba4b","entry":"train","repo":"ebagdasa/federated_adaptation","repo_kind":"official","path":"training.py","file_url":"https://github.com/ebagdasa/federated_adaptation/blob/HEAD/training.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":"2f2c95358bb2ba4b"}},{"code_sha256_prefix":"d1eabb8d72b78b3a","entry":"train","repo":"SanaAwan5/FTLSimulation","repo_kind":"listed","path":"training.py","file_url":"https://github.com/SanaAwan5/FTLSimulation/blob/HEAD/training.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":"d1eabb8d72b78b3a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}