Differentially Private Subspace Fine-Tuning for Large Language Models
Lele Zheng, Xiang Wang, Tao Zhang, Yang Cao, Ke Cheng, Yulong Shen
TL;DR
The paper introduces DP-SFT, a two-stage method for differentially private fine-tuning of large language models that confines noise to a small, task-relevant gradient subspace. Stage 1 extracts a low-dimensional subspace from short, private gradient trajectories via SVD; Stage 2 performs gradient updates within this subspace, adding DP noise in $\mathbb{R}^k$ and mapping back to the full parameter space, achieving $(\varepsilon, \delta)$-DP with substantially reduced noise. Empirical results across SST-2, IMDB, QNLI, and MNLI show DP-SFT outperforms full-DP and LoRA/Adapter baselines under DP budgets, with strong stability and convergence benefits; subspaces learned from public data transfer across tasks with minimal loss. The approach delivers near-non-private utility under DP, offering a scalable and privacy-efficient pathway for adapting LLMs to downstream tasks in privacy-sensitive settings.
Abstract
Fine-tuning large language models on downstream tasks is crucial for realizing their cross-domain potential but often relies on sensitive data, raising privacy concerns. Differential privacy (DP) offers rigorous privacy guarantees and has been widely adopted in fine-tuning; however, naively injecting noise across the high-dimensional parameter space creates perturbations with large norms, degrading performance and destabilizing training. To address this issue, we propose DP-SFT, a two-stage subspace fine-tuning method that substantially reduces noise magnitude while preserving formal DP guarantees. Our intuition is that, during fine-tuning, significant parameter updates lie within a low-dimensional, task-specific subspace, while other directions change minimally. Hence, we only inject DP noise into this subspace to protect privacy without perturbing irrelevant parameters. In phase one, we identify the subspace by analyzing principal gradient directions to capture task-specific update signals. In phase two, we project full gradients onto this subspace, add DP noise, and map the perturbed gradients back to the original parameter space for model updates, markedly lowering noise impact. Experiments on multiple datasets demonstrate that DP-SFT enhances accuracy and stability under rigorous DP constraints, accelerates convergence, and achieves substantial gains over DP fine-tuning baselines.
