TL;DR
Federated Learning (FL) struggles when client data is highly diverse, a problem often tackled by using Sharpness-Aware Minimization (SAM) to find "flat" and robust models. However, existing SAM-based FL methods are computationally expensive and mistakenly optimize for local rather than global flatness. This paper introduces FedGMT, a novel algorithm that uses the historical trajectory of the global model to efficiently optimize global flatness, achieving state-of-the-art accuracy while significantly cutting computation costs.
What Problem Does This Paper Address?
In Federated Learning, edge devices (clients) train a shared model collaboratively without sharing their raw, private data. A major hurdle in FL is data heterogeneity (non-IID data)—for example, one user's phone might have mostly photos of cats, while another has mostly dogs. This causes "client drift," where local models optimize for their specific data and diverge from the global objective.
To fix this, recent research has turned to Sharpness-Aware Minimization (SAM). Instead of just looking for the lowest point (minimum) in the loss landscape, SAM looks for flat minima—wide valleys where the model performs well even if the parameters shift slightly. Flat minima generally lead to better generalization.
However, applying SAM to FL has two massive bottlenecks:
- Double the Compute: SAM requires calculating a perturbation direction, which means doing two backward passes per training step instead of one. For resource-constrained edge devices, this is a dealbreaker.
- The Local vs. Global Trap: Clients can only measure the sharpness of their local data. Optimizing for a local flat valley might actually push the model into a sharp, high-loss cliff on the global landscape, slowing down convergence and hurting performance.
Methods
The authors propose FedGMT (Federated learning with Global Model Trajectory) to solve both the compute and the local-bias problems simultaneously ("One Arrow, Two Hawks").
- Global Model Trajectory (EMA): Instead of trying to calculate global sharpness directly (which is impossible without centralizing data), FedGMT maintains an Exponential Moving Average (EMA) of past global models. This trajectory acts as a historical memory of the global loss landscape.
- Replacing the Extra Backward Pass: Instead of SAM's expensive perturbation step, FedGMT uses a Kullback–Leibler (KL) divergence loss. It forces the current local model's predictions to stay close to the predictions of the historical EMA model. This requires only one extra forward pass, completely eliminating the dreaded second backward pass.
- ADMM for Global Consistency: To ensure the local updates don't drift, FedGMT uses the Alternating Direction Method of Multipliers (ADMM). Think of ADMM as a mathematical leash that penalizes local models if they stray too far from the global objective, ensuring the sharpness measure remains globally accurate.
- FedGMT-v2: Sending the EMA model to clients increases communication overhead. The authors introduce a variant, FedGMT-v2, where clients approximate the EMA model locally, cutting communication costs in half with only a minor dip in accuracy.
Datasets
The authors evaluated FedGMT across both Computer Vision (CV) and Natural Language Processing (NLP) domains:
- CV: CIFAR-10, CIFAR-100, and CINIC-10 (using CNN, ResNet-8, and ViT architectures).
- NLP: AG News (using FastText).
- Heterogeneity Settings: They simulated severe real-world data skew using Pathological partitions and Dirichlet distributions, specifically shaping the data into long-tail (highly imbalanced) distributions to stress-test the algorithms.
Key Insights and Ideas
- Local flatness can be globally sharp: The authors visualized the loss landscapes and proved a counterintuitive point: standard FedSAM pushes models into flat regions for a specific client, but when merged globally, those regions are often sharp and unstable.
- History is a proxy for global geometry: You don't need to see everyone's data to know the shape of the global loss landscape. The pseudo-gradients from previous communication rounds (captured via the EMA model) contain enough geometric information to guide current updates toward global flatness.
- Cheaper is sometimes better: By swapping SAM's exact gradient perturbation for a KL-divergence penalty against the model's own history, the authors achieved a better approximation of the global objective while reducing the per-iteration compute cost by roughly 33%.
Key Results
- Superior Accuracy: FedGMT consistently outperformed state-of-the-art FL baselines (including FedAvg, FedSAM, FedSpeed, and FedSMOO), particularly in the most severely heterogeneous data settings (e.g., Dirichlet 0.01).
- Massive Efficiency Gains: FedGMT reaches target accuracies much faster. On the CINIC-10 dataset, FedGMT hit the target accuracy in just 392 communication rounds, compared to 688 rounds for FedSpeed and 692 for FedSMOO.
- Reduced Compute: The computational cost of FedGMT's sharpness measure is only ~0.67x that of standard FedSAM, making it far more practical for deployment on mobile phones or IoT devices. As shown above, FedGMT and FedGMT-v2 offer the best trade-off between computation time and communication cost.
- Theoretical Guarantee: The authors provide rigorous mathematical proofs showing that FedGMT achieves a fast convergence rate of $O(1/T)$ in non-convex settings.
Limitations and Future Work
- Hyperparameter Sensitivity: The algorithm relies on an EMA decay coefficient ($\alpha$). If $\alpha$ is set too high, the model ignores recent trajectory changes, which can impede convergence during the chaotic early epochs of training. Currently, this requires manual tuning.
- Future Work: The authors acknowledge this sensitivity and plan to develop an adaptive mechanism for $\alpha$ in future iterations. This would allow the algorithm to dynamically adjust how much it relies on historical trajectory versus recent updates, making it more robust out-of-the-box.
Summary updated