Beyond Parameter Aggregation: Semantic Consensus for Federated Fine-Tuning of LLMs

Amr Abourayya, Jens Kleesiek, Michael Kamp

TL;DR

Federated learning for Large Language Models (LLMs) typically relies on exchanging massive parameter updates (like LoRA weights), which strains network bandwidth and requires all participants to use identical model architectures. This paper introduces FedCoFiT, a framework that replaces parameter averaging with a "semantic consensus" over text outputs generated on a shared public prompt set. This shift slashes communication costs by orders of magnitude, naturally supports completely heterogeneous client architectures, and matches or exceeds the accuracy of traditional federated fine-tuning.

What Problem Does This Paper Address?

Fine-tuning LLMs on distributed, private data (e.g., across different hospitals or banks) is a natural use case for Federated Learning (FL). However, standard FL protocols are parameter-centric: clients repeatedly upload and download model weights or adapter gradients. This introduces three major bottlenecks:

  1. Massive Communication Overhead: Transmitting large collections of weights becomes a severe bottleneck under realistic network bandwidths.
  2. Architectural Rigidity: Standard weight-averaging assumes all clients share the exact same model architecture, tokenizer, and LoRA configuration.
  3. White-Box Restrictions: It requires direct access to model parameters, making it impossible to include proprietary or API-based "black-box" models in the federation.

The authors flip this paradigm on its head by asking: Can federated collaboration be mediated through model behavior (text outputs) rather than internal parameters?

Methods

The authors propose FedCoFiT (Federated Co-Training for Fine-Tuning), an instantiation of their Semantic Consensus principle. Instead of transmitting weights, the protocol operates entirely in the text and semantic embedding space:

  1. Local Fine-Tuning: Clients fine-tune their local models on their private datasets.
  2. Behavior Generation: Clients run inference on a shared, unlabeled public prompt set ($D_{pub}$) and send only the generated text responses to the central server.
  3. Semantic Embedding & Clustering: The server maps these text responses into a semantic space using a sentence encoder (e.g., SBERT). It normalizes the embeddings and clusters them using DBSCAN to identify the dominant response mode and filter out anomalous or outlier generations.
  4. Consensus Selection: The server calculates the centroid of the majority cluster and selects the actual client response closest to this centroid to serve as the "consensus pseudo-label."
  5. Feedback Loop: The server broadcasts these pseudo-labeled public prompts back to the clients. Clients then update their models on a joint objective of their private data and the newly pseudo-labeled public data.
Figure 1: Overview of FedCoFiT. Clients fine-tune locally, generate responses to shared public prompts, and send only these responses to the server. The server embeds and clusters the responses to select consensus pseudo-labels, which are broadcast back for further local training. Unlike parameter aggregation, FedCoFiT aggregates behavior and is compatible with heterogeneous clients.

Datasets

The framework was evaluated across three distinct adaptation regimes using well-known open datasets:

  • Instruction Compliance: Fine-tuned on Dolly-15K and Alpaca, evaluated via the IFEval benchmark.
  • Knowledge Generalization: Fine-tuned on Wizard and OpenOrca, evaluated via the MMLU benchmark.
  • Chat Quality: Fine-tuned on ShareGPT and UltraChat, evaluated via MT-Bench.

The public prompt sets were constructed by subsampling inputs from these same datasets while ensuring they were strictly excluded from the clients' private training splits.

Key Insights and Ideas

  • Decoupling Communication from Model Size: Because clients only exchange text responses, the communication complexity depends solely on the public prompt budget and the average response length ($KM\bar{\ell}$). It is entirely independent of the backbone model's parameter count. For a massive model like Llama 3.1-405B, this translates to an analytical communication reduction of up to 1006x.
  • Inherent Support for Heterogeneity: Because aggregation happens in a shared semantic space rather than a parameter space, clients can use entirely different base models, tokenizers, or LoRA ranks (e.g., mixing ranks of 8, 16, and 32) without any modification to the protocol.
  • Black-Box Friendly: FedCoFiT only requires forward-pass access to generate text, meaning clients can participate even if they only have API access to a model.
  • Differential Privacy Compatibility: The authors prove that FedCoFiT easily accommodates record-level differential privacy (DP). Since the shared text responses are simply outputs of a locally DP-tuned model, the server-side consensus steps preserve privacy via standard post-processing guarantees.

Key Results

FedCoFiT was tested against strong parameter-aggregation baselines (FedIT, FLoRA, FlexLoRA) across TinyLlama, LLaMA-7B, and LLaMA2-13B architectures.

  • Competitive Task Quality: FedCoFiT consistently matched or outperformed the strongest federated baselines. For example, on LLaMA-7B trained on Dolly-15K, FedCoFiT achieved the top IFEval score of 54.36, beating FLoRA (53.29) and FlexLoRA (52.61).
  • Orders of Magnitude Less Data: While parameter-centric methods required transferring between 0.36 GB and 20.63 GB of data across rounds, FedCoFiT achieved its results using a mere 0.001 to 0.007 GB total communication volume.
  • Real-World Efficiency: This drastic reduction in data transfer translated directly into significantly shorter wall-clock runtimes, lower energy consumption, and reduced CO2 emissions during training.
  • Robustness to Heterogeneous Clients: When clients were configured with mixed LoRA ranks, traditional baselines either degraded or failed entirely (FedIT does not support heterogeneous ranks). FedCoFiT remained stable and achieved the highest scores across all tasks.
Table 1: Comparison of Semantic Consensus FedCoFiT with baselines across instruction compliance (IFEval), knowledge generalization (MMLU), and chat quality (MT-Bench). GB denotes the cumula- tive communication volume (in gigabytes) summed across all clients and all rounds.

Limitations and Future Work

The primary limitation of FedCoFiT is its dependence on the public prompt set. If the public prompt budget is too small ($M \le 100$), the quality of the semantic consensus degrades. Furthermore, while the method is robust to mild instruction-style distribution shifts, its performance drops under severe format mismatches (e.g., using multi-turn chat prompts as the public set for a single-turn instruction task).

The authors note that future work should explore automated, optimized public prompt selection, enhance robustness against severe distribution shifts, and extend behavior-level consensus to non-text outputs like structured API calls or tool interactions.

Summary updated

BibTeX
@inproceedings{abourayya2026beyond,
  author = {Amr Abourayya and Jens Kleesiek and Michael Kamp},
  title = {{Beyond Parameter Aggregation: Semantic Consensus for Federated Fine-Tuning of LLMs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=4jInQZ53nD},
}
Figure