arXiv(opens in a new tab)cs.LGAug 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2608.25873

How Edge of Stability Hinders SCAFFOLD in Federated Optimization

Anant Khandelwal, Michael Crawshaw, Mingrui Liu

Abstract

In federated learning, it is well known that heterogeneous data can (in theory) slow down optimization, and much effort has been directed at designing optimization algorithms that are unaffected by data heterogeneity, such as the SCAFFOLD algorithm. Yet, despite strong theoretical guarantees, SCAFFOLD does not usually outperform the much simpler FedAvg in practice. In this work, we propose that this gap is due to the presence of Edge of Stability (EoS) and progressive sharpening in federated optimization, supported by extensive empirical probing. First, we find that EoS-like dynamics occur with both FedAvg and SCAFFOLD under a variety of architectures and hyperparameters. We observe that the equilibrium value of the sharpness is inversely proportional to the learning rate (as in GD), and interestingly, the degree of data heterogeneity (but not the number of local steps) also affects the equilibrium value. Most importantly, we observe that SCAFFOLD's ability to estimate the gradient of the global objective is severely degraded at the EoS, as measured by the correlation between sharpness and SCAFFOLD's error in estimating the global gradient along the optimization trajectory. This suggests a mechanism for SCAFFOLD's lackluster performance in deep learning: with high sharpness at the EoS, SCAFFOLD cannot reliably estimate the global gradient.

1 Introduction

Federated learning is a paradigm for machine learning in which many separate machines (often user devices) communicate over a network to collaboratively train a machine learning model, which leverages hardware and data from many devices while preserving privacy (McMahan et al. 2017; Kairouz et al. 2021; Wang et al. 2021). However, the federated optimization process can be slowed down when user data exhibits large heterogeneity across devices, and indeed for standard algorithms like FedAvg (McMahan et al. 2017), the theoretical convergence rate slows as user data becomes more heterogeneous (Woodworth, Patel, and Srebro 2020; Koloskova et al. 2020).

The SCAFFOLD algorithm (Karimireddy et al. 2020) was introduced to eliminate this slowdown from heterogeneous data, by using control variates to estimate the gradient of the global objective via gradients from previous communication rounds. In theory, SCAFFOLD enjoys a convergence rate that is independent of data heterogeneity, which suggests that SCAFFOLD should be a strict improvement over FedAvg. However, it has been observed that in deep learning, SCAFFOLD's performance is lacking compared to the theoretical bounds (Yu et al. 2022; Li et al. 2023; Baumgart et al. 2024). Indeed, in practice FedAvg is "unreasonably effective" (Wang et al. 2024; Patel et al. 2023) and remains preferred over SCAFFOLD. This discrepancy between theory and practice motivates our central question:

References (49)

  • Learning threshold neurons via edge of stability
  • Understanding Gradient Descent on the Edge of Stability in Deep Learning
  • Not All Federated Learning Algorithms Are Created Equal: A Performance Evaluation Study (opens arXiv in a new tab)
  • Beyond the edge of stability via two-step gradient updates
  • Momentum Benefits Non-IID Federated Learning Simply and Provably
  • Understanding Optimization in Deep Learning with Central Flows
  • Adaptive Gradient Methods at the Edge of Stability
  • Gradient Descent on Neural Networks Typically Occurs at the Edge of Stability
  • Self-Stabilization: The Implicit Bias of Gradient Descent at the Edge of Stability
  • (S) GD over Diagonal Linear Networks: Implicit bias, Large Stepsizes and Edge of Stability
  • Sharp bounds for federated averaging (Local SGD) and continuous perspective
  • On the convergence of local descent methods in federated learning (opens arXiv in a new tab)
  • Advances and Open Problems in Federated Learning
  • SCAFFOLD: Stochastic Controlled Averaging for Federated Learning
  • Tighter theory for local SGD on identical and heterogeneous data
  • A Unified Theory of Decentralized SGD with Changing Topology and Local Updates
  • Learning Multiple Layers of Features from Tiny Images
  • Gradient-Based Learning Applied to Document Recognition
  • On the Effectiveness of Partial Variance Reduction in Federated Learning with Heterogeneous Data
  • Recent Advances on Federated Learning: A Systematic Survey
  • Revisiting LocalSGD and SCAFFOLD: Improved Rates and Missing Analysis
  • Scaffold with Stochastic Gradients: New Analysis with Linear Speed-Up
  • Communication-Efficient Learning of Deep Networks from Decentralized Data
  • On the Still Unreasonable Effectiveness of Federated Averaging for Heterogeneous Distributed Learning
  • The limits and potentials of local sgd for distributed heterogeneous learning with intermittent communication
  • Towards optimal communication complexity in distributed non-convex optimization
  • Revisiting Consensus Error: A Fine-grained Analysis of Local SGD under Second-order Data Heterogeneity
  • Detrended Cross-Correlation Analysis: A New Method for Analyzing Two Nonstationary Time Series
  • Local SGD Converges Fast and Communicates Little
  • A Field Guide to Federated Optimization (opens arXiv in a new tab)
  • On the Unreasonable Effectiveness of Federated Averaging with Heterogeneous Data
  • Mini-batch vs Local SGD for Heterogeneous Distributed Learning
  • Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms
  • TCT: Convexifying Federated Learning Using Bootstrapped Neural Tangent Kernels
  • Understanding Edge-of-Stability Training Dynamics with a Minimalist Example
  • It is piecewise linear and does not saturate for positive inputs
  • The local sharpness at local step k of round t is the average sharpness of the participating clients' local objectives, evaluated at their respective local models:
  • data and larger values induce greater non-i.i.d
  • pool and one shard from the non-i.i.d
  • By subtracting previous local gradients and adding previous global gradients, SCAFFOLD adjusts model updates toward ground-truth global gradients
  • Instead of continuous increase in sharpness until a threshold, both FedAvg and SCAFFOLD experience a modest increase followed by a rapid decrease in sharpness as the model begins to converge and overfit with the maximum margin bias causing smoother optimization
  • This indicates that our results, which have high levels of SCAFFOLD performance relative to FedAvg on MNIST tasks, may show that SCAFFOLD suffers from high sharpness values
  • These have high (>0.5) degrees of correlation between normalized values across model depths and dataset sizes, demonstrating the effect of sharpness on misalignment
  • Figure 9 shows no qualitative similarity between the curves across different dataset sizes and model depths
  • SCAFFOLD takes longer to converge, with significantly more instability along its path
  • For MNIST, sharpness rises initially, and then gradually decreases as the network converges to 0 loss
  • Update misalignment and sharpness stay highly correlated across different architectures and dataset sizes for SCAFFOLD
  • For FedAvg, update misalignment and sharpness are empirically disassociated
  • FedAvg consistently attains lower loss and converges faster, with less instability in loss