SemiFL: Semi-Supervised Federated Learning for Unlabeled Clients with Alternate Training

Enmao Diao, Jie Ding, Vahid Tarokh

Introduction

Standard Federated Learning (FL) assumes that distributed clients—such as mobile phones or IoT devices—have ground-truth labels for their local data. In reality, labeling data is often expensive, time-consuming, or requires expert knowledge that end-users lack.

While Semi-Supervised Learning (SSL) is designed to handle unlabeled data by generating "pseudo-labels," combining it with communication-efficient FL (like the popular FedAvg algorithm) is surprisingly difficult. When clients train for multiple local epochs, their models can quickly drift. This drift generates poor-quality pseudo-labels, leading to a feedback loop of errors. Consequently, many existing semi-supervised federated methods actually perform worse than simply training a model on the server's small labeled dataset alone.

To solve this, SemiFL introduces a novel "alternate training" strategy. By alternating between server-side fine-tuning with a small labeled dataset and client-side training with fixed pseudo-labels, SemiFL achieves state-of-the-art performance while remaining communication-efficient.

The Alternate Training Method

SemiFL centers on a technique called Alternate Training, which prevents local models from deteriorating their own pseudo-labels during the multiple local epochs required for communication efficiency. The process works in a continuous loop:

  1. Server Fine-Tuning: At the start of each round, the server uses its small pool of labeled data to fine-tune the global model. This ensures the model remains grounded in ground-truth reality.
  2. Fixed Pseudo-Labeling: The server sends this updated model to the clients. Crucially, clients generate pseudo-labels for their local data only once at the beginning of their local training session using this global model.
  3. Local Training: Clients then train for multiple epochs using these fixed pseudo-labels. They employ strong data augmentation (like RandAugment) and Mixup to improve generalization.
  4. Aggregation: The updated client models are sent back and averaged by the server to form the new global model.
The Alternate Training process of SemiFL, where pseudo-labels are generated once per round using the global model.

Key Insights

The Communication-Efficiency Bottleneck

The paper identifies that the primary hurdle in Semi-Supervised Federated Learning (SSFL) isn't the SSL algorithm itself, but the interaction between multiple local epochs and pseudo-label generation. If pseudo-labels are updated locally without frequent server intervention, the model's accuracy collapses over time.

Learning curves demonstrating the performance collapse of standard FedAvg with FixMatch compared to FedSGD.

Theoretical Grounding of Augmentation

The authors provide a theoretical analysis of why "strong" data augmentation is so effective in SSL. They model it as a "transmission" mechanism that maps unlabeled data points into the regime of the labeled data distribution, effectively filling the gaps where the labeled data is sparse.

Static Batch Normalization (sBN)

To handle the discrepancies between labeled and unlabeled data distributions, the paper utilizes Static Batch Normalization (sBN). This technique helps stabilize the global model after aggregating diverse client updates.

Datasets and Key Results

The researchers evaluated SemiFL on three standard computer vision benchmarks (CIFAR-10, SVHN, and CIFAR-100), varying the amount of labeled data available at the server. They tested both IID (uniformly distributed data) and Non-IID (skewed class distributions) scenarios to simulate real-world conditions.

SemiFL significantly outperforms existing SSFL baselines and approaches the performance of centralized SSL:

  • Massive Accuracy Boosts: On CIFAR-10 with only 250 labeled images, SemiFL reached 88.2% accuracy, compared to just 42.4% for a model trained only on the server's labeled data.
  • Outperforming Baselines: It achieved a 30% improvement over previous SSFL methods like FedMatch and FedRGD.
  • Competitive with Centralized Models: For CIFAR-10 with 4,000 labels, SemiFL achieved 93.1% accuracy, which is only 1-2% lower than state-of-the-art centralized SSL and fully supervised FL results.

Limitations and Future Work

While SemiFL represents a significant step forward, it has a few limitations. The requirement for the server to fine-tune the model in every communication round adds a computational burden to the central hub. Additionally, the server and clients currently train sequentially; training on labeled and unlabeled data simultaneously in a single batch could potentially improve performance further. Finally, while SemiFL handles Non-IID data better than its predecessors, performance still degrades under extreme label distribution shifts, highlighting an area for future robustness research.

Summary updated

BibTeX
@inproceedings{diao2022semifl,
  author = {Enmao Diao and Jie Ding and Vahid Tarokh},
  title = {{SemiFL: Semi-Supervised Federated Learning for Unlabeled Clients with Alternate Training}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
}
Figure