Examples
Here are some examples of how to use the Private Evolution library.
Images
Using foundation models (diffusion models) as the APIs. These examples follow the experimental settings in the paper Differentially Private Synthetic Data via Foundation Model APIs 1: Images (ICLR 2024).
CIFAR10 dataset: This example shows how to generate differentially private synthetic images for the CIFAR10 dataset using the APIs from a pre-trained ImageNet diffusion model.
Camelyon17 dataset: This example shows how to generate differentially private synthetic images for the Camelyon17 dataset using the APIs from a pre-trained ImageNet diffusion model.
Cat dataset: This example shows how to generate differentially private synthetic images for the Cat dataset using the APIs from Stable Diffusion.
Using simulators as the APIs. These examples follow the experimental settings in the paper Differentially Private Synthetic Data via APIs 3: Using Simulators Instead of Foundation Models.
MNIST dataset: This example shows how to generate differentially private synthetic images for the MNIST dataset using a text render.
CelebA dataset (simulator-generated data): This example shows how to generate differentially private synthetic images for the CelebA dataset using the generated data from a computer graphics-based renderer for face images.
CelebA dataset (weak simulator): This example shows how to generate differentially private synthetic images for the CelebA dataset using a rule-based avatar generator.
Text
These examples follow the experimental settings in the paper Differentially Private Synthetic Data via Foundation Model APIs 2: Text (ICML 2024 Spotlight).
Yelp dataset: These examples show how to generate differentially private synthetic text for the Yelp dataset using LLM APIs from:
OpenAI APIs: See example
Huggingface models: See example
OpenReview dataset: These examples show how to generate differentially private synthetic text for the OpenReview dataset using LLM APIs from:
OpenAI APIs: See example
Huggingface models: See example
PubMed dataset: These examples show how to generate differentially private synthetic text for the PubMed dataset using LLM APIs from:
OpenAI APIs: See example
Huggingface models: See example