Token-Level Prompt Mixture with Parameter-Free Routing for Federated Domain Generalization

Shuai Gong, Chaoran Cui, Xiaolin Dong, Xiushan Nie, Lei Zhu +1 more
4/29/2025
cs.LGcs.AI

Official code: GongShuai8210/TRIP (4 stars, last commit 2026-01-30).

Abstract

Federated domain generalization (FedDG) aims to learn a globally generalizable model from decentralized clients with heterogeneous data while preserving privacy. Recent studies have introduced prompt learning to adapt vision-language models (VLMs) in FedDG by learning a single global prompt. However, such a one-prompt-fits-all learning paradigm typically leads to performance degradation on personalized samples. Although the mixture of experts (MoE) offers a promising solution for specialization, existing MoE-based methods suffer from coarse image-level expert assignment and high communication costs from parameterized routers. To address these limitations, we propose TRIP, a Token-level prompt mixture with parameter-free routing framework for FedDG, which treats multiple prompts as distinct experts. Unlike existing image-level routing designs, TRIP assigns different tokens within an image to specific experts. To ensure communication efficiency, TRIP incorporates a parameter-free routing mechanism based on token clustering and optimal transport. The instance-specific prompt is then synthesized by aggregating experts, weighted by the number of tokens assigned to each. Additionally, TRIP develops an unbiased learning strategy for prompt experts, leveraging the VLM's zero-shot generalization capability. Extensive experiments across four benchmarks demonstrate that TRIP achieves optimal generalization results, with communication of only 1K parameters per round. Our code is available at https://github.com/GongShuai8210/TRIP.

View on arXivView PDF

Code Implementations(1)

GongShuai8210/TRIPOfficial100%
42Shell, PythonApr 28, 20258 months ago

Similar Papers

Cite this paper

@article{gong2025tokenlevel,
  title  = {Token-Level Prompt Mixture with Parameter-Free Routing for Federated Domain Generalization},
  author = {Shuai Gong and Chaoran Cui and Xiaolin Dong and Xiushan Nie and Lei Zhu and Xiaojun Chang},
  year   = {2025},
  eprint = {2504.21063},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.21063v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2504.21063.svg)](https://codeofpaper.com/paper/2504.21063)

Discussion