Introduction
Federated Learning (FL) has emerged as a powerful paradigm for training machine learning models across decentralized clients while preserving data privacy. However, a significant challenge in FL is data heterogeneity (non-IID data), where the data distribution varies significantly across clients. This heterogeneity leads to "client drift," where local models diverge from the global objective. While methods like MOON and FedCKA attempt to mitigate this by regularizing model representations, they often focus only on the final or initial layers, potentially ignoring critical information distributed throughout the network.
The FedIntR Framework
To address these limitations, we propose FedIntR (Federated Intermediate Representation regularization). FedIntR applies a fine-grained contrastive regularization across all intermediate layers of a model, effectively anchoring the local model's feature extraction process to the global model.
The core innovation of FedIntR lies in two components:
- Multi-Layer Contrastive Loss: Representations are extracted from every convolutional and fully connected layer. For each layer $k$, a contrastive loss is computed to encourage the current local representation $z^k$ to be similar to the global model's representation $z_g^k$ and dissimilar to the previous round's local representation $z_p^k$.
- Dynamic Layer-Wise Weights ($\alpha_k$): Recognizing that different layers contribute differently to regularization, FedIntR employs a softmax-based weighting mechanism. This automatically assigns higher weights to layers where the local and global representations are more similar, prioritizing stable feature extraction and reducing the need for manual hyperparameter tuning.
Experimental Evaluation
We evaluated FedIntR on standard benchmarks including Fashion-MNIST, SVHN, CIFAR-10, and CIFAR-100. To simulate varying degrees of data heterogeneity, we partitioned the data using a Dirichlet distribution controlled by a parameter $\beta$.
As shown in the figure above, a lower $\beta$ (e.g., 0.1) results in a highly non-IID environment where clients possess very few classes, making the training process significantly more challenging.
Key Results
- Performance Gains: FedIntR consistently outperforms state-of-the-art methods. For instance, on CIFAR-10 with high heterogeneity ($\beta=0.1$), FedIntR achieved an accuracy of 58.32%, surpassing MOON (57.60%) and FedProx (56.55%).
- Effectiveness of Dynamic Weighting: Ablation studies confirmed that dynamic weighting ($\alpha_k$) is superior to simple averaging. On the SVHN dataset, dynamic weighting achieved 87.17% accuracy compared to 85.62% for uniform weighting.
- Scalability: FedIntR demonstrates robust performance in large-scale settings, maintaining its lead over 1000 training rounds with 100 clients.
Discussion and Future Work
While FedIntR significantly improves performance in heterogeneous environments, it introduces additional local computational overhead due to multi-layer representation extraction and contrastive loss calculations. This may pose challenges for resource-constrained IoT devices. Future research will explore the applicability of FedIntR to attention-based architectures like Vision Transformers (ViTs) and investigate methods to reduce communication costs while maintaining high accuracy.
Summary updated