NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Understanding Generalization of Federated Learning: the Trade-off between Model Stability and Optimization

Dun Zeng, Zheshun Wu, Shiyu Liu, Yu Pan, Xiaoying Tang, Zenglin Xu · DOI

Abstract

This paper introduces Libra, a novel theoretical framework that unifies model stability and optimization analysis to understand generalization in Federated Learning (FL). By treating generalization as a "tightrope walk" between fitting the training data (optimization) and remaining insensitive to specific data points (stability), the authors provide a way to predict the "benign-fitting" window and explain why common heuristics like learning rate decay and server momentum improve performance.

Introduction

In Federated Learning (FL), models are trained across decentralized devices with heterogeneous (non-IID) data. This heterogeneity leads to "client drift," where local models diverge, hindering the global model's generalization. Historically, research has focused on either Convergence Analysis (fitting training data) or Algorithmic Stability (sensitivity to data perturbations). However, in modern non-convex neural networks, these forces often conflict: a perfectly fitted model may be unstable, while a stable model may fail to converge. The Libra framework bridges this gap by analyzing the dynamics of minimum excess risk.

The Libra Framework

The Libra framework bounds excess risk—the difference between a model's performance on the true distribution versus the training set—as a weighted sum of stability and optimization error. Unlike previous isolated analyses, Libra tracks how these components evolve over communication rounds ($T$). Stability typically degrades as training progresses, while optimization error decreases.

The transition from under-fitting to over-fitting as a function of the stability-optimization trade-off.

Key features of Libra include:

  • Dynamic Tracking: It identifies the optimal training point where the sum of stability and optimization error is minimized.
  • Algorithm-Dependent Bounds: Specific derivations are provided for Federated SGD (FedAvg) and Federated Optimization with Server Momentum (FOSM).
  • The "Libra" Balance: The framework formalizes the trade-off where faster convergence often accelerates the expansion of the stability bound, potentially leading to earlier overfitting.

Experimental Validation

The researchers validated Libra using standard FL benchmarks: CIFAR-10, CIFAR-100, and AGNews. Data was partitioned among 100 clients using Latent Dirichlet Allocation (LDA) with a coefficient of 0.1 to simulate high heterogeneity.

Key Results

Empirical results confirm the existence of three distinct phases in FL training:

  1. Under-fitting: Optimization error (gradient norm) dominates.
  2. Benign-fitting: The optimal balance where excess risk is minimized.
  3. Over-fitting: Stability error dominates as the model becomes overly sensitive to local data.
Excess risk dynamics over communication rounds, showing how different configurations reach the 'benign-fitting' zone.

The study found that the generalization gap increases approximately linearly with the number of local steps ($K$). For instance, $K=20$ reaches an unstable state twice as fast as $K=10$. Furthermore, server momentum (FOSM) was shown to be a "net win"; despite worsening stability, its acceleration of convergence leads to lower overall minimum excess risk compared to vanilla FedAvg.

Discussion: Why Common Tricks Work

Libra provides a theoretical basis for several common FL practices:

  • Learning Rate Decay: Beyond settling into local minima, LR decay "stabilizes" generalization by slowing the expansion of the stability bound, extending the "benign-fitting" window.
  • The $K$ Paradox: To maintain generalization when increasing local steps $K$, the global learning rate ($\eta_g$) should be scaled inversely with $K$ to counteract the linear scaling of instability.

Conclusion and Future Work

Libra offers a principled approach to understanding FL generalization. While robust, the current theory assumes full client participation and focuses on SGD-based optimizers. Future work includes extending the framework to cross-device settings with client dropout and incorporating adaptive optimizers like AdamW. Additionally, Libra could inform new "early stopping" criteria based on predicted crossover points between stability and optimization.

Summary updated

BibTeX
@misc{zeng2024understanding,
  author = {Dun Zeng and Zheshun Wu and Shiyu Liu and Yu Pan and Xiaoying Tang and Zenglin Xu},
  title = {{Understanding Generalization of Federated Learning: the Trade-off between Model Stability and Optimization}},
  year = {2024},
  eprint = {2411.16303},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.16303},
}
Figure