Introduction
Federated Learning (FL) enables distributed clients, such as hospitals or mobile devices, to collaboratively train a shared machine learning model without centralizing private raw data. However, a significant challenge in FL is data heterogeneity (non-IID data). Because clients collect data from diverse sources, their local datasets are often heavily biased—for instance, one client might only have images of cats while another has only dogs.
During training, local models overfit to these specific distributions. When aggregated at the server, the conflicting parameter updates pull the global model in different directions, leading to "client drift," slow convergence, and poor overall performance. While previous methods attempt to constrain local updates or use diffusion models to generate synthetic balancing data, these approaches often suffer from persistent parameter deviation or overfitting. FedDifRC proposes a different path: leveraging the rich, internal visual representations of pre-trained text-to-image diffusion models to steer and regularize local training.
The FedDifRC Framework
Instead of using a diffusion model (like Stable Diffusion) to generate new images, FedDifRC extracts intermediate feature maps from the diffusion model's UNet to guide the local FL model. The framework consists of two primary components designed to align local embeddings with robust, semantically rich representations.
1. Text-Driven Diffusion Contrastive Learning (TDCL)
In TDCL, the local model's image embedding is injected into the diffusion model alongside a text prompt (e.g., "a photo of a [class]"). The resulting UNet feature maps serve as "positive" targets. This process forces the local model's embedding to move closer to these semantically rich diffusion representations while pushing it away from "negative" representations generated by mismatched text prompts (e.g., "a photo of a [dog]" when the image is a cat).
2. Noise-Driven Diffusion Consistent Restriction (NDCR)
NDCR adds noise to the input image and passes it through the diffusion model's backward (denoising) process. The extracted denoising feature maps act as a stable regularization target. This forces the local model to align its feature space with the diffusion model's robust visual representations, ensuring consistency even under varying data conditions.
To manage the high dimensionality of these features, FedDifRC extracts maps from multiple UNet layers—capturing both coarse semantics and fine textures—and uses Principal Component Analysis (PCA) to fuse them into a high-quality guiding signal.
Experimental Evaluation
The authors evaluated FedDifRC across diverse heterogeneous FL environments, including label shifts (CIFAR-10/100, TinyImageNet), domain shifts (Digits, Office-Caltech), and out-of-domain scenarios involving medical (HAM10000) and satellite (EuroSAT) imagery.
Key Results
- Superior Accuracy: FedDifRC consistently outperformed state-of-the-art baselines like FedAvg, FedProx, MOON, and FedRCL. On CIFAR-10 with high heterogeneity, FedDifRC achieved 88.27% accuracy, compared to 87.11% for the next best method.
- Robust Generalization: The framework succeeded even on specialized medical and satellite data, proving that diffusion models learn fundamental visual perception (edges, textures) rather than just memorizing high-level priors.
- Self-Supervised Potential: By using generic prompts, FedDifRC can be adapted to settings where client data is completely unlabeled, achieving 31.45% accuracy on CIFAR-100 in an unsupervised setting.
Conclusion
FedDifRC demonstrates that pre-trained diffusion models are powerful zero-shot feature extractors for federated learning. By matching local latent spaces to diffusion feature maps rather than relying on synthetic data generation, the framework provides a more stable and effective way to combat client drift. While the computational overhead of running large diffusion models on edge devices remains a challenge for future work, the semantic guidance provided by FedDifRC sets a new benchmark for heterogeneous federated learning.
Summary updated