{"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/fedclip-fast-generalization-and","title":"FedCLIP: Fast Generalization and Personalization for CLIP in Federated Learning","arxiv_id":"2302.13485","date":"2023-02-27","proceeding":null,"authors":["Wang Lu","Xixu Hu","Jindong Wang","Xing Xie"],"abstract":"Federated learning (FL) has emerged as a new paradigm for privacy-preserving computation in recent years. Unfortunately, FL faces two critical challenges that hinder its actual performance: data distribution heterogeneity and high resource costs brought by large foundation models. Specifically, the non-IID data in different clients make existing FL algorithms hard to converge while the high resource costs, including computational and communication costs that increase the deployment difficulty in real-world scenarios. In this paper, we propose an effective yet simple method, named FedCLIP, to achieve fast generalization and personalization for CLIP in federated learning. Concretely, we design an attention-based adapter for the large model, CLIP, and the rest operations merely depend on adapters. Lightweight adapters can make the most use of pretrained model information and ensure models be adaptive for clients in specific tasks. Simultaneously, small-scale operations can mitigate the computational burden and communication burden caused by large models. Extensive experiments are conducted on three datasets with distribution shifts. Qualitative and quantitative results demonstrate that FedCLIP significantly outperforms other baselines (9% overall improvements on PACS) and effectively reduces computational and communication costs (283x faster than FedAVG). Our code will be available at: https://github.com/microsoft/PersonalizedFL.","url_abs":"https://arxiv.org/abs/2302.13485v2","url_pdf":"https://arxiv.org/pdf/2302.13485v2.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":"fedclip-fast-generalization-and","repo_url":"https://github.com/microsoft/personalizedfl","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"federated-learning","task_name":"Federated Learning"},{"task_slug":"privacy-preserving","task_name":"Privacy Preserving"}],"methods":[{"method_slug":"adapter","method_name":"Adapter"},{"method_slug":"clip","method_name":"CLIP"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2302.13485","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2302.13485"}},"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/microsoft/personalizedfl","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":12},"by_repo_kind":{"official":{"samples":12,"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":"f74d575af34e74e7","entry":"build_non_iid_by_dirichlet","repo":"microsoft/personalizedfl","repo_kind":"official","path":"datautil/datasplit.py","file_url":"https://github.com/microsoft/personalizedfl/blob/HEAD/datautil/datasplit.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":"f74d575af34e74e7"}},{"code_sha256_prefix":"10459ba23ee74a45","entry":"communication","repo":"microsoft/personalizedfl","repo_kind":"official","path":"alg/core/comm.py","file_url":"https://github.com/microsoft/personalizedfl/blob/HEAD/alg/core/comm.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":"10459ba23ee74a45"}},{"code_sha256_prefix":"edd2e01f90db21d4","entry":"communication","repo":"microsoft/personalizedfl","repo_kind":"official","path":"fedclip/methods/fed_at_clip.py","file_url":"https://github.com/microsoft/personalizedfl/blob/HEAD/fedclip/methods/fed_at_clip.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":"edd2e01f90db21d4"}},{"code_sha256_prefix":"a839fc9a58cb6763","entry":"define_val_dataset","repo":"microsoft/personalizedfl","repo_kind":"official","path":"datautil/datasplit.py","file_url":"https://github.com/microsoft/personalizedfl/blob/HEAD/datautil/datasplit.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":"a839fc9a58cb6763"}},{"code_sha256_prefix":"b0bc80b1655a6802","entry":"get_algorithm_class","repo":"microsoft/personalizedfl","repo_kind":"official","path":"alg/algs.py","file_url":"https://github.com/microsoft/personalizedfl/blob/HEAD/alg/algs.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":"b0bc80b1655a6802"}},{"code_sha256_prefix":"407179ecda48fdf8","entry":"get_data","repo":"microsoft/personalizedfl","repo_kind":"official","path":"datautil/prepare_data.py","file_url":"https://github.com/microsoft/personalizedfl/blob/HEAD/datautil/prepare_data.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":"407179ecda48fdf8"}},{"code_sha256_prefix":"d16f8082ebd071a3","entry":"get_form","repo":"microsoft/personalizedfl","repo_kind":"official","path":"alg/fedap.py","file_url":"https://github.com/microsoft/personalizedfl/blob/HEAD/alg/fedap.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":"d16f8082ebd071a3"}},{"code_sha256_prefix":"485a9696257a76b0","entry":"get_wasserstein","repo":"microsoft/personalizedfl","repo_kind":"official","path":"alg/fedap.py","file_url":"https://github.com/microsoft/personalizedfl/blob/HEAD/alg/fedap.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":"485a9696257a76b0"}},{"code_sha256_prefix":"5ad3d27e05d47a52","entry":"get_weight_matrix1","repo":"microsoft/personalizedfl","repo_kind":"official","path":"alg/fedap.py","file_url":"https://github.com/microsoft/personalizedfl/blob/HEAD/alg/fedap.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":"5ad3d27e05d47a52"}},{"code_sha256_prefix":"a7b76be7899c4bfa","entry":"getfeadataloader","repo":"microsoft/personalizedfl","repo_kind":"official","path":"datautil/prepare_data.py","file_url":"https://github.com/microsoft/personalizedfl/blob/HEAD/datautil/prepare_data.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":"a7b76be7899c4bfa"}},{"code_sha256_prefix":"4c58833df55e5fdc","entry":"img_union","repo":"microsoft/personalizedfl","repo_kind":"official","path":"datautil/prepare_data.py","file_url":"https://github.com/microsoft/personalizedfl/blob/HEAD/datautil/prepare_data.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":"4c58833df55e5fdc"}},{"code_sha256_prefix":"f17fef1111fa1087","entry":"record_class_distribution","repo":"microsoft/personalizedfl","repo_kind":"official","path":"datautil/datasplit.py","file_url":"https://github.com/microsoft/personalizedfl/blob/HEAD/datautil/datasplit.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":"f17fef1111fa1087"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}