Exploring the Current Landscape of Synthetic Medical Record Generation with Commercial LLMs

Yihan Lin, Zhirong Yu, Simon Austin LeeCHIL 2025

TL;DR

This paper investigates the capabilities of commercial Large Language Models (LLMs) in generating synthetic Electronic Health Records (EHRs). The key finding is that while LLMs excel at creating synthetic data for a limited number of features, their performance significantly degrades as the dimensionality of the data increases, hindering their ability to generalize across different healthcare settings.

What Problem Does This Paper Address?

Synthetic Electronic Health Records (EHRs) are highly desirable for healthcare research and development. They offer a way to create privacy-preserving, harmonized datasets that can improve fairness, representation, and enable data sharing without privacy concerns. LLMs have emerged as a promising tool for generating this synthetic data. However, a major challenge in healthcare data is ensuring that synthetic records generated from one source can reliably generalize to data from different hospitals or healthcare systems. This paper aims to evaluate how well current commercial LLMs can generate synthetic EHRs that overcome this generalization challenge, particularly as the complexity (dimensionality) of the data increases.

Methods

The authors explore four main LLM-based strategies for generating synthetic EHRs:

  • Naive Generation: The LLM is given a sample of real data and asked to generate new records without explicit instructions on structure or constraints, aiming to mimic the observed properties.
  • Schema-Constrained Generation: The LLM is provided with explicit instructions and constraints based on the data schema (data types, relationships) to ensure logical consistency and structural fidelity.
  • Conditional Generation: This approach involves sequentially generating features, where each new feature is conditioned on the previously generated ones. This aims to capture dynamic dependencies and realistic clinical relationships (e.g., age influencing heart rate).
  • Group-Based Generation: This strategy conditions the generation process on demographic subgroups (e.g., race, gender). The goal is to capture group-specific patterns and ensure more granular realism within each subgroup.

The generated synthetic data is then evaluated using an XGBoost model for a prediction task (ICU mortality). Performance is measured by AUC and AUPRC, and data fidelity is assessed using KL divergence. Privacy is evaluated using Membership Inference Attacks (MIAs).

Datasets

The primary dataset used for this study is the eICU Collaborative Research Database (Pollard et al., 2018). This is a multi-center dataset containing deidentified health data from over 200,000 ICU admissions in the United States between 2014 and 2015. The eICU dataset is used for both training the LLMs (implicitly, through their pre-training and fine-tuning on similar data) and for evaluating the generalizability of the generated synthetic data.

Key Insights and Ideas

  • The "Sweet Spot" for Dimensionality: The study found that LLMs perform best when generating synthetic data for a limited number of features (around 10). This suggests a critical balance between providing enough information for meaningful patterns and overwhelming the model with complexity.
  • Dimensionality is the Enemy of Generalization: As the number of features increases beyond this sweet spot, the LLMs struggle significantly. This leads to a degradation in model performance and a decrease in the fidelity of the synthetic data, making it less useful for downstream tasks.
  • Conditional and Group-Based Strategies Offer Improvements: While naive generation is a baseline, schema-constrained, conditional, and group-based generation strategies generally lead to better synthetic data quality, particularly in terms of fidelity and fairness. Group-based generation, in particular, showed promise for capturing demographic-specific patterns.
  • Privacy Trade-off with Dimensionality: Higher-dimensional synthetic datasets, while potentially richer, also become more vulnerable to privacy attacks like Membership Inference Attacks. This highlights a crucial trade-off between data complexity and privacy guarantees.
  • LLMs Struggle with Complex Inter-Feature Relationships at Scale: The core challenge appears to be the LLMs' difficulty in accurately capturing and preserving the intricate, non-linear dependencies between a large number of features in high-dimensional EHR data.

Key Results

  • Performance Degradation with Features: When generating synthetic data for all 83 features, the AUC scores for predicting ICU mortality dropped significantly compared to using only 10 features. For example, AUC across datasets decreased from around 0.81 for 10 features to 0.53 for 20 features.
  • KL Divergence Increases with Dimensionality: Average KL divergence, a measure of how well synthetic data matches real data distributions, increased substantially as the number of features grew, indicating a loss of fidelity.
  • Group-Based Generation Yields Lower KL Divergence: The group-based generation strategy consistently resulted in lower KL divergence values across various demographic groups compared to the naive approach, suggesting better alignment with underlying distributions.
  • Privacy Preservation at Lower Dimensionality: For datasets with 5 and 10 features, Membership Inference Attacks showed limited effectiveness, indicating strong privacy preservation. However, this effectiveness increased significantly with higher dimensionality.
  • Sample Size Benefits Performance: Increasing the sample size for synthetic data generation (from 1,000 to 10,000) consistently improved performance metrics (AUC and AUPRC), suggesting better alignment with real data distributions.

Limitations and Future Work

  • Single Prediction Task: The study focused on predicting ICU mortality. Future work could explore other prediction tasks (e.g., length of stay, readmission) to assess the broader applicability of LLM-generated synthetic data.
  • Single Dataset: The evaluation was conducted using only the eICU dataset. Testing on other EHR databases (e.g., MIMIC-IV) is needed to evaluate generalizability across different healthcare systems and patient populations.
  • Temporal Aspects: The study did not extensively evaluate the capture of temporal patterns in EHR data. Future research should investigate whether generative models can capture time-series trends in laboratory values and vital signs.
  • Addressing High-Dimensionality: The primary limitation identified is the LLMs' struggle with high-dimensional data. Future research should focus on developing more sophisticated generative models capable of handling complex, high-dimensional dependencies without compromising data quality or privacy. This could involve exploring new architectures or advanced conditioning techniques.

Summary updated

BibTeX
@inproceedings{lin2025exploring,
  author = {Yihan Lin and Zhirong Yu and Simon Austin Lee},
  title = {{Exploring the Current Landscape of Synthetic Medical Record Generation with Commercial LLMs}},
  booktitle = {CHIL},
  year = {2025},
  url = {https://openreview.net/forum?id=e4DaNtDnMS},
}
Figure