Model-Contrastive Federated Learning (MOON) is a novel framework for federated learning that addresses the challenge of non-IID data distribution across parties. MOON introduces a model-level contrastive learning approach to correct local training by maximizing the agreement between the representations learned by the current local model and the global model. Unlike traditional contrastive learning, which focuses on image views, MOON compares representations learned by different models. MOON is simple and effective, significantly outperforming existing federated learning algorithms on image classification tasks such as CIFAR-10, CIFAR-100, and Tiny-Imagenet. MOON achieves higher accuracy by reducing the distance between local and global model representations and increasing the distance between local model representations and previous local model representations. Experiments show that MOON outperforms FedAvg, FedProx, and SCAFFOLD by at least 2% in most cases. MOON is also more communication-efficient and can handle non-IID data distributions effectively. The framework is applicable to various domains, including medical imaging, object detection, and landmark classification. MOON's model-contrastive loss is effective in constraining representations and improving model performance without slowing down convergence. The approach is robust to different levels of data heterogeneity and can be combined with other federated learning techniques. Overall, MOON provides a promising solution for federated learning in non-IID scenarios.Model-Contrastive Federated Learning (MOON) is a novel framework for federated learning that addresses the challenge of non-IID data distribution across parties. MOON introduces a model-level contrastive learning approach to correct local training by maximizing the agreement between the representations learned by the current local model and the global model. Unlike traditional contrastive learning, which focuses on image views, MOON compares representations learned by different models. MOON is simple and effective, significantly outperforming existing federated learning algorithms on image classification tasks such as CIFAR-10, CIFAR-100, and Tiny-Imagenet. MOON achieves higher accuracy by reducing the distance between local and global model representations and increasing the distance between local model representations and previous local model representations. Experiments show that MOON outperforms FedAvg, FedProx, and SCAFFOLD by at least 2% in most cases. MOON is also more communication-efficient and can handle non-IID data distributions effectively. The framework is applicable to various domains, including medical imaging, object detection, and landmark classification. MOON's model-contrastive loss is effective in constraining representations and improving model performance without slowing down convergence. The approach is robust to different levels of data heterogeneity and can be combined with other federated learning techniques. Overall, MOON provides a promising solution for federated learning in non-IID scenarios.