Towards Understanding Generalization and Stability Gaps between Centralized and Decentralized Federated Learning

Yan Sun, Li Shen, Dacheng Tao · DOI

Abstract

As two mainstream frameworks in federated learning (FL), both centralized and decentralized approaches have shown great application value in practical scenarios. However, existing studies do not provide sufficient evidence and clear guidance for analysis of which performs better in the FL community. Although decentralized methods have been proven to approach the comparable convergence of centralized with less communication, their test performance always falls short of expectations in empirical studies. To comprehensively and fairly compare their efficiency gaps in FL, in this paper, we explore their stability and generalization efficiency. Specifically, we prove that on the general smooth non-convex objectives, 1) centralized FL (CFL) always generalizes better than decentralized FL (DFL); 2) CFL achieves the best performance via adopting partial participation instead of full participation; and, 3) there is a necessary requirement for the topology in DFL to avoid performance collapse as the training scale increases.

Introduction

Federated Learning (FL) has emerged as a paradigm for training machine learning models across distributed clients while preserving data privacy. The two primary architectures are Centralized Federated Learning (CFL), which relies on a central server for model aggregation (e.g., FedAvg), and Decentralized Federated Learning (DFL), where clients communicate directly with neighbors in a peer-to-peer network. While DFL is often preferred for its lack of a single point of failure and reduced communication bottlenecks, empirical evidence suggests a persistent "generalization gap" where DFL models underperform compared to CFL, despite similar convergence rates. This paper provides a theoretical and empirical investigation into the stability and generalization efficiency of these two frameworks.

Methodology: Stability and Generalization

To analyze the performance gap, we employ the framework of Uniform Stability. An algorithm is considered stable if a small change in the training data (e.g., replacing one data point) results in a minimal change to the final model. High stability is a strong indicator of low generalization error—the difference between training performance and test performance.

Unlike prior research that relied on the restrictive assumption of bounded gradients, our analysis utilizes a more flexible "bounded uniform stability" approach suitable for smooth non-convex objectives common in deep learning. We derive generalization error bounds for both FedAvg (CFL) and D-FedAvg (DFL) to quantify how architecture and participation affect the final model quality.

The Generalization Advantage of CFL

Our theoretical analysis reveals that CFL is inherently more stable than DFL. The central server in CFL acts as a global consensus mechanism, effectively regularizing local models and preventing them from overfitting to local, heterogeneous data.

One of the most significant findings is the role of Partial Participation. Counter-intuitively, we prove that having every client participate in every round (full participation) is often detrimental to generalization. Instead, selecting a random subset of clients in each round introduces a form of stochastic regularization. This partial participation balances the speed of optimization with the stability of the model, leading to superior test accuracy.

The Role of Network Topology in DFL

In DFL, the network topology—how clients are connected—is the primary driver of performance. We analyze this through the "spectrum gap," a mathematical measure of graph connectivity.

Common network topologies used in Decentralized Federated Learning (DFL), ranging from sparse (Ring) to dense (Full).

Our findings indicate a risk of performance collapse in DFL. If a sparse topology (such as a Ring or Grid) is used while the number of clients increases, the model's ability to generalize can actually degrade despite having more total training data. To maintain performance as the system scales, DFL requires topologies where connectivity increases alongside the client count, such as Exponential or Full graphs. Without sufficient density, the local models drift too far apart, and the decentralized consensus mechanism fails to stabilize the global training process.

Empirical Validation

We validated these theoretical insights using the CIFAR-10 dataset with high data heterogeneity (Dirichlet distribution $\beta=0.1$) across scales of 100, 200, and 500 clients.

  • CFL Participation: For 100 clients, the optimal generalization occurred at ~30% participation. For 500 clients, the optimal ratio rose to ~40%, confirming that partial participation is a critical hyperparameter for CFL success.
  • DFL Scaling: In sparse Ring topologies, accuracy dropped significantly as the number of clients ($m$) increased, falling from ~59% at $m=100$ to ~41% at $m=500$. Conversely, dense topologies like Exponential graphs showed increasing accuracy with scale, matching our theoretical requirements.
  • The Efficiency Gap: Even under identical communication bandwidth constraints, CFL consistently outperformed DFL by 5-15% in test accuracy, highlighting the fundamental stability advantage of centralized aggregation.

Conclusion

This work clarifies the trade-offs between centralized and decentralized federated learning. While DFL offers infrastructure benefits, it requires carefully designed, dense topologies to avoid performance collapse at scale. CFL remains the "generalization king," particularly when leveraging partial participation as a regularizing force. Future work should focus on developing DFL topologies that optimize the balance between communication costs and the connectivity required for stable generalization.

Summary updated

BibTeX
@article{sun2025towards,
  author = {Yan Sun and Li Shen and Dacheng Tao},
  title = {{Towards Understanding Generalization and Stability Gaps between Centralized and Decentralized Federated Learning}},
  journal = {IEEE Transactions on Pattern Analysis and Machine Intelligence},
  year = {2025},
  doi = {10.1109/tpami.2025.3647762},
}
Figure