Principle:Gretelai Gretel synthetics ACTGAN Model Initialization
| Knowledge Sources | |
|---|---|
| Domains | Synthetic_Data, GAN, Tabular_Data |
| Last Updated | 2026-02-14 19:00 GMT |
Overview
GAN model initialization is the process of configuring and constructing all architectural hyperparameters, training settings, and metadata-handling policies before any data fitting or generation occurs.
Description
In a Generative Adversarial Network for tabular data synthesis, initialization involves selecting the dimensionality of the latent noise vector (embedding dimension), the layer sizes for both the generator and discriminator networks, learning rates and weight decay for the Adam optimizers, the batch size, the number of training epochs, and the type of conditional vector to use during training. Additionally, metadata-level settings such as field names, field types, field transformers, and automatic datetime detection must be configured. The initialization step validates all hyperparameters against constraints (for example, batch size must be divisible by 2 and by the PAC grouping size) and stores them for later use during model building and training.
A well-designed initialization API separates metadata-level concerns (what columns exist, what their types are, how they should be transformed) from architecture-level concerns (network dimensions, learning rates, optimizer settings) and training-level concerns (epochs, batch size, callbacks). This layered design allows users to configure ACTGAN for diverse tabular datasets without needing to understand GAN internals.
Usage
Use this principle whenever constructing an ACTGAN model for tabular synthetic data generation. The initialization step is required before any call to fit() or sample(). It is also the point at which to configure:
- Network architecture: embedding dimension, generator and discriminator layer sizes
- Optimizer settings: learning rates and weight decay for generator and discriminator
- Training schedule: number of epochs, batch size, discriminator steps per generator update
- Conditional generation: conditional vector type (SINGLE_DISCRETE or ANYWAY), column selection probabilities, reconstruction loss coefficient, force conditioning
- Data handling: field types, field transformers, automatic datetime detection, binary encoder cutoff, primary key, constraints
Theoretical Basis
GAN initialization follows from the architecture described in the CTGAN paper (Xu et al., 2019), extended by ACTGAN with additional conditional vector types.
The generator uses residual layers where each layer concatenates its output with its input:
For each layer dimension d_i in generator_dim:
h_{i+1} = concat(ReLU(BN(Linear(h_i, d_i))), h_i)
Final output: Linear(h_last, data_dim)
The discriminator uses standard feedforward layers with LeakyReLU activation and dropout:
For each layer dimension d_i in discriminator_dim:
h_{i+1} = Dropout(LeakyReLU(Linear(h_i, d_i)))
Final output: Linear(h_last, 1)
The PAC (Packing with Auxiliary Classifier) mechanism groups pac samples together as input to the discriminator, which requires that batch_size is divisible by pac. This prevents mode collapse by ensuring the discriminator evaluates multiple samples simultaneously.
The conditional vector configuration determines how conditional information is injected during training. The SINGLE_DISCRETE type selects exactly one discrete column per training step (the original CTGAN approach), while the ANYWAY type can condition on any combination of columns, enabling more flexible conditional generation at inference time.