Abstract
Standard Federated Learning (FL) often fails to perform well in heterogeneous environments where data is non-i.i.d. across clients. This paper introduces FedRep, a novel algorithm that decouples a neural network into a shared global representation and personalized local "heads." By utilizing a "head-first" alternating optimization strategy, FedRep enables clients to learn a common feature extractor while maintaining unique classifiers. Empirical results and theoretical analysis demonstrate that FedRep significantly outperforms existing FL methods, particularly in settings with limited local data and high heterogeneity.
Introduction
The primary goal of standard Federated Learning, such as FedAvg, is to train a single global model that generalizes across all participating clients. However, in real-world scenarios, data is frequently non-i.i.d. (not independent and identically distributed). For instance, different users might have distinct labeling preferences or tasks, making a "one-size-fits-all" model a "jack of all trades, master of none."
While personalized FL methods have been proposed, many struggle with high-dimensional data or lack theoretical guarantees regarding the benefits of collaboration. The authors of FedRep argue that while clients may have different tasks, they often share an underlying structure. The challenge lies in efficiently learning this shared "alphabet" while allowing each client to compose their own "poem."
The FedRep Algorithm
The core of the proposed approach is the FedRep (Federated Representation Learning) algorithm. It models the network as a composition of two distinct parts:
- A Global Representation ($\phi$): A shared feature extractor (the "body") that maps high-dimensional input data into a lower-dimensional latent space.
- Local Heads ($h_i$): A unique classifier for each client $i$ that interprets the shared features for their specific task.
FedRep employs a specific alternating update scheme known as the FedRep Shuffle:
- Local Update: A client receives the current global representation $\phi^t$. Keeping $\phi^t$ fixed, the client performs multiple local updates to optimize their personal head $h_i$.
- Global Update: Once the head is optimized, the client performs a small number of updates to the representation $\phi$ and sends only the updated representation back to the server.
- Server Aggregation: The server averages the representations from all participating clients to produce $\phi^{t+1}$ and broadcasts it for the next round.
This "head-first" approach ensures the global representation is updated based on optimized local classifiers, leading to more stable and accurate feature learning.
Theoretical and Empirical Evaluation
The authors evaluated FedRep using synthetic linear data and several standard benchmarks, including CIFAR10, CIFAR100, FEMNIST, and Sent140. These datasets were partitioned to simulate high heterogeneity (e.g., giving each client only a few classes in CIFAR).
Key Insights
- The Power of Cooperation: In linear settings, FedRep converges to the ground truth representation at an exponential rate. The sample complexity per client scales with $O(d/n)$, where $n$ is the number of clients. This implies that as more users join the federation, the data requirement for each individual decreases.
- Dimensionality Reduction: By learning a shared $k$-dimensional representation where $k \ll d$, FedRep effectively simplifies the learning problem for each client.
- Head-First Optimization: Performing multiple local updates on the head prevents the global model from drifting due to local label noise, allowing the global body to focus on universal features.
Results
FedRep consistently outperformed baselines like FedAvg, FedPer, and Per-FedAvg across various heterogeneous settings. For example, on CIFAR10 with only 2 classes per client, FedRep achieved approximately 87.7% accuracy, a significant improvement over FedAvg's 42.6%.
Furthermore, FedRep excels in "cold start" scenarios. New clients can achieve high accuracy quickly by training only a small local head on a few samples, leveraging the high-quality pre-trained feature extractor. Unlike standard FL, FedRep’s performance generally remains stable or improves as the number of local epochs for the head increases, mitigating the common issue of "client drift."
Conclusion
FedRep provides a robust framework for personalized federated learning by exploiting shared representations. While the current theoretical proofs are focused on linear architectures, the empirical success on deep neural networks is compelling. Future research may address extending these proofs to non-linear cases, reducing communication overhead through compression, and further exploring the privacy implications of sharing representations.
Summary updated