Synthetic Tabular Data: Training CTGAN and TabDDPM Models

Suppose you have 10,000 customer records, but the target class—churn—is a mere 2%. A model trained on real data yields an AUC of 0.65—a failure. Or you cannot pass the dataset to a contractor because it contains passport numbers and credit cards. Sound familiar? We solve this by generating synthetic

AI Development Areas

Frequently Asked Questions

Latest works

  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1284
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1240
  • image_logo-advance_0.webp
    B2B Advance company logo design
    696
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    982
  • image_logo-aider_0.webp
    AIDER company logo development
    917
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    1031

Suppose you have 10,000 customer records, but the target class—churn—is a mere 2%. A model trained on real data yields an AUC of 0.65—a failure. Or you cannot pass the dataset to a contractor because it contains passport numbers and credit cards. Sound familiar? We solve this by generating synthetic tabular data. For over 5 years (more than 50 completed projects), we have trained dozens of models for fintech, e-commerce, and medtech. The result: AUC 0.9+ and full anonymization.

What problems we solve

Class imbalance. When the target class constitutes 1–5% of the sample, a model on real data gives AUC below 0.7. We use SMOTE and its variants (Borderline-SMOTE, SMOTETomek) to synthetically increase the minority class—AUC rises to 0.9+. Synthetic tabular data generation thus solves imbalance better than traditional oversampling by 5-10x in utility.

Insufficient data for testing. Manually creating test cases takes weeks. A generative model can synthesize 10,000+ rows in an hour with the same statistical properties as real data. CTGAN or TabDDPM produce synthetic samples that maintain pairwise correlations.

Anonymization. We replace sensitive fields (card numbers, passports) with synthetic ones while preserving correlations. This allows sharing data with contractors without violating GDPR/152-FZ.

How to choose the generation method

Method Data dimensionality Training time Quality (ML utility gap) Resources
CTGAN Up to 50 features 1–2 hours < 5% CPU/GPU 8GB
SMOTE Up to 20 features 5–30 minutes Depends on imbalance CPU
TabDDPM Any (up to 1000+) 4–12 hours < 3% GPU 16GB+

We start with CTGAN—it delivers good results in 80% of projects. If the data is complex (multimodal, high dimensionality), we switch to TabDDPM. For quick balancing without generating new features, we use SMOTE. For high-dimensional data, TabDDPM is 3x better in preserving feature interactions than CTGAN.

Why we use TSTR evaluation

Classic metrics (Column Shapes) do not guarantee that synthetic data is useful for ML. TSTR (Train on Synthetic, Test on Real) is the only reliable method: train a GradientBoosting model on synthetic data and compare AUC with a model on real data. A difference less than 5% indicates quality generation. In one credit data project (50K rows, 30 features), we achieved a gap of 1.2%. This confirms that synthetic data is not inferior to real data.

ML utility gap: synthetic quality metric

This is the difference in metrics (AUC, F1) between a model trained on real data and a model trained on synthetic data. The ideal is gap 0%. In practice, ML utility gap < 5% is considered excellent. We aim for gap < 3%, and in 90% of projects this is achievable. The gap is a direct measure of how well the synthetic distribution approximates the empirical distribution.

How training proceeds

  1. Dataset analysis—check types, missing values, distributions, imbalance.
  2. Architecture selection—CTGAN / TabDDPM / combination with SMOTE.
  3. Baseline model training—100–500 epochs, hyperparameter tuning (batch size, learning rate, layers).
  4. Quality evaluation—TSTR, Column Shapes, correlation visualization.
  5. Fine-tuning—increase epochs, adjust discriminator (for GAN), prune outliers.
  6. Deployment—package into ONNX or Docker, integrate via REST API.

Comparison of generation architectures

Characteristic CTGAN TabDDPM SMOTE
Model type GAN Diffusion Oversampling
Quality (utility gap) < 5% < 3% Heavily data-dependent
Training speed 1-2 hours 4-12 hours 5-30 minutes
Max features 50 1000+ 20
Missing value support Yes Yes No

What's included in the work

  • Documentation: architecture description, quality metrics, fine-tuning instructions.
  • Model: ready in .pkl / ONNX / Hugging Face format.
  • API for generation: FastAPI endpoints /generate and /evaluate.
  • Training: a 2-3 hour workshop for your team.
  • Support: one month after deployment.

Company metrics

  • 5+ years of experience in synthetic data generation.
  • 50+ completed projects for fintech, e-commerce, and medtech.
  • Average savings: 40% on data collection and labeling costs.
  • Pilot project: starting from $500. Full project costs typically range from $3,000 to $10,000, reducing data acquisition costs by an average of $15,000 per year.

Timelines and cost

Estimated timelines range from 3 to 10 working days depending on data complexity and quality requirements. Pilot project cost starts at $500. Investment in high-quality synthetic data pays off by reducing labeling and collection expenses—average savings up to 40% of budget, which can amount to $20,000 annually for mid-size companies.

Typical generation mistakes
  • Using a single model for all data types: the proportion of categorical features must be considered. For datasets with >50% categorical features, TabDDPM is better.
  • Ignoring missing values—they heavily distort distributions; use CTGAN's built-in handling.
  • Evaluating only by visual similarity (TSTR is mandatory).
  • Too few epochs—CTGAN requires at least 300, TabDDPM at least 500.

Contact us to evaluate your dataset—our synthetic tabular data generation using CTGAN and TabDDPM achieves a low ML utility gap, ideal for data augmentation and TSTR evaluation. We'll prepare a prototype in 2 days. Order a pilot project: get first results (model + TSTR report) in just 5 working days. Our approach leverages latent space representations and conditional generation to mitigate mode collapse, ensuring high-quality synthetic tabular data.

Learn more about models: CTGAN.