Task-Centric Personalized Federated Fine-Tuning of Language Models

Gabriel U. Talasso, Meghdad Kurmanji, Allan M. de Souza, Nicholas D. Lane, Leandro A. VillasarXiv 2026

TL;DR

FedRouter is a novel federated learning framework that shifts personalization from a client-centric to a task-centric paradigm. By using dual-level clustering to train specialized adapters for specific tasks rather than specific users, it achieves up to a 136% improvement in generalizing to unseen data and significantly reduces performance degradation caused by conflicting tasks within a single client's dataset.

What Problem Does This Paper Address?

Federated Learning (FL) allows multiple clients (like mobile devices or hospitals) to collaboratively train models without sharing raw data. However, two major hurdles remain for Large Language Models (LLMs) in this space:

  1. Intra-client Task Interference: A single client might have data for very different tasks (e.g., writing emails vs. summarizing medical reports). Training one "personalized" model for that client often leads to "negative interference," where the model performs poorly because it's trying to satisfy conflicting objectives.
  2. Generalization Failures: Most personalized FL (pFL) methods are brittle. If a client encounters a new task at test time that wasn't in their training set, the personalized model typically fails to adapt.

The authors argue that personalization shouldn't be about the who (the client), but about the what (the task).

Methods

The authors introduce FedRouter, which utilizes Parameter-Efficient Fine-Tuning (specifically LoRA adapters) and a two-stage clustering mechanism:

  • Local Clustering: Before training, each client uses a frozen base LLM to generate embeddings for their local data. They apply K-Means clustering to these embeddings to partition their dataset into distinct "tasks." A specialized LoRA adapter is then trained for each local cluster.
  • Global Clustering: Clients send their cluster centroids and adapters to a central server. The server performs a second round of clustering on these centroids to identify similar tasks across the entire federation. It then aggregates (averages) the adapters belonging to the same global task cluster.
  • Evaluation Router: This is the "brain" of the inference phase. When a new data sample arrives, FedRouter computes its embedding and routes it to the most relevant adapter based on Euclidean distance to the centroids. It offers two modes:
  • Personalized Mode: Routes samples using only the client's local centroids.
  • Generalized Mode: Routes samples using all global centroids, allowing the client to "borrow" an adapter from the federation for a task they've never seen before.
Figure 1: FedRouter Workflow Overview. Each client first computes embeddings from its local data and applies clustering to partition the dataset into task-specific subsets. The client then sends the resulting centroids and adapters to the server, which performs global clustering to associate similar tasks across clients and aggregate their corresponding adapters collaboratively. Finally, the server sends the updated adapters back to the clients, which then associate each received model with the appropriate local task-specific dataset for next round of training.

To keep communication costs low, FedRouter uses a round-robin approach, where each client only trains and shares one adapter per communication round, even if they have multiple task clusters.

Datasets

The researchers evaluated FedRouter using a subset of four diverse tasks from the FLAN collection:

  • QQP: Paraphrase detection.
  • WebNLG: Structure-to-text generation.
  • Samsum: Dialogue summarization.
  • GigaWord: General text summarization.

Performance was measured using the ROUGE-1 metric.

Key Insights and Ideas

  • Task-Centricity is Key: Shifting the focus from "one model per client" to "one model per task type" effectively solves the interference problem. The t-SNE visualization below shows how clearly the base model's embeddings can separate different tasks, even across different clients.
Figure 4: t-SNE visualization of client test data embeddings in single scenario.
  • Embeddings as Proxies: The paper demonstrates that embeddings from a pre-trained, frozen model are sufficient to identify task boundaries, meaning clients don't need to perform complex task labeling manually.
  • Global Knowledge for Local Unseen Tasks: The "Generalized Evaluation" mode is a major breakthrough for pFL. By having access to global centroids, a client can successfully process a "summarization" request even if they only participated in "paraphrase detection" training, simply by routing the request to the global summarization adapter.
Figure 2: FedRouter Evaluation Modes. During inference, each client computes the embedding of a new data sample and associates it with the nearest centroid based on the minimum Euclidean distance. The association can be performed using either the local centroids, to obtain a personalized evaluation, or the global centroids, to enable a generalized evaluation across the federation.

Key Results

  • Generalization: In scenarios where clients faced entirely new tasks at test time, FedRouter achieved a 136% relative improvement (0.583 ROUGE-1 vs. 0.247 for state-of-the-art FedSA).
  • Task Interference: When clients held data for all four tasks simultaneously, FedRouter outperformed standard personalized approaches by ~6.1% relatively.
  • Scalability: The method scales gracefully. Performance improved as the model size increased (from Llama 3.2 1B to 8B) and as the number of clients in the federation grew, indicating that more participants provide better "task coverage" for the global pool.

Limitations and Future Work

  • Hyperparameter Tuning: The number of clusters ($n_l$ and $n_g$) is a hyperparameter that currently needs to be set. While the authors used the Silhouette Score to find the optimal number, automating this in a live FL environment remains a challenge.
  • Task Overlap: The authors noted that as the number of tasks increases, clustering accuracy can dip slightly (from 100% to ~95%) due to overlapping distributions.
  • Cross-Task Collaboration: Future work could explore how adapters for different but related tasks might collaborate or share knowledge beyond simple averaging within a cluster.

Summary updated

BibTeX
@misc{talasso2026task,
  author = {Gabriel U. Talasso and Meghdad Kurmanji and Allan M. de Souza and Nicholas D. Lane and Leandro A. Villas},
  title = {{Task-Centric Personalized Federated Fine-Tuning of Language Models}},
  year = {2026},
  eprint = {2604.00050},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2604.00050},
}
Figure