TabLLMGenGenerator<T>
Models & Types · AiDotNet.NeuralNetworks.SyntheticData
TabLLM-Gen generator that uses LLM-style schema-aware tokenization and autoregressive transformers to generate realistic tabular data.
Inheritance: NeuralNetworkBase<T> → NeuralSyntheticTabularGeneratorBase<T> → TabLLMGenGenerator<T>
Implements: ISyntheticTabularGenerator<T>
For Beginners
TabLLM-Gen works like an AI that fills in a form:
- It reads the form labels (column names and types)
- Fills in each field one by one, using previous answers to inform the next
- For example: after filling in “Age: 25”, it knows to generate a realistic
income for a 25-year-old
If you provide custom layers in the architecture, those will be used directly for the FFN blocks. Otherwise, the network creates standard layers based on the original research paper specifications.
Example usage:
How It Works
TabLLM-Gen processes a row as a sequence of (schema_token, value_token) pairs:
The model learns to generate value tokens conditioned on:
- The column’s schema tokens (name, type)
- All previously generated column values
This implementation follows the standard neural network architecture pattern with:
- Proper inheritance from NeuralNetworkBase
- Layer-based architecture using ILayer components
- Full autodiff and JIT compilation support
Reference: “LLM-based Tabular Data Generation” (2024)
Constructors
| Constructor | Summary |
|---|---|
TabLLMGenGenerator() |
Initializes a new TabLLM-Gen generator with the specified architecture. |
TabLLMGenGenerator(NeuralNetworkArchitecture<T> architecture, TabLLMGenOptions<T> options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer, ILossFunction<T> lossFunction) |
Properties
| Property | Summary |
|---|---|
IReadOnlyList<ColumnMetadata> Columns { get; } |
|
TabLLMGenOptions<T> Options { get; } |
Gets the TabLLM-Gen-specific options. |
bool IsFitted { get; set; } |
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) |