This repo is a Python library to generate differentially private (DP) synthetic data without the need of any ML model training. It is based on the following papers that proposed Private Evolution (PE), a new DP synthetic data framework that uses only blackbox inference APIs of foundation models (e.g., Stable Diffusion, GPT models) or simple data generation tools such as simulators and random number generators.
- Differentially Private Synthetic Data via Foundation Model APIs 1: Images
[paper (ICLR 2024)] [paper (arxiv)]
Authors: [Zinan Lin], [Sivakanth Gopi], [Janardhan Kulkarni], [Harsha Nori], [Sergey Yekhanin] - Differentially Private Synthetic Data via Foundation Model APIs 2: Text
[paper (ICML 2024 Spotlight)] [paper (arxiv)] [website]
Authors: [Chulin Xie], [Zinan Lin], [Arturs Backurs], [Sivakanth Gopi], [Da Yu], [Huseyin Inan], [Harsha Nori], [Haotian Jiang], [Huishuai Zhang], [Yin Tat Lee], [Bo Li], [Sergey Yekhanin] - Differentially Private Synthetic Data via APIs 3: Using Simulators Instead of Foundation Models
[paper (arxiv)]
Authors: [Zinan Lin], [Tadas Baltrusaitis], [Wenyu Wang], [Sergey Yekhanin] - Differentially Private Synthetic Data via APIs 4: Tabular Data
[paper (ICML 2026)] [paper (arxiv)]
Authors: [Toan Tran], [Arturs Backurs], [Zinan Lin], [Victor Reis], [Li Xiong], [Sergey Yekhanin]
Please refer to this repo for the full list of papers and code repositories related to PE.
PE has been adopted by some of the largest IT companies such as Microsoft and Apple.
Please refer to the documentation for more details, including the installation instructions, usage, and examples.
7/1/2026: Tabular data generation based on the Tab-PE paperDifferentially Private Synthetic Data via APIs 4: Tabular Data (ICML 2026)has been released in this library! It runs entirely on CPUs and requires no GPU, model training, or model inference. Please refer to the tabular examples to get started.2/11/2025: Image generation with simulator APIs based on the Sim-PE paperDifferentially Private Synthetic Data via APIs 3: Using Simulators Instead of Foundation Modelshas been released in this library!1/8/2025: Text generation with foundation model APIs based on the Aug-PE paperDifferentially Private Synthetic Data via Foundation Model APIs 2: Text (ICML 2024 Spotlight)has been integrated into the library! If you want to reproduce the results in the paper, please refer to our original codebase.11/21/2024: The refactored codebase for image generation with foundation model APIs based on the paperDifferentially Private Synthetic Data via Foundation Model APIs 1: Images (ICLR 2024)has been released! It is completely refactored to be more modular and easier to use and extend. The code originally published with the paper has been moved to the deprecated branch in this repository, which is no longer maintained.5/26/2023: The Cat Cookie and Cat Doudou datasets (512x512) created in the paper are released here.
If you use this library in your research or work, please cite the following papers:
DPSDA/doc/source/getting_started/pe1.bib
Lines 1 to 6 in 48941e2
DPSDA/doc/source/getting_started/pe2.bib
Lines 1 to 6 in 48941e2
DPSDA/doc/source/getting_started/pe3.bib
Lines 1 to 6 in 48941e2
DPSDA/doc/source/getting_started/pe4.bib
Lines 1 to 6 in a138b4d
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.
This project uses foundation model APIs to create synthetic data with differential privacy guarantees. Differential privacy (DP) is a formal framework that ensures the output of an algorithm does not reveal too much information about its inputs. Without a formal privacy guarantee, a synthetic data generation algorithm may inadvertently reveal sensitive information about its input datapoints.
Using synthetic data in downstream applications can carry risk. Synthetic data may not always reflect the true data distribution, and can cause harms in downstream applications. Both the dataset and algorithms behind the foundation model APIs may contain various types of bias, leading to potential allocation, representation, and quality-of-service harms. Additionally, privacy violations can still occur if the ε and δ privacy parameters are set inappropriately, or if multiple copies of a sample exist in the seed dataset. It is important to consider these factors carefully before any potential deployments.