PATEGANGenerator<T>
Models & Types · AiDotNet.NeuralNetworks.SyntheticData
PATE-GAN (Jordon, Yoon and van der Schaar, ICLR 2019): a GAN made differentially private by replacing its discriminator with the PATE mechanism. k teachers each see one disjoint partition of the data; a student learns from the teachers’ Laplace-noised votes on generated rows; the generator learns only through the student.
Inheritance: NeuralNetworkBase<T> → NeuralSyntheticTabularGeneratorBase<T> → PATEGANGenerator<T>
Implements: ISyntheticTabularGenerator<T>
For Beginners
PATE-GAN learns to produce realistic rows while protecting the people in the data. No single network sees the whole table, and the only signal that leaves the real data is a noisy vote, so the generated rows cannot reveal much about any one person. Training stops automatically once the privacy budget is used up.
How It Works
This follows section 4, Algorithm 1 and the appendix:
- The data are normalized into [0, 1]^d (continuous columns min-max scaled, categorical columns one-hot) and
the noise is z ~ Unif([0, 1]^d), so that the generator’s support covers the data’s (section 4.2.2).
- Generator and student are depth 3 with d and d/2 hidden units, ReLU hidden layers and sigmoid outputs; the
teachers are depth 1 (a logistic regression).
- Each generator iteration makes n_T updates of every teacher on its own partition and generated rows
(Eq. 6), then n_S student updates on generated rows labelled by PATE_λ (Eqs. 4 and 7), updating the moments accountant for every label, then one generator update on Σ log(1 − S(G(z))). Training stops when the accountant’s ε̂ reaches ε.
The paper adds Lap(λ) noise to the vote counts, which makes one vote (1/λ, 0)-differentially private (section 3), yet writes its accountant bound (Algorithm 1, lines 17-19) with λ where Papernot et al. 2017 have the privacy parameter γ of Lap(1/γ) noise. This class keeps Lap(λ) noise and evaluates the bound at γ = 1/λ, so ε̂ is the guarantee the added noise actually provides.
Constructors
| Constructor | Summary |
|---|---|
PATEGANGenerator() |
Initializes a new instance with default architecture settings. |
PATEGANGenerator(NeuralNetworkArchitecture<T> architecture, PATEGANOptions<T> options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer, ILossFunction<T> lossFunction) |
Initializes a new PATE-GAN generator with the specified architecture. |
Properties
| Property | Summary |
|---|---|
IReadOnlyList<ColumnMetadata> Columns { get; } |
|
PATEGANOptions<T> Options { get; } |
Gets the PATE-GAN-specific options. |
bool IsFitted { get; set; } |
|
double PrivacySpent { get; set; } |
The privacy spent so far, ε̂ = min_l (α(l) + log(1/δ)) / l (Algorithm 1, line 25). |
int IterationsTrained { get; set; } |
The number of generator iterations the last Fit ran before ε was spent. |
Methods
| Method | Summary |
|---|---|
Dictionary<string, T> GetFeatureImportance() |
|
Matrix<T> Generate(int numSamples, Vector<T> conditionColumn, Vector<T> conditionValue) |
|
ModelMetadata<T> GetModelMetadata() |
|
Task FitAsync(Matrix<T> data, IReadOnlyList<ColumnMetadata> columns, int? epochs, CancellationToken cancellationToken) |
|
void Fit(Matrix<T> data, IReadOnlyList<ColumnMetadata> columns, int? epochs) |