Differentially Private Subspace Fine-Tuning for Large Language Models

Lele Zheng, Xiang Wang, Tao Zhang, Yang Cao, Ke Cheng, Yulong Shen

TL;DR

This paper introduces DP-SFT, a novel method for fine-tuning large language models (LLMs) with differential privacy. By injecting noise only into a low-dimensional "task-specific subspace" of gradients, DP-SFT significantly reduces performance degradation and training instability typically associated with applying differential privacy to the entire high-dimensional parameter space. This approach achieves near-non-private performance while maintaining rigorous privacy guarantees.

What Problem Does This Paper Address?

Fine-tuning large language models (LLMs) like BERT and GPT is crucial for adapting them to specific downstream tasks, leading to significant performance gains. However, this process often requires sensitive personal data, raising serious privacy concerns. Differential privacy (DP) offers a robust solution by adding noise to protect individual data. Yet, naively applying DP to the vast parameter space of LLMs introduces substantial noise, leading to degraded accuracy and unstable training. This "curse of dimensionality" makes it challenging to achieve both strong privacy and high model utility. The paper aims to bridge this gap by developing a more efficient and effective DP fine-tuning method.

Methods

The core innovation of DP-SFT is its two-stage approach:

  1. Subspace Construction: Instead of directly injecting noise into the full parameter space, DP-SFT first identifies a low-dimensional subspace that captures the most significant gradient updates during fine-tuning. This subspace is learned by analyzing the trajectory of model parameters during a brief, non-private fine-tuning phase (e.g., one epoch) on public data. Singular Value Decomposition (SVD) is used to extract this subspace. The key insight is that important parameter updates often lie in a much lower-dimensional space than the full model.
  2. Private Subspace Training: In the second stage, during actual private fine-tuning, gradients are computed for each data sample. These gradients are then projected onto the pre-identified low-dimensional subspace. Differential privacy noise is added only within this subspace. Finally, the noisy, projected gradients are mapped back to the original high-dimensional parameter space for model updates. This significantly reduces the magnitude of the injected noise, as it's applied to a much smaller dimension. The method also leverages the properties of Gaussian noise and clipping for privacy guarantees.

Datasets

The paper evaluates DP-SFT on four widely used natural language understanding benchmarks:

  • SST-2: A binary sentiment classification task for short movie reviews.
  • IMDB: Another sentiment classification dataset, featuring longer and noisier reviews.
  • QNLI: An entailment task derived from SQuAD, assessing if a candidate sentence answers a question.
  • MNLI: A large natural language inference benchmark with sentence pairs labeled as entailment, contradiction, or neutral.

The subspace construction phase can be performed on public datasets (like MNLI or QNLI) without privacy costs, demonstrating subspace transferability.

Key Insights and Ideas

  • The "Curse of Dimensionality" in DP is Real: Applying DP naively to high-dimensional LLM parameters leads to disproportionately large noise, harming performance.
  • Gradient Updates are Low-Dimensional: During fine-tuning, most of the meaningful parameter updates are concentrated in a low-dimensional subspace, not spread across the entire parameter space.
  • Subspace as a Privacy Shield: By restricting noise injection to this task-specific subspace, DP-SFT effectively shields sensitive information without perturbing irrelevant parameters, thus preserving utility.
  • Subspace Transferability: The learned subspace captures general task geometry, not private data specifics, allowing it to be constructed on public data and transferred to private fine-tuning tasks, saving privacy budget and improving practicality.
  • Short Trajectories Suffice: Constructing the subspace requires only a brief period of fine-tuning (e.g., 1 epoch), making the subspace construction phase computationally efficient and scalable.

Key Results

DP-SFT consistently outperforms existing differentially private fine-tuning methods (Full-DP, LORA-DP, Adapter-DP) across all tested datasets and privacy budgets.

  • Under a standard privacy constraint ($\epsilon = 4$), DP-SFT achieves near-non-private performance, with accuracy drops of only 1.84% compared to full fine-tuning.
  • Even under a more stringent privacy constraint ($\epsilon = 1$), DP-SFT shows remarkable robustness, outperforming baselines by significant margins (e.g., up to 23.38% on IMDB) and retaining over 86.5% accuracy on MNLI where others dropped below 73%.
  • The subspace construction phase is highly efficient, with 1-epoch subspace models achieving performance very close to full fine-tuning, reducing construction time by 96.9%.
  • Subspace transferability experiments show that using a subspace trained on public data for private fine-tuning still significantly outperforms the Full-DP baseline.

Limitations and Future Work

  • Impact of Noisy Trajectories: The paper notes that if subspace construction itself is performed with DP (using noisy trajectories), it can lead to a significant decline in accuracy, highlighting the importance of constructing subspaces on public data.
  • Integration with Secure Inference: The authors suggest future work could explore integrating DP-SFT with secure inference systems like L-SecNet.
  • Generalization to Other DP Mechanisms: While the paper focuses on Gaussian noise, exploring the application of DP-SFT with other DP mechanisms could be a future direction.

Summary updated

BibTeX
@inproceedings{zheng2026differentially,
  author = {Lele Zheng and Xiang Wang and Tao Zhang and Yang Cao and Ke Cheng and Yulong Shen},
  title = {{Differentially Private Subspace Fine-Tuning for Large Language Models}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2026},
  doi = {10.1609/aaai.v40i34.40117},
}
Figure