Skip to content
AI.info

Research

Prompt Estimation from Prototypes for Federated Prompt Tuning of Vision Transformers

Overview Research area: Computer vision and federated learning, specifically parameter-efficient fine-tuning (prompt tuning) of pre-trained Vision Transformers (ViTs) under non-iid client data. Techni

arXiv
2510.25372
Published
2025-10-29
Authors
M Yashwanth, Sharannya Ghosh, Aditay Tripathi, Anirban Chakraborty

AI summary

Overview

Research area: Computer vision and federated learning, specifically parameter-efficient fine-tuning (prompt tuning) of pre-trained Vision Transformers (ViTs) under non-iid client data.

Technical level: Advanced. The paper combines federated optimization, visual prompt tuning, and a theoretical analysis involving Lipschitz smoothness and minimum mean squared error (MMSE) estimation.

Scope (one sentence): The paper proposes PEP-FedPT, a federated prompt-tuning framework that mixes globally shared, class-specific prompts into per-sample "Class-Contextualized Mixed Prompts" using only global class prototypes and local class priors, targeting a balance between generalization and personalization.

What This Paper Is About

In federated learning, multiple clients train a shared model without sharing raw data, but their local data distributions often differ sharply ("non-iid" data). When the model is a large pre-trained Vision Transformer tuned with prompts, a single globally shared prompt generalizes but cannot adapt to each client, while client-specific (personalized) prompts adapt locally but overfit and generalize poorly to unseen clients. The paper asks whether personalization can be achieved while relying solely on globally shared prompts, and answers with a mixing scheme that computes per-sample prompts on the client side from global class prototypes plus local class priors.

Key Contributions

  1. A unified framework (PEP-FedPT) that jointly optimizes class-specific prompts and a shared prompt for federated learning of ViTs, achieving personalization using only globally shared prompts (no client-dependent trainable prompt storage).
  2. A novel prompt-mixing strategy, Class-Contextualized Mixed Prompts (CCMP), which softly combines class-specific prompts using weights derived from global cls-token prototypes and client class priors, empirically shown to outperform existing methods under feature and label imbalance.
  3. Theoretical support: CCMP is shown to minimize a quadratic upper bound on the loss around the class prompts (Proposition 1) and to be optimal in the Minimum Mean Squared Error (MMSE) sense (Proposition 2).

Main Findings

  • CIFAR-100, pathological split (each client sees only 10 classes): PEP-FedPT reaches 95.46 ± 0.16 mean accuracy and 84.74 ± 3.12 worst-client accuracy, versus the strongest baseline pFedPG at 92.96 ± 1.34 mean / 84.58 ± 1.1 worst. Other baselines: FedVPT-D 85.15 ± 0.77, SGPT 84.16 ± 0.24, FedVPT 83.62 ± 0.02, FedPR 81.77 ± 0.30, Head-Tuning 77.85 ± 0.17, P-PT 75.37 ± 0.39.
  • CIFAR-100, Dirichlet Dir(0.3): PEP-FedPT achieves 88.75 ± 0.25 mean / 81.00 ± 0.00 worst, ahead of FedVPT-D (88.60 ± 0.19 / 79.17 ± 0.65), SGPT (85.90 ± 0.21 / 76.73 ± 1.60), FedVPT (84.91 ± 0.07 / 74.64 ± 0.74), FedPR (82.27 ± 0.22 / 73.29 ± 1.38), P-PT (80.10 ± 0.25 / 68.33 ± 0.58), Head-Tuning (79.56 ± 0.25 / 66.66 ± 2.79), and pFedPG (77.27 ± 0.77 / 62.34 ± 1.53).
  • Tiny-ImageNet, pathological split: PEP-FedPT reaches 91.52 ± 0.11 mean / 77.33 ± 1.84 worst, versus pFedPG 82.93 ± 0.18 / 50.21 ± 1.05, FedVPT-D 79.60 ± 0.42 / 59.83 ± 1.66, SGPT 75.65 ± 1.81 / 55.66 ± 3.32, FedVPT 74.20 ± 0.33 / 54.00 ± 2.46, FedPR 68.86 ± 0.17 / 47.50 ± 1.63, Head-Tuning 68.39 ± 0.76 / 44.09 ± 0.58, P-PT 61.68 ± 1.16 / 38.09 ± 6.38.
  • Tiny-ImageNet, Dirichlet Dir(0.3): PEP-FedPT obtains 83.44 ± 0.02 mean / 61.00 ± 0.31 worst, ahead of FedVPT-D (83.30 ± 0.16 / 60.33 ± 0.58), SGPT (78.84 ± 1.11 / 53.87 ± 0.46), FedVPT (76.57 ± 0.34 / 50.34 ± 2.51), Head-Tuning (70.73 ± 0.08 / 45.63 ± 2.05), FedPR (68.93 ± 0.11 / 47.37 ± 1.44), P-PT (62.78 ± 0.38 / 40.30 ± 1.13), and pFedPG (55.91 ± 0.65 / 49.31 ± 1.05).
  • Personalized baselines degrade sharply under label heterogeneity: pFedPG scores well on CIFAR-100 pathological (92.96 mean) but drops to 77.27 mean under Dir(0.3) and to 55.91 mean on Tiny-ImageNet Dir(0.3), consistent with the paper's claim that personalized prompts overfit local data and generalize poorly.
  • Prompt placement matters: inserting CCMP too early is unhelpful because early cls tokens are not informative enough, while inserting too late leaves insufficient depth for adaptation; layers 5, 6, 7 are reported as the most effective placement.
  • cls tokens carry task information: the paper reports a Top-5 accuracy analysis on CIFAR-100 based on the minimum distance between a test input's cls token and cls prototypes at each layer, showing middle layers hold coarse task information.
  • Prototype sharing is characterized as low-risk: the authors state that class prototypes are aggregated, low-dimensional intermediate-layer summaries rather than raw data, and report in the appendix that adding Laplace DP noise to class prototypes had minimal impact on final accuracy, with (ε, 0) privacy attainable.
  • Results on DomainNet and iNaturalist: these datasets are listed in the abstract as evaluation sets, and Table 2 and Table 3 are referenced, but their numeric results are not included in the provided paper content, so they cannot be reported here.

Methodology in Plain English

Each client keeps a pre-trained ViT-B/16 and trains only two sets of prompts plus the classification head, sharing the backbone. The shared prompts are inserted at the very first transformer layer, on the reasoning that early layers capture low-level, class-agnostic features that transfer across clients and domains. The class-specific prompts (one vector per class) are also shared globally, but they are not inserted directly. Instead, for each input, the client computes a weight for every class prompt and takes a weighted sum, producing the Class-Contextualized Mixed Prompt (CCMP) injected at layers 5–7.

The weights come from two sources: (a) the cosine similarity between the input's cls token and the global cls-prototype for each class, exponentiated and scaled by a temperature, and (b) the client's own class prior (empirical label frequency). These unnormalized scores are normalized across classes into a probability vector, so the mixed prompt is tailored per sample and per client without storing any client-specific trainable prompt.

Global prototypes are computed by averaging cls representations per class at each participating client, aggregating those class centroids at the server, and smoothing them across update periods with momentum. Prompts are then trained locally and combined with standard federated averaging (FedAvg). The authors prove that under compactness of the prompt space, Lipschitz smoothness of the per-class losses, and a shared per-class optimum, this mixing minimizes a quadratic upper bound on the global loss and is the MMSE estimate of the true class prompt.

Why This Matters

Impact on research: The work targets the central tension in federated prompt tuning—global prompts generalize but lack expressiveness, personalized prompts adapt but overfit and require assumptions like full client participation (pFedPG) or complex two-stage non-differentiable training (SGPT). PEP-FedPT shows that per-sample personalization can be derived from shared prompts plus cheap statistics, and it adds theoretical grounding (upper-bound minimization and MMSE optimality) that most prompt-tuning papers lack.

Real-world applications:

  • Mobile and edge AI: adapting a shared vision model across many devices with limited communication and compute budgets.
  • Healthcare imaging: collaborative model adaptation across hospitals that cannot share patient images and have very different case mixes.
  • Person re-identification and face recognition: domains where the cited literature already applies federated learning and where camera or user distributions differ heavily per site.
  • Cross-domain deployment: settings like DomainNet, where the same classes appear under very different visual domains (sketch, clipart, painting), mapping to practical deployment across heterogeneous sensor or capture conditions.

Industry relevance: Because only prompts and class prototypes cross the network—not backbone weights or gradients—the method fits the communication constraints of cross-device federated systems, and it works with standard federated averaging, so it can be dropped into existing FL pipelines rather than requiring new server-side infrastructure.

Future Directions

  • Report the DomainNet and iNaturalist results fully: these datasets are named as evaluation sets but their numbers are not present in the provided content; complete comparisons would clarify behavior under pure feature imbalance and at cross-device scale (1018 clients, 1203 classes).
  • Strengthen privacy guarantees: the method requires transmitting class prototypes; the authors only discuss empirical robustness to Laplace DP noise and a stated (ε, 0) result, leaving formal end-to-end privacy accounting as an open area.
  • Relax the theoretical assumptions: Assumption 3 (all clients' class-specific losses share the same minimum) is stated to hold for label imbalance but not for feature imbalance, so extending the guarantee to feature-heterogeneous settings is a natural next step.
  • Reduce reliance on class priors: the method assumes access to local empirical label distributions (also assumed in prior work); studying performance when priors are unknown, noisy, or estimated online would broaden applicability.

Target Audience

Researchers and practitioners working on federated learning, parameter-efficient fine-tuning, and Vision Transformer adaptation—particularly those interested in the trade-off between generalization and personalization under non-iid data. It is most useful to readers already comfortable with federated averaging, ViT architectures, and prompt tuning; the theory sections (Lipschitz smoothness, MMSE) assume a graduate-level machine learning background.

Authors’ abstract

Visual Prompt Tuning (VPT) of pre-trained Vision Transformers (ViTs) has proven highly effective as a parameter-efficient fine-tuning technique for adapting large models to downstream tasks with limited data. Its parameter efficiency makes it particularly suitable for Federated Learning (FL), where both communication and computation budgets are often constrained. However, global prompt tuning struggles to generalize across heterogeneous clients, while personalized tuning overfits to local data and lacks generalization. We propose PEP-FedPT (Prompt Estimation from Prototypes for Federated Prompt Tuning), a unified framework designed to achieve both generalization and personalization in federated prompt tuning of ViTs. Within this framework, we introduce the novel Class-Contextualized Mixed Prompt (CCMP) - based on class-specific prompts maintained alongside a globally shared prompt. For each input, CCMP adaptively combines class-specific prompts using weights derived from global class prototypes and client class priors. This approach enables per-sample prompt personalization without storing client-dependent trainable parameters. The prompts are collaboratively optimized via traditional federated averaging technique on the same. Comprehensive evaluations on CIFAR-100, TinyImageNet, DomainNet, and iNaturalist datasets demonstrate that PEP-FedPT consistently surpasses the state-of-the-art baselines under diverse data heterogeneity scenarios, establishing a strong foundation for efficient and generalizable federated prompt tuning of Vision Transformers.

Read the original paper