---
title: 'FairTabGen: Fair Synthetic Tabular Generation'
url: https://www.emergentmind.com/topics/fairtabgen
type: topic
---

# FairTabGen: Fair Synthetic Tabular Generation

FairTabGen is a fairness-aware large language model-based framework for synthetic tabular data generation that is designed for privacy-sensitive, low-data regimes and explicitly targets both counterfactual and causal fairness while preserving statistical utility [2508.11810]. It is presented as a modular, iterative system that combines in-context learning, prompt refinement, fairness-aware data curation, and evaluation-guided feedback to generate synthetic datasets for domains such as healthcare, criminal justice, and education, including settings where only \(5\%\)–\(20\%\) of the original data is available [2508.11810].

## 1. Problem setting and design objectives

FairTabGen is motivated by three linked constraints. First, many real-world tabular datasets are sensitive and expensive to collect, so synthetic data is used to enable sharing, augmentation, and model development without exposing private records. Second, conventional tabular generators often prioritize statistical fidelity and therefore reproduce structural biases present in the source data. Third, fairness and utility interact: improving one can degrade the other unless generation and evaluation are jointly orchestrated rather than separated into a generator followed by post hoc auditing [2508.11810].

The framework therefore treats fairness as a first-class generation objective. Its stated target is not only demographic balance, but also the simultaneous improvement of counterfactual and causal fairness. In the reported experiments, the method outperforms GAN-based and LLM-based baselines and achieves up to \(10\%\) improvements on fairness metrics such as demographic parity and path-specific causal effects while retaining statistical utility, with gains obtained using less than \(20\%\) of the original data [2508.11810].

This design places FairTabGen in a distinct category within synthetic tabular data generation. Rather than training a specialized generator from scratch, it uses prompt-based orchestration around a general-purpose LLM and refines that orchestration through repeated fairness and utility assessments. A plausible implication is that the framework treats the LLM less as a standalone sampler and more as a controllable synthesis component embedded in a fairness-constrained pipeline.

## 2. Fairness model, metrics, and causal semantics

FairTabGen evaluates fairness through demographic parity (DP), counterfactual invariances via Fairness Through Unawareness (FTU), and path-specific causal effects (PSE) under the Standard Fairness Model (SFM) [2508.11810]. Counterfactual fairness is described in the sense of invariance of decisions under hypothetical changes to a protected attribute, following Kusner et al. conceptually. In practice, the paper reports DP and FTU rather than equalized odds or equality of opportunity [2508.11810].

The demographic parity quantities restated in the paper are

$$
DP_{\text{diff}} = \left| P(\hat{Y} = 1 \mid A = a) - P(\hat{Y} = 1 \mid A = a') \right|
$$

and

$$
DP_{\text{ratio}} = \frac{P(\hat{Y} = 1 \mid A = a)}{P(\hat{Y} = 1 \mid A = a')}.
$$

Counterfactual fairness is expressed in SCM notation as the condition that a predictor \(\hat{Y}\) is counterfactually fair if, for any individual with latent or background variables \(U\),

$$
P\!\left( \hat{Y}_{A \leftarrow a}(U) = \hat{Y}_{A \leftarrow a'}(U) \right) = 1
$$

for all \(a, a'\) [2508.11810].

For causal fairness, FairTabGen adopts the SFM decomposition into total variation (TV), direct effect (DE), indirect effect (IE), and spurious effect (SE). Lower magnitudes of DE, IE, and SE are interpreted as fairer causal pathways, with improvements corresponding to reductions toward zero [2508.11810]. Although the paper does not provide formal PSE identification formulae, it restates standard nested-counterfactual expressions such as the natural direct effect

$$
NDE(a, a') = E[ Y(a, M(a')) ] - E[ Y(a', M(a')) ]
$$

and the natural indirect effect

$$
NIE(a, a') = E[ Y(a, M(a)) ] - E[ Y(a, M(a')) ].
$$

More generally, for a set of allowed paths \(\mathcal{P}\),

$$
PSE_{\mathcal{P}}(a, a') = E[ Y( a_{\mathcal{P}}, a'_{\neg \mathcal{P}} ) ] - E[ Y( a'_{\mathcal{P}}, a'_{\neg \mathcal{P}} ) ].
$$

The dataset-specific SCM role assignment is \(X\) for the sensitive attribute, \(Z\) for mediators, \(Y\) for the outcome, and \(W\) for confounders. Prompts explicitly ask the LLM to generate data “structured to allow evaluation of fairness through causal pathways,” enabling decomposition into DE, IE, SE, and TV. At the same time, the paper does not specify structural equations, a DAG with explicit functional forms, or identification steps for PSE; interventions are conceptually implied rather than fully derived [2508.11810].

## 3. Framework architecture and prompt-driven generation loop

FairTabGen orchestrates LLM-based generation with fairness-aware evaluation and iterative prompt refinement. Its inputs are a target schema, real-data exemplars for in-context learning, and fairness and utility constraints. The reported generator is GPT-4o via the OpenAI API, with prompts that include a dataset description, the SCM role assignment, explicit generation instructions, and a schema-guided output format [2508.11810].

The prompt design is highly prescriptive. The system role is “You are a tabular synthetic data generation model.” The context defines \(X\), \(Z\), \(Y\), and \(W\). Instructions include “DO NOT COPY THE EXAMPLES,” “generate realistic but new AND diverse samples,” and “correct label conditioned on features.” Output is requested as a markdown-like tabular code snippet containing the dataset header and generated rows [2508.11810].

The paper reports dataset-specific prompt configurations and sample budgets:

| Dataset | SCM roles and label | ICL / synthetic size |
|---|---|---|
| COMPAS | Sensitive race; mediators age, sex; label two_year_recid | 40 ICL; 1,000 synthetic |
| LAW | Sensitive race; mediator sex; label bar_passed | 40 ICL; 1,000 synthetic |
| MIMIC-IV | Sensitive race; mediators age, gender; label los_seconds | 200 ICL; 3,400 synthetic |

The orchestration loop evaluates each synthetic batch for statistical quality, counterfactual fairness, causal fairness, and predictive performance. If thresholds are unmet, the prompt is refined by reweighting group distributions, modifying prompt structure to encode fairness constraints, embedding contrastive counterfactual examples, and adjusting sampling parameters such as temperature and top-\(p\) to balance realism and diversity [2508.11810]. The reported generation parameters are temperature \(0.9\) for all datasets, top-\(p=1.0\) for COMPAS, top-\(p=0.95\) for LAW and MIMIC-IV, and max tokens sized to fit the feature counts within the GPT-4o context window [2508.11810].

Fairness-aware data curation is a central component rather than a preprocessing footnote. Representative exemplars are selected to cover minority groups, address class imbalance by sampling across labels, and discourage memorization. In practice, the paper reports shifts such as reducing the majority race in COMPAS from \(60.2\%\) to \(53.9\%\), pushing LAW toward approximately \(1/8\) per race class, and balancing race and gender in MIMIC [2508.11810]. This suggests that FairTabGen uses prompt conditioning and exemplar composition as operational levers for fairness control, rather than depending on a formal multi-objective optimizer.

## 4. Experimental protocol and reported empirical behavior

The experimental setup uses three datasets: COMPAS with \(5{,}278\) original rows and \(1{,}000\) synthetic rows, LAW with \(21{,}311\) original rows and \(1{,}000\) synthetic rows, and MIMIC-IV with \(418{,}640\) original rows and \(3{,}400\) synthetic rows [2508.11810]. Models are trained with a mixed training strategy on a combination of real and synthetic data and evaluated on a held-out real test set. Experiments are repeated five times with different random seeds, and fairness metrics are reported as mean \(\pm\) SD [2508.11810].

The evaluation pipeline reports precision, recall, and AUROC for XGBoost as the primary downstream model, while also training Decision Tree, Logistic Regression, Random Forest, and SVM. Causal fairness metrics are computed after training XGBoost models; the table caption notes “XGBoost with the TS-TS method,” but the paper does not elaborate on TS-TS [2508.11810]. Statistical similarity is assessed qualitatively through distributional comparisons rather than formal KS tests or Wasserstein distances, and privacy risk metrics are not reported [2508.11810].

On counterfactual fairness, FairTabGen records a DP of \(0.054 \pm 0.034\) on COMPAS, compared with \(0.202 \pm 0.012\) for real data, \(0.073 \pm 0.021\) for DECAF, and \(0.107 \pm 0.063\) for CLLM; its FTU on COMPAS is \(0.083 \pm 0.020\), compared with \(0.152 \pm 0.023\) for real data and \(0.051 \pm 0.022\) for CLLM [2508.11810]. On LAW, FTU is \(0.010 \pm 0.020\), matching the real-data level of \(0.010 \pm 0.001\), while DP is \(0.058 \pm 0.022\), lower than the real-data value of \(0.074 \pm 0.007\) and much lower than CLLM’s \(0.139 \pm 0.079\) [2508.11810]. On MIMIC, DP reaches \(0.001 \pm 0.005\), compared with \(0.065 \pm 0.013\) for real data, \(0.080 \pm 0.003\) for DECAF, and \(0.024 \pm 0.001\) for CLLM; FTU is \(0.025 \pm 0.003\), lower than the real-data value of \(0.042 \pm 0.003\) [2508.11810].

On causal fairness, the reported trend is that FairTabGen’s effects are generally closer to zero. For COMPAS, TV is \(0.0951 \pm 0.1102\), compared with \(0.2199 \pm 0.0364\) for real data and \(0.1813 \pm 0.106\) for CLLM, while SE is \(-0.0165 \pm 0.0962\), compared with \(-0.0742 \pm 0.0341\) for real data and \(-0.1555 \pm 0.1002\) for CLLM [2508.11810]. For LAW, TV is \(0.0494 \pm 0.0865\), DE is \(-0.0196 \pm 0.0279\), IE is \(-0.0519 \pm 0.0611\), and SE is \(-0.0170 \pm 0.0653\), with the paper characterizing these as improvements over real data and CLLM [2508.11810]. For MIMIC-IV, TV is \(0.0072 \pm 0.0612\), compared with \(0.0147 \pm 0.0215\) for real data and \(0.0508 \pm 0.0508\) for CLLM, and SE is \(-0.0023 \pm 0.06\), compared with \(0.0027 \pm 0.0207\) for real data and \(0.0108 \pm 0.0426\) for CLLM [2508.11810].

Utility results are mixed but strong in several regimes. On COMPAS, FairTabGen reports precision \(0.850\), recall \(0.829\), and AUROC \(0.933\), compared with CLLM’s \(0.881\), \(0.908\), and \(0.960\) and real-data XGBoost’s \(0.632\), \(0.577\), and \(0.700\) [2508.11810]. On LAW, it reports \(0.942\) precision, \(0.929\) recall, and \(0.983\) AUROC, exceeding the real-data AUROC of \(0.826\) and CLLM’s \(0.804\) [2508.11810]. On MIMIC, it reports \(0.905\) precision and \(0.969\) recall, but AUROC is \(0.644\), lower than the real-data value of \(0.853\) [2508.11810]. The paper itself highlights this as a trade-off case: fairness gains and recall improvements do not uniformly imply improvement in every utility metric.

## 5. Position within the fair tabular generation literature

FairTabGen is explicitly framed against both GAN-based and LLM-based tabular generators. The paper discusses CTGAN, TabDDPM, and REaLTabFormer in its introduction, and evaluates DECAF and CLLM as baselines [2508.11810]. Its main distinction is the unification of counterfactual fairness and causal fairness within both the generation and the evaluation pipelines, rather than optimizing only statistical fidelity or a single group-fairness criterion [2508.11810].

A useful contrast is with TabFairGAN, which is a two-phase WGAN-GP method for mixed-type tabular data that first learns the joint distribution and then adds a demographic parity penalty to the generator objective. TabFairGAN focuses on demographic parity through the discrimination score \(DS = P(y=1 \mid s=1) - P(y=1 \mid s=0)\), assumes binary sensitive attribute and binary label, and enforces fairness through adversarial training rather than prompt orchestration [2109.00666]. Relative to that design, FairTabGen moves fairness steering from generative model training to in-context learning, fairness-aware exemplar selection, prompt constraints, and evaluation-guided regeneration [2508.11810].

A later contrast is TABFAIRGDT, which uses autoregressive decision trees and a soft leaf resampling mechanism to reduce statistical parity difference at the target-generation step. That method is non-parametric, CPU-compatible, and enforces fairness only at target generation, with a reported focus on statistical parity rather than the combined counterfactual-and-causal treatment used in FairTabGen [2509.19927]. This suggests that FairTabGen occupies the LLM-centric end of the fair tabular synthesis spectrum, whereas TabFairGAN and TABFAIRGDT represent adversarial and tree-based alternatives, respectively.

The comparison also clarifies a common misconception: fair synthetic data generation is not a single design pattern. FairTabGen does not share TabFairGAN’s fairness loss or TABFAIRGDT’s leaf-level relabeling logic. Its novelty lies in the integration of fairness definitions into prompt construction, exemplar curation, iterative feedback, and causal-path evaluation, all within a general LLM-driven pipeline [2508.11810].

## 6. Assumptions, limitations, and practical use

FairTabGen has several explicit assumptions and limitations. It assumes that observed confounders are sufficient, does not model unobserved confounding, and does not perform sensitivity analysis for PSE identification [2508.11810]. It does not consider process-level fairness or decision-maker dynamics, handles a single sensitive attribute at a time, and does not cover intersectional or multi-attribute fairness [2508.11810]. The paper also acknowledges that fairness improvements can shift distributions and that utility may trade off in certain metrics, with MIMIC AUROC providing an example [2508.11810].

The causal claims are therefore operational rather than fully identified. The framework references causal fairness models and computes TV, DE, IE, and SE from trained model predictions, but it does not provide identification formulae or DAG structures with explicit functional forms [2508.11810]. A plausible implication is that FairTabGen should be read as a causally informed fairness pipeline rather than a full SCM identification framework.

The paper provides concrete guidance for application. The recommended sequence is to define metadata by identifying \(X\), \(Z\), \(Y\), and \(W\); curate \(40\)–\(200\) representative ICL examples covering minority groups and label classes; construct prompts with system role, SCM context, schema headers, examples, and fairness or utility constraints; generate synthetic batches with GPT-4o using temperature approximately \(0.9\) and tuned top-\(p\); evaluate using downstream models on real holdout data together with DP, FTU, TV, DE, IE, and SE; refine prompts by adjusting targeted group proportions or adding counterfactual exemplars; and optionally apply post-processing methods such as Reweighing (RW), Correlation Remover (CoR), Disparate Impact Remover (DIR), or Suppression (SUP) [2508.11810].

The ablation findings indicate that FairTabGen combined with RW often yields the highest fairness scores in COMPAS and LAW and performs strongly across all algorithms in MIMIC [2508.11810]. The paper interprets this as evidence that fairness-aware synthetic data can amplify the efficacy of downstream mitigation relative to real-only training. In that sense, FairTabGen is not merely a generator; it is a modular fairness intervention layer for synthetic tabular workflows in which prompt design, structural role assignment, and iterative evaluation are treated as the main control surfaces.

Source: https://www.emergentmind.com/topics/fairtabgen