Practical overview
When it fits
Use it when you have tabular data to model and need synthetic samples, or when your synthetic-data task must represent a parent-child relationship across tables.
Who it is for
- Data practitioners preparing synthetic tabular data for development or testing.
- Researchers and developers working with synthetic datasets spanning parent and child tables.
Documented uses
- Fit a model to tabular observations and generate a chosen number of synthetic rows.
- Model parent and child tables and generate child records conditioned on sampled parent records.
- Save trained models and load them from a saved experiment directory.
Requirements & limits
The repository is public, lists an MIT license, and documents installation with pip for Python 3.7 or later.
- Select the tabular model for independent observations and the sequence-to-sequence relational model for linked parent-child data.
- For the relational workflow, parent and child tables must share a join-key column name.
- The README advises removing unique identifiers that should not be modeled.
- The non-relational model uses an optimal stopping criterion; the README recommends allowing a large epoch setting.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Train and sample a synthetic single-table dataset
Fit a tabular model to a CSV dataset, save it, and generate synthetic rows.
Before you start
- Python 3.7 or later
- A CSV dataset readable with pandas
- Remove unique identifiers you do not want modeled
Steps
Install the package with pip install realtabformer.
Load the CSV into a pandas DataFrame and create REaLTabFormer with model_type="tabular".
Fit the model to the DataFrame and save it with the model's save method.
Call sample with the desired number of rows; the README example uses the input dataset's row count.
Expected outcome
A trained model saved to a directory and a sampled synthetic DataFrame.
Guide limitations
- The documented optimal stopping criterion applies to non-relational tabular training; the README recommends setting epochs high enough to allow the criterion to be met.
- The example requires users to decide which unique identifiers should be excluded from modeling.
Generate synthetic records for linked parent-child tables
Fit a parent model and a relational child model, then generate child records conditioned on generated parent records.
Before you start
- Python 3.7 or later
- Parent and child tables available as pandas DataFrames
- A join-key column with the same name in both tables
Steps
Install the package with pip install realtabformer and load the parent and child CSV files.
Fit a tabular parent model using the parent DataFrame without the join-key field, then save the model.
Create a relational model using the saved parent-model path and fit it with the child DataFrame, parent DataFrame, and join-key name.
Sample parent records, assign the join-key from their index, and pass those records and keys to the relational model's sample method.
Expected outcome
Generated parent samples and relational child samples conditioned on those parent records.
Guide limitations
- The documented example requires the join-key column to exist in both tables and have the same name.
- The recipe follows the README's parent-child example and does not specify a general workflow for other relational schemas.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 15 October 2026
- Original website title
- worldbank/REaLTabFormer · Official homepage title · retained in its source language

