Inferensys

Glossary

Train-on-Real Test-on-Synthetic (TRTS)

Train-on-Real Test-on-Synthetic (TRTS) is an evaluation protocol that assesses the fidelity of synthetic data by training a model on real data and measuring its performance degradation when evaluated on the synthetic dataset.
Data scientist building training data pipeline on laptop, data preprocessing visible, technical workspace.
SYNTHETIC DATA VALIDATION

What is Train-on-Real Test-on-Synthetic (TRTS)?

A core evaluation protocol for assessing the statistical fidelity of generated datasets.

Train-on-Real Test-on-Synthetic (TRTS) is an evaluation protocol that measures the fidelity of a synthetic dataset by training a model on real data and then assessing its performance degradation when evaluated on the synthetic data. A minimal drop in performance indicates the synthetic data has high statistical similarity to the real data's distribution. This method is a direct two-sample test for distributional alignment, contrasting with utility-focused protocols like Train-on-Synthetic Test-on-Real (TSTR).

The TRTS protocol is a critical component of a synthetic data validation pipeline. It operates on the principle that a model trained on the true distribution (real data) should perform well on a high-fidelity approximation of it (synthetic data). A significant performance drop signals a distribution shift, suggesting issues with the generative model, such as mode collapse or poor support coverage. This makes TRTS a fundamental check for data plausibility before downstream use.

SYNTHETIC DATA VALIDATION

Key Characteristics of TRTS

Train-on-Real Test-on-Synthetic (TRTS) is a core protocol for assessing the fidelity of a synthetic dataset. It measures how well a model, trained to understand the real world, recognizes and performs on the artificial one.

01

Core Protocol & Rationale

TRTS is a fidelity assessment protocol, not a utility test. The core premise is that a model trained on real data has learned the true data manifold. If the synthetic data is a high-fidelity replica, this model should perform well on it. A significant performance drop indicates the synthetic data has distributional shift or lacks key statistical properties captured by the real-trained model.

  • Primary Goal: Quantify how well synthetic data mimics the statistical essence of real data.
  • Contrast with TSTR: TRTS tests fidelity; Train-on-Synthetic Test-on-Real (TSTR) tests utility.
  • Interpretation: High TRTS performance suggests the synthetic data's feature space aligns with reality, a prerequisite for downstream training tasks.
02

Implementation & Metrics

The protocol requires three datasets: a real training set (R_train), a real test set (R_test) for baseline, and the synthetic test set (S_test).

  1. Train Classifier: A model (e.g., a ResNet for images, XGBoost for tabular data) is trained on R_train.
  2. Establish Baseline: Evaluate the model on R_test to get the real-world performance ceiling (e.g., 95% accuracy).
  3. Synthetic Evaluation: Evaluate the same, frozen model on S_test.

Key Metrics:

  • Performance Gap: The absolute difference in accuracy/F1-score/AUC between R_test and S_test.
  • Relative Performance: S_test performance as a percentage of R_test performance (e.g., 92% of real performance).
  • Per-Class Analysis: Breakdown of performance gap across different classes or segments to identify where synthesis fails.
03

Strengths and Advantages

TRTS provides a direct, model-based measure of distributional similarity that is often more sensitive than pure statistical tests.

  • Model as a Distributional Probe: Leverages the model's learned representation, which can capture complex, high-order statistical relationships that simple moment-matching misses.
  • Task-Relevant Fidelity: Measures fidelity in the context of a specific modeling task (e.g., classification), which is often the end goal of the data.
  • Interpretable Output: A percentage or score gap is easily communicated and tracked over time.
  • Detects Subtle Flaws: Can reveal issues like semantic corruption (an image looks right to a human but the classifier fails) or covariate shift that simpler metrics might not catch.
04

Limitations and Caveats

TRTS is a powerful tool but must be applied with an understanding of its constraints.

  • Dependence on Base Model Quality: If the model trained on R_train is poor or underfitted, the TRTS metric becomes unreliable.
  • Not a Measure of Diversity: A model could score highly on TRTS even if the synthetic data suffers from mode collapse, as long as the collapsed modes are perfectly replicated.
  • Task Specificity: A good TRTS score for one task (e.g., object classification) does not guarantee fidelity for another (e.g., object segmentation).
  • Baseline Requirement: Requires a held-out real test set (R_test), which consumes valuable real data that could otherwise be used for training.
05

Complementary Metrics in a Validation Suite

TRTS should never be used in isolation. A robust synthetic data validation pipeline combines it with other metrics to form a complete picture.

  • Pair with TSTR: While TRTS measures fidelity, Train-on-Synthetic Test-on-Real (TSTR) measures utility. The ideal dataset scores highly on both.
  • Statistical Metrics: Use Fréchet Inception Distance (FID), Kernel Inception Distance (KID), or Maximum Mean Discrepancy (MMD) to measure distributional overlap directly.
  • Diversity Metrics: Use Precision and Recall for Distributions (P&R) to ensure the synthetic data covers the real distribution (recall) without generating outliers (precision).
  • Visual Inspection: t-SNE visualizations remain crucial for human-in-the-loop spotting of global clustering issues.
06

Example: Validating Synthetic Medical Images

Consider generating synthetic chest X-rays to augment a dataset for detecting pneumonia.

  1. Real Data: 10,000 labeled real X-rays (R_train=8,000, R_test=2,000).
  2. Synthetic Data: Generator produces 20,000 synthetic X-rays (S_test).
  3. TRTS Execution:
    • Train a DenseNet classifier on the 8,000 real images.
    • Baseline AUC on R_test: 0.96.
    • AUC on S_test: 0.92.
  4. Interpretation: The TRTS performance gap is 0.04 (or 96% of real performance). This indicates high fidelity. However, a per-class analysis might reveal the model struggles more with synthetic "pneumonia" images, prompting a review of the conditional generation for that class. This finding would be correlated with TSTR results and FID scores for a full assessment.
SYNTHETIC DATA VALIDATION

TRTS vs. TSTR: Complementary Evaluation Protocols

A comparison of the two primary, complementary protocols for evaluating synthetic data quality, focusing on their objectives, methodologies, and typical use cases.

Evaluation DimensionTrain-on-Real Test-on-Synthetic (TRTS)Train-on-Synthetic Test-on-Real (TSTR)

Primary Objective

Assess the fidelity and statistical similarity of the synthetic data to the real data.

Assess the utility and downstream task performance of the synthetic data for model training.

Core Question Answered

"How realistic is the synthetic data?" (Does it look like the real data?)

"How useful is the synthetic data?" (Can a model trained on it solve real problems?)

Protocol Summary

A diagnostic model is trained on the real dataset. Its performance drop when evaluated on the synthetic dataset indicates a distribution gap.

A task model is trained entirely on the synthetic dataset. Its performance on a held-out real test set measures the synthetic data's practical utility.

Typical Metric

Degradation in accuracy, F1-score, or AUC of the diagnostic model when moving from a real to a synthetic test set.

Accuracy, F1-score, or AUC of the task model on the real-world test set.

Key Strength

Directly measures distributional similarity and data fidelity. Sensitive to subtle statistical differences.

Directly measures the end-goal: the synthetic data's ability to train performant models. The ultimate validation for many use cases.

Key Limitation

A high-fidelity score does not guarantee the synthetic data is useful for training; it may lack the necessary complexity or diversity.

Good utility does not guarantee perfect fidelity; a model may learn to perform well on a task even from somewhat biased or simplified data.

Primary Use Case

Diagnosing the quality of a generative model's output during development. Answering: "Is my synthetic data realistic?"

Validating synthetic data for production use in model training pipelines. Answering: "Can I safely train my model on this synthetic data?"

Interpretation of Good Result

Minimal performance drop (e.g., < 2-5% relative decrease) indicates high synthetic data fidelity.

Performance comparable to a model trained on real data (e.g., within 1-3% absolute difference) indicates high synthetic data utility.

Complementary Relationship

Used alongside TSTR to ensure synthetic data is both realistic (TRTS) and useful (TSTR). A comprehensive validation suite requires both.

TRAIN-ON-REAL TEST-ON-SYNTHETIC (TRTS)

Frequently Asked Questions

Train-on-Real Test-on-Synthetic (TRTS) is a core evaluation protocol in synthetic data validation. It directly measures the statistical fidelity of a generated dataset by assessing how well it mimics the real-world data distribution. This FAQ addresses its methodology, interpretation, and role within a comprehensive validation pipeline.

Train-on-Real Test-on-Synthetic (TRTS) is an evaluation protocol that assesses the fidelity of a synthetic dataset by training a predictive model on a real dataset and then measuring its performance degradation when evaluated on the synthetic holdout set. The core premise is that a model trained on the real data distribution should perform similarly on high-fidelity synthetic data from the same distribution. A significant performance drop indicates a distributional shift, revealing that the synthetic data lacks the essential statistical properties of the real data. TRTS is a direct, task-oriented metric that moves beyond simple statistical tests to evaluate how the data 'behaves' in a realistic machine learning workflow.

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.