FedFN: Feature Normalization for Alleviating Data Heterogeneity Problem in Federated Learning

Seongyoon Kim, Gihun Lee, Jaehoon Oh, Se-Young Yun

TL;DR

While prevailing wisdom attributes client drift in non-IID federated learning primarily to biased classifier heads, this paper demonstrates that the true bottleneck lies in feature representations—specifically, an escalating disparity in local vs. global feature norms. To resolve this, the authors propose FedFN (Federated Averaging with Feature Normalization Update), a simple technique that normalizes feature representations during local training while keeping classifiers trainable. FedFN consistently outperforms standard baselines across diverse non-IID settings and effectively stabilizes fine-tuning for pretrained models.

What Problem Does This Paper Address?

In Federated Learning (FL), a central server aggregates model updates trained across decentralized client devices without directly accessing their private data. A central obstacle is data heterogeneity (non-IID data distributions across clients), which causes client models to drift in divergent directions, degrading global model convergence and accuracy.

Previous literature predominantly blamed the final classifier layer for this performance drop (arguing that local classifiers overfit to the subset of classes present on each device). Consequently, existing fixes focused on freezing or post-calibrating classifier weights. The authors challenge this consensus by investigating whether the deeper root cause actually stems from representations in the feature extractor itself.

Methods

  • 4-Factor Representation Diagnostic: The authors analyze the penultimate features and classifier weights along four metrics: weight similarity, inter-class prototype similarity, intra-class prototype similarity, and prototype-weight alignment.
  • Feature Norm Analysis: They track the $L_2$ norm of feature vectors for seen (in-distribution / ID) versus unseen (out-of-distribution / OOD) classes on local clients. While classifier weight norms naturally stabilize as learning rates decay, feature norms maintain a persistent, severe gap: local models inflate feature norms for observed classes, causing major norm mismatches with the global model.
  • FedFN (Feature Normalization Update): To eliminate feature norm disparities, FedFN projects the penultimate feature vector onto the unit hypersphere: $$\hat{f}(x; \theta_{\text{ext}}) = \frac{f(x; \theta_{\text{ext}})}{\|f(x; \theta_{\text{ext}})\|_2}$$ The logit vector is computed as $\hat{z}(x; \theta) = \theta_{\text{cls}} \hat{f}(x; \theta_{\text{ext}})$.

  • Unconstrained Classifier Updates: Unlike prior hyperspherical approaches (such as SphereFed, which freeze classifiers to fixed orthonormal vectors and bound logits to $[-1, 1]$), FedFN leaves the classifier matrix $\theta_{\text{cls}}$ unconstrained and fully trainable via standard cross-entropy loss. Because feature normalization rescales the backpropagated gradients for $\theta_{\text{cls}}$, FedFN uses a slightly higher initial learning rate found via grid search.

Datasets

The authors evaluate FedFN across 100 simulated clients under balanced sharding and Dirichlet-based non-IID partitions:

  • CIFAR-10: Evaluated with VGG11 and ResNet18 (both training from scratch and starting from pretrained weights). Partitions tested: $s \in \{2, 3, 5, 10\}$ classes per client, as well as Latent Dirichlet Allocation (LDA) with concentration $\alpha \in \{0.1, 0.3, 0.5, 1.0\}$.
  • CIFAR-100: Evaluated with MobileNet across sharded allocations ($s \in \{10, 50, 100\}$) and Dirichlet partitions ($\alpha \in \{0.1, 0.3, 0.5, 1.0\}$).

No new benchmarks were created; all partitions use established FL simulation protocols.

Key Insights and Ideas

  • Classifier bias vanishes; feature norm bias persists: Under learning rate decay, classifier weight norms for unseen classes recover and converge to the global average. In contrast, local feature norms for seen classes remain heavily inflated, directly destabilizing global model aggregation as data heterogeneity increases.
  • Class separation degrades at the feature level: In highly heterogeneous setups ($s=2$), inter-class prototype similarity climbs sharply in vanilla FedAVG, causing class representations to collapse into one another. Normalizing feature vectors restores low inter-class similarity and sharper decision boundaries.
  • Logits should remain unconstrained: Constraining both features and classifier vectors to unit length (as in cosine-margin methods) overly restricts logit scale and hurts training dynamics. Letting classifier weights vary freely in magnitude allows FedFN to outperform rigid hyperspherical baselines like SphereFed.
  • Pretrained models are vulnerable without normalization: In extreme non-IID conditions ($s=2$), standard fine-tuning with FedAVG causes pretrained ResNet18 performance to collapse below that of models trained from scratch (37.87% vs. 41.50%). FedFN protects pretrained representations, improving accuracy to 56.84%.

Key Results

  • CIFAR-10 (VGG11): At extreme heterogeneity ($s=2$), FedFN achieves 77.77% top-1 accuracy compared to 74.24% for FedAVG and 75.05% for FedBABU.
  • Plug-and-Play Compatibility: Adding the feature normalization update (+FN) uniformly boosted multiple federated optimizers. On CIFAR-100 (MobileNet, $s=10$):
  • FedAVG: climbs from 37.25% $\rightarrow$ 44.67% (+FN).
  • Scaffold: climbs from 41.86% $\rightarrow$ 49.42% (+FN), additionally preventing client divergence where Scaffold previously crashed.
  • FedEXP: climbs from 36.35% $\rightarrow$ 45.90% (+FN).
  • Personalized FL: In 2-step fine-tuning (FedFN-FT) on CIFAR-100 ($s=10$), FedFN achieves 82.85% client accuracy, outperforming FedBABU-FT (79.76%) and Per-FedAVG (32.57%).

Limitations and Future Work

  • Sensitivity to Learning Rate Tuning: Dividing backpropagated gradients by the feature norm changes gradient scales on the classifier, necessitating grid searches for larger initial learning rates.
  • Scope of Architecture & Tasks: Experiments focus entirely on computer vision benchmarks (CIFAR-10/100 using VGG, MobileNet, and ResNet18). The paper suggests applicability to large foundation models, but empirical validation on modern vision-language models or large language models (LLMs) remains to be investigated.

Summary updated

BibTeX
@inproceedings{kim2023fedfn,
  author = {Seongyoon Kim and Gihun Lee and Jaehoon Oh and Se-Young Yun},
  title = {{FedFN: Feature Normalization for Alleviating Data Heterogeneity Problem in Federated Learning}},
  booktitle = {Federated Learning @ NeurIPS},
  year = {2023},
  url = {https://openreview.net/forum?id=4apX9Kcxie},
}

Loading related content...

Figure