On the Importance and Applicability of Pre-Training for Federated Learning

Hong-You Chen, Cheng-Hao Tu, Ziwei Li, Han Wei Shen, Wei-Lun Chao

On the Importance and Applicability of Pre-Training for Federated Learning

TL;DR

This paper demonstrates that the "standard recipe" of initializing Federated Learning (FL) with random weights is holding the field back. By using pre-trained weights—whether from large-scale real datasets, a novel synthetic fractal-based approach, or decentralized self-supervision—researchers can significantly boost accuracy and nearly close the performance gap between federated and centralized learning, especially in challenging "non-IID" scenarios.

What Problem Does This Paper Address?

Federated Learning (FL) allows multiple clients (like mobile phones or hospitals) to collaboratively train a model without sharing their raw data. While powerful, FL faces a major hurdle: data heterogeneity (non-IID data). Because each client's data is unique, local models tend to "drift" in different directions, leading to a significant accuracy drop compared to models trained on a single, centralized dataset.

In the centralized world, we almost always start with pre-trained weights (e.g., from ImageNet) to improve performance. Curiously, the FL community has largely stuck to random initialization. This paper asks: Can pre-training fix the "accuracy gap" in FL, and how can we do it if we don't have access to massive public datasets?

Methods: Pre-training Strategies

The authors investigate three main scenarios for model initialization to overcome the limitations of random weights:

  1. Standard Pre-training: Using weights from models already trained on large-scale public datasets like ImageNet or Places365.
  2. Synthetic Pre-training (FPS): For cases where real data is unavailable (e.g., medical imaging due to privacy constraints), the authors propose Fractal Pair Similarity (FPS). This method generates synthetic images using mathematical fractals (Iterative Function Systems). Unlike previous work that treated fractals as "classes," FPS uses a self-supervised approach (SimSiam) to learn representations by comparing different augmented versions of the same fractal composition.
The proposed Fractal Pair Similarity (FPS) method for synthetic pre-training.
  1. Federated Self-Pre-training (SP): The authors explore a two-stage process where clients first perform self-supervised learning on their own local data in a federated manner before starting the actual supervised FL task.

Key Insights and Results

The study is comprehensive, covering both image classification (CIFAR-10, CIFAR-100, Tiny-ImageNet, iNaturalist-GEO) and semantic segmentation (Cityscapes), alongside NLP tasks in the supplement.

  • Closing the Gap: Pre-training doesn't just help; it helps FL more than it helps centralized learning. It effectively bridges the performance gap caused by non-IID data. On CIFAR-10 with severe data imbalance, ImageNet pre-training improved FedAvg accuracy by 8.1%, reducing the gap to centralized learning from 9.0% down to just 2.5%.
  • Synthetic Success: The proposed FPS method (synthetic fractals) improved FedAvg on Cityscapes by 23.9% mIoU, outperforming other synthetic data generation methods like StyleGAN.
Performance comparison of Centralized vs. FedAvg learning with different initialization strategies.
  • The "Loss Basin" Effect: Through loss landscape visualization, the authors found that pre-training guides models from different clients to converge into the same "loss basin." Without it, models often end up in isolated, poor-performing regions of the optimization space.
  • Stable Aggregation: While pre-training doesn't stop "local model drift" (models still move away from the global state during local training), it makes the final global aggregation much more stable and less sensitive to the specific weights of each client.
  • Scaling Up: Pre-training allows FL to benefit from deeper and wider architectures (like ResNet-50 or 101), which often fail to converge or show limited gains when initialized randomly in a federated setting.

Limitations and Future Work

The primary limitation acknowledged is that pre-training is not a silver bullet for local model drift. Even with a great initialization, local models still diverge significantly during the local update steps.

Future work could explore how to combine pre-training with more advanced aggregation algorithms to further mitigate drift. Additionally, while FPS is impressive, there is still a performance gap between synthetic fractal pre-training and pre-training on massive real-world datasets like ImageNet. Bridging this "synthetic-to-real" gap remains an open challenge for privacy-preserving machine learning.

Summary updated

BibTeX
@inproceedings{chen2023importance,
  author = {Hong-You Chen and Cheng-Hao Tu and Ziwei Li and Han Wei Shen and Wei-Lun Chao},
  title = {{On the Importance and Applicability of Pre-Training for Federated Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=fWWFv--P0xP},
}
Figure