Synthetic data is a transformative tool for addressing data scarcity, privacy concerns, and algorithmic bias. However, the current software landscape is fragmented, with most tools being "one-off" implementations tied to specific research papers. This makes them difficult to extend, reuse, or compare across different real-world scenarios. Synthcity is a comprehensive open-source Python library designed to unify synthetic data generation and evaluation across diverse data modalities, including static tables, time series, and censored survival data.
The Problem: Fragmentation and Complexity
Real-world data is rarely just a simple static table. It often involves complex temporal patterns (time series), missingness, or "censoring"—a common occurrence in medical survival data where the event of interest might not have occurred for all subjects during a study. Most existing libraries lack the breadth to handle these diverse modalities or the specialized evaluation metrics needed to ensure synthetic data is not only realistic but also fair and private. Synthcity aims to be the "one-stop-shop" that bridges the gap between cutting-edge research and practical application.
The Synthcity Framework
The authors propose a modular, three-pillar workflow that facilitates the entire lifecycle of synthetic data generation:
- DataLoader: A consistent interface for ingestion that handles metadata (e.g., identifying sensitive features or outcome targets) and various observation patterns (static, regular/irregular time series).
- Plugins (Generators): Instead of a monolithic structure, Synthcity uses a plugin system for algorithms. This includes a massive library of generators ranging from Deep Learning (GANs like CTGAN and TimeGAN, VAEs, and Normalizing Flows) to traditional methods like Bayesian Networks and mixture models. It also includes specialized models for causal fairness (DECAF) and differential privacy (PATEGAN, DPGAN).
- Metrics (Evaluation): A standardized suite to evaluate three critical aspects:
- Fidelity: How closely the synthetic distribution matches the real one (e.g., Jensen-Shannon distance).
- Utility: How well a model trained on synthetic data performs on real-world tasks ("train-on-synthetic, test-on-real").
- Privacy: Resistance to attacks like re-identification or membership inference.
Supported Data Modalities
Synthcity treats complex data types as first-class citizens. Its capabilities extend across:
- Static Tabular Data: Standard snapshots of data.
- Time Series: Both regular intervals and irregular "longitudinal" data.
- Censored Data: Survival data where outcomes are partially observed.
- Composite/Multi-source Data: Datasets combined from different domains or sources.
Key Insights and Results
A core philosophy of Synthcity is that "tabular data" is a broad umbrella. By supporting time series and censored data natively, the library addresses the needs of complex industries like healthcare and finance. Furthermore, the library emphasizes that there is no "silver bullet" algorithm; deep generative models excel at large datasets, while simpler Bayesian models may thrive on smaller tables. Synthcity’s architecture allows users to swap and benchmark these easily.
Qualitative comparisons show that Synthcity significantly outpaces other popular libraries (such as SDV, Gretel, and YData) in terms of supported modalities and use cases. It is currently the only library among those compared to support irregular time series and censored features natively. With over 20 evaluation metrics, it provides a granular look at the trade-offs between data utility, fairness, and privacy.
Conclusion and Future Work
While Synthcity provides a robust foundation, it currently does not natively support training on data with missing values, requiring external imputation (e.g., via HyperImpute). Future work involves expanding into unstructured data modalities like images or raw text and continuing to refine the API based on community feedback. As an evolving open-source project, Synthcity represents a significant step toward making high-quality, private, and fair synthetic data accessible to the broader research community.
Summary updated