[Paper Review] Guiding The Last Layer in Federated Learning with Pre-Trained Models
This paper proposes a two-stage federated learning framework that first guides the last classification layer using Nearest Class Means (FedNCM) and then fine-tunes the full model, achieving superior accuracy, faster convergence, and reduced communication and computation costs. FedNCM enables exact, efficient, and privacy-preserving head tuning without hyperparameters, outperforming standard fine-tuning and prior methods across diverse datasets and heterogeneity levels.
Federated Learning (FL) is an emerging paradigm that allows a model to be trained across a number of participants without sharing data. Recent works have begun to consider the effects of using pre-trained models as an initialization point for existing FL algorithms; however, these approaches ignore the vast body of efficient transfer learning literature from the centralized learning setting. Here we revisit the problem of FL from a pre-trained model considered in prior work and expand it to a set of computer vision transfer learning problems. We first observe that simply fitting a linear classification head can be efficient and effective in many cases. We then show that in the FL setting, fitting a classifier using the Nearest Class Means (NCM) can be done exactly and orders of magnitude more efficiently than existing proposals, while obtaining strong performance. Finally, we demonstrate that using a two-phase approach of obtaining the classifier and then fine-tuning the model can yield rapid convergence and improved generalization in the federated setting. We demonstrate the potential our method has to reduce communication and compute costs while achieving better model performance.
Motivation & Objective
- Address performance degradation in federated learning under non-iid data distributions by leveraging pre-trained models as a strong initialization.
- Reduce communication and computation costs in federated learning by focusing optimization on the last layer during an initial tuning phase.
- Improve convergence stability and generalization in federated settings by decoupling classification head adaptation from full model fine-tuning.
- Demonstrate that a pre-trained model's representation capacity can be efficiently exploited via lightweight, exact, and privacy-preserving methods like FedNCM.
- Investigate the synergy between efficient head tuning and subsequent full fine-tuning to achieve state-of-the-art performance with minimal hyperparameter sensitivity.
Proposed method
- Propose FedNCM, a federated adaptation of Nearest Class Means that computes the optimal linear classifier exactly and efficiently using only global model representations, without transmitting raw data.
- Introduce a two-stage training protocol: first, train only the classification head using FedNCM (HeadTuning stage), then fine-tune the entire model (Fine-Tuning stage).
- Use FedAvg, FedAdam, and FedProx as base FL algorithms to evaluate the two-stage method across diverse optimization strategies and heterogeneity levels.
- Compute FedNCM in a privacy-preserving manner by aggregating local class means from clients and solving the linear classifier via closed-form optimization.
- Apply the two-stage method to standard vision benchmarks (e.g., CIFAR-10, Flowers102, Tiny ImageNet) using ImageNet-pretrained ResNet-18 and ViT-Tiny.
- Evaluate robustness to data heterogeneity by varying the Dirichlet distribution parameter α, and assess performance under increasing local epochs and client counts.

Experimental results
Research questions
- RQ1Can training only the last layer using FedNCM achieve strong performance in federated learning with pre-trained models, without requiring full model fine-tuning?
- RQ2Does a two-stage approach—first optimizing the classification head via FedNCM, then fine-tuning the full model—lead to faster convergence and improved generalization compared to direct fine-tuning?
- RQ3How does FedNCM compare to standard fine-tuning and other head-tuning methods (e.g., linear probing) in terms of accuracy, communication cost, and robustness under data heterogeneity?
- RQ4To what extent does the two-stage method reduce hyperparameter sensitivity in federated learning, especially in non-iid settings?
- RQ5How does the performance of FedNCM+FT scale with increasing client count, local epochs, and data heterogeneity (Dirichlet-α)?
Key findings
- FedNCM alone outperforms standard fine-tuning on the Flowers102 dataset, achieving 76.7% accuracy compared to fine-tuning’s 71.8% under FedAdam.
- The two-stage method FedNCM+FT consistently outperforms both fine-tuning and linear probing across all evaluated datasets and FL algorithms (FedAvg, FedAdam, FedProx).
- On CIFAR-10, FedNCM+FT achieves 84.1% accuracy with FedAdam, significantly exceeding fine-tuning (76.6%) and linear probing (78.3%) under the same conditions.
- FedNCM+FT demonstrates superior robustness to data heterogeneity: performance degrades more gracefully than fine-tuning as Dirichlet-α decreases from 100 (nearly iid) to 0.01 (highly non-iid).
- The method is highly stable across hyperparameter grids: FedNCM+FT maintains high performance over a wide range of learning rates, while fine-tuning shows significant sensitivity and performance drops in some settings.
- Increasing the number of clients leads to less severe performance degradation for FedNCM+FT compared to fine-tuning and linear probing, indicating better scalability and stability in large-scale FL settings.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.