[Paper Review] FedSSC: Shared Supervised-Contrastive Federated Learning
FedSSC proposes a novel federated learning framework that combines supervised contrastive learning with global class-wise feature sharing to address data heterogeneity in non-IID settings. By integrating a global contrastive loss with MOON regularization, it improves model accuracy and convergence speed, outperforming FedAvg, FedProx, and MOON on CIFAR-10 and CIFAR-100 under various non-IID conditions.
Federated learning is widely used to perform decentralized training of a global model on multiple devices while preserving the data privacy of each device. However, it suffers from heterogeneous local data on each training device which increases the difficulty to reach the same level of accuracy as the centralized training. Supervised Contrastive Learning which outperform cross-entropy tries to minimizes the difference between feature space of points belongs to the same class and pushes away points from different classes. We propose Supervised Contrastive Federated Learning in which devices can share the learned class-wise feature spaces with each other and add the supervised-contrastive learning loss as a regularization term to foster the feature space learning. The loss tries to minimize the cosine similarity distance between the feature map and the averaged feature map from another device in the same class and maximizes the distance between the feature map and that in a different class. This new regularization term when added on top of the moon regularization term is found to outperform the other state-of-the-art regularization terms in solving the heterogeneous data distribution problem.
Motivation & Objective
- Address the challenge of model performance degradation in federated learning due to non-iid data distributions across clients.
- Improve feature space alignment across clients without sharing raw training data.
- Enhance model generalization and convergence speed in decentralized learning by leveraging class-wise shared representations.
- Integrate supervised contrastive learning with existing regularization techniques like MOON to better handle data heterogeneity.
- Demonstrate that combining global contrastive loss with MOON regularization yields superior performance over state-of-the-art methods.
Proposed method
- Introduces a global contrastive loss term ($l_{glob}$) that minimizes cosine similarity between a client's feature embedding and the shared, class-wise averaged feature embedding from other clients.
- Uses temperature-scaled cosine similarity to compute the contrastive loss, treating same-class shared embeddings as positive pairs and different-class embeddings as negative pairs.
- Combines $l_{glob}$ with the MOON regularization loss ($l_{moon}$), which aligns local representations with the global model's representation of the same image.
- Employs a communication-efficient protocol where each client reports class-wise projected feature representations to the server at the end of each round, enabling global averaging of class-wise embeddings.
- The global server maintains and updates $zs_{glob}^{k}$, the class-wise averaged feature representations across clients, for use in the $l_{glob}$ computation.
- The overall objective function combines cross-entropy loss, MOON loss, and global contrastive loss, with hyperparameters to balance their contributions.
Experimental results
Research questions
- RQ1Can shared, class-wise global feature representations improve model generalization in non-iID federated learning?
- RQ2Does combining supervised contrastive learning with MOON regularization yield better performance than either method alone?
- RQ3How does the inclusion of global contrastive loss affect convergence speed and final accuracy in heterogeneous data settings?
- RQ4What is the relative contribution of MOON and global contrastive losses when used together?
- RQ5How does the number of shared representations ($k$) impact performance, and is there a diminishing return effect?
Key findings
- FedSSC outperforms FedAvg, FedProx, and MOON in terms of top-1 accuracy on both CIFAR-10 and CIFAR-100 under non-IID data distribution.
- The method converges faster than baseline methods, achieving higher accuracy in fewer communication rounds, especially under high data heterogeneity ($\beta = 0.2$ and $\beta = 0.5$).
- Removing the MOON loss ($\mu_{MOON} = 0$) significantly degrades performance, even when global representations are shared, indicating that $l_{moon}$ and $l_{glob}$ are complementary.
- Using two-stage contrastive learning or local batch-based contrastive pairs yields lower performance than FedSSC, especially in early training rounds.
- Increasing the number of shared representations ($k$) improves performance slightly, but the gains plateau, suggesting that even a small number of shared features are effective.
- The global contrastive loss ($l_{glob}$) is orthogonal to existing methods and enhances performance when combined with MOON, confirming its effectiveness in mitigating data heterogeneity.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.