Beyond the Federation: Topology-aware Federated Learning for Generalization to Unseen Clients

Mengmeng Ma, Tang Li, Xi Peng

TL;DR

Topology-aware Federated Learning (TFL) addresses the "out-of-federation" (OOF) generalization gap, where models trained collaboratively fail when deployed to new, unseen clients. By inferring a graph of client relationships from model weights and prioritizing "influential" nodes during training, TFL achieves superior robustness and scalability compared to existing state-of-the-art methods.

What Problem Does This Paper Address?

Federated Learning (FL) allows multiple institutions to train a shared model without exchanging raw data. While effective for participating members, these models often suffer from catastrophic performance degradation when applied to unseen clients outside the original federation. This is known as the out-of-federation (OOF) generalization problem.

As shown in Figure 1, a model with 85.1% accuracy on participating hospitals can drop to 57.2% when faced with OOF data—a 27.9% decline. Existing solutions to this problem typically fall into two traps: they either require intensive communication (client augmentation) or heavy local computation (adversarial alignment), making them difficult to scale to large, real-world networks.

Figure 1. Our empirical evaluation of patient mortality predic- tion using Federated Learning on distributed Healthcare dataset (eICU (Pollard et al., 2018)). We observed that a model exhibiting high accuracy with in-federation (IF) data can fail catastrophi- cally when presented with out-of-federation (OOF) data.

Methods

The authors propose Topology-aware Federated Learning (TFL), which treats the federation as a graph where nodes are clients and edges represent the similarity of their data distributions. The framework consists of two alternating steps:

  1. Client Topology Learning (CTL): To preserve privacy, the server does not look at client data. Instead, it uses local model weights as "node embeddings." The intuition is that clients with similar data distributions will produce similar model updates. The server constructs an $\epsilon$-graph by measuring pairwise similarity (e.g., dot product) between these weights.
  2. Learning on Client Topology (LCT): Once the topology is established, TFL identifies "influential" clients using graph centrality measures (specifically betweenness centrality). These are clients that are most representative of the overall distribution space.

TFL then formulates a novel minimax optimization problem. Unlike standard robust FL, which focuses solely on the "worst-case" (hardest) clients, TFL uses the learned topology as a prior to regularize the training process. This ensures the model learns from representative, influential distributions rather than over-fitting to outliers.

Figure 3. Overview of Topology-aware Federated Learning (TFL). TFL contains two alternating steps: client topology learning (CTL) and learning on client topology (LCT). CTL learn the client topology that describes the relationships between local clients. We use model weights as node embedding and construct a ϵ-graph by measuring the similarity of node pairs. LCT leverage the learned client topology to achieve better OOF robustness. We identify the influential client and then use the influential client as prior knowledge to regularize a distributionally robust optimization framework. In this way, the optimization process can balance the “worst-case” client and the “influential” client to avoid overly pessimistic models with compromised OOF-resiliency.

Datasets

The authors evaluated TFL on a diverse set of tasks including classification, regression, and segmentation:

  • Real-world Healthcare: eICU (patient mortality prediction) and FeTS (brain tumor segmentation). The authors curated specific OOF protocols for these datasets.
  • Climate Science: TPT-48 (US state temperature prediction).
  • Standard Benchmarks: PACS, OfficeHome, and CIFAR-10/-100 for general image classification and domain generalization.

Key Insights and Ideas

  • Weights as Proxies: The paper empirically demonstrates that model weights are highly effective proxies for underlying data distributions. As seen in Figure 4, clients with similar data show significantly higher model similarity scores across various metrics.
  • Influential vs. Worst-case: A major "aha moment" is the realization that focusing only on the worst-performing clients (the standard approach in distributionally robust optimization) can lead to overly pessimistic models that generalize poorly. By identifying "influential" nodes that act as bridges in the distribution graph, TFL builds a more balanced and resilient global model.
  • Scalability Sweet Spot: TFL manages to achieve high OOF accuracy without the massive time penalties of methods like FedDG. Figure 2 highlights how TFL provides a superior trade-off between robustness and wall-clock time.
Figure 2. Accuracy vs. wall-clock time on PACS dataset (Li et al.,

Key Results

  • Superior Robustness: TFL consistently outperformed baselines (FedAvg, FedProx, DRFA, FedSR) across all datasets. On the PACS dataset, TFL achieved 69.95% average accuracy, roughly 2.25% higher than the next best robust method (DRFA).
  • Efficiency: On the eICU dataset, TFL reached its peak performance in just 2 communication rounds, whereas other methods required significantly more rounds or failed to reach the same accuracy level.
  • Qualitative Success: In medical imaging (FeTS), TFL produced segmentations that were much closer to the ground truth for unseen patients compared to other federated methods, as shown in Figure 5.
Figure 5. Qualitative segmentation results

Limitations and Future Work

  • Privacy Concerns: While TFL doesn't share raw data, sharing model weights can still potentially leak information. The authors suggest that future work should integrate TFL with established privacy-preserving techniques like differential privacy.
  • High-Dimensionality: For massive models like Transformers, calculating pairwise weight similarity for thousands of clients could become a bottleneck. The authors propose using partial parameters (e.g., only the last few layers) or dimension reduction as potential workarounds.
  • Adversarial Robustness: The authors note that client topology could be used to detect and isolate malicious or "adversarial" clients, as these nodes would likely appear as disconnected outliers in the learned graph. This remains an open area for future exploration.

Summary updated

Abstract

Federated Learning is widely employed to tackle distributed sensitive data. Existing methods primarily focus on addressing in-federation data heterogeneity. However, we observed that they suffer from significant performance degradation when applied to unseen clients for out-of-federation (OOF) generalization. The recent attempts to address generalization to unseen clients generally struggle to scale up to large-scale distributed settings due to high communication or computation costs. Moreover, methods that scale well often demonstrate poor generalization capability. To achieve OOF-resiliency in a scalable manner, we propose Topology-aware Federated Learning (TFL) that leverages client topology - a graph representing client relationships - to effectively train robust models against OOF data. We formulate a novel optimization problem for TFL, consisting of two key modules: Client Topology Learning, which infers the client relationships in a privacy-preserving manner, and Learning on Client Topology, which leverages the learned topology to identify influential clients and harness this information into the FL optimization process to efficiently build robust models. Empirical evaluation on a variety of real-world datasets verifies TFL's superior OOF robustness and scalability.
BibTeX
@inproceedings{ma2024beyond,
  author = {Mengmeng Ma and Tang Li and Xi Peng},
  title = {{Beyond the Federation: Topology-aware Federated Learning for Generalization to Unseen Clients}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=2zLt2Odckx},
}
Figure