Introduction
Tabular data is a fundamental component of data science across industries such as finance and healthcare. However, synthesizing realistic tabular data remains a significant challenge. Traditional generative models, including Variational Autoencoders (VAEs) and Generative Adversarial Networks (GANs), often struggle with three primary issues: lossy preprocessing (e.g., one-hot encoding), a lack of semantic context for features, and rigid conditioning that requires retraining for different imputation tasks.
This paper introduces GReaT (Generation of Realistic Tabular data), a novel framework that addresses these limitations by treating tabular rows as natural language sentences. By fine-tuning Large Language Models (LLMs) on these textual representations, GReaT leverages pre-existing contextual knowledge to generate highly realistic synthetic data and support arbitrary conditioning without retraining.
Methodology
The GReaT pipeline transforms tabular data generation into a language modeling problem through three key steps:
- Textual Encoding: Each row is converted into a human-readable sentence (e.g., "Age is 39, Education is Bachelors..."). This preserves the semantic meaning of feature names, allowing the model to utilize its pre-trained "common sense."
- Feature Order Permutation: During training, the order of feature clauses is randomly shuffled. This enables the model to learn bidirectional dependencies, facilitating "arbitrary conditioning"—the ability to complete a record starting from any given subset of features.
- LLM Fine-tuning: A pre-trained GPT-2 model is fine-tuned on these shuffled sentences. The model learns the underlying distribution of the data by predicting the next token in the sequence.
To generate new data, the model is prompted with a starting feature or an empty string and allowed to auto-regressively complete the "sentence," which is then parsed back into a tabular format.
Experimental Setup
The researchers evaluated GReaT against six real-world datasets (Travel Customers, Sick, HELOC, Adult Income, Diabetes, and California Housing) and three synthetic benchmarks (Alarm, Asia, and GMM). These datasets cover various domains and scales, ranging from fewer than 1,000 to over 100,000 samples, testing the model's ability to handle diverse data types and complex distributions.
Results and Discussion
GReaT demonstrates superior performance across several key metrics:
- Machine Learning Efficiency (MLE): Models trained on GReaT-generated synthetic data achieved performance comparable to or better than those trained on data from state-of-the-art baselines like CTGAN and TVAE.
- High Realism: Discriminator tests showed that GReaT's synthetic samples were the most difficult to distinguish from real data.
- Spatial Accuracy: A standout feature of GReaT is its ability to respect complex, non-linear boundaries. In the California Housing dataset, GReaT was the only model to accurately capture the geographical shape of the state.
The success of GReaT highlights the importance of semantics. By including feature names, the model understands that "Latitude" and "Longitude" refer to physical locations, helping it maintain spatial consistency. Furthermore, the shuffling technique effectively turns the auto-regressive LLM into a versatile imputation engine.
Conclusion
GReaT represents a paradigm shift in tabular data generation by moving away from complex mathematical distribution modeling toward semantic language modeling. While the computational cost of fine-tuning LLMs is higher than traditional GANs, the gains in realism, robustness, and flexibility are substantial. Future work may focus on improving numerical precision and incorporating differential privacy to enhance the utility and security of synthetic data generation.
Summary updated