[Paper Review] Language Models are Realistic Tabular Data Generators
The paper proposes GReaT, a transformer-based method that fine-tunes an autoregressive LLM on textually encoded tabular data to generate realistic synthetic tabular samples with arbitrary conditioning. It achieves state-of-the-art performance across multiple real-world and synthetic datasets and provides an easy-to-use Python package.
Tabular data is among the oldest and most ubiquitous forms of data. However, the generation of synthetic samples with the original data's characteristics remains a significant challenge for tabular data. While many generative models from the computer vision domain, such as variational autoencoders or generative adversarial networks, have been adapted for tabular data generation, less research has been directed towards recent transformer-based large language models (LLMs), which are also generative in nature. To this end, we propose GReaT (Generation of Realistic Tabular data), which exploits an auto-regressive generative LLM to sample synthetic and yet highly realistic tabular data. Furthermore, GReaT can model tabular data distributions by conditioning on any subset of features; the remaining features are sampled without additional overhead. We demonstrate the effectiveness of the proposed approach in a series of experiments that quantify the validity and quality of the produced data samples from multiple angles. We find that GReaT maintains state-of-the-art performance across numerous real-world and synthetic data sets with heterogeneous feature types coming in various sizes.
Motivation & Objective
- Motivate the generation of realistic synthetic tabular data and address preprocessing, contextual knowledge, and arbitrary conditioning challenges.
- Introduce a novel textual encoding of tabular data for LLMs that preserves information and avoids artificial ordering.
- Enable sampling with arbitrary conditioning by leveraging random feature order permutations during training.
- Demonstrate state-of-the-art generation quality across diverse real-world and synthetic datasets.
- Provide an accessible implementation and benchmarks for the community.
Proposed method
- Transform tabular data into text using a subject-predicate-object encoding that includes feature names and values.
- Randomly permute the encoded feature sentences to remove order dependencies and enable arbitrary conditioning.
- Fine-tune a pretrained autoregressive LLM (GPT-2 variants) on the textual encodings for tabular data generation.
- Sample new tabular rows by conditioning on feature names or name-value pairs; convert generated text back to tabular format with regular expressions.
- Provide three conditioning modes: feature name alone, one name-value pair, or multiple name-value pairs for flexible sampling.
- Offer an open-source Python package and report sampling with a low invalid-sample rate (<1%).
Experimental results
Research questions
- RQ1Can large language models (LLMs) be effectively fine-tuned to generate realistic tabular data when trained on textual encodings of tabular rows?
- RQ2Does random feature order permutation confer arbitrary conditioning capabilities to the generative model without retraining?
- RQ3How does GReaT perform relative to established baselines (CTGAN, TVAE, CopulaGAN) on real-world and synthetic tabular datasets?
- RQ4Can GReaT generate high-quality samples across heterogeneous feature types and varying dataset sizes?
- RQ5Is there an accessible implementation that enables easy adoption and benchmarking by the community?
Key findings
- GReaT achieves state-of-the-art generative performance across multiple real-world and synthetic datasets with heterogeneous feature types.
- Distill-GReaT (smaller GPT-2) and GReaT (larger GPT-2) outperform baselines like CTGAN, TVAE, and CopulaGAN in the experiments cited.
- Arbitrary conditioning is enabled by training on randomly permuted textual encodings, allowing conditioning on any subset of features during sampling without retraining.
- The sampling process can start from feature names or name-value pairs, enabling flexible imputation, conditional generation, and counterfactual-like sampling.
- Invalid-sample rates during generation are reported to be consistently below 1%, with rare violations attributed to tokenization of category values and mitigated by lowering temperature.
- An easy-to-use Python package is provided for generating synthetic samples with three lines of code to get started.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.