A Unified Solution to Diverse Heterogeneities in One-shot Federated Learning

Jun Bai, Yiliao Song, Di Wu, Atul Sajjanhar, Yong Xiang, Wei Zhou, Xiaohui Tao, Yan Li, Yue Li · DOI

TL;DR

Traditional Federated Learning requires multiple communication rounds, risking privacy leaks and high bandwidth costs. One-Shot Federated Learning (OSFL) solves this by communicating only once, but it struggles severely when clients have both different data distributions and different model architectures. This paper introduces FedHydra, a data-free OSFL framework that uses a novel two-stage learning mechanism—Model Stratification and Heterogeneity-Aware Stratified Aggregation—to simultaneously conquer both data and model heterogeneities without requiring any real public data.

What Problem Does This Paper Address?

Federated Learning (FL) allows multiple clients to collaboratively train a global model without sharing their private data. However, standard FL requires hundreds of communication rounds between the clients and a central server, exposing the system to communication bottlenecks and privacy attacks.

One-Shot Federated Learning (OSFL) eliminates this multi-round overhead by restricting communication to a single round: clients train locally until convergence, upload their models, and the server aggregates them once.

Unfortunately, real-world edge devices suffer from severe heterogeneity, which degrades OSFL performance:

  1. Data Heterogeneity: Clients have different quantities of data (size heterogeneity) or entirely different class distributions (label heterogeneity).
  2. Model Heterogeneity: Clients use different neural network architectures due to varying hardware capabilities.

Existing OSFL methods typically address only one side of the coin. Some rely on auxiliary public datasets to handle data heterogeneity, which is impractical when data sharing is restricted. Others use data-free knowledge distillation but fail under extreme label skew. FedHydra bridges this gap by providing a unified, data-free solution for both challenges.

Figure 1: Illustration of heterogeneity problems (a) Label Heterogeneity, (b) Size Heterogeneity, and (c) Model Hetero- geneity.

Methods

FedHydra operates entirely on the server side in a single communication round using a two-stage mechanism:

  1. Model Stratification (MS) Stage: Before aggregating the models, the server must understand what each client is actually good at. FedHydra uses an auxiliary generator to evaluate each client model's classification capability across all class labels. By analyzing the cross-entropy loss variance during generator training, the server calculates a guidance capability matrix. This matrix yields precise, stratified weights indicating how much a specific client should be trusted for a specific class.

  2. Heterogeneity-Aware Stratified Aggregation (HASA) Stage: This stage alternates between two phases:

  3. Data Generation: A generator is trained using the stratified weights from the MS stage. It combines Cross-Entropy loss, Batch Normalization (BN) loss (to stabilize training), and Adversarial Distillation (AD) loss (to maximize diversity) to produce high-quality synthetic data that mimics the global client data distribution.

  4. Model Distillation: The server uses the generated synthetic data to distill knowledge from the heterogeneous client models into a unified global model using KL divergence and hard-label cross-entropy losses.
Figure 2: Illustration of the FedHydra framework. FedHydra consists of two stages: (1) the MS stage, which evaluates the classification capabilities of uploaded converged client models, and (2) the HASA stage, which enables data-free distillation training of the global model through two phases—data generation and model distillation.

Datasets

The authors evaluated FedHydra on four widely used image classification benchmarks:

  • MNIST & FashionMNIST (using a 2-layer CNN for clients)
  • SVHN & CIFAR-10 (using a 3-layer CNN for clients)

To simulate data heterogeneity, they used a Dirichlet distribution ($Dir(\alpha)$) with $\alpha \in \{0.5, 0.3, 0.1, 0.01\}$, where lower values signify extreme data skew. They also tested a highly challenging 2c/c setting, where each client only holds data for two distinct classes. For model heterogeneity, clients were assigned diverse architectures including GoogleNet, ResNet18, customized CNNs, and LeNet.

Key Insights and Ideas

  • Loss Variance as a Capability Proxy: A core insight of the paper is that during data-free generator training, a client model providing stronger, more accurate guidance will exhibit greater loss variance and a lower minimum loss. FedHydra exploits this mathematical property to profile client capabilities without ever seeing their raw data.
  • Stratification Over Uniform Averaging: Standard ensemble methods treat all client predictions equally. If Client A has never seen a "cat" image, its prediction on a synthetic cat image is pure noise. FedHydra's stratified aggregation ensures that only clients with proven capability for the "cat" label contribute to generating and distilling cat data.
  • Privacy-Preserving Synthetic Data: Visualizations show that the generated synthetic images contain no human-interpretable textures or semantic structures—they look like random noise. Yet, they successfully retain the underlying statistical features required to train the global model, offering strong privacy guarantees.

Key Results

FedHydra consistently outperformed state-of-the-art baselines (FedAvg, OT, FedDF, DENSE, Co-Boosting) across all datasets:

  • Extreme Data Heterogeneity ($\alpha = 0.01$): On MNIST, FedHydra achieved 38.83% top-1 accuracy, outperforming the next-best baseline (Co-Boosting) by 9.72%. On CIFAR-10, it reached 40.63%, outperforming Co-Boosting by 5.53%.
  • The 2c/c Challenge: In the extreme scenario where clients only have 2 classes, FedHydra achieved 40.81% accuracy on MNIST, whereas standard DENSE achieved only 15.58% and Co-Boosting hit 26.05%.
  • Model Heterogeneity: When clients ran completely different personalized architectures on CIFAR-10, FedHydra maintained a robust 30.51% accuracy under extreme skew ($\alpha = 0.01$), while competing data-free methods like DENSE collapsed to 18.67%.
  • Scalability: As the number of clients ($K$) scaled up to 100 on SVHN, FedHydra maintained a leading accuracy of 60.01%, while FedAvg dropped precipitously to 23.69%.

Limitations and Future Work

  • Server Computational Cost: While FedHydra drastically reduces communication overhead to a single round, it shifts the computational burden to the server, which must run a two-stage generator training process. However, empirical results show only a modest ~7% increase in running time complexity compared to the standard DENSE baseline.
  • Future Directions: The authors plan to extend FedHydra's adaptability to handle even more complex, real-world heterogeneity scenarios and further optimize its server-side computational efficiency.

Summary updated

Abstract

One-Shot Federated Learning (OSFL) restricts communication between the server and clients to a single round, significantly reducing communication costs and minimizing privacy leakage risks compared to traditional Federated Learning (FL), which requires multiple rounds of communication. However, existing OSFL frameworks remain vulnerable to distributional heterogeneity, as they primarily focus on model heterogeneity while neglecting data heterogeneity. To bridge this gap, we propose FedHydra, a unified, data-free, OSFL framework designed to effectively address both model and data heterogeneity. Unlike existing OSFL approaches, FedHydra introduces a novel two-stage learning mechanism. Specifically, it incorporates model stratification and heterogeneity-aware stratified aggregation to mitigate the challenges posed by both model and data heterogeneity. By this design, the data and model heterogeneity issues are simultaneously monitored from different aspects during learning. Consequently, FedHydra can effectively mitigate both issues by minimizing their inherent conflicts. We compared FedHydra with five SOTA baselines on four benchmark datasets. Experimental results show that our method outperforms the previous OSFL methods in both homogeneous and heterogeneous settings. The code is available at https://github.com/Jun-B0518/FedHydra.
BibTeX
@inproceedings{bai2024unified,
  author = {Jun Bai and Yiliao Song and Di Wu and Atul Sajjanhar and Yong Xiang and Wei Zhou and Xiaohui Tao and Yan Li and Yue Li},
  title = {{A Unified Solution to Diverse Heterogeneities in One-shot Federated Learning}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2024},
}
Figure