A Technical Exploration of Causal Inference with Hybrid LLM Synthetic Data
Dana Kim, Yichen Xu, Tiffany Lin · 2025
Read A Technical Exploration of Causal Inference with Hybrid LLM Synthetic Data by Dana Kim, Yichen Xu, Tiffany Lin (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2511-00318.txt.
Introduction
Dana Kim, Yichen Xu, and Tiffany Lin explore a trap in synthetic data: fake tables can predict well yet give wrong causal answers. A generator may match patterns in medical or social data while badly misjudging the average effect of a treatment. The authors first show that leading generators, both GAN-based and language-model-based, fall into exactly this trap.
Their hybrid fix builds covariates with a monitored model, then learns the treatment assignment and outcome parts separately, so cause-and-effect structure survives. A pairing trick eases cases where some groups rarely get treated. With unlimited synthetic samples, they benchmark standard causal estimators under complex data patterns. The work lays groundwork for safer synthetic data pipelines.
Catalog record
| CREATOR | Dana Kim, Yichen Xu, Tiffany Lin |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 21 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2511-00318
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
A Technical Exploration of Causal Inference with Hybrid LLM Synthetic Data Dana Kim, Yichen Xu, Tiffany Lin Abstract Large Language Models (LLMs) offer a flexible means to generate synthetic tabular data, yet existing approaches often fail to preserve key causal parameters such as the average treatment effect (ATE). In this technical exploration, we first demonstrate that state-of-the-art synthetic data generators—both GAN- and LLM-based—can achieve high predictive fidelity while substantially misestimating causal effects. To address this gap, we propose a hybrid generation framework that combines model-based covariate synthesis (monitored via distance-to-closest-record filtering) with separately learned propensity and outcome models, thereby ensuring that ( W , A , Y ) (W,A,Y) triplets retain their underlying causal structure. We further introduce a synthetic pairing strategy to mitigate positivity violations and a realistic evaluation protocol that leverages unlimited synthetic samples to benchmark traditional estimators (IPTW, AIPW, substitution) under complex covariate distributions. This work lays the groundwork for LLM-powered data pipelines that support robust causal analysis. Our code is available at https://github.com/Xyc-arch/llm-synthetic-for-causal-inference.git . 1 Introduction The growing capabilities of Large Language Models present new opportunities to support complex analytical tasks. This work introduces an LLM agent designed to enhance causal inference, not by estimating effects directly, but by addressing key data challenges that underpin causal analysis. While the causal inference community is well aware of the limitations of real-world data, the use of synthetic data to address these challenges remains under-explored. We propose that the LLM agent’s primary role is to generate high-quality synthetic data tailored for use with standard causal estimators. This synthetic data addresses issues such as privacy constraints, data scarcity, poor covariate balance, and limited overlap, while also enabling consistent benchmarking to guide estimator selection. A key challenge is ensuring that the synthetic data retains both the observational patterns and the causal structure necessary for valid inference. By tackling these foundational problems, the agent supports more reliable and robust causal analysis. Our main contributions, therefore, directly support the data generation and utility functions of an LLM agent for causal inference: • We observe that existing generative models for privacy-preserving data sharing may fail to preserve causal parameters, even when they maintain strong predictive performance. • We propose a hybrid data generation approach designed to preserve causal structure, particularly the average treatment effect (ATE). • We introduce an algorithm that leverages synthetic data to mitigate violations of the positivity assumption in causal inference. • We propose a method for evaluating the performance of causal estimators in scenarios where the ground truth is unknown in the real dataset. 2 Related works Few studies have investigated the intersection of synthetic data generation and causal inference. Our work builds upon advances in both domains. CTGAN Xu et al., 2019 pioneered conditional GANs for tabular data, introducing mode-specific normalization and training-by-sampling to address data imbalance. While preserving marginal distributions, GANs often struggle with complex conditional relationships essential for causal inference. More recently, the GReaT framework Borisov et al., 2023 demonstrated LLMs’ capability in generating high-fidelity tabular data by encoding tables as text, though its efficacy in preserving causal structures remained unexplored until now. Several studies have begun exploring synthetic data for causal inference. De Bartolomeis et al., 2024 used foundation models for randomized experiments, focusing on experimental efficiency rather than addressing positivity violations. Liu et al., 2025 surveyed LLM applications in causal inference but did not address preserving causal parameters in synthetic data—a gap our work fills. For positivity violations, traditional approaches like trimming extreme propensity scores can lead to biased estimates. Nakada et al., 2025 proposed synthetic oversampling using LLMs to address data imbalance, but primarily in predictive contexts. Our synthetic counterfactual pairing directly targets positivity challenges in causal estimation. Evaluating causal estimators typically relies on simplified simulations that fail to capture real-world complexity. Our hybrid synthetic data framework preserves both distributional complexity and causal relationships, providing a realistic testbed with known ground truth parameters. We demonstrate that synthetic data may maintain strong predictive performance while failing to preserve critical causal relationships—highlighting the need for specialized approaches to synthetic data generation in causal inference. 3 Using LLMs as Realistic Synthetic Data Generators In this section, we describe how we employed a Large Language Model (LLM), specifically GPT-2, to generate realistic synthetic tabular data using the GReaT framework Borisov et al., 2023 . This procedure underpins our hybrid data-generation strategy, enabling the accurate simulation of covariate-treatment-outcome triplets suitable for causal inference analysis. Figure 1: Overview of the LLM‐based synthetic data generation pipeline. Raw data is first serialized into prompts and processed through an LLM. The resulting synthetic samples are filtered via DCR (distance to closest record) matching. Curated synthetic data is evaluated for privacy preservation, positivity balance, and estimator fidelity before contributing to ATE estimation. 3.1 Textual Serialization and Prompt Construction We serialized each row of the tabular dataset into natural language sentences following the methodology proposed in the GReaT framework. Each covariate, treatment, and outcome was encoded explicitly as a subject-predicate-object clause, structured as follows: W1=1, W2=0, W3=1, W4=0, W5=1, W6=0 => A=1, Y=0 This textual encoding preserves the semantics of each feature, enabling the LLM to model complex dependencies among covariates, treatments, and outcomes without imposing artificial ordering biases. To enhance generalizability and allow conditioning on arbitrary feature subsets, we randomized the order of serialized features prior to training. 3.2 Fine-Tuning with GReaT We fine-tuned GPT-2 using the GReaT Python package Borisov et al., 2023 , which facilitates the application of pretrained language models for generating synthetic tabular data via textual encodings. We conducted training for 50 epochs with a batch size of 32, configuring the model to save checkpoints every 400,000 training steps using the save_steps parameter to ensure reproducibility and enable checkpoint recovery. Our training dataset comprised 5,740 samples, each containing six binary covariates ( W ), a binary treatment ( A ), and a binary outcome ( Y ). The fine-tuning configuration was as follows: Model: GPT-2 (355M parameters); Epochs: 50; Batch size: 32; Synthetic samples: 50 000; Max sampling length: 1024–2000 tokens. After completing the training phase, we saved and subsequently reloaded the trained model to generate synthetic data. We exported the generated data in a structured tabular format to facilitate downstream causal analysis. All intermediate and final outputs follow a systematic file-naming convention to enhance traceability and reproducibility and are accessible in the supplementary repository. 3.3 Sampling Strategy We leveraged the autoregressive capabilities of GPT-2 to generate synthetic records sequentially, conditioned on randomized feature orders. We conducted sampling with a maximum generation length ranging from 1024 to 2000 tokens. The flexibility inherent in the GReaT framework permitted both complete record generation and conditional sampling based on subsets of features, thereby facilitating advanced applications such as counterfactual simulations and covariate imputations. 3.4 Advantages and Fidelity Considerations The GReaT framework supports arbitrary conditioning and obviates the need for lossy preprocessing methods, such as one-hot encoding. This feature is particularly beneficial for causal inference tasks, where maintaining complex conditional dependencies is critical. Furthermore, distance-to-closest-record (DCR) analysis confirmed that the generated samples closely matched the original data distribution, while simultaneously preserving sufficient variability to prevent overfitting and data leakage. 3.5 Runtime and Reproducibility Across multiple runs, fine-tuning and sampling procedures averaged between 15 and