FedCoLLM: A Parameter-Efficient Federated Co-tuning Framework for Large and Small Language Models

Tao Fan, Yan Kang, Guoqiang Ma, Lixin Fan, Kai Chen, Qiang YangarXiv 2024 · DOI

Abstract

The deployment of Large Language Models (LLMs) in specialized domains is often hindered by the "AI divide," where powerful models lack domain-specific knowledge and resource-constrained clients lack the compute to fine-tune them. We present FedCoLLM, a federated learning framework that facilitates mutual enhancement between a server-side LLM and client-side Small Language Models (SLMs). By combining Low-Rank Adaptation (LoRA) with a mutual knowledge distillation "bridge," FedCoLLM allows clients to benefit from LLM reasoning while the server model gains domain insights without compromising data privacy. Our evaluations demonstrate that FedCoLLM achieves up to 99% of centralized training performance with a 99.77% reduction in communication overhead.

Introduction

The rapid advancement of LLMs like LLaMa and GPT-4 has revolutionized natural language processing, yet their application in sensitive industries (e.g., healthcare, law) remains challenging. These models often lack the niche expertise required for specialized tasks, while the organizations holding the necessary data typically lack the hardware to fine-tune massive models. Furthermore, privacy regulations prevent the centralization of sensitive data.

Traditional Federated Learning (FL) addresses privacy but struggles with the hardware requirements of LLMs on client devices. Existing distillation methods often focus on one-way transfer (Teacher to Student). FedCoLLM addresses these gaps by enabling mutual enhancement, where both the server-side LLM and the client-side SLMs improve through a collaborative, privacy-preserving process.

Methodology

FedCoLLM introduces a "bridge" strategy to facilitate knowledge exchange between disparate model scales.

The SLM Bridge and LoRA

Instead of synchronizing a massive LLM, the system utilizes an SLM (e.g., LLaMa-1.3B) as an intermediary. Both the server and clients employ Low-Rank Adaptation (LoRA), which uses lightweight, trainable "adapters" while keeping the base model parameters frozen. This significantly reduces the computational and communication burden.

Figure 1: Overview of the FedCoLLM framework, illustrating the mutual knowledge distillation between the server-side LLM and SLM, and the federated aggregation of client-side adapters.

Federated Training and Aggregation

  1. Local Training: Clients fine-tune their local SLM-LoRA adapters on private datasets ($D^1, D^2, \dots, D^K$).
  2. Aggregation: Only the tiny LoRA updates ($\theta_1, \theta_2, \dots, \theta_K$) are sent to the server. The server aggregates these into a "Global SLM Adapter" ($\theta$) that represents the collective domain knowledge.

Mutual Knowledge Distillation

On the server, the LLM and the updated Global SLM engage in "co-tuning" using an auxiliary distillation dataset ($D^a$). This process involves:

  • LLM to SLM: The LLM transfers general reasoning capabilities to the SLM.
  • SLM to LLM: The SLM transfers the aggregated domain-specific insights back to the LLM. This bidirectional transfer is achieved by minimizing the Kullback-Leibler (KL) divergence between the output distributions of the two models, aligning their predictions.

Experimental Setup

The framework was evaluated using three model families: GPT-2, OPT, and LLaMa2. Testing was conducted across four reasoning and question-answering benchmarks:

  • CommonsenseQA (CQA): General logic and reasoning.
  • OpenBookQA (OBQA): Elementary science exams.
  • ARC-C & ARC-E: Complex AI2 Reasoning Challenge questions.

Key Results and Insights

  • Performance Parity: Server-side LLMs achieved 97-99% of the performance of centralized training. For example, LLaMa2-7B showed a 66% relative improvement over its zero-shot performance on the CQA task.
  • Client Enhancement: Client-side SLMs outperformed standalone or standard FedAvg training. On CQA, the SLM saw a 6% improvement due to the LLM's guidance.
  • Communication Efficiency: For LLaMa2, FedCoLLM required transmitting only 3.15M parameters compared to the 1345M parameters of a full model—a 99.77% reduction.
  • Privacy as a Proxy: The SLM acts as a buffer; the LLM never directly interacts with client data or individual adapters, enhancing the privacy profile of the system.

Limitations and Future Work

While effective, FedCoLLM's reliance on an auxiliary distillation dataset warrants further study regarding the impact of dataset quality. Additionally, while this study focused on intra-family model pairs (e.g., LLaMa2-7B and 1.3B), future research should explore cross-architecture co-tuning. Finally, robust privacy layers could be integrated to move beyond the "semi-honest" server assumption in adversarial contexts.

Summary updated

BibTeX
@misc{fan2024fedcollm,
  author = {Tao Fan and Yan Kang and Guoqiang Ma and Lixin Fan and Kai Chen and Qiang Yang},
  title = {{FedCoLLM: A Parameter-Efficient Federated Co-tuning Framework for Large and Small Language Models}},
  year = {2024},
  eprint = {2411.11707},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.11707},
}
Figure