TL;DR
FedCKA improves Federated Learning on non-IID data by regularizing only the first few "critical" layers of a neural network using Centered Kernel Alignment (CKA). This approach achieves state-of-the-art accuracy while significantly reducing computational overhead compared to methods that regularize the entire model.
What Problem Does This Paper Address?
Federated Learning (FL) allows multiple clients to train a shared model without ever exchanging their raw data. While promising for privacy, FL faces a major hurdle: data heterogeneity. In the real world, data is rarely "Independent and Identically Distributed" (IID) across clients. For example, one mobile user might take photos of cats, while another takes photos of cars.
When data is non-IID, local models drift toward different "local optima." When the server averages these models (the standard "FedAvg" approach), the resulting global model often performs poorly. Existing solutions like FedProx and MOON try to fix this by adding a regularization term that forces the local model to stay "close" to the global model. However, these methods typically regularize the entire network. The authors argue this is inefficient and fundamentally flawed because it ignores how neural networks actually learn.
Methods
The authors introduce FedCKA, a framework built on two key observations:
- Layer-Wise Importance: Not all layers are created equal. Early layers in a network tend to learn general features (like edges and textures) that should be similar across all clients. Late layers learn high-level, task-specific features that should naturally differ when trained on different data. FedCKA only regularizes the first two "naturally similar" layers.
- Centered Kernel Alignment (CKA): Previous methods used simple metrics like $L_2$ distance or cosine similarity to compare models. The authors show that CKA is a much more accurate way to measure representational similarity between layers because it is invariant to orthogonal transformations and scaling.
The Algorithm: During local training, FedCKA adds a contrastive loss term. This term encourages the current local model's early layers to be similar to the global model's early layers, while remaining distinct from the previous round's local model. Because it only targets two layers, the computational cost remains nearly constant even as the total number of layers in the model increases.
Datasets
The authors evaluated FedCKA against state-of-the-art methods (FedAvg, FedProx, SCAFFOLD, and MOON) using three standard computer vision benchmarks:
- CIFAR-10
- CIFAR-100
- Tiny ImageNet
To simulate real-world heterogeneity, they used a Dirichlet distribution ($\alpha$) to control data imbalance. A smaller $\alpha$ indicates higher heterogeneity (more difficult for FL).
Key Insights and Ideas
- Less is More: Regularizing every layer can actually hurt performance. By forcing the specialized late layers of a model to match a global average, you may be penalizing beneficial local updates. FedCKA proves that focusing on the "foundation" (early layers) is more effective.
- Representational Similarity Matters: Neural networks can represent the same information in different ways (e.g., rotated or scaled weights). CKA is robust to these variations, making it a "fairer" metric for comparing models than simple geometric distances.
- Scalability is the Bottleneck: As we move toward massive models like ResNet-50 or Transformers, regularizing every layer becomes computationally prohibitive for edge devices. FedCKA provides a path forward by keeping the regularization "sparse."
Key Results
- Accuracy Boost: FedCKA consistently outperformed all other methods. On CIFAR-10 with moderate heterogeneity ($\alpha=5.0$), FedCKA achieved 67.86% accuracy, compared to MOON (65.25%) and FedAvg (64.37%).
- Efficiency Gains: The most striking results appear in scalability. When training a ResNet-50 (50 layers) on Tiny ImageNet:
- MOON took 1689 seconds per round.
- FedProx took 862 seconds.
- FedCKA took only 751 seconds, which is remarkably close to the baseline FedAvg (639 seconds).
- Proximity to Upper Bound: In some settings, FedCKA's performance nearly reached the "Upper Bound"—the accuracy achieved if all data were centralized on a single server.
Limitations and Future Work
- Heuristic Layer Selection: The paper defaults to regularizing the first two layers. While this works well for CNNs and ResNets, the authors note that identifying the "important" layers in more complex architectures like Transformers or Graph Neural Networks remains an open question.
- CKA Computation: While CKA is more efficient than regularizing 50+ layers, the matrix multiplications involved in CKA can still be intensive if the feature maps (activations) are very large.
- Data Augmentation: The authors noted discrepancies between their results and those reported in the MOON paper, suspecting that unrecorded data augmentation techniques might play a role. Standardizing these experimental setups is a suggested area for future work.
Summary updated