Abstract
The success of current Large-Language Models (LLMs) hinges on extensive training data that is collected and stored centrally, called Centralized Learning (CL). However, such a collection manner poses a privacy threat, and one potential solution is Federated Learning (FL), which transfers gradients, not raw data, among clients. Unlike traditional networks, FL for LLMs incurs significant communication costs due to their tremendous parameters. This study introduces an innovative approach to compress gradients to improve communication efficiency during LLM FL, formulating the new FL pipeline named CG-FedLLM. This approach integrates an encoder on the client side to acquire the compressed gradient features and a decoder on the server side to reconstruct the gradients. We also developed a novel training strategy that comprises Temporal-ensemble Gradient-Aware Pre-training (TGAP) to identify characteristic gradients of the target model and Federated AutoEncoder-Involved Fine-tuning (FAF) to compress gradients adaptively. Extensive experiments confirm that our approach reduces communication costs and improves performance (e.g., average 3 points increment compared with traditional CL- and FL-based fine-tuning with LlaMA on a well-recognized benchmark, C-Eval). This improvement is because our encoder-decoder, trained via TGAP and FAF, can filter gradients while selectively preserving critical features. Furthermore, we present a series of experimental analyses focusing on the signal-to-noise ratio, compression rate, and robustness within this privacy-centric framework, providing insight into developing more efficient and secure LLMs.
Introduction
Training Large Language Models (LLMs) typically requires massive, centralized datasets, which raises significant privacy concerns. Federated Learning (FL) offers a solution by keeping data on local devices (clients) and only sharing model updates (gradients) with a central server. However, LLMs face a severe "communication bottleneck." Even when using Parameter-Efficient Fine-Tuning (PEFT) like LoRA, the updates for a 7-billion parameter model are still too large to transmit efficiently over standard internet connections. Furthermore, sharing gradients can still leak private information.
The challenge is to compress these updates further without destroying the model's ability to learn. This paper introduces CG-FedLLM, a framework that utilizes a split-AutoEncoder architecture to compress LLM gradients to just 1.56% of their original size during federated learning.
Methodology
The CG-FedLLM pipeline consists of two primary stages designed to identify and preserve essential gradient features while minimizing communication overhead.
Stage I: Temporal-ensemble Gradient-Aware Pre-training (TGAP)
Before the actual training begins, the system collects a small set of "temporal gradients"—snapshots of how the model changes over initial training steps. These are used to pre-train an AutoEncoder. The goal is to teach the AutoEncoder the specific "manifold" or structure of LLM gradients so it knows what features are essential to preserve.
Stage II: Federated AutoEncoder-Involved Fine-tuning (FAF)
During actual federated training, the Encoder stays on the client side, and the Decoder stays on the server.
- Clients compute their gradients, compress them into compact "feature vectors" using the Encoder, and send only those features to the server.
- The Server uses the Decoder to reconstruct the full gradients, aggregates them, and updates the global model.
The researchers found that 2D structures like ResNet and U-Former significantly outperformed simple 1D-CNNs in capturing the spatial-temporal dependencies of the gradients.
Experimental Setup
The framework was evaluated using foundation models including LLaMA-7B, Alpaca-7B, and Qwen-7B. Fine-tuning was performed on the Databricks-Dolly-15k instruction-following dataset. Performance was measured across several standard benchmarks: C-Eval (Chinese evaluation suite), MMLU (Massive Multitask Language Understanding), and CNN-DailyMail (text summarization).
Key Results and Insights
- Superior Performance: On the C-Eval benchmark, Compress-FT (the proposed method) scored an average of 26.6, outperforming both standard Federated LoRA (25.8) and even Centralized Learning (24.9). The authors argue the AutoEncoder acts as a filter, selectively preserving "functional" gradients while discarding random noise.
- Privacy and Robustness: Because the server only holds the Decoder and the client holds the Encoder, an attacker intercepting the transmission cannot easily reconstruct the original gradients. Furthermore, CG-FedLLM is remarkably robust to Differential Privacy (DP) noise, as the pre-trained AutoEncoder effectively "cleans" the privacy-protected updates.
- Low Overhead: The computational cost of the AutoEncoder is minimal. Encoding and decoding take only a few milliseconds, making it feasible for edge devices.
Limitations and Future Work
The method requires an initial phase to collect gradients for TGAP, adding a step to the deployment pipeline. Additionally, the privacy model assumes an "honest-but-curious" server; if a server were fully malicious and gained access to the client's encoder, some privacy advantages would be lost. Future work will investigate if these compression manifolds hold for larger models (e.g., 70B+ parameters) where gradient structures may be more complex.
Summary updated