A Bayesian Framework for Clustered Federated Learning

Peng Wu, Tales Imbiriba, Pau Closas

TL;DR

This paper reinterprets Clustered Federated Learning (CFL) through the lens of Bayesian data association, a technique traditionally used in multi-target tracking. By treating global models as "targets" and local client data as "measurements," the authors propose a framework (BCFL) that maintains multiple probabilistic hypotheses about which clients belong to which clusters, significantly improving performance on heterogeneous (non-IID) data compared to traditional "hard-clustering" methods.

What Problem Does This Paper Address?

Federated Learning (FL) allows multiple devices to train a model collaboratively without sharing raw data. However, a major hurdle is non-IID data: when different clients have vastly different data distributions (e.g., one user takes photos of cats, another of cars), a single global model often fails to perform well for everyone.

Clustered Federated Learning (CFL) tries to solve this by grouping similar clients into clusters, each with its own specialized model. The problem is that most current CFL methods use "hard" or "greedy" assignments—once a client is put in a box, they stay there. This often leads to inefficient use of information, poor handling of uncertainty, and a lack of a unified theory to describe how information should actually be shared between these groups.

Methods

The authors introduce the General Bayesian CFL (BCFL) framework. The core innovation is treating the relationship between clients and clusters as a probabilistic data association problem.

Because calculating every possible client-cluster combination across multiple rounds is computationally impossible (a "hypothesis explosion"), they propose three practical algorithms that trade off accuracy for speed:

  1. BCFL-G (Greedy): The simplest version. It selects only the single most likely association at each round. It’s computationally cheap and similar to existing state-of-the-art methods but sits within a formal Bayesian structure.
  2. BCFL-C (Consensus): It identifies the $M$ best associations, updates the models, and then "merges" them back into a single hypothesis using moment matching (fusing Gaussian densities). This better captures the uncertainty of the clustering process.
  3. BCFL-MH (Multi-Hypothesis): The most robust version. It keeps track of $M$ different "trajectories" of associations over time. It explores multiple possible clustering paths simultaneously, pruning the least likely ones to keep the math manageable.

To solve the underlying optimization of "who goes where," the authors adapt the Hungarian algorithm and Murty’s algorithm, turning the clustering step into a classic assignment problem.

Datasets

The framework was evaluated on four well-known datasets, modified to simulate different types of data skew:

  • Feature-Skewed: Digits-Five (five different styles of handwritten digits) and AmazonReview (sentiment analysis across different product categories).
  • Label-Skewed: Fashion-MNIST and CIFAR-10, where data was partitioned using a Dirichlet distribution to ensure clients held different proportions of classes.

Key Insights and Ideas

  • The Tracking Analogy: The most striking idea is the analogy to computer vision. In multi-target tracking, you have to decide which "blip" on a radar belongs to which "plane." Here, the "blips" are local client updates and the "planes" are the cluster models.
  • Embracing Uncertainty: Traditional CFL assumes we know which cluster a client belongs to. BCFL acknowledges we might be wrong. By maintaining multiple hypotheses, the system can "change its mind" or allow a client's data to influence multiple models proportionally.
  • Cross-Pollination: Because the framework is probabilistic, it allows for "soft" information sharing. Even if a client is 90% likely to be in Cluster A, their 10% association with Cluster B allows for a degree of knowledge transfer that hard-clustering prevents.
  • Hypothesis Management: The paper provides a principled way to handle the "curse of dimensionality" in clustering by using pruning and merging techniques borrowed from signal processing.

Key Results

  • Superior Accuracy: The BCFL-MH variant consistently outperformed baseline models (like FedAvg) and state-of-the-art clustered methods (like WeCFL and FeSEM). For example, on the difficult CIFAR-10 dataset, BCFL-MH-6 achieved 75.26% accuracy, significantly higher than WeCFL's 72.91%.
  • Faster Convergence: The Bayesian variants reached high accuracy levels in fewer communication rounds than competing methods, particularly on the AmazonReview and Fashion-MNIST tasks.
  • Better Clustering Visualization: Using cluster graphs, the authors showed that BCFL-MH forms more "meaningful" connections between clients. While hard-clustering methods create isolated islands, BCFL allows for a web of connections that better represents the underlying data similarities.

Limitations and Future Work

  • Computational Overhead: The BCFL-MH algorithm is significantly more expensive than standard FL. Maintaining multiple hypotheses requires more memory and more local training steps, which might be a dealbreaker for low-power mobile devices.
  • Fixed Cluster Count ($K$): The current framework requires the number of clusters ($K$) to be defined upfront. In real-world scenarios, we rarely know how many "types" of users exist.
  • Future Directions: The authors suggest extending the framework to estimate the number of clusters automatically (handling "unknown cardinality") and further optimizing the communication costs associated with sending multiple model hypotheses.

Summary updated

BibTeX
@article{wu2025bayesian,
  author = {Peng Wu and Tales Imbiriba and Pau Closas},
  title = {{A Bayesian Framework for Clustered Federated Learning}},
  journal = {IEEE Transactions on Pattern Analysis and Machine Intelligence},
  year = {2025},
  doi = {10.1109/tpami.2025.3637562},
}
Figure