Mixture of Experts Made Personalized: Federated Prompt Learning for Vision-Language Models

Jun Luo, Chen Chen, Shandong Wu

TL;DR

pFedMoAP reimagines federated prompt learning by breaking the "one global model" rule. By treating lightweight prompts from different clients as a pool of "experts," it allows individual devices to download and mix multiple prompts using a local attention-based gating network. This approach achieves state-of-the-art personalization for Vision-Language Models (VLMs) like CLIP.

The Challenge: Data Heterogeneity in Federated Learning

Federated Learning (FL) aims to train models across decentralized devices without sharing raw data, preserving user privacy. However, a major hurdle is data heterogeneity—where one client’s data (e.g., photos of household pets) looks entirely different from another’s (e.g., satellite imagery). This divergence often causes a single, globally aggregated model to perform poorly for individual users.

Recently, researchers have turned to Prompt Learning to adapt massive VLMs like CLIP to local data. Instead of fine-tuning millions of parameters, they train tiny "prompts" (small learnable vectors) that guide the frozen model. While prompts are incredibly lightweight, current federated methods still force clients to download just one aggregated global prompt. The authors argue this is a missed opportunity: since prompts are so small (often 3,000x smaller than a standard ResNet50), why not download several and let the local device choose the best ones?

Model parameter counts and the pFedMoAP pipeline

Introducing pFedMoAP

To capitalize on the lightweight nature of prompts, the authors introduce Personalized Federated Mixture of Adaptive Prompts (pFedMoAP). The framework personalizes the prompt learning process through the lens of a Mixture of Experts (MoE) and consists of three main components:

  1. The Expert Pool: The central server maintains a dynamic repository of prompts trained by various clients, treating each as a specialized "expert."
  2. KNN-Based Selection: Instead of downloading the entire pool, a client uses a K-Nearest Neighbors (KNN) approach to identify the $K$ most relevant "non-local experts" based on feature similarity.
  3. Attention-Based Gating: This is the core innovation. Standard MoE usually uses a simple linear layer to weight experts. pFedMoAP instead employs a Multi-Head Attention (MHA) network. It uses the local image features as a "query" to evaluate the text features generated by both the local prompt and the downloaded non-local experts. This allows the model to dynamically "blend" the best text representations for a specific image.

Crucially, while the prompts are shared and aggregated on the server, the gating network remains local. This ensures high personalization for each client while keeping communication overhead strictly limited to the lightweight prompts.

Key Insights

  • Prompts are "Communication-Cheap": The fundamental realization is that the bandwidth constraints of traditional FL don't apply to prompts. Sharing 10 prompts is still significantly cheaper than sharing a single full-sized model.
  • Attention Outperforms Linear Weighting: Traditional MoE gating assigns a static weight to an expert's output. By using attention, pFedMoAP actively aligns image features with text features. This makes the system "order-agnostic"—the attention mechanism dynamically finds the right feature regardless of which expert provided it.
  • Robustness to Privacy Constraints: The method holds up remarkably well under Differential Privacy (DP). Even when noise is added to the shared prompts to protect data, the local gating network learns to "filter" the noise and focus on the useful signals from the experts.

Experimental Results

The researchers evaluated pFedMoAP on 9 diverse datasets to simulate various real-world challenges, including few-shot learning (Flowers102, OxfordPets), label shift (CIFAR10/100), and domain gaps (DomainNet).

pFedMoAP consistently outperformed state-of-the-art federated prompt learning methods like FedOTP and pFedPrompt across the board.

Performance comparison of pFedMoAP against baseline methods on various datasets
  • Accuracy Boost: On the Flowers102 dataset, pFedMoAP reached an impressive 98.41% accuracy, a significant jump over previous best federated methods.
  • Handling Heterogeneity: In "pathological" settings where clients only see a few classes, pFedMoAP showed much more robust growth as the number of available training "shots" increased compared to traditional FedAvg-style approaches.
  • Domain Adaptation: On DomainNet (feature shift), it achieved an average accuracy of 38.80%, outperforming local-only training (CoOp) and standard federated prompt learning (PromptFL).

Limitations and Future Work

While the paper demonstrates strong results, a few areas remain open for exploration:

  • Computational Overhead: Although communication is low, running a Multi-Head Attention gating network on a mobile device adds some local compute cost. The authors mitigated this with a pooling layer to reduce dimensions, but it remains a factor for ultra-low-power hardware.
  • Expert Scaling: Ablation studies show diminishing returns after about 20-25 experts. Automatically finding the "sweet spot" for the number of experts ($K$) based on a client's specific resources is a potential future direction.
  • Beyond CLIP: Extending this MoE-personalized approach to other large-scale foundation models, such as Large Language Models (LLMs) or newer VLMs, represents a logical and exciting next step for federated personalization.

Summary updated

BibTeX
@inproceedings{luo2025mixture,
  author = {Jun Luo and Chen Chen and Shandong Wu},
  title = {{Mixture of Experts Made Personalized: Federated Prompt Learning for Vision-Language Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=xiDJaTim3P},
}
Figure