FedFA: Federated Learning with Feature Anchors to Align Feature and Classifier for Heterogeneous Data

Tailin Zhou, Jun Zhang, Danny H. K. Tsang · DOI

Introduction

Federated Learning (FL) enables collaborative model training across multiple clients without centralizing raw data. Despite its promise, FL faces significant challenges when data is heterogeneous across clients. This heterogeneity typically manifests as label skew (differing class distributions) or feature skew (differing visual styles for the same class). Standard algorithms like FedAvg often suffer from performance collapse in these scenarios.

The Vicious Cycle of Model Divergence

Recent research identifies a fundamental hurdle in heterogeneous FL: a "vicious cycle" between the feature extractor and the classifier. Inconsistent feature distributions across clients cause local classifiers to diverge. During local training, these diverged classifiers then "pull" the feature extractors into even more inconsistent regions of the feature space. This feedback loop prevents the global model from converging to a unified, high-performing state.

The vicious cycle of model divergence (a) is transformed into a virtuous cycle (b) using feature anchors.

FedFA: Breaking the Cycle with Feature Anchors

To address this, the authors propose FedFA (Federated learning with Feature Anchors). FedFA introduces three core mechanisms to transform the vicious cycle into a "virtuous" one:

  1. Feature Anchor Alignment: The server maintains a set of global "feature anchors"—representative centroids for each class. Clients use a Feature Anchor Loss to ensure their local features align with these global targets.
  2. Classifier Calibration: Clients use the global feature anchors as virtual inputs to calibrate their local classifiers during every mini-batch. This ensures consistent decision boundaries across the network, even for classes a client might lack.
  3. Momentum-based Updates: Feature anchors are not static; they evolve based on weighted feature momentum from clients at the end of each round, allowing the shared space to adapt as learning progresses.

Empirical Results and Insights

FedFA was evaluated against state-of-the-art baselines (e.g., FedProx, MOON, FedDyn) on datasets like CIFAR-10/100 and a "Mixed Digits" benchmark combining MNIST, SVHN, USPS, SynthDigits, and MNIST-M.

t-SNE visualizations and metrics showing improved feature consistency and classifier similarity with FedFA compared to MOON.

The results demonstrate significant gains:

  • Label Skew: On CIFAR-10 with high label skew ($\alpha=0.1$), FedFA achieved 52.95% accuracy, outperforming the best baseline (FedProc) by nearly 18%.
  • Feature Skew: On the Mixed Digits dataset, FedFA reached 90.73% accuracy, a 7% improvement over FedDyn.
  • Optimization Stability: Theoretical analysis shows that FedFA improves the "Lipschitzness" of the loss function, leading to a smoother optimization landscape and more stable convergence.

Conclusion

By simultaneously aligning features and calibrating classifiers, FedFA effectively breaks the feedback loop of divergence in heterogeneous Federated Learning. While future work may address privacy trade-offs or deeper layer alignment, FedFA currently sets a new benchmark for robust performance across diverse data distributions.

Summary updated

BibTeX
@article{zhou2024fedfa,
  author = {Tailin Zhou and Jun Zhang and Danny H. K. Tsang},
  title = {{FedFA: Federated Learning with Feature Anchors to Align Feature and Classifier for Heterogeneous Data}},
  journal = {IEEE Trans. Mobile Computing},
  year = {2024},
  doi = {10.1109/tmc.2023.3325366},
}
Figure