Federated Variational Inference Methods for Structured Latent Variable Models

Conor Hassan, Robert Salomone, Kerrie L. MengersenarXiv 2023 · DOI

Abstract

Federated Learning (FL) has traditionally focused on "flat" models, often struggling with the complexities of structured probabilistic models that incorporate both global and local latent variables. We introduce Structured Federated Variational Inference (SFVI), a framework designed for distributed training of these complex models. SFVI ensures partition invariance, while its communication-efficient variant, SFVI-Avg, utilizes Wasserstein barycenters for robust distributional averaging across heterogeneous data sources. Our evaluations on hierarchical Bayesian Neural Networks and topic models demonstrate that SFVI significantly outperforms existing Bayesian FL methods in non-IID settings, achieving up to 97.5% accuracy on heterogeneous MNIST.

Introduction: The Challenge of Structured Data

Federated Learning (FL) enables the training of models on private, distributed data without centralizing sensitive information. While effective for standard neural networks, many real-world applications—such as medical diagnostics or personalized recommendation systems—benefit from structured probabilistic models. These models feature "global" parameters shared across the network and "local" latent variables unique to specific data silos.

Comparison of model structures: Standard FL, Bayesian FL, and the proposed Structured Bayesian FL alongside the SFVI inference framework.

Existing FL methods typically assume identical data structures across silos or lack the mechanisms to handle local latent variables. Furthermore, data heterogeneity (non-IID data) poses a significant challenge for standard parameter averaging, often leading to poor convergence. The SFVI framework addresses these gaps by mirroring the conditional independence of structured models within the variational approximation.

Methods: Structured Federated Variational Inference

The authors propose two primary algorithms to facilitate training in structured federated environments.

SFVI (Structured Federated Variational Inference)

SFVI is a distributed implementation of stochastic variational inference. It utilizes the "reparameterization trick" and a "Sticking the Landing" (STL) gradient estimator to update model parameters. A defining characteristic of SFVI is its partition invariance: the algorithm yields the same results regardless of how data is distributed across silos, effectively matching the performance of centralized training.

Detailed graphical model for Structured Federated Variational Inference (SFVI), showing the flow of global and local information.

SFVI-Avg: Communication-Efficient Averaging

To reduce communication overhead, SFVI-Avg allows silos to perform multiple local updates before synchronizing with the central server. Unlike standard FedAvg, which averages raw parameters, SFVI-Avg computes a Wasserstein barycenter. This provides a more principled geometric "middle ground" between probability distributions, enhancing robustness in highly heterogeneous settings.

Experimental Evaluation

The SFVI framework was evaluated across three distinct benchmarks:

  • MNIST (Hierarchical BNN): Tested under "severe heterogeneity" where silos were dominated by single digits.
  • 20Newsgroups (Topic Modeling): Evaluated using ProdLDA to handle high-dimensional latent spaces.
  • Six Cities Dataset: A longitudinal study of child health used to test the algorithm on small, unevenly split data.

Key Results

  • Superior Performance: On heterogeneous MNIST, the Hierarchical BNN with SFVI achieved 97.5% accuracy, outperforming state-of-the-art Bayesian FL methods like pFedBayes (94.1%).
  • Topic Coherence: In topic modeling, SFVI-Avg outperformed the base SFVI in terms of "topic coherence," despite SFVI having a higher Evidence Lower Bound (ELBO).
  • Convergence Speed: Utilizing SFVI-Avg for an initial "warm-up" phase (e.g., 5 rounds) before switching to standard SFVI was found to cut total convergence time in half.

Discussion and Insights

The success of these methods suggests that hierarchical models are a natural fit for Federated Learning. By allowing local latent variables to "absorb" silo-specific variations, the global model can more effectively learn shared signals from non-IID data. Additionally, the move toward distributional averaging via Wasserstein barycenters offers a more robust foundation for federated Bayesian inference than simple parameter averaging.

Limitations and Future Work

Despite its strengths, SFVI-Avg is not a panacea; it failed to produce reasonable results for the Bayesian Logistic Mixed Model in the Six Cities dataset, suggesting sensitivity to specific model scales or architectures. Future work will focus on integrating Differential Privacy (DP) to provide formal security guarantees for local variables and exploring alternative objective functions beyond the ELBO.

Summary updated

BibTeX
@misc{hassan2023federated,
  author = {Conor Hassan and Robert Salomone and Kerrie L. Mengersen},
  title = {{Federated Variational Inference Methods for Structured Latent Variable Models}},
  year = {2023},
  eprint = {2302.03314},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2302.03314},
}
Figure