Private LoRA Fine-tuning of Open-Source LLMs with Homomorphic Encryption
Jordan Frery, Roman Bredehoft, Jakub Klemsa, Arthur Meyre, Andrei Stoian
TL;DR
This work presents a privacy-preserving protocol for fine-tuning open-source LLMs using LoRA in conjunction with homomorphic encryption. The data owner coordinates LoRA updates while the server, operating on encrypted activations, handles the heavy linear computations with W, enabling secure private adaptation. The authors demonstrate feasibility on Llama-3.2-1B with HE-compatible quantization, achieving convergence close to FP32 and reporting a heavy but scalable server-side cost (approximately 216 seconds per token for a training step) while keeping client-side computation minimal (around 0.025 MFLOP/s). The approach enables confidential tasks such as knowledge-base QA, private code assistants, and sensitive-domain analysis, and shows clear potential for scaling through multi-server orchestration.
Abstract
Preserving data confidentiality during the fine-tuning of open-source Large Language Models (LLMs) is crucial for sensitive applications. This work introduces an interactive protocol adapting the Low-Rank Adaptation (LoRA) technique for private fine-tuning. Homomorphic Encryption (HE) protects the confidentiality of training data and gradients handled by remote worker nodes performing the bulk of computations involving the base model weights. The data owner orchestrates training, requiring minimal local computing power and memory, thus alleviating the need for expensive client-side GPUs. We demonstrate feasibility by fine-tuning a Llama-3.2-1B model, presenting convergence results using HE-compatible quantization and performance benchmarks for HE computations on GPU hardware. This approach enables applications such as confidential knowledge base question answering, private codebase fine-tuning for AI code assistants, AI agents for drafting emails based on a company's email archive, and adapting models to analyze sensitive legal or healthcare documents.
