Just Fine-tune Twice: Selective Differential Privacy for Large Language Models
Weiyan Shi, Ryan Shea, Si Chen, Chiyuan Zhang, Ruoxi Jia, Zhou Yu
Abstract
Protecting large language models from privacy leakage is becoming increasingly crucial with their wide adoption in real-world products. Yet applying differential privacy (DP), a canonical notion with provable privacy guarantees for machine learning models, to those models remains challenging due to the trade-off between model utility and privacy loss. Utilizing the fact that sensitive information in language data tends to be sparse, Shi et al. (2021) formalized a DP notion extension called Selective Differential Privacy (SDP) to protect only the sensitive tokens defined by a policy function. However, their algorithm only works for RNN-based models. In this paper, we develop a novel framework, Just Fine-tune Twice (JFT), that achieves SDP for state-of-the-art large transformer-based models. Our method is easy to implement: it first fine-tunes the model with redacted in-domain data, and then fine-tunes it again with the original in-domain data using a private training mechanism. Furthermore, we study the scenario of imperfect implementation of policy functions that misses sensitive tokens and develop systematic methods to handle it. Experiments show that our method achieves strong utility compared to previous baselines. We also analyze the SDP privacy guarantee empirically with the canary insertion attack.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
11 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Differentially Private Learning Needs Better Features (or Much More Data) cites The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networks
- Differentially Private Learning Needs Better Features (or Much More Data) cites Deep Learning with Differential Privacy
- Information Flow Control in Machine Learning through Modular Model Architecture cites Large Language Models Can Be Strong Differentially Private Learners
- Information Flow Control in Machine Learning through Modular Model Architecture cites Deep Learning with Differential Privacy
- PrivLM-Bench: A Multi-level Privacy Evaluation Benchmark for Language Models cites The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networks
- PrivLM-Bench: A Multi-level Privacy Evaluation Benchmark for Language Models cites Large Language Models Can Be Strong Differentially Private Learners
- PrivLM-Bench: A Multi-level Privacy Evaluation Benchmark for Language Models cites Differentially Private Fine-tuning of Language Models
- PrivLM-Bench: A Multi-level Privacy Evaluation Benchmark for Language Models cites Deep Learning with Differential Privacy
- The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networks cites Deep Learning with Differential Privacy
- Large Language Models Can Be Strong Differentially Private Learners cites Differentially Private Learning Needs Better Features (or Much More Data)
- Large Language Models Can Be Strong Differentially Private Learners cites The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networks
- Large Language Models Can Be Strong Differentially Private Learners cites Differentially Private Fine-tuning of Language Models
- Differentially Private Fine-tuning of Language Models cites Large Language Models Can Be Strong Differentially Private Learners
- Large Language Models Can Be Strong Differentially Private Learners cites Deep Learning with Differential Privacy
- Differentially Private Fine-tuning of Language Models cites Differentially Private Learning Needs Better Features (or Much More Data)
- Differentially Private Fine-tuning of Language Models cites The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networks
- Differentially Private Fine-tuning of Language Models cites Deep Learning with Differential Privacy
- Differentially Private Fine-tuning of Language Models cites SeqPATE: Differentially Private Text Generation via Knowledge Distillation
- SeqPATE: Differentially Private Text Generation via Knowledge Distillation cites Differentially Private Fine-tuning of Language Models
- A New Linear Scaling Rule for Private Adaptive Hyperparameter Optimization cites Large Language Models Can Be Strong Differentially Private Learners
- A New Linear Scaling Rule for Private Adaptive Hyperparameter Optimization cites Deep Learning with Differential Privacy
- Be like a Goldfish, Don't Memorize! Mitigating Memorization in Generative LLMs cites The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networks
- Be like a Goldfish, Don't Memorize! Mitigating Memorization in Generative LLMs cites Deep Learning with Differential Privacy
- SeqPATE: Differentially Private Text Generation via Knowledge Distillation cites The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networks
- SeqPATE: Differentially Private Text Generation via Knowledge Distillation cites Large Language Models Can Be Strong Differentially Private Learners
- SeqPATE: Differentially Private Text Generation via Knowledge Distillation cites Deep Learning with Differential Privacy
Cited by top-tier papers11
- Be like a Goldfish, Don't Memorize! Mitigating Memorization in Generative LLMsAbhimanyu Hans, John Kirchenbauer, Yuxin Wen, Neel Jain et al.NeurIPS 2024 · 65 citations
- SeqPATE: Differentially Private Text Generation via Knowledge DistillationZhiliang Tian, Yingxiu Zhao, Ziyue Huang, Yu-Xiang Wang et al.NeurIPS 2022 · 29 citations
- A New Linear Scaling Rule for Private Adaptive Hyperparameter OptimizationAshwinee Panda, Xinyu Tang, Saeed Mahloujifar, Vikash Sehwag et al.ICML 2024 · 15 citations
- Information Flow Control in Machine Learning through Modular Model ArchitectureTrishita Tiwari, Suchin Gururangan, Chuan Guo, Weizhe Hua et al.USENIX Security 2024 · 12 citations
- PrivLM-Bench: A Multi-level Privacy Evaluation Benchmark for Language ModelsHaoran Li, Dadi Guo, Donghao Li, Wei Fan et al.ACL 2024 · 9 citations
Builds on9
- Deep Learning with Differential PrivacyMartín Abadi, Andy Chu, Ian J. Goodfellow, H. Brendan McMahan et al.CCS 2016 · 7,620 citations
- The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural NetworksNicholas Carlini, Chang Liu, Úlfar Erlingsson, Jernej Kos et al.USENIX Security 2019 · 1,386 citations
- Large Language Models Can Be Strong Differentially Private LearnersXuechen Li, Florian Tramèr, Percy Liang, Tatsunori HashimotoICLR 2022 · 502 citations
- Differentially Private Fine-tuning of Language ModelsDa Yu, Saurabh Naik, Arturs Backurs, Sivakanth Gopi et al.ICLR 2022 · 494 citations
- Differentially Private Learning Needs Better Features (or Much More Data)Florian Tramèr, Dan BonehICLR 2021 · 325 citations
Related papers
- Synthetic Text Generation with Differential Privacy: A Simple and Practical RecipeXiang Yue, Huseyin A. Inan, Xuechen Li, Girish Kumar et al.ACL 2023 · 24 citations
- Differentially Private Subspace Fine-Tuning for Large Language ModelsLele Zheng, Xiang Wang, Tao Zhang, Yang Cao et al.AAAI 2026
- Domain Private Transformers for Multi-Domain Dialog SystemsAnmol Kabra, Ethan R. ElenbergEMNLP Findings 2023
- Training Text-to-Text Transformers with Privacy GuaranteesNatalia Ponomareva, Jasmijn Bastings, Sergei VassilvitskiiACL Findings 2022 · 9 citations
- PrivCode++: Latent-Conditioned Differentially Private Code Generation for Comprehensive GuaranteesZheng Liu, Chen GONG, Terry Yue Zhuo, Zhou Yang et al.ICML 2026
