TL;DR
Fine-tuning large language models (LLMs) with Differential Privacy (DP) usually tanks performance because noise must be added across millions of dimensions. DP-SFT solves this by confining DP noise injection to a low-dimensional, task-specific gradient subspace extracted via Singular Value Decomposition (SVD). This drastically reduces noise magnitude, delivering near-lossless utility and setting a new state-of-the-art in privacy-preserving LLM adaptation.
What Problem Does This Paper Address?
Fine-tuning LLMs on downstream tasks often requires handling sensitive user data, such as medical records, private chats, or financial history. Differential Privacy (DP)—typically implemented via Differentially Private Stochastic Gradient Descent (DP-SGD)—provides rigorous mathematical guarantees against data leakage by adding random noise to gradients during training.
However, LLMs suffer from the curse of dimensionality: the variance of the required Gaussian noise scales linearly with the number of parameters. Injecting massive noise across hundreds of millions of dimensions destroys model accuracy and causes severe training instability. The challenge is clear: how can we protect user privacy without sacrificing the performance gains of fine-tuning?
Methods
The authors introduce DP-SFT (Differentially Private Subspace Fine-Tuning), a two-stage framework designed to bypass high-dimensional noise injection:
- Stage 1: Subspace Construction: The authors observe that meaningful parameter updates during fine-tuning actually lie within a highly compact, low-dimensional subspace. To capture this, they record model snapshots during a brief early training phase (e.g., 1 epoch) to form a "trajectory matrix." They then apply Singular Value Decomposition (SVD) to extract the top-$k$ principal directions ($k \ll d$), creating an orthogonal projection matrix.
- Stage 2: Private Subspace Training: During subsequent training steps, full per-sample gradients are projected onto this compact subspace. $\ell_2$-norm clipping and Gaussian noise injection are performed only within this low-dimensional space. The perturbed gradients are then mapped back to the original full parameter space to update the model.
Subspace Transferability
Crucially, the authors demonstrate that the subspace does not need to be constructed using the private dataset. Instead, it can be extracted from a semantically related public dataset. This treats subspace extraction as a public preprocessing step that consumes zero privacy budget, avoiding early-stage noise contamination.
Datasets
The method was evaluated using the RoBERTa-base architecture (~125 million parameters) across four popular natural language understanding (NLU) benchmarks:
- SST-2: A binary sentiment classification dataset consisting of short movie reviews.
- IMDB: A more privacy-sensitive sentiment dataset featuring longer, noisier, user-generated reviews.
- QNLI: A question-answering entailment dataset derived from SQuAD.
- MNLI: A large-scale natural language inference benchmark involving sentence pairs from diverse genres.
Key Insights and Ideas
- Subspaces Generalize Across Tasks: A gradient subspace learned from a public dataset (like MNLI) can be successfully transferred to fine-tune a private target task (like SST-2) with negligible performance loss. This implies the subspace captures general geometric properties of language tasks rather than specific private sample details.
- Short Trajectories Suffice: You don't need a fully trained model to find the right subspace; snapshots from just a single epoch of training are enough to capture the dominant optimization directions, reducing subspace construction time by 96.9% compared to full training.
- Noise Contamination Hurts Early: Trying to build the subspace using private data with DP noise significantly reduces the fidelity of the learned subspace, confirming that using public data for a clean subspace preprocessing step is the superior design choice.
Key Results
DP-SFT consistently sets a new state-of-the-art for DP fine-tuning, outperforming strong baselines like LoRA-DP and Adapter-DP:
- Standard Privacy ($\epsilon = 4$): DP-SFT outperformed the strongest private baseline (Adapter-DP) by up to 11.51% on QNLI and 11.12% on MNLI, closing the gap to non-private full-tuning to within a mere 1.84%.
- Strict Privacy ($\epsilon = 1$): Under extreme privacy constraints, DP-SFT demonstrated remarkable robustness, beating Adapter-DP by 23.38% on IMDB and retaining over 86.5% accuracy on MNLI while other private methods collapsed below 73%.
Limitations and Future Work
- Public-Private Domain Alignment: The transferability of the subspace relies on having access to a semantically related public dataset. Performance might degrade if the public and private datasets are completely disjoint in domain or structure.
- Future Work: The authors suggest exploring the integration of DP-SFT with secure inference systems (such as L-SecNet) to protect privacy during both the training and deployment phases.
Summary updated