Improving the Model Consistency of Decentralized Federated Learning

Yifan Shi, Li Shen, Kang Wei, Yan Sun, Bo Yuan, Xueqian Wang, Dacheng Tao · DOI

Abstract

Decentralized Federated Learning (DFL) offers a robust alternative to centralized systems by removing the single point of failure and communication bottlenecks associated with a central server. However, DFL often suffers from significant performance degradation due to model inconsistency caused by data heterogeneity. This paper presents DFedSAM and DFedSAM-MGS, two novel algorithms designed to enhance model consistency. By integrating Sharpness Aware Minimization (SAM) to identify flatter loss landscapes and utilizing Multiple Gossip Steps (MGS) for improved client synchronization, these methods effectively bridge the performance gap between decentralized and centralized learning frameworks.

Introduction and Problem Statement

In standard Centralized Federated Learning (CFL), a central server orchestrates training across many clients. While effective, this architecture creates a communication bottleneck and a single point of failure. Decentralized Federated Learning (DFL) addresses these issues by requiring clients to communicate only with their immediate neighbors.

Comparison of Centralized (CFL) and Decentralized (DFL) Federated Learning frameworks.

Despite its advantages, DFL faces a major weakness: model inconsistency. Because clients have different local data (data heterogeneity) and only talk to a few neighbors, their local models quickly drift apart. This drift leads to "sharp" loss landscapes where even small differences in model weights cause significant drops in accuracy. When these inconsistent models are averaged, the resulting global model often performs poorly compared to its centralized counterpart.

Methodology

The authors propose a two-tiered solution to enforce consistency and improve generalization:

  1. DFedSAM: This algorithm integrates Sharpness Aware Minimization (SAM) into the local training process. Instead of just seeking the lowest loss, SAM searches for a "flat" region in the loss landscape—areas where the loss remains low even if model parameters are slightly perturbed. Flat minima are known to generalize better and are more robust when averaged with models from other clients.
  2. DFedSAM-MGS: This builds on DFedSAM by adding Multiple Gossip Steps (MGS). In each communication round, clients perform $Q$ rounds of "gossip" (averaging weights with neighbors). This accelerates consensus, making the decentralized network behave more like a centralized one.

The authors also provide a rigorous theoretical analysis, proving improved convergence rates for both algorithms in non-convex settings, specifically highlighting how the "spectral gap" (a measure of network connectivity) and the number of gossip steps $Q$ impact learning speed.

Key Results and Insights

The algorithms were evaluated on standard computer vision benchmarks, CIFAR-10 and CIFAR-100, using non-IID data partitioning (Dirichlet and Pathological) to simulate real-world challenges.

Test accuracy comparison across communication rounds for various decentralized learning methods.

Performance Highlights

  • Superior Accuracy: On CIFAR-10 (Dirichlet 0.3), DFedSAM-MGS achieved a validation accuracy of 84.26%, significantly outperforming the standard decentralized baseline (DFedAvg) at 73.55% and rivaling the centralized FedAvg (82.39%).
  • Generalization and Robustness: The methods showed a much lower gap between training and testing accuracy. Empirical Hessian analysis verified that DFedSAM-MGS resulted in significantly smaller eigenvalues, indicating the successful discovery of flatter, more stable loss landscapes.
  • Bridging the DFL-CFL Gap: The paper demonstrates that by increasing the number of gossip steps ($Q$), DFL can theoretically and empirically approach the performance of a centralized server, even on sparse network topologies like a Ring.

Conclusion and Future Work

The core insight of this research is that local over-fitting in DFL is characterized by sharp minima, and forcing local models into flat regions via SAM makes them more "averageable." While MGS and SAM introduce additional communication and computational overhead, they provide a viable path toward high-performance decentralized learning. Future directions include automating the tuning of the perturbation radius $\rho$ and the number of gossip steps $Q$ to optimize the trade-off between accuracy and resource consumption.

Summary updated

BibTeX
@inproceedings{shi2023improving,
  author = {Yifan Shi and Li Shen and Kang Wei and Yan Sun and Bo Yuan and Xueqian Wang and Dacheng Tao},
  title = {{Improving the Model Consistency of Decentralized Federated Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=8BEGM7VSRnO},
}
Figure