Skip to main content
QUICK REVIEW

[Paper Review] Model-Contrastive Federated Learning

Qinbin Li, Bingsheng He|arXiv (Cornell University)|Mar 30, 2021
Privacy-Preserving Technologies in DataComputer Science46 references17 citations
TL;DR

This paper proposes MOON (Model-Contrastive Federated Learning), a novel federated learning framework that improves performance on non-IID image datasets by applying contrastive learning at the model level. By aligning local model representations with the global model through a contrastive loss, MOON achieves up to 61.8% top-1 accuracy on CIFAR-100 with 100 parties—significantly outperforming FedAvg, FedProx, and SCAFFOLD, which achieve at most 55% under the same conditions.

ABSTRACT

Federated learning enables multiple parties to collaboratively train a machine learning model without communicating their local data. A key challenge in federated learning is to handle the heterogeneity of local data distribution across parties. Although many studies have been proposed to address this challenge, we find that they fail to achieve high performance in image datasets with deep learning models. In this paper, we propose MOON: model-contrastive federated learning. MOON is a simple and effective federated learning framework. The key idea of MOON is to utilize the similarity between model representations to correct the local training of individual parties, i.e., conducting contrastive learning in model-level. Our extensive experiments show that MOON significantly outperforms the other state-of-the-art federated learning algorithms on various image classification tasks.

Motivation & Objective

  • To address the challenge of non-IID data distribution in federated learning, which degrades model performance on deep learning tasks.
  • To improve local model training in federated settings by leveraging global model representations as a supervisory signal.
  • To develop a simple yet effective method that outperforms existing state-of-the-art federated learning algorithms on image classification benchmarks.
  • To investigate whether model-level contrastive learning can stabilize and enhance convergence in non-IID settings.
  • To evaluate the robustness and scalability of the proposed method across varying levels of data heterogeneity and communication rounds.

Proposed method

  • MOON introduces a model-contrastive loss that maximizes agreement between the representation of the local model and the global model during local training.
  • The contrastive loss is inspired by NT-Xent and encourages local models to learn representations similar to the global model, using a temperature-scaled cosine similarity.
  • The method modifies FedAvg by adding the contrastive loss term to the local objective function, without altering the global aggregation step.
  • The contrastive loss is computed using features from the last hidden layer of the neural network, enabling representation alignment across models.
  • Hyperparameter μ controls the strength of the contrastive regularization, with optimal values found empirically across datasets.
  • The approach is lightweight and compatible with standard federated learning pipelines, requiring minimal changes to FedAvg.

Experimental results

Research questions

  • RQ1Can model-level contrastive learning improve the performance of federated learning on non-IID image datasets compared to FedAvg and other SOTA methods?
  • RQ2How does MOON perform under varying degrees of data heterogeneity, particularly when the Dirichlet concentration parameter β is reduced?
  • RQ3Does the addition of a contrastive loss term outperform alternative regularization strategies like ℓ₂ norm in local training?
  • RQ4How does MOON scale with increasing numbers of clients and communication rounds?
  • RQ5Is MOON robust to extreme data skew, such as in highly unbalanced partitions?

Key findings

  • On CIFAR-100 with 100 parties and high data heterogeneity (β=0.1), MOON achieves 64.0% top-1 accuracy, outperforming FedAvg (62.5%) and FedProx (62.9%) by over 1.5 percentage points.
  • With 100 parties and 500 communication rounds, MOON reaches 61.8% top-1 accuracy, significantly exceeding the best-performing baseline (55%) and FedProx (44.6%).
  • On CIFAR-10, MOON achieves 69.1% top-1 accuracy, surpassing FedAvg (66.3%) and the ℓ₂-regularized variant (65.8%) by over 2.5 percentage points.
  • On Tiny-ImageNet, MOON achieves 25.1% top-1 accuracy, outperforming FedAvg (23.0%) and ℓ₂-regularized FedAvg (24.0%) by 2.1 and 1.1 percentage points, respectively.
  • MOON maintains consistent performance gains across all tested levels of data heterogeneity (β=0.1, 0.5, 5), with improvements of over 2% over FedAvg even when data are nearly balanced (β=5).
  • SCAFFOLD shows poor performance on CIFAR-100, achieving only 44.5% accuracy with 100 parties, while MOON with μ=10 reaches 61.8%, indicating MOON's superior robustness to data skew.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.