TabSynGenerator<T>
Models & Types · AiDotNet.NeuralNetworks.SyntheticData
TabSyn generator combining VAE pretraining with latent diffusion for state-of-the-art synthetic tabular data generation.
Inheritance: NeuralNetworkBase<T> → NeuralSyntheticTabularGeneratorBase<T> → TabSynGenerator<T>
Implements: ISyntheticTabularGenerator<T>
For Beginners
TabSyn is a two-step generator:
**Step 1 - VAE Training (learning to compress):****Step 2 - Diffusion Training (learning the latent distribution):**Generation:
If you provide custom layers in the architecture, those will be used directly for the VAE encoder. If not, the network creates industry-standard TabSyn encoder layers based on the original research paper specifications.
Example usage:
How It Works
TabSyn trains in two phases:
- VAE Phase: Encoder-decoder learns latent representation of tabular data
- Diffusion Phase: Gaussian diffusion model learns the distribution of latent codes
Generation: z ~ DiffusionModel -> decoded = VAEDecoder(z) -> inverse transform
This implementation follows the standard neural network architecture pattern with:
- Proper inheritance from NeuralNetworkBase
- Layer-based architecture using ILayer components
- Engine-based tensor operations for CPU/GPU acceleration
- Full autodiff and JIT compilation support
Reference: “TabSyn: Bridging the Gap” (Zhang et al., NeurIPS 2023)
Constructors
| Constructor | Summary |
|---|---|
TabSynGenerator() |
Initializes a new TabSyn generator with the specified architecture. |
TabSynGenerator(NeuralNetworkArchitecture<T> architecture, TabSynOptions<T> options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer, ILossFunction<T> lossFunction) |
Properties
| Property | Summary |
|---|---|
IReadOnlyList<ColumnMetadata> Columns { get; } |
|
TabSynOptions<T> Options { get; } |
Gets the TabSyn-specific options. |
bool IsFitted { get; set; } |
Methods
| Method | Summary |
|---|---|
Dictionary<string, T> GetFeatureImportance() |
|
Matrix<T> Generate(int numSamples, Vector<T> conditionColumn, Vector<T> conditionValue) |
Generates new synthetic tabular data rows. |
ModelMetadata<T> GetModelMetadata() |
|
Task FitAsync(Matrix<T> data, IReadOnlyList<ColumnMetadata> columns, int? epochs, CancellationToken ct) |
|
void Fit(Matrix<T> data, IReadOnlyList<ColumnMetadata> columns, int? epochs) |
Fits the TabSyn generator to the provided real tabular data. |