{"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/adaptive-test-time-personalization-for-1","title":"Adaptive Test-Time Personalization for Federated Learning","arxiv_id":"2310.18816","date":"2023-10-28","proceeding":"NeurIPS 2023 11","authors":["Wenxuan Bao","Tianxin Wei","Haohan Wang","Jingrui He"],"abstract":"Personalized federated learning algorithms have shown promising results in adapting models to various distribution shifts. However, most of these methods require labeled data on testing clients for personalization, which is usually unavailable in real-world scenarios. In this paper, we introduce a novel setting called test-time personalized federated learning (TTPFL), where clients locally adapt a global model in an unsupervised way without relying on any labeled data during test-time. While traditional test-time adaptation (TTA) can be used in this scenario, most of them inherently assume training data come from a single domain, while they come from multiple clients (source domains) with different distributions. Overlooking these domain interrelationships can result in suboptimal generalization. Moreover, most TTA algorithms are designed for a specific kind of distribution shift and lack the flexibility to handle multiple kinds of distribution shifts in FL. In this paper, we find that this lack of flexibility partially results from their pre-defining which modules to adapt in the model. To tackle this challenge, we propose a novel algorithm called ATP to adaptively learns the adaptation rates for each module in the model from distribution shifts among source domains. Theoretical analysis proves the strong generalization of ATP. Extensive experiments demonstrate its superiority in handling various distribution shifts including label shift, image corruptions, and domain shift, outperforming existing TTA methods across multiple datasets and model architectures. Our code is available at https://github.com/baowenxuan/ATP .","url_abs":"https://arxiv.org/abs/2310.18816v1","url_pdf":"https://arxiv.org/pdf/2310.18816v1.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":"adaptive-test-time-personalization-for-1","repo_url":"https://github.com/baowenxuan/atp","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"federated-learning","task_name":"Federated Learning"},{"task_slug":"personalized-federated-learning","task_name":"Personalized Federated Learning"},{"task_slug":"test-time-adaptation","task_name":"Test-time Adaptation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2310.18816","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.18816"}},"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/baowenxuan/ATP","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/baowenxuan/atp","reach":{"status":"ok"}}],"summary":{"ran":4,"ran_draft_wrong":3},"by_repo_kind":{"official":{"samples":7,"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":7,"samples":[{"code_sha256_prefix":"3206f9a8f3166ed4","entry":"ATPTestClient","repo":"baowenxuan/atp","repo_kind":"official","path":"src/algorithm/ATPTest.py","file_url":"https://github.com/baowenxuan/atp/blob/HEAD/src/algorithm/ATPTest.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":"3206f9a8f3166ed4"}},{"code_sha256_prefix":"d8c3e85b9c22a7fc","entry":"BaseClient","repo":"baowenxuan/atp","repo_kind":"official","path":"src/algorithm/ATPTest.py","file_url":"https://github.com/baowenxuan/atp/blob/HEAD/src/algorithm/ATPTest.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":"d8c3e85b9c22a7fc"}},{"code_sha256_prefix":"d82d69d3e18a9cd9","entry":"create_loss","repo":"baowenxuan/atp","repo_kind":"official","path":"src/algorithm/ATPTest.py","file_url":"https://github.com/baowenxuan/atp/blob/HEAD/src/algorithm/ATPTest.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d82d69d3e18a9cd9"}},{"code_sha256_prefix":"059bac42a37340b6","entry":"create_metric","repo":"baowenxuan/atp","repo_kind":"official","path":"src/algorithm/ATPTest.py","file_url":"https://github.com/baowenxuan/atp/blob/HEAD/src/algorithm/ATPTest.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"059bac42a37340b6"}},{"code_sha256_prefix":"f194bfd61755bba9","entry":"marginal_entropy","repo":"baowenxuan/ATP","repo_kind":"official","path":"src/algorithm/MEMO.py","file_url":"https://github.com/baowenxuan/ATP/blob/HEAD/src/algorithm/MEMO.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f194bfd61755bba9"}},{"code_sha256_prefix":"a4d86da6bf316a22","entry":"project_to_simplex","repo":"baowenxuan/ATP","repo_kind":"official","path":"src/algorithm/BBSE.py","file_url":"https://github.com/baowenxuan/ATP/blob/HEAD/src/algorithm/BBSE.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a4d86da6bf316a22"}},{"code_sha256_prefix":"281b3356d574d14e","entry":"wavg_state","repo":"baowenxuan/atp","repo_kind":"official","path":"src/algorithm/ATPTest.py","file_url":"https://github.com/baowenxuan/atp/blob/HEAD/src/algorithm/ATPTest.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"281b3356d574d14e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}