{"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/federated-learning-as-variational-inference-a","title":"Federated Learning as Variational Inference: A Scalable Expectation Propagation Approach","arxiv_id":"2302.04228","date":"2023-02-08","proceeding":null,"authors":["Han Guo","Philip Greengard","Hongyi Wang","Andrew Gelman","Yoon Kim","Eric P. Xing"],"abstract":"The canonical formulation of federated learning treats it as a distributed optimization problem where the model parameters are optimized against a global loss function that decomposes across client loss functions. A recent alternative formulation instead treats federated learning as a distributed inference problem, where the goal is to infer a global posterior from partitioned client data (Al-Shedivat et al., 2021). This paper extends the inference view and describes a variational inference formulation of federated learning where the goal is to find a global variational posterior that well-approximates the true posterior. This naturally motivates an expectation propagation approach to federated learning (FedEP), where approximations to the global posterior are iteratively refined through probabilistic message-passing between the central server and the clients. We conduct an extensive empirical study across various algorithmic considerations and describe practical strategies for scaling up expectation propagation to the modern federated setting. We apply FedEP on standard federated learning benchmarks and find that it outperforms strong baselines in terms of both convergence speed and accuracy.","url_abs":"https://arxiv.org/abs/2302.04228v1","url_pdf":"https://arxiv.org/pdf/2302.04228v1.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":"federated-learning-as-variational-inference-a","repo_url":"https://github.com/hanguo97/expectation-propagation","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"jax","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"distributed-optimization","task_name":"Distributed Optimization"},{"task_slug":"federated-learning","task_name":"Federated Learning"},{"task_slug":"variational-inference","task_name":"Variational Inference"}],"methods":[{"method_slug":"speed","method_name":"SPEED"},{"method_slug":"variational-inference","method_name":"Variational Inference"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2302.04228","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2302.04228"}},"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/hanguo97/expectation-propagation","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_draft_wrong":1,"unverified":2},"by_repo_kind":{"official":{"samples":3,"ran":1,"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":"e87e32e7160fb616","entry":"sample_clients_uniformly","repo":"hanguo97/expectation-propagation","repo_kind":"official","path":"federated/learning/algorithms.py","file_url":"https://github.com/hanguo97/expectation-propagation/blob/HEAD/federated/learning/algorithms.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e87e32e7160fb616"}},{"code_sha256_prefix":"4ec382a64858e145","entry":"pack_tree","repo":"hanguo97/expectation-propagation","repo_kind":"official","path":"federated/modules/base.py","file_url":"https://github.com/hanguo97/expectation-propagation/blob/HEAD/federated/modules/base.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4ec382a64858e145"}},{"code_sha256_prefix":"da71dd2e862b8d7a","entry":"unpack_tree","repo":"hanguo97/expectation-propagation","repo_kind":"official","path":"federated/modules/base.py","file_url":"https://github.com/hanguo97/expectation-propagation/blob/HEAD/federated/modules/base.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"da71dd2e862b8d7a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}