TabFlowGenerator<T>

Models & Types · AiDotNet.NeuralNetworks.SyntheticData

TabFlow generator using flow matching with optimal transport conditional paths for high-quality, fast synthetic tabular data generation.

Inheritance: NeuralNetworkBase<T> → NeuralSyntheticTabularGeneratorBase<T> → TabFlowGenerator<T>

Implements: ISyntheticTabularGenerator<T>

For Beginners

TabFlow works by learning “which direction data should move”:

If you provide custom layers in the architecture, those will be used directly for the velocity field MLP. If not, the network creates industry-standard TabFlow layers based on the original research paper specifications.

Example usage:

How It Works

TabFlow learns a velocity field v(x, t) that defines an ODE: dx/dt = v(x, t). The ODE transports samples from noise (t=0) to data (t=1) along straight paths. 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

Training: Given data x1 and noise x0, the optimal transport path is: xt = (1 - t) * x0 + t * x1 (linear interpolation) Target velocity: v* = x1 - x0 (direction from noise to data) Loss: ||v(xt, t) - v*||^2 (learn to predict the direction)

Generation: Start at x0 ~ N(0,1), solve ODE from t=0 to t=1 using Euler/RK4.

Reference: “Flow Matching for Tabular Data” (2024)

Constructors

Constructor Summary
TabFlowGenerator() Initializes a new TabFlow generator with the specified architecture.
TabFlowGenerator(NeuralNetworkArchitecture<T> architecture, TabFlowOptions<T> options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer, ILossFunction<T> lossFunction)

Properties

Property Summary
IReadOnlyList<ColumnMetadata> Columns { get; }
TabFlowOptions<T> Options { get; } Gets the TabFlow-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 TabFlow generator to the provided real tabular data.