- Introduced by
- Yurochkin, M. et al.; McMahan, H. B. et al. (foundational federated learning)
- Year
- 2019
- Type
- Probabilistic federated ensemble
- Family
- Machine learning
What does it do?
Bayesian Federated Learning (BFL) trains a model across several clients that keep their data local. Each client maintains a posterior distribution over model parameters rather than a single point estimate, and the server combines these posterior summaries into a global posterior, so predictions can carry uncertainty.
The approach is aimed at distributed, privacy-constrained data settings.
The intuition behind the method
Standard federated learning sends weight vectors between clients and a central server, but the weights do not say how confident each client is. Bayesian Federated Learning treats model parameters as probability distributions: each client computes a local posterior that combines a shared prior with its own data. The server aggregates these posteriors into a global posterior. In Gaussian variants, the aggregation weights each client's mean by its precision, so clients whose posteriors are more concentrated have more influence. The global model can then express uncertainty across test inputs, not only a point prediction.
History
Federated learning was introduced by McMahan et al. in 2017 with the FedAvg algorithm. Corinzia and Buhmann (2019) proposed variational federated multi-task learning. Yurochkin et al. (2019) introduced Probabilistic Federated Neural Matching (PFNM), a Bayesian nonparametric approach that aligns neurons across clients before averaging.
When to use it
Choose Bayesian Federated Learning when data sit with several clients or institutions that cannot share raw records, such as hospitals, banks or devices, and when calibrated predictive uncertainty matters for downstream decisions. It is also a candidate when client datasets differ in size or distribution and you want aggregation to reflect how much evidence each client holds. Standard federated averaging is usually sufficient when only point predictions are needed. Do not use it when there are very many clients, when the communication budget is tight and posterior summaries cannot be transmitted cheaply, or when all labelled data can be pooled at one site. In that last case, ordinary Bayesian inference on the pooled data is simpler. If some clients may be unreliable or adversarial, BFL alone is not sufficient; pair it with Byzantine-robust aggregation rules.
Limitations and considerations
- Exact local posteriors are intractable for large neural networks, so practical use relies on approximations such as variational inference or Laplace methods; the approximation error carries into the global posterior.
- Transmitting full covariance matrices each round costs more communication than sending weight vectors as in FedAvg.
- Evidence on behaviour with very many clients is limited; how the method performs at large client counts is not established.
- The shared prior must suit all clients. A prior that is badly matched to the local data affects every local posterior and the aggregate.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Predictions carry posterior uncertainty, so the output includes predictive variances or credible intervals rather than only point estimates.
- In Gaussian variants, precision-weighted aggregation gives less influence to clients whose local posteriors are broad, which reflects clients with less evidence without a separate weighting rule.
- Only posterior summaries are communicated between clients and server; raw records stay local.
- Bayesian nonparametric variants such as PFNM can match and merge local models of different sizes, which simple parameter averaging does not handle.
Applications
- Privacy-preserving clinical model training across hospitals with heterogeneous patient populations.
- Financial risk modeling across banking institutions that cannot share transaction records.
- Edge-device personalization where each device (phone, sensor) has a small private dataset and calibrated uncertainty is needed.
- Federated anomaly detection with uncertainty-aware flagging of out-of-distribution inputs (an illustrative use case, not drawn from the cited sources).
- Multi-institutional NLP model training on confidential text corpora (legal documents, medical notes).
How it works
How it works
Each participating client starts from a shared global prior over model parameters, for example a Gaussian or a nonparametric prior, and runs local Bayesian inference on its private dataset. The page names variational inference, Laplace approximation and MCMC as options. The resulting local posterior reflects both the best estimate and the uncertainty left by the client's data size and distribution.
Clients send only a compact summary of their local posterior to the central server. For a Gaussian approximation this is a mean and covariance; in Bayesian nonparametric variants it includes the matched neurons. Raw data stay on the client. The shared prior is the common reference that keeps the local posteriors on a comparable scale.
The server combines the received posterior summaries into a global posterior. In Gaussian variants this is a precision-weighted average of the local means. This aggregation follows from multiplying Gaussian posteriors under the assumptions that local posteriors are Gaussian, that clients are conditionally independent given the parameters, and that the shared prior is removed correctly when the local posteriors are combined. When these assumptions hold only approximately, the aggregate is approximate. In Bayesian nonparametric variants such as PFNM, the server first aligns neurons across heterogeneous local models using Hungarian matching and then averages the matched units.
The global posterior is sent back to the clients as the prior for the next communication round. Because the update is a full distribution rather than a single weight vector, the uncertainty accumulated across clients is carried forward and revised in each round.
Communication rounds continue until the global posterior changes by less than a chosen threshold, for example a KL divergence between successive global posteriors, or until a maximum number of rounds is reached. This is a stopping heuristic: the method does not guarantee convergence, and the threshold and round limit should be checked by monitoring the global posterior and held-out performance across rounds. Predictions are made from the final global posterior by integrating over the model parameters, which gives the predictive uncertainty.
Common pitfalls
- Choosing the shared prior without checking it against the clients' data: the prior has the strongest influence on clients with little data, so a prior far from their likelihood can dominate their local posteriors.
- Reporting only point-estimate metrics such as accuracy or RMSE and discarding the predictive uncertainty, which is the main output the Bayesian framework adds.
- Treating Bayesian Federated Learning as equivalent to FedAvg with dropout or noise regularization; those procedures do not produce posterior distributions over parameters.
- Ignoring the communication cost of posterior summaries; full covariances may need compression or approximation before each round.
- Evaluating only on IID test splits, which does not test the heterogeneity and out-of-distribution behaviour that motivate the Bayesian treatment.
Frequently asked questions
How does Bayesian Federated Learning differ from standard FedAvg?
FedAvg aggregates point-estimate weight vectors by averaging. Bayesian FL aggregates posterior distributions, which carry uncertainty information. The global model can then express confidence levels, and in Gaussian variants it weights client contributions by their precision rather than treating all clients equally.
Is Bayesian Federated Learning feasible for deep neural networks?
Yes, but only with approximations. Exact Bayesian inference is intractable for deep networks, so practitioners use approximations such as Laplace methods, mean-field variational inference or MC Dropout. These approximations introduce bias, and the quality of the resulting uncertainty depends on how well they fit the local models.
How many clients are needed?
There is no fixed minimum. The Bayesian framework is most clearly motivated in settings with heterogeneous data and a moderate number of clients. With very large client counts, communication overhead and approximation quality become the main constraints, and the method's behaviour in that regime is not established here.
What output does the method produce?
The global posterior over model parameters. In practice this is usually summarised as predictive means and variances, or credible intervals, for each test point. Some implementations also provide client-level posteriors for personalized prediction.
Can this method defend against adversarial or poisoned clients?
Not by itself. Bayesian aggregation does not provide guaranteed Byzantine robustness: a client that reports confident but incorrect posteriors can dominate a precision-weighted average. When adversarial clients are possible, Byzantine-robust aggregation rules should be used alongside BFL.
Related methods
Sources
Yurochkin, M., Agarwal, M., Ghosh, S., Greenewald, K., Hoang, N., & Khazaeni, Y. (2019). Bayesian Nonparametric Federated Learning of Neural Networks. Proceedings of the 36th International Conference on Machine Learning (ICML 2019), PMLR 97, 7101–7110.
Open publication referenceCorinzia, L., & Buhmann, J. M. (2019). Variational Federated Multi-Task Learning. arXiv preprint arXiv:1906.06268.
Open publication reference