You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/getting_started/details/api.rst
+20-4Lines changed: 20 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,12 +15,15 @@ Currently, the following APIs are implemented:
15
15
16
16
* Images
17
17
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]_).
20
23
21
24
* Text
22
25
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:
24
27
25
28
* :py:class:`pe.llm.OpenAILLM`: The LLMs from OpenAI APIs.
26
29
* :py:class:`pe.llm.AzureOpenAILLM`: The LLMs from Azure OpenAI APIs.
@@ -31,6 +34,19 @@ Adding Your Own APIs
31
34
32
35
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.
33
36
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_>`__.
Copy file name to clipboardExpand all lines: doc/source/getting_started/details/callback_and_logger.rst
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,11 +14,13 @@ Currently, the following callbacks are implemented:
14
14
15
15
* :py:class:`pe.callback.ComputeFID`: Computes the FID between the synthetic samples and the private samples.
16
16
* :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.
17
18
18
19
* Images
19
20
20
21
* :py:class:`pe.callback.SampleImages`: Samples some images from each class.
21
22
* :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`_.
22
24
23
25
* Text
24
26
@@ -34,3 +36,6 @@ Currently, the following loggers are implemented:
34
36
* :py:class:`pe.logger.LogPrint`: Prints the float results to the console and/or files using the logging module.
35
37
* :py:class:`pe.logger.ImageFile`: Saves the images to files.
36
38
* :py:class:`pe.logger.MatplotlibPDF`: Saves the matplotlib plots to PDF files.
39
+
40
+
.. _precision and recall metrics: https://arxiv.org/abs/1904.06991
Copy file name to clipboardExpand all lines: doc/source/getting_started/details/runner.rst
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,3 +6,4 @@ API reference: :doc:`/api/pe.runner`.
6
6
:py:class:`pe.runner.PE` manages the main **Private Evolution** algorithm by calling the other components discussed before. It has the following key methods:
7
7
8
8
* :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.
Copy file name to clipboardExpand all lines: doc/source/getting_started/examples.rst
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Images
16
16
17
17
* **MNIST dataset**: `This example <MNIST example_>`__ shows how to generate differentially private synthetic images for the `MNIST dataset`_ using a text render.
18
18
* **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_>`__.
20
20
21
21
Text
22
22
----
@@ -43,7 +43,7 @@ These examples follow the experimental settings in the paper `Differentially Pri
0 commit comments