TL;DR
Federated domain-specific instruction tuning (FedDIT) often struggles because individual clients lack sufficient private in-domain data. This paper shows that cross-client domain coverage—rather than data heterogeneity—is the primary driver of model performance in FedDIT. To optimize this, the authors introduce FedDCA, a framework that maximizes domain coverage via greedy client-center selection and server-side retrieval, as well as an ultra-lightweight heterogeneous-encoder variant (FedDCA*).
What Problem Does This Paper Address?
Fine-tuning Large Language Models (LLMs) on domain-specific tasks (e.g., finance, medicine, coding) via Federated Learning (FL) is challenging. Individual clients (like hospitals or financial firms) typically have small, highly specialized datasets. Relying solely on local client data often leads to overfitting, performance degradation, and memorization of sensitive private data.
While centralized instruction augmentation is well-studied, applying it to distributed settings poses three key questions:
- What data distribution factors actually dictate performance in federated instruction tuning?
- How can distributed clients enrich their instruction sets using public data without sharing private text or generating redundant data?
- How can clients with limited compute participate efficiently without leaking private domain details to the server?
Methods
The authors propose FedDCA (Federated Instruction Tuning with Domain Coverage Augmentation) and a resource-efficient variant, FedDCA*:
[Clients] [Server]
1. Local K-Means Clustering
Embed instructions -> ξ Centers ──► 2. Greedy Center Selection
- Selects centers iteratively
- Filters high-similarity centers
- Maximizes domain coverage
3. Public Data Dense Retrieval
- Retrieves Top-N samples
4. Collaborative LoRA Tuning ◄── - Filters samples > α similarity
Train local LoRA params ◄──► 5. Federated LoRA Aggregation
- Greedy Client Center Selection: Formulated as a facility location optimization problem, selecting optimal cluster centers across clients is NP-hard. FedDCA approximates this in polynomial time: each client runs $k$-means on local instruction embeddings and sends $\xi$ centers to the server. The server iteratively selects cluster centers that represent local data while actively avoiding proximity to already chosen centers.
- Domain Data Retrieval: Using the selected centers, the server queries a multi-domain public pool via dense semantic retrieval to supply clients with targeted, non-overlapping augmented data ($D_k^g$). A similarity threshold $\alpha$ filters out exact overlaps to safeguard data freshness.
- Heterogeneous Encoders (FedDCA*): To reduce client-side compute, clients encode instructions with a tiny encoder (e.g., MiniLM, 22.7M parameters). The server maps these lower-dimensional embeddings to a large server-side encoder's space (e.g., BGE-large, 335M parameters) using a 2-layer MLP projector trained via supervised contrastive learning.
- Federated Optimization: Once augmented, clients fine-tune pre-trained LLMs using parameter-efficient LoRA adapters aggregated via standard FL protocols (e.g., FedAvg, FedProx, SCAFFOLD).
Datasets
The authors evaluate across four specialized domains using public instruction pools and standard benchmarks:
- Code: Trained on CodeAlpaca; evaluated on HumanEval (Pass@1).
- Medical: Trained on MedAlpaca; evaluated on MMLU-Med (Accuracy across 6 subjects).
- Financial: Trained on FinGPT and Sujet-Finance-Instruct-177k; evaluated on FPB, FiQA, and TFNS (Accuracy).
- Mathematics: Trained on MathInstruct; evaluated on GSM8K (Exact Match).
- General Public Data: Stanford Alpaca is included in the server-hosted public repository to simulate realistic multi-domain background data.
Key Insights and Ideas
- Data Heterogeneity is Not the Culprit: In standard FL, non-IID data distribution usually degrades global model accuracy. In FedDIT, experiments across Dirichlet distribution levels ($\alpha \in [0.01, 10]$) show no monotonic correlation between heterogeneity and LLM performance.
- Domain Coverage Dictates Success: High semantic coverage of the latent in-domain space correlates directly with downstream accuracy. Maximizing coverage across all participating clients is far more impactful than balancing class distributions.
- Data Augmentation Protects Privacy: Under memory extraction attacks, models trained only on local data increasingly memorize and regurgitate private prompts as training rounds progress. Augmenting with retrieved public data acts as a regularizer: memorization scores (ROUGE-L) either plateau or decrease across communication rounds.
Key Results
- Performance Gains: FedDCA outperforms unaugmented FedIT and augmented baselines (Random Sampling, Direct Retrieval, LESS, and Self-Instruct) across all benchmarks. On financial FiQA, FedDCA achieves 35.27% accuracy compared to 14.18% (Base local data) and 19.11% (Direct retrieval). On GSM8K, it achieves 52.46% (vs. 47.46% Base).
- Domain Coverage: FedDCA consistently achieves the highest domain coverage scores (0.9320 to 0.9815), delivering relative coverage improvements of up to 21.36% over baselines.
- Computational Efficiency (FedDCA*): Cutting client-side encoder size from 335M to 22.7M reduces encoding time from 15m 46s to 5m 02s (a ~3× speedup) while experiencing only a minor decrease in domain coverage (~2.89%) and still outperforming all non-FedDCA baselines.
Limitations and Future Work
- Dependency on Public Pools: The method relies on the server hosting (or having web access to) a multi-domain public dataset containing relevant task knowledge.
- Paradigm-Heavy Tasks: In highly structured domains like Code, unaugmented local tuning already performs competitively because programming syntax follows strict templates; the benefits of domain coverage augmentation are slightly less pronounced here than in open-ended domains like finance.
- Clustering Hyperparameter Sensitivity: The optimal number of cluster centers ($\xi$) varies noticeably across domains (e.g., $\xi=10$ for math vs. $\xi=80$ for medical), requiring domain-specific tuning.
Summary updated