Skip to main content
QUICK REVIEW

[Paper Review] A Fast, Performant, Secure Distributed Training Framework For Large Language Model

Wei Huang, Yinggui Wang|arXiv (Cornell University)|Jan 18, 2024
Topic ModelingComputer Science4 citations
TL;DR

This paper proposes a secure, high-performance distributed training framework for large language models (LLMs) using model slicing, Trusted Execution Environments (TEE), and lightweight encryption to prevent both server-side and client-side model/data leakage. By deploying TEEs on both clients and servers and splitting fine-tuning across layers—especially placing later layers in server-side TEEs—it achieves strong security with minimal accuracy loss, outperforming baseline methods in accuracy and efficiency.

ABSTRACT

The distributed (federated) LLM is an important method for co-training the domain-specific LLM using siloed data. However, maliciously stealing model parameters and data from the server or client side has become an urgent problem to be solved. In this paper, we propose a secure distributed LLM based on model slicing. In this case, we deploy the Trusted Execution Environment (TEE) on both the client and server side, and put the fine-tuned structure (LoRA or embedding of P-tuning v2) into the TEE. Then, secure communication is executed in the TEE and general environments through lightweight encryption. In order to further reduce the equipment cost as well as increase the model performance and accuracy, we propose a split fine-tuning scheme. In particular, we split the LLM by layers and place the latter layers in a server-side TEE (the client does not need a TEE). We then combine the proposed Sparsification Parameter Fine-tuning (SPF) with the LoRA part to improve the accuracy of the downstream task. Numerous experiments have shown that our method guarantees accuracy while maintaining security.

Motivation & Objective

  • To address the critical security challenge of model parameter and data leakage in distributed (federated) LLM training, especially from both malicious servers and clients.
  • To design a secure, efficient, and scalable training framework that maintains high model accuracy while protecting sensitive data and model weights.
  • To enable practical deployment across diverse hardware by supporting both consumer-grade (small-memory) and industrial-grade (large-memory) TEE solutions.
  • To reduce training overhead and equipment costs through a novel split fine-tuning strategy that minimizes the number of parameters updated in the TEE.

Proposed method

  • The framework uses model slicing to partition the LLM, placing the later layers in a server-side TEE and the earlier layers in the client’s general environment.
  • LoRA and P-tuning v2 parameters are stored and computed within TEEs on both client and server to ensure confidentiality of fine-tuned weights and embeddings.
  • Secure communication between TEE and external environments is achieved using One-Time Pad (OTP) encryption for gradients and intermediate outputs.
  • A split fine-tuning strategy is introduced, where only a subset of layers (e.g., last 4 layers) are fine-tuned in the server-side TEE, reducing parameter update surface and cost.
  • The method supports two TEE configurations: Intel SGX (small memory, no GPU) and Intel TDX/SGX (large memory, no GPU), with tailored schemes for each.
  • Sparsification Parameter Fine-tuning (SPF) is combined with LoRA to further improve downstream task accuracy without increasing model size.

Experimental results

Research questions

  • RQ1How can both server-side and client-side model parameter and data leakage be prevented in distributed LLM training?
  • RQ2What is the optimal trade-off between security, model accuracy, and training efficiency in a TEE-protected distributed LLM framework?
  • RQ3Can a split fine-tuning strategy that isolates later layers in a server-side TEE maintain high accuracy while reducing the number of parameters processed in the TEE?
  • RQ4How does the use of lightweight encryption (OTP) and TEEs compare to other privacy-preserving techniques like differential privacy or MPC in terms of performance and security?
  • RQ5What is the impact of different TEE hardware configurations (e.g., SGX vs. TDX/SGX) on training latency and system cost?

Key findings

  • Method2, which deploys 4 layers in the server-side TEE with 25% and 50% parameter ratios for QKV and dense layers, achieved the highest average accuracy across all five medical datasets, outperforming FL-LLM and SWMT.
  • The average training time for Method2 was 4.33s per data sample (LoRA), significantly lower than SWMT (17.92s) and Method1 (17.06s), demonstrating high efficiency.
  • Method1 achieved slightly lower accuracy than FL-LLM (plaintext) due to FP16 truncation errors from encryption, but still provided strong security guarantees.
  • The number of trainable parameters in Method2 was about five times higher than in Method1, yet it delivered substantially better performance, proving the effectiveness of split fine-tuning.
  • SWMT had the highest training and inference latency due to TEE-only CPU processing, while Method2 minimized TEE usage by offloading most computation to the GPU.
  • The ablation study confirmed that increasing the number of layers in the TEE improves accuracy but at the cost of higher latency and increased parameter count, validating the 4-layer, (25%,50%) ratio as a balanced choice.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.