Skip to content

Commit d623e76

Browse files
committed
update doc about the components in "private evolution for images using simulators"
1 parent 53115f4 commit d623e76

File tree

6 files changed

+36
-6
lines changed

6 files changed

+36
-6
lines changed

doc/source/getting_started/details/api.rst

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@ Currently, the following APIs are implemented:
1515

1616
* Images
1717

18-
* :py:class:`pe.api.StableDiffusion`: The APIs of `Stable Diffusion`_.
19-
* :py:class:`pe.api.ImprovedDiffusion`: The APIs of the `improved diffusion model`_.
18+
* :py:class:`pe.api.StableDiffusion`: The APIs of `Stable Diffusion`_ (introduced in [#pe1]_).
19+
* :py:class:`pe.api.ImprovedDiffusion`: The APIs of the `improved diffusion model`_ (introduced in [#pe1]_).
20+
* :py:class:`pe.api.DrawText`: The APIs that render text on images (introduced in [#pe3]_).
21+
* :py:class:`pe.api.Avatar`: The APIs that generate avatars using `the Python Avatars library <python_avatars_>`__ (introduced in [#pe3]_).
22+
* :py:class:`pe.api.NearestImage`: The APIs that utilize a static image dataset (introduced in [#pe3]_).
2023

2124
* Text
2225

23-
* :py:class:`pe.api.LLMAugPE`: The APIs for text generation using LLMs. When constructing the instance of this API, an LLM instance is required. The LLM instances follow the interface of :py:class:`pe.llm.LLM`. Currently, the following LLMs are implemented:
26+
* :py:class:`pe.api.LLMAugPE`: The APIs for text generation using LLMs (introduced in [#pe2]_). When constructing the instance of this API, an LLM instance is required. The LLM instances follow the interface of :py:class:`pe.llm.LLM`. Currently, the following LLMs are implemented:
2427

2528
* :py:class:`pe.llm.OpenAILLM`: The LLMs from OpenAI APIs.
2629
* :py:class:`pe.llm.AzureOpenAILLM`: The LLMs from Azure OpenAI APIs.
@@ -31,6 +34,19 @@ Adding Your Own APIs
3134

3235
To add your own APIs, you need to create a class that inherits from :py:class:`pe.api.API` and implements the :py:meth:`pe.api.API.random_api` and :py:meth:`pe.api.API.variation_api` methods.
3336

34-
37+
38+
.. rubric:: Citations
39+
40+
.. [#pe1] `Differentially Private Synthetic Data via Foundation Model APIs 1: Images (ICLR 2024) <pe1_paper_>`__.
41+
.. [#pe2] `Differentially Private Synthetic Data via Foundation Model APIs 2: Text (ICML 2024 Spotlight) <pe2_paper_>`__.
42+
.. [#pe3] `Differentially Private Synthetic Data via APIs 3: Using Simulators Instead of Foundation Models <pe3_paper_>`__.
43+
44+
3545
.. _improved diffusion model: https://github.com/openai/improved-diffusion
3646
.. _Stable Diffusion: https://huggingface.co/CompVis/stable-diffusion-v1-4
47+
48+
.. _python_avatars: https://github.com/ibonn/python_avatars
49+
50+
.. _pe1_paper: https://arxiv.org/abs/2305.15560
51+
.. _pe2_paper: https://arxiv.org/abs/2403.01749
52+
.. _pe3_paper: https://arxiv.org/abs/2502.05505

doc/source/getting_started/details/callback_and_logger.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ Currently, the following callbacks are implemented:
1414

1515
* :py:class:`pe.callback.ComputeFID`: Computes the FID between the synthetic samples and the private samples.
1616
* :py:class:`pe.callback.SaveCheckpoints`: Saves the checkpoint of current synthetic samples to files.
17+
* :py:class:`pe.callback.ComputePrecisionRecall`: Computes the `precision and recall metrics`_ between the synthetic samples and the private samples.
1718

1819
* Images
1920

2021
* :py:class:`pe.callback.SampleImages`: Samples some images from each class.
2122
* :py:class:`pe.callback.SaveAllImages`: Saves all synthetic images to files.
23+
* :py:class:`pe.callback.DPImageBenchClassifyImages`: Trains classifiers on the synthetic images and evaluates them on the private images, following the settings in `DPImageBench`_.
2224

2325
* Text
2426

@@ -34,3 +36,6 @@ Currently, the following loggers are implemented:
3436
* :py:class:`pe.logger.LogPrint`: Prints the float results to the console and/or files using the logging module.
3537
* :py:class:`pe.logger.ImageFile`: Saves the images to files.
3638
* :py:class:`pe.logger.MatplotlibPDF`: Saves the matplotlib plots to PDF files.
39+
40+
.. _precision and recall metrics: https://arxiv.org/abs/1904.06991
41+
.. _DPImageBench: https://github.com/2019ChenGong/DPImageBench

doc/source/getting_started/details/data.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ For convenience, some well-known datasets are already packaged as :py:class:`pe.
1919
* :py:class:`pe.data.Cifar10`: The `CIFAR10 dataset`_.
2020
* :py:class:`pe.data.Camelyon17`: The `Camelyon17 dataset`_.
2121
* :py:class:`pe.data.Cat`: The `Cat dataset`_.
22+
* :py:class:`pe.data.MNIST`: The `MNIST dataset`_.
23+
* :py:class:`pe.data.CelebA`: The `CelebA dataset`_.
24+
* :py:class:`pe.data.DigiFace1M`: The `DigiFace1M dataset`_.
2225
* In addition, you can easily load a custom image dataset from a (nested) directory with the image files using :py:meth:`pe.data.load_image_folder`.
2326

2427
* Text datasets
@@ -50,6 +53,9 @@ To apply **Private Evolution** to your own private dataset, you need to create a
5053
.. _Cat dataset: https://www.kaggle.com/datasets/fjxmlzn/cat-cookie-doudou
5154
.. _CIFAR10 dataset: https://www.cs.toronto.edu/~kriz/cifar.html
5255
.. _Camelyon17 dataset: https://camelyon17.grand-challenge.org/
56+
.. _MNIST dataset: https://pytorch.org/vision/main/generated/torchvision.datasets.MNIST.html
57+
.. _CelebA dataset: https://mmlab.ie.cuhk.edu.hk/projects/CelebA.html
58+
.. _DigiFace1M dataset: https://github.com/microsoft/DigiFace1M
5359
.. _Yelp dataset: https://github.com/AI-secure/aug-pe/tree/main/data
5460
.. _OpenReview dataset: https://github.com/AI-secure/aug-pe/tree/main/data
5561
.. _PubMed dataset: https://github.com/AI-secure/aug-pe/tree/main/data

doc/source/getting_started/details/embedding.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ Currently, the following embeddings are implemented:
1616
* Images
1717

1818
* :py:class:`pe.embedding.Inception`: The embeddings computed using the Inception model.
19+
* :py:class:`pe.embedding.FLDInception`: The embeddings computed using the Inception model following the procedure in the `FLD`_ library.
1920

2021
* Text
2122

2223
* :py:class:`pe.embedding.SentenceTransformer`: The embeddings computed using the `Sentence Transformers`_ library.
2324

2425

2526
.. _Sentence Transformers: https://sbert.net/
27+
.. _FLD: https://github.com/marcojira/fld

doc/source/getting_started/details/runner.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ API reference: :doc:`/api/pe.runner`.
66
:py:class:`pe.runner.PE` manages the main **Private Evolution** algorithm by calling the other components discussed before. It has the following key methods:
77

88
* :py:meth:`pe.runner.PE.run`: Runs the **Private Evolution** algorithm.
9+
* :py:meth:`pe.runner.PE.evaluate`: Evaluates the synthetic samples using the :py:class:`pe.callback.Callback` modules.

doc/source/getting_started/examples.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Images
1616

1717
* **MNIST dataset**: `This example <MNIST example_>`__ shows how to generate differentially private synthetic images for the `MNIST dataset`_ using a text render.
1818
* **CelebA dataset (simulator-generated data)**: `This example <CelebA DigiFace1M 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 <DigiFace1M_>`__.
19-
* **CelebA dataset (weak simulator)**: `This example <CelebA avatar example_>`__ shows how to generate differentially private synthetic images for the `CelebA dataset`_ using `a rule-based avatar generator <python_avatar_>`__.
19+
* **CelebA dataset (weak simulator)**: `This example <CelebA avatar example_>`__ shows how to generate differentially private synthetic images for the `CelebA dataset`_ using `a rule-based avatar generator <python_avatars_>`__.
2020

2121
Text
2222
----
@@ -43,7 +43,7 @@ These examples follow the experimental settings in the paper `Differentially Pri
4343
.. _Stable Diffusion: https://huggingface.co/CompVis/stable-diffusion-v1-4
4444

4545
.. _DigiFace1M: https://github.com/microsoft/DigiFace1M
46-
.. _python_avatar: https://github.com/ibonn/python_avatars
46+
.. _python_avatars: https://github.com/ibonn/python_avatars
4747

4848
.. _Cat dataset: https://www.kaggle.com/datasets/fjxmlzn/cat-cookie-doudou
4949
.. _CIFAR10 dataset: https://www.cs.toronto.edu/~kriz/cifar.html

0 commit comments

Comments
 (0)