Source-linked AI summary
CTAB-GAN: Effective Table Data Synthesizing
Zilong Zhao, Aditya Kunar, Hiek Van der Scheer, Robert Birke, Lydia Y. Chen
TL;DR
Privacy concerns and regulation limit data sharing, while existing tabular generators do not adequately handle mixed variables and difficult distributions. CTAB-GAN uses a conditional GAN with specialized encoding, losses, and conditional vectors, and it achieves strong utility, similarity, and privacy results, including up to 17% accuracy improvement on complex datasets. However, extremely imbalanced mixed variables remain a limitation.
Problem
Privacy regulation constrains data sharing, and prior tabular generators inadequately model mixed variables, long tails, imbalanced categories, and skewed continuous distributions.
Method
CTAB-GAN combines a conditional GAN with classification and information losses, mixed-type encoding, conditional vectors, and log-frequency sampling.
Results
Up to 17% higher accuracy than state-of-the-art algorithms was achieved on complex datasets, alongside high utility, similarity, and reasonable privacy guarantees.
Takeaways & Limitations
CTAB-GAN demonstrates potential for data-sharing applications in banking, insurance, manufacturing, and telecommunications.
Takeaways & Limitations
For extremely imbalanced mixed variables, CTAB-GAN can amplify the dominant zero value and still has room for improvement.
Abstract
from arXiv · showhide
While data sharing is crucial for knowledge development, privacy concerns and strict regulation (e.g., European General Data Protection Regulation (GDPR)) unfortunately limit its full effectiveness. Synthetic tabular data emerges as an alternative to enable data sharing while fulfilling regulatory and privacy constraints. The state-of-the-art tabular data synthesizers draw methodologies from generative Adversarial Networks (GAN) and address two main data types in the industry, i.e., continuous and categorical. In this paper, we develop CTAB-GAN, a novel conditional table GAN architecture that can effectively model diverse data types, including a mix of continuous and categorical variables. Moreover, we address data imbalance and long-tail issues, i.e., certain variables have drastic frequency differences across large values. To achieve those aims, we first introduce the information loss and classification loss to the conditional GAN. Secondly, we design a novel conditional vector, which efficiently encodes the mixed data type and skewed distribution of data variable. We extensively evaluate CTAB-GAN with the state of the art GANs that generate synthetic tables, in terms of data similarity and analysis utility. The results on five datasets show that the synthetic data of CTAB-GAN remarkably resembles the real data for all three types of variables and results into higher accuracy for five machine learning algorithms, by up to 17%.
1 INTRODUCTION
CTAB-GAN is motivated by the need to share useful data under privacy constraints while modeling industrial tables with mixed types, long tails, and skewed distributions. It introduces conditional-GAN enhancements and is evaluated against existing tabular generators.
- Motivation: Privacy concerns and GDPR constrain data sharing, motivating synthetic data as a privacy-compatible alternative.Synthetic data is described as statistically resembling real data and potentially complying with GDPR because it is synthetic.
- Industrial data challenges: Industrial tables combine continuous, categorical, and mixed variables, including numeric values whose special meanings depend on categories.The Mortgage variable can be zero for no mortgage or a positive continuous amount, making it mixed.
- Industrial data challenges: Existing GAN-based generators struggle with mixed variables, long-tail distributions, and skewed multi-mode continuous variables.For Mortgage, prior methods generate values near zero rather than exact zero; for Hours-per-week, they lose modes relative to the original distribution.
- Proposed direction: CTAB-GAN adds classification loss and a novel conditional vector to address mixed data, long tails, imbalance, and skewed continuous variables.Its stated contributions also include a classifier for additional supervision and data encoding for continuous, categorical, and mixed variables.
- Evaluation: The evaluation covers machine-learning utility, statistical similarity, and privacy preservability on five datasets against four GAN-based tabular generators.The introduction reports that CTAB-GAN outperforms the comparisons in machine-learning utility and statistical similarity and provides better distance-based privacy guarantees than TableGAN.
2 RELATED STUDIES
Related studies extend GANs and conditional GANs to tabular data, but prior methods leave mixed variables and some distributional challenges insufficiently addressed. CTAB-GAN combines relevant prior mechanisms with new encoding and conditional-vector designs.
- GAN-based generators: GAN-based tabular generators extend GAN architectures to handle categorical or discrete data and have been applied to domains including electronic health records.Examples include MedGAN, which combines an auto-encoder with a GAN, and CrGAN-Cnet for airline passenger records.
- Conditional GAN-based generators: Conditional GAN-based methods use conditional vectors to control generated classes, with approaches targeting Wasserstein training, minority oversampling, and tabular structure.CW-GAN uses Wasserstein distance and conditional sampling, while CTGAN incorporates PacGAN and Gaussian-mixture-based treatment of continuous variables.
- CTAB-GAN: CTAB-GAN extends prior work by modeling mixed variables, addressing long-tail distributions, and combining classifiers, information loss, encoding, and conditional vectors.Its novelty is framed as combining strengths of prior art while introducing a new conditional-vector structure for difficult variable distributions.
3 CTAB-GAN
CTAB-GAN combines conditional generation with mixed-type encoding, auxiliary losses, and rebalancing strategies to model challenging tabular data. Its pipeline represents variable modes and classes explicitly while addressing long-tailed distributions.
- Architecture and objectives: CTAB-GAN combines a Mixed-type Encoder, conditional GAN, classification and information losses, and logarithmic frequency sampling.The encoder represents mixed variables and missing values; the added losses target semantic integrity and training stability, while sampling addresses imbalance.
- Architecture and objectives: The generator receives noise and a conditional vector, while discriminator and auxiliary classifier provide adversarial and semantic feedback.The classifier is trained on real data and evaluates reverse-transformed synthetic records for class-label predictions.
- Architecture and objectives: The information loss matches generated and real first-order and second-order statistics, while classification loss penalizes semantically inconsistent synthesized records.The classifier learns correlations between classes and other variable values from real training data.
- Mixed-type Encoder: Mixed variables are encoded as concatenated value-mode pairs, using Gaussian-mixture modes for continuous regions and one-hot representations for categorical values.Categorical values can include strings or missing values, which are mapped to numeric symbols or separate one-hot classes.
- Conditional vector and imbalance: The conditional vector concatenates mode and class one-hot encodings, selecting one mode or class and sampling it by logarithmic frequency to increase minority representation.During training, a variable is chosen uniformly, then a mode or class is sampled using the logarithm of its frequency-based probability.
- Long-tail variables: Log transformation compresses long-tail values toward the bulk, making them easier for the variational Gaussian mixture model to encode.This preprocessing is intended to help encode rare tail points that Gaussian mixtures otherwise handle poorly.
4 EXPERIMENTAL ANALYSIS
The evaluation compares CTAB-GAN with four GAN-based tabular generators across machine-learning utility, statistical similarity, and privacy preservability. Experiments use five datasets, repeated evaluations, and metrics tailored to categorical, continuous, mixed, correlation, and privacy properties.
- Experimental setup: Experiments compare CTAB-GAN with CTGAN, TableGAN, CWGAN, and MedGAN on five tabular datasets.The datasets are Adult, Covertype, Credit, Intrusion, and Loan.
- Evaluation dimensions: The evaluation measures machine-learning utility, statistical similarity, and privacy preservability.The first two assess whether synthetic data can proxy the original data, while the third examines nearest-neighbour distances.
- ML utility: ML utility trains models separately on real and synthetic training data and evaluates both on the real test set.The models include decision trees, linear SVM, random forests, multinomial logistic regression, and MLP; performance uses accuracy, F1-score, and AUC.
- Statistical similarity: JSD measures categorical-distribution differences, while Wasserstein distance measures continuous or mixed-variable distribution differences.Wasserstein distance is used because JSD was numerically unstable for continuous variables without distributional overlap.
- Statistical similarity: Pair-wise correlation differences evaluate whether feature interactions are preserved across continuous, categorical, and mixed variable pairs.Pearson correlation, Theil uncertainty, and correlation ratio are used for the three pair types.
- Privacy preservability: DCR and NNDR quantify privacy risk through distances between synthetic records and real neighbours.Higher DCR and NNDR indicate better privacy, and the 5th percentile provides a robust risk estimate.
4.3 Results analysis
CTAB-GAN performs strongly across utility, statistical similarity, and privacy comparisons, although performance varies by dataset. Its largest utility advantage appears on Intrusion, while TableGAN performs better on Loan.
- ML Utility: CTAB-GAN outperforms the compared methods in accuracy, F1-score, and AUC differences averaged across five datasets and three replications.Lower differences between real and synthetic data indicate better synthetic-data utility.
- ML Utility: 0.117 is CTAB-GAN’s AUC difference, down from 0.169 for the best state-of-the-art method.Figure 7 compares F1-score and AUC across five ML models for Covertype, Intrusion, and Loan.
- ML Utility: CTAB-GAN achieves 17% higher averaged accuracy than the second-best method on Intrusion across five machine-learning algorithms.Its advantage is attributed in the paper to Intrusion’s highly imbalanced categorical variables and three long-tail continuous variables.
- ML Utility: TableGAN is better than CTAB-GAN on Loan, although their difference is smaller than on Intrusion.The paper relates this result to Loan’s smaller size, fewer variables, and simpler continuous distributions.
- Statistical similarity: CTAB-GAN and CTGAN have similar categorical-variable JSD, within a 1% difference, and outperform the next-best TableGAN by at least 12.4%.The paper links this performance to conditional-vector design and log-frequency sampling.
- Statistical similarity: CTAB-GAN achieves an average WD of 1050, versus extreme values of 46257 and 238155 for other algorithms on continuous variables.The paper attributes the extreme values to generated values that become excessively large for long-tail variables.
- Privacy preservability: CTAB-GAN exceeds TableGAN by 10.3% on DCR and 4.6% on NNDR while maintaining higher ML utility and statistical similarity.TableGAN has the shortest real-to-synthetic distance, identified as the highest privacy risk.
4.4 Ablation analysis
The ablation study removes CTAB-GAN components individually and evaluates the resulting models on the same five datasets, algorithms, and evaluation flow. Component effects differ across datasets.
- Ablation design: The ablation study removes the classifier, information loss, or VGM and mode vector from CTAB-GAN one component at a time.Removing VGM and the mode vector replaces VGM with min-max normalization and uses simple one-hot categorical encoding.
- Ablation design: Ablation results are compared with the full CTAB-GAN baseline across five machine-learning algorithms, with three repetitions.The test datasets and evaluation flow match the main experiments.
- Component effects: Removing the classifier negatively affects every dataset except Credit.The classifier and its generator classification loss are the components removed in this ablation.
4.5 Further discussion
CTAB-GAN addresses mixed, long-tail, and skewed continuous-variable challenges, recovering long-tail structure particularly well while still overproducing dominant zero values in an extremely imbalanced mixed variable.
- Mixed data type variables: CTAB-GAN models mixed Mortgage values by generating explicit zero values.However, it amplifies zero-value dominance relative to the original Loan distribution.
- Mixed data type variables: Extremely imbalanced cases remain an area for improvement because CTAB-GAN can overproduce the dominant category.This limitation is observed despite log-frequency-based sampling of Gaussian mixture modes and categorical classes.
- Long tail distributions: CTAB-GAN recovers the real long-tail distribution of Credit’s Amount variable.The authors attribute this improvement over state-of-the-art methods to log-transform preprocessing.
- Skewed multi-mode continuous variables: CTAB-GAN better captures Adult’s skewed multi-mode Hours-per-week distribution than TableGAN, CWGAN, MedGAN, and CTGAN.The distribution contains a dominant peak at 40 alongside multiple side peaks.
5 CONCLUSION
CTAB-GAN is a conditional GAN-based tabular generator designed to model mixed, imbalanced, and complex-distribution variables for synthetic data sharing. Across broad evaluations, it achieves high utility and similarity with reasonable privacy preservation, including accuracy improvements of up to 17%.
- 5 CONCLUSION: CTAB-GAN advances tabular generation through classifier supervision, mixed-variable encoding, and novel conditional-vector construction.These design choices target mixed variables, imbalanced categorical variables, and continuous variables with complex distributions.
- 5 CONCLUSION: CTAB-GAN is evaluated against four tabular data generators using machine-learning utility, statistical similarity, and privacy-preservation metrics.Figure 8 highlights mixed type, long-tail distribution, and skewed-data challenges in industrial datasets.
- 5 CONCLUSION: Up to 17% accuracy improvement is reported on complex datasets compared with all state-of-the-art algorithms.The paper also reports high utility, high similarity, and reasonable privacy guarantee.
A.1 Introduction
The demo implements a synthetic tabular data generation pipeline as a lightweight local web application using Python and Flask.
- A.1 Introduction: The software demo runs as a local-server web application implemented with Python 3.7.* and Flask.Its functionality and usage are documented in the corresponding sections.
A.2 Functionality
The demo provides a lightweight synthetic-data generator and an evaluator that reports distributional, machine-learning utility, and privacy metrics.
- A.2 Functionality: The synthetic-data generator is cross-platform, lightweight, pip-installable, robust to missing values, and compatible with date formats.These features are presented as supporting usability in real-world scenarios.
- A.2 Functionality: The evaluator compares real and synthetic individual-column distributions through visual plots.These plots are shown in sub-figures A.1a and A.1b of Figure A.1.
- A.2 Functionality: The evaluation report includes synthetic-data machine-learning utility and privacy-preservability metrics.The tableevaluator2 library assists in generating the report.
A.3 Usage
The usage workflow runs the web application locally, supports training a new model or reusing an existing one, and guides dataset configuration and model training. After generation, users can download synthetic data, create a PDF report, and inspect visual distribution, utility, and privacy figures.
- Launching the application: The application is launched from the software package with a Python server and opened locally at http://127.0.0.1:5000/.Users first navigate to the package root, run the server command, and open the listed browser address.
- Selecting a model: Users can train a new model with a dataset or use an existing trained model.The workflow directs first-time users toward training and allows others to continue with an existing model.
- Configuring the dataset: Dataset setup includes uploading a CSV, reviewing automatically detected column types, and choosing columns for inclusion or exclusion.Detected data types can be adjusted before training.
- Training the model: Users specify None, Binary Classification, or Multi-class Classification, enter the number of epochs, and click “Train Model”.The instructions recommend leaving the problem type as None when uncertain.
- Reviewing outputs: Generated data can be downloaded as CSV and used to generate a PDF report, while figures compare generated and real distributions and summarize ML utility and privacy preservability.The report page redirects to the completed PDF, and the figures provide visual distribution, utility, and privacy views.