Inferensys

Glossary

Train on Synthetic, Test on Real (TSTR)

Train on Synthetic, Test on Real (TSTR) is an evaluation protocol for synthetic tabular data where a model is trained on the generated dataset and its performance is evaluated on a held-out set of real data to measure the utility of the synthetic data for downstream tasks.
ML engineer working on model compression and quantization, laptop showing performance benchmarks, technical workspace.
EVALUATION PROTOCOL

What is Train on Synthetic, Test on Real (TSTR)?

A core methodology for assessing the utility of synthetically generated tabular data for downstream machine learning tasks.

Train on Synthetic, Test on Real (TSTR) is an evaluation protocol that measures the utility of a synthetic dataset by training a predictive model on it and then testing that model's performance on a held-out set of real data. The core hypothesis is that if a model trained on synthetic data performs nearly as well on real data as a model trained directly on real data, the synthetic data has successfully captured the essential statistical patterns and relationships of the original dataset. This protocol is a direct, task-oriented alternative to purely statistical similarity metrics.

The TSTR protocol is considered the gold standard for utility evaluation in synthetic data generation because it directly answers the practitioner's key question: "Can I use this synthetic data to build a model that works in the real world?" A successful TSTR result indicates the synthetic data preserves the machine learning signal necessary for the target task, such as classification or regression. It is often contrasted with the Train on Real, Test on Real (TRTR) baseline, which establishes the performance ceiling using the original data.

EVALUATION PROTOCOL

Key Characteristics of TSTR

Train on Synthetic, Test on Real (TSTR) is the primary evaluation protocol for assessing the utility of synthetic tabular data. It measures how well a model trained on artificial data performs on a held-out set of real-world data.

01

Core Protocol & Purpose

The TSTR protocol is a direct, task-oriented evaluation method. Its primary purpose is to answer a critical question: Can a model trained on synthetic data solve real-world problems as effectively as one trained on real data?

  • Procedure: A machine learning model (e.g., a classifier or regressor) is trained exclusively on the synthetic dataset. Its performance is then evaluated on a completely separate, unseen test set composed of real data.
  • Objective: To quantify the downstream utility and statistical fidelity of the synthetic data. High TSTR performance indicates the synthetic data has preserved the predictive relationships necessary for the target task.
02

Comparison to TRTR

TSTR is almost always benchmarked against the Train on Real, Test on Real (TRTR) baseline, which represents the performance ceiling using the original data.

  • TRTR Baseline: A model is trained on a subset of the real data and tested on the held-out real test set. This establishes the optimal achievable performance.
  • Interpretation Gap: The performance difference between TRTR and TSTR scores reveals the utility gap. A small gap indicates high-fidelity synthesis.
  • Critical Insight: A synthetic dataset achieving perfect statistical similarity scores might still fail the TSTR test if it hasn't captured subtle, task-relevant correlations, making TSTR a more pragmatic metric than distribution distance alone.
03

Primary Use Cases & Applications

TSTR evaluation is essential in scenarios where synthetic data is intended for direct model training.

  • Privacy-Preserving ML: Validating that synthetic data generated under differential privacy constraints retains utility for building accurate models.
  • Data Augmentation for Imbalanced Classes: Assessing whether synthetic oversampling techniques (e.g., SMOTE, CTGAN) improve model performance on minority classes without degrading overall accuracy.
  • Pre-training and Domain Adaptation: Evaluating if synthetic data can effectively pre-train a model before fine-tuning on limited real data, reducing data acquisition costs.
  • Benchmarking Generative Models: Providing a concrete, application-driven metric to compare different tabular generative models (e.g., TVAE vs. TabDDPM).
04

Key Evaluation Metrics

The choice of metric in a TSTR evaluation is dictated by the downstream machine learning task.

  • Classification Tasks: Use Accuracy, F1-Score, Precision-Recall AUC, or ROC-AUC.
  • Regression Tasks: Use Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), or R-squared.
  • Statistical Comparison: The TSTR metric is reported alongside the TRTR baseline. The relative percentage drop (e.g., "TSTR accuracy within 2% of TRTR") is a common summary.
  • Multi-Metric Analysis: It's often necessary to evaluate performance across different data subgroups (e.g., per-class accuracy) to ensure the synthetic data hasn't introduced or amplified biases.
05

Limitations and Considerations

While crucial, TSTR has limitations that must be accounted for in a robust evaluation framework.

  • Task Dependency: TSTR results are specific to the model architecture and task used for evaluation. A dataset that performs well for a logistic regression task may fail for a gradient boosting model.
  • Does Not Guarantee Privacy: A successful TSTR outcome measures utility, not privacy. A synthetic dataset must be separately evaluated for privacy leakage using metrics like membership inference attack resilience.
  • Held-Out Real Data Requirement: The protocol requires a reserved set of real data, which can be problematic when real data is extremely scarce.
  • May Miss Multi-Task Utility: A single task evaluation might not capture all relational properties needed for other unforeseen downstream uses.
06

Complementary Evaluation Methods

TSTR should be part of a comprehensive validation suite, not used in isolation.

  • Train on Synthetic, Test on Synthetic (TSTS): A sanity check to ensure a model can learn from the synthetic data itself.
  • Statistical Fidelity Tests: Measures like Wasserstein Distance, Kolmogorov-Smirnov tests, and correlation matrix similarity assess low-order moment matching.
  • Discriminative Evaluation: Training a model to distinguish between real and synthetic samples (e.g., using a post-hoc classifier). A high classification accuracy indicates the synthetic data is easily distinguishable, suggesting poor fidelity.
  • Privacy Audits: Conducting membership inference or attribute inference attacks on the synthetic data to quantify privacy risk.

A robust synthetic data pipeline will report TSTR alongside these other metrics to provide a complete picture of quality, utility, and safety.

EVALUATION METHODOLOGY

How the TSTR Protocol Works

Train on Synthetic, Test on Real (TSTR) is the primary quantitative protocol for assessing the utility of generated tabular data in downstream machine learning tasks.

Train on Synthetic, Test on Real (TSTR) is an evaluation protocol where a predictive model is trained exclusively on a synthetically generated dataset, and its performance is then measured on a held-out set of real, unseen data. This direct comparison quantifies how well the statistical fidelity and machine learning utility of the synthetic data preserve the actionable patterns of the original dataset. A successful TSTR evaluation shows that models trained on synthetic data generalize effectively to real-world scenarios, validating the synthetic data's quality for tasks like classification or regression.

The protocol's strength lies in its task-oriented realism, directly measuring the synthetic data's value for actual model development. It contrasts with the Train on Real, Test on Real (TRTR) baseline and the less common Train on Synthetic, Test on Synthetic (TSTS) variant. Key metrics include accuracy, F1-score, or AUC-ROC, with performance close to the TRTR baseline indicating high utility. TSTR is essential for proving synthetic data can overcome data scarcity, privacy constraints, and class imbalance without compromising model efficacy.

SYNTHETIC DATA VALIDATION

TSTR vs. Other Evaluation Methods

A comparison of evaluation protocols for assessing the utility and fidelity of synthetic tabular data.

Evaluation ProtocolCore ObjectiveData UsagePrimary MetricKey Limitation

Train on Synthetic, Test on Real (TSTR)

Measure downstream task utility

Train: Synthetic, Test: Held-out Real

Task Performance (e.g., F1, AUC)

Requires a labeled real test set

Train on Real, Test on Real (TRTR) - Baseline

Establish real data performance ceiling

Train: Real, Test: Held-out Real

Task Performance (e.g., F1, AUC)

Does not evaluate synthetic data

Train on Synthetic, Test on Synthetic (TSTS)

Assess internal consistency of synthetic data

Train: Synthetic, Test: Synthetic

Task Performance (e.g., F1, AUC)

Does not measure real-world generalization

Statistical Similarity Tests

Measure distributional fidelity

Full Synthetic vs. Full Real

Wasserstein Distance, KS Test

May not correlate with model utility

Discriminator-based Evaluation

Assess indistinguishability

Mixed Synthetic & Real

Discriminator Accuracy

Adversarial training can be unstable

Privacy Attack Evaluation

Measure privacy leakage risk

Synthetic & Real (Attacker Access)

Attack Success Rate (e.g., MIA)

Evaluates risk, not utility

TRAIN ON SYNTHETIC, TEST ON REAL (TSTR)

Frequently Asked Questions

The Train on Synthetic, Test on Real (TSTR) protocol is the definitive benchmark for evaluating the utility of generated tabular data. These questions address its core mechanics, applications, and how it compares to other validation methods.

Train on Synthetic, Test on Real (TSTR) is an evaluation protocol that measures the utility of a synthetic dataset by training a downstream machine learning model on the generated data and then assessing its performance on a held-out set of real data.

This methodology directly answers the primary question for data scientists: "If I use this synthetic data to build a model, will it perform well on real-world tasks?" The core metric is the performance gap between a model trained on synthetic data and a baseline model trained directly on the real training set. A small gap indicates high-fidelity synthetic data that has preserved the statistical patterns necessary for the target task. TSTR is the gold standard for utility assessment because it evaluates the synthetic data through the lens of its intended use case, such as classification accuracy or regression error, rather than abstract statistical similarity.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.