RSCFed: Random Sampling Consensus Federated Semi-supervised Learning

Xiaoxiao Liang, Yiqun Lin, Huazhu Fu, Lei Zhu, Xiaomeng Li

TL;DR

RSCFed introduces a robust framework for Federated Semi-Supervised Learning (FSSL) that thrives under realistic, non-IID (heterogeneous) data distributions. Inspired by the classical RANSAC algorithm, it filters out the corrupting effects of unreliable or highly biased local client updates by distilling multiple randomly sampled "sub-consensus" models before updating the global model. This approach achieves state-of-the-art performance on both natural and medical image benchmarks without risking data privacy.

What Problem Does This Paper Address?

Federated Learning (FL) allows machine learning models to train across decentralized devices or institutions without centralizing raw data, preserving privacy. However, standard FL assumes all data is fully labeled. In the real world, labeling data is expensive and time-consuming. Federated Semi-Supervised Learning (FSSL) addresses this by allowing a mix of fully-labeled, fully-unlabeled, or partially-labeled clients to collaborate.

The core challenge arises when data is Non-IID (not independent and identically distributed) across clients. In this practical scenario, labeled clients quickly become heavily biased toward their specific local data distributions, while unlabeled clients struggle to generate accurate pseudo-labels. Directly averaging these highly divergent, unevenly reliable models (as standard algorithms like FedAvg do) degrades the global model's performance. Existing fixes either fail under Non-IID conditions or share client correlation matrices, which introduces severe privacy risks.

Methods

RSCFed (Random Sampling Consensus Federated learning) treats divergent local client models as "noisy" data points. Instead of directly aggregating all local updates into the global model, it introduces a two-step consensus distillation process:

  1. Multiple Random Sub-sampling (SSO): In each synchronization round, the server randomly samples subsets of clients multiple times ($M$ times, picking $K$ clients per subset).
  2. Distance-Reweighted Model Aggregation (DMA): For each subset, the server calculates an initial average model. It then dynamically adjusts the weights of each client model based on its $L_2$ distance from this average. Models that are close to the average get higher weights, while highly deviant "noisy" models are penalized. This yields a highly robust sub-consensus model for each subset.

Finally, the server averages these refined sub-consensus models to update the master global model.

Figure 3. An overview of our proposed RSCFed. The labeled and unlabeled clients optimize by supervised cross-entropy loss LCE and mean-teacher-based consistency loss LMSE, respectively. Our RSCFed performs multiple random sub-sampling among all clients with distance-reweighted model aggregation (DMA) to increase the weights for clients that are close to the sub-consensus model and visa versa. This module can help avoid the influence of a deviated local model to the global model.

For local training, labeled clients use standard cross-entropy loss, while unlabeled clients leverage a mean-teacher framework with consistency regularization and prediction sharpening to stabilize learning.

Datasets

The authors evaluated RSCFed on three distinct image classification benchmarks, partitioned using a Dirichlet distribution ($\text{Dir}(0.8)$) to simulate a strict Non-IID setup:

  • SVHN (Street View House Numbers): A natural image dataset of house numbers.
  • CIFAR-100: A complex natural image dataset with 100 target classes.
  • ISIC 2018 (Skin Lesion Analysis): A medical imaging dataset consisting of 10,015 dermoscopy images across 7 skin lesion types, simulating a high-stakes, privacy-sensitive clinical deployment.

Key Insights and Ideas

  • RANSAC for Model Weights: Bridging classical geometric computer vision with federated optimization, the authors realize that client updates under Non-IID conditions behave like noisy spatial data points containing outliers.
  • The Power of Sub-Consensus: Directly averaging highly divergent models washes out distinct, useful features. Grouping clients into random sub-clusters allows intermediate consensus structures to emerge and stabilize before final fusion.
  • Resilience to Unlabeled Scaling: In standard FSSL, adding more unlabeled clients often destroys model accuracy because the unlabeled noise overwhelms the small amount of labeled signal. RSCFed flips this script: its filtering mechanism ensures that performance gaps widen in favor of RSCFed as the ratio of unlabeled clients increases.

Key Results

RSCFed consistently outperformed state-of-the-art FSSL approaches like FedIRM and Fed-Consist across all benchmarks under the challenging 1-labeled / 9-unlabeled client split:

  • SVHN: RSCFed achieved an accuracy of 70.26%, a notable improvement over Fed-Consist (66.94%) and FedIRM (55.69%).
  • CIFAR-100: RSCFed reached 15.82% accuracy, outperforming the baselines by roughly 1.5% to 2%.
  • ISIC 2018: On medical images, RSCFed hit 70.26% accuracy and achieved the top Area Under the ROC Curve (AUC) score of 86.01%.

Ablation studies confirmed that both the sub-sampling mechanism (SSO) and the distance-reweighting module (DMA) were critical to these performance gains. Furthermore, even when communication budgets were artificially constrained to 80% of the baseline's cost, RSCFed still delivered superior accuracy.

Limitations and Future Work

  • Communication Overhead: Because the server performs multiple sub-sampling operations ($M \times K$ total client evaluations), the baseline communication overhead is roughly 1.5 times higher than simpler aggregation methods. While the authors showed the model remains robust under strict communication constraints, optimizing this overhead is an open area.
  • Hyperparameter Sensitivity: The framework introduces new hyperparameters, notably the number of subsets ($M$), the subset size ($K$), and the distance scaling factor ($\beta$). While empirical testing showed relative stability, finding the optimal configuration across wildly different data modalities may require extensive tuning.

Summary updated

BibTeX
@inproceedings{liang2022rscfed,
  author = {Xiaoxiao Liang and Yiqun Lin and Huazhu Fu and Lei Zhu and Xiaomeng Li},
  title = {{RSCFed: Random Sampling Consensus Federated Semi-supervised Learning}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2022},
}
Figure