Abstract
Federated Learning (FL) faces a persistent challenge in balancing global generalization (Generalized FL) with local adaptation (Personalized FL), a conflict often described as a "tug-of-war." This paper presents Shared and Group Prompt Tuning (SGPT), a novel framework designed to bridge this gap efficiently. By utilizing a frozen Vision Transformer (ViT) backbone and introducing a small set of learnable visual prompts, SGPT achieves high performance across heterogeneous data distributions. Specifically, it employs shared prompts in early layers for universal features and group-specific prompts in deeper layers for specialized knowledge. A dynamic prompt selection module enables instant adaptation to local client data. Experimental results across diverse benchmarks, including CIFAR-100 and DomainNet, demonstrate that SGPT significantly outperforms existing state-of-the-art methods while maintaining extreme parameter efficiency, training only 0.1M parameters.
Introduction: The GFL-PFL Tug-of-War
Standard Federated Learning (FL) typically aims for one of two divergent goals. Generalized FL (GFL) seeks a single global model that performs well across all participating clients. However, in the presence of significant data heterogeneity—where clients possess different label distributions or visual domains—a one-size-fits-all model often fails to capture local nuances. Conversely, Personalized FL (PFL) tailors models to individual clients, yielding high local accuracy but often at the cost of overfitting and poor generalization to unseen data.
This challenge is particularly acute when using large-scale models like Vision Transformers (ViTs). Fine-tuning these models in a decentralized environment is computationally prohibitive and prone to instability. SGPT addresses these issues by leveraging the efficiency of Visual Prompt Tuning (VPT) to bridge the gap between generalization and personalization.
The SGPT Framework
The core innovation of SGPT lies in its dual-prompt architecture and automated selection mechanism. Instead of updating the millions of parameters within a ViT backbone, the backbone remains frozen, and only a small set of "prompts"—learnable vectors added to the input space—are trained.
Shared and Group Prompts
SGPT distinguishes between two types of prompts:
- Shared Prompts ($P_S$): Inserted into the early layers of the ViT, these prompts are designed to capture universal, low-level features (such as textures and edges) that are common across all clients.
- Group Prompts ($P_G$): Inserted into deeper layers, these prompts capture specialized, high-level semantic features relevant to specific data clusters.
Prompt Selection and Adaptation
To handle local data distributions without requiring post-hoc personalization phases, SGPT incorporates a Prompt Selection Module. This module acts as a router, using a pre-trained feature encoder and a set of learnable "keys." For any given input, the module calculates the cosine similarity between the input's features and the keys to select the most appropriate group prompt. This allows the model to adapt to a client's specific data distribution dynamically at inference time.
Optimization and Stability
To ensure stable training in heterogeneous environments, the authors introduce two key strategies:
- Block Coordinate Descent (BCD): Training follows a cognitive progression. Shared prompts are optimized first to capture common knowledge, followed by an iterative optimization of group prompts and keys. This "general-to-specific" approach prevents the model from getting stuck in poor local minima.
- Momentum Aggregation: To prevent "clustering collapse"—where all inputs might gravitate toward a single group—momentum updates are applied during the server-side aggregation of keys and group prompts, ensuring a diverse and stable representation across the prompt pool.
Experimental Results
SGPT was evaluated against several state-of-the-art baselines, including FedEM, pFedPG, and Ditto, across datasets exhibiting both label heterogeneity (CIFAR-100, Five-dataset) and feature heterogeneity (Office-Caltech10, DomainNet).
Performance Trade-offs
A primary metric for success in this domain is the trade-off between Global Accuracy (generalization) and Worst Local Accuracy (personalization robustness). On the CIFAR-100 benchmark ($s=10$), SGPT achieved a Global Accuracy of 84.64% and a Worst Local Accuracy of 73.85%. As shown in the results, SGPT occupies the upper-right quadrant of the performance space, significantly improving the trade-off compared to both GFL and PFL-focused baselines.
Efficiency and Robustness
Beyond accuracy, SGPT is remarkably efficient. By training only 0.1M parameters (compared to 86M for a full ViT-B/16), it drastically reduces the communication overhead, making it ideal for real-world FL deployments. Furthermore, on the DomainNet benchmark, SGPT showed significant robustness to feature shifts, outperforming the next best baseline by nearly 9% in average accuracy.
Conclusion
SGPT demonstrates that prompt-tuning is a powerful tool for resolving the fundamental tensions in Federated Learning. By strategically combining shared and group-specific knowledge within a parameter-efficient framework, it provides a scalable solution for high-performance, personalized decentralized learning. Future work may explore automated methods for determining optimal prompt placement and dynamic grouping strategies.
Summary updated