Synthetic Text Generation with Differential Privacy: A Simple and Practical Recipe

Xiang Yue, Huseyin A. Inan, Xuechen Li, Girish Kumar, Julia McAnallen +4 more
10/25/2022
cs.CLcs.CR

Official code: microsoft/dp-transformers (150 stars, Python, MIT, last commit 2026-11-16).

Abstract

Privacy concerns have attracted increasing attention in data-driven products due to the tendency of machine learning models to memorize sensitive training data. Generating synthetic versions of such data with a formal privacy guarantee, such as differential privacy (DP), provides a promising path to mitigating these privacy concerns, but previous approaches in this direction have typically failed to produce synthetic data of high quality.

Show full abstract

In this work, we show that a simple and practical recipe in the text domain is effective: simply fine-tuning a pretrained generative language model with DP enables the model to generate useful synthetic text with strong privacy protection. Through extensive empirical analyses on both benchmark and private customer data, we demonstrate that our method produces synthetic text that is competitive in terms of utility with its non-private counterpart, meanwhile providing strong protection against potential privacy leakages.

View on arXivView PDF

Code Implementations(1)

MIT

Differentially-private transformers using HuggingFace and Opacus

15033PythonAug 1, 20222 weeks agoMIT

Similar Papers

Cite this paper

@article{yue2022synthetic,
  title  = {Synthetic Text Generation with Differential Privacy: A Simple and Practical Recipe},
  author = {Xiang Yue and Huseyin A. Inan and Xuechen Li and Girish Kumar and Julia McAnallen and Hoda Shajari and Huan Sun and David Levitan and Robert Sim},
  year   = {2022},
  eprint = {2210.14348},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2210.14348}
}

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/2210.14348.svg)](https://codeofpaper.com/paper/2210.14348)

Discussion