Differentially Private Fine-tuning of Language Models

Da Yu, Saurabh Naik, Arturs Backurs, Sivakanth Gopi, Huseyin A. Inan +7 more
10/13/2021
564 citations
cs.LGcs.CLcs.CR

Official code: huseyinatahaninan/Differentially-Private-Fine-tuning-of-Language-Models (79 stars, Python, last commit 2022-05-28).

Abstract

We give simpler, sparser, and faster algorithms for differentially private fine-tuning of large-scale pre-trained language models, which achieve the state-of-the-art privacy versus utility tradeoffs on many standard NLP tasks. We propose a meta-framework for this problem, inspired by the recent success of highly parameter-efficient methods for fine-tuning.

Show full abstract

Our experiments show that differentially private adaptations of these approaches outperform previous private algorithms in three important dimensions: utility, privacy, and the computational and memory cost of private training. On many commonly studied datasets, the utility of private models approaches that of non-private models. For example, on the MNLI dataset we achieve an accuracy of $87.8\%$ using RoBERTa-Large and $83.5\%$ using RoBERTa-Base with a privacy budget of $ε= 6.7$. In comparison, absent privacy constraints, RoBERTa-Large achieves an accuracy of $90.2\%$. Our findings are similar for natural language generation tasks. Privately fine-tuning with DART, GPT-2-Small, GPT-2-Medium, GPT-2-Large, and GPT-2-XL achieve BLEU scores of 38.5, 42.0, 43.1, and 43.8 respectively (privacy budget of $ε= 6.8,δ=$ 1e-5) whereas the non-private baseline is $48.1$. All our experiments suggest that larger models are better suited for private fine-tuning: while they are well known to achieve superior accuracy non-privately, we find that they also better maintain their accuracy when privacy is introduced.

View on arXivView PDF

Code Implementations(1)

7918Python, COct 30, 20214 years ago

Similar Papers

Cite this paper

@article{yu2021differentially,
  title  = {Differentially Private Fine-tuning of Language Models},
  author = {Da Yu and Saurabh Naik and Arturs Backurs and Sivakanth Gopi and Huseyin A. Inan and Gautam Kamath and Janardhan Kulkarni and Yin Tat Lee and Andre Manoel and Lukas Wutschitz and Sergey Yekhanin and Huishuai Zhang},
  year   = {2021},
  eprint = {2110.06500},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2110.06500}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2110.06500.svg)](https://codeofpaper.com/paper/2110.06500)

Discussion