SynTEG: A framework for temporal structured electronic health data simulation

Ziqi Zhang, Chao Yan, Thomas A. Lasko, Jimeng Sun, Bradley A. Malin

Research output: Contribution to journalArticlepeer-review


Objective: Simulating electronic health record data offers an opportunity to resolve the tension between data sharing and patient privacy. Recent techniques based on generative adversarial networks have shown promise but neglect the temporal aspect of healthcare. We introduce a generative framework for simulating the trajectory of patients' diagnoses and measures to evaluate utility and privacy. Materials and Methods: The framework simulates date-stamped diagnosis sequences based on a 2-stage process that 1) sequentially extracts temporal patterns from clinical visits and 2) generates synthetic data conditioned on the learned patterns. We designed 3 utility measures to characterize the extent to which the framework maintains feature correlations and temporal patterns in clinical events. We evaluated the framework with billing codes, represented as phenome-wide association study codes (phecodes), from over 500 000 Vanderbilt University Medical Center electronic health records. We further assessed the privacy risks based on membership inference and attribute disclosure attacks. Results: The simulated temporal sequences exhibited similar characteristics to real sequences on the utility measures. Notably, diagnosis prediction models based on real versus synthetic temporal data exhibited an average relative difference in area under the ROC curve of 1.6% with standard deviation of 3.8% for 1276 phecodes. Additionally, the relative difference in the mean occurrence age and time between visits were 4.9% and 4.2%, respectively. The privacy risks in synthetic data, with respect to the membership and attribute inference were negligible. Conclusion: This investigation indicates that temporal diagnosis code sequences can be simulated in a manner that provides utility and respects privacy.

Original languageEnglish (US)
Pages (from-to)596-604
Number of pages9
JournalJournal of the American Medical Informatics Association
Issue number3
StatePublished - Mar 1 2021


  • billing codes
  • electronic heath records (EHRs)
  • generative adversarial networks (GANs)
  • privacy
  • temporal simulation

ASJC Scopus subject areas

  • Health Informatics


Dive into the research topics of 'SynTEG: A framework for temporal structured electronic health data simulation'. Together they form a unique fingerprint.

Cite this