Focus on Where You Aggregate: Restricted SAM for Non-IID Federated Learning
Abstract
Federated learning (FL) under heterogeneous data distributions suffers from client drift, particularly with multiple local updates, which undermines the stability of global model aggregation. Existing sharpness-aware minimization (SAM)-based FL methods mitigate this issue by promoting flatter local loss landscapes. However, their spherical perturbation neighborhoods do not explicitly account for the geometry of global parameter aggregation, limiting the benefits of local flattening for the aggregated model. To address this limitation, we propose Federated Restricted SAM (FedRSAM), which promotes aggregation-aware flatness by restricting SAM perturbations to an anticipated aggregation region. Specifically, FedRSAM constructs a cone-shaped region using the previous global update direction and the variance of client updates to capture where subsequent global aggregation is likely to occur. By restricting perturbations to this region, FedRSAM focuses local sharpness-aware optimization on directions most relevant to global aggregation. Theoretically, we establish tighter aggregation-sensitivity error bounds while retaining the convergence guarantee. Extensive experiments across vision and language benchmarks demonstrate the stability and superior performance of FedRSAM under heterogeneous data distributions.