MedGANOptions<T>
Options & Configuration · AiDotNet.Models.Options
Configuration options for medGAN, the medical Generative Adversarial Network of Choi et al. (arXiv:1703.06490) for generating synthetic patient records.
Inheritance: ModelOptions → NeuralNetworkOptions → ModelHyperparameterOptions → FinancialNeuralNetworkOptions → RiskModelOptions<T> → SyntheticDataGeneratorOptions<T> → MedGANOptions<T>
For Beginners
Hospitals cannot share real patient records, but they can share fake ones that have the same statistical shape. medGAN learns that shape in two stages: first it learns to compress and rebuild real records (the autoencoder), then it learns to invent new compressed codes that rebuild into records a critic cannot tell from real ones.
How It Works
medGAN generates high-dimensional discrete patient records by combining an AUTOENCODER with a GAN. The autoencoder is pre-trained on the real records; the GAN’s generator then learns to produce points in the autoencoder’s LATENT space, and the pre-trained decoder converts those to records. The paper’s three efficiency devices are minibatch averaging (to avoid mode collapse), batch normalization, and shortcut connections in the generator.
Defaults reproduce the paper’s stated hyperparameters: 128-dimensional embedding, a generator of two 128-wide shortcut layers, a discriminator of 256 then 128, Adam at 1e-3, minibatches of 1,000 records, and k = 2 discriminator updates per generator update.
Constructors
| Constructor | Summary |
|---|---|
MedGANOptions() |
Properties
| Property | Summary |
|---|---|
MedGANDataType DataType { get; set; } |
Gets or sets the kind of variables the records hold, which selects the autoencoder’s activations and pre-training loss. |
bool EnablePrivacy { get; set; } |
Gets or sets whether to train the discriminator with differentially private SGD. |
bool UseMinibatchAveraging { get; set; } |
Gets or sets whether the discriminator sees each sample concatenated with the minibatch average, medGAN’s remedy for mode collapse. |
double AutoencoderPretrainFraction { get; set; } |
Gets or sets the share of the total epoch budget spent pre-training the autoencoder when AutoencoderPretrainEpochs is null. |
double BatchNormDecay { get; set; } |
Gets or sets the decay used by the generator’s batch normalization moving averages. |
double ClipNorm { get; set; } |
Gets or sets the per-example gradient clipping norm C used when EnablePrivacy is set. |
double ConstraintWeight { get; set; } |
Gets or sets the weight on a penalty for generated values outside the per-column range observed in the training data. |
double Epsilon { get; set; } |
Gets or sets the privacy budget epsilon used when EnablePrivacy is set. |
double LearningRate { get; set; } |
Gets or sets the Adam learning rate. |
int BatchSize { get; set; } |
Gets or sets the training minibatch size. |
int DiscriminatorSteps { get; set; } |
Gets or sets the number of discriminator updates per generator update (k). |
int EmbeddingDimension { get; set; } |
Gets or sets the autoencoder’s embedding dimension — the width of the latent space the generator produces into and the decoder consumes. |
int Epochs { get; set; } |
Gets or sets the number of training epochs. |
int VGMModes { get; set; } |
Gets or sets the number of VGM modes used to transform continuous columns. |
int? AutoencoderPretrainEpochs { get; set; } |
Gets or sets the number of epochs spent pre-training the autoencoder before the GAN begins. |
int? NoiseDimension { get; set; } |
Gets or sets the dimension r of the random prior z ~ N(0, 1). |
int[] AutoencoderDimensions { get; set; } |
Gets or sets the autoencoder’s hidden layer widths BEFORE the embedding layer. |
int[] DiscriminatorDimensions { get; set; } |
Gets or sets the discriminator’s hidden layer widths. |
int[] GeneratorDimensions { get; set; } |
Gets or sets the generator’s hidden layer widths, each carrying a shortcut connection. |