[Paper Review] PromptEHR: Conditional Electronic Healthcare Records Generation with Prompt Learning
PromptEHR proposes a conditional, text-to-text language model-based framework for generating realistic, multimodal longitudinal electronic healthcare records (EHRs) using prompt learning to control generation via demographic and clinical features. It achieves state-of-the-art performance with 53.1% lower longitudinal imputation perplexity and 45.3% lower cross-modality perplexity than baselines, while demonstrating strong privacy preservation against membership and attribute inference attacks.
Accessing longitudinal multimodal Electronic Healthcare Records (EHRs) is challenging due to privacy concerns, which hinders the use of ML for healthcare applications. Synthetic EHRs generation bypasses the need to share sensitive real patient records. However, existing methods generate single-modal EHRs by unconditional generation or by longitudinal inference, which falls short of low flexibility and makes unrealistic EHRs. In this work, we propose to formulate EHRs generation as a text-to-text translation task by language models (LMs), which suffices to highly flexible event imputation during generation. We also design prompt learning to control the generation conditioned by numerical and categorical demographic features. We evaluate synthetic EHRs quality by two perplexity measures accounting for their longitudinal pattern (longitudinal imputation perplexity, lpl) and the connections cross modalities (cross-modality imputation perplexity, mpl). Moreover, we utilize two adversaries: membership and attribute inference attacks for privacy-preserving evaluation. Experiments on MIMIC-III data demonstrate the superiority of our methods on realistic EHRs generation (53.1\% decrease of lpl and 45.3\% decrease of mpl on average compared to the best baselines) with low privacy risks. Software is available at https://github.com/RyanWangZf/PromptEHR.
Motivation & Objective
- To address the challenge of sharing real EHRs due to privacy risks and data access restrictions in healthcare ML research.
- To generate high-fidelity, multimodal longitudinal EHRs that reflect complex temporal and cross-modal relationships between diagnoses, medications, procedures, and patient demographics.
- To enable flexible, conditional EHR generation by conditioning on both patient demographics and prior clinical events for improved personalization and utility.
- To evaluate synthetic EHRs not only on generation quality but also on privacy risks using membership and attribute inference attacks.
- To demonstrate that synthetic EHRs can effectively augment real data and even outperform real data in downstream ML tasks when combined with sufficient synthetic samples.
Proposed method
- Formulate EHR generation as a text-to-text translation task using pre-trained language models (e.g., T5, BART), treating each visit as a sequence of event tokens with special markers.
- Transform longitudinal EHRs into tokenized sequences using special tokens (e.g., <v>, </v> for visits; <dx>, </dx> for diagnoses) to preserve temporal and structural order.
- Design a prompt learning mechanism where demographic features (age, gender, etc.) are embedded via dedicated featurizers and injected into the input token embeddings to condition generation.
- Train the model using causal language modeling loss to enable autoregressive, sequential generation of events while maintaining context from prior visits and conditional prompts.
- Integrate prompt tuning with a frozen pre-trained LM to enable efficient fine-tuning while preserving the model’s generalization capacity.
- Use a two-stage evaluation pipeline: (1) perplexity-based metrics (longitudinal and cross-modality imputation perplexity) for quality, and (2) membership and attribute inference attacks for privacy evaluation.
Experimental results
Research questions
- RQ1Can a language model-based approach generate realistic, multimodal longitudinal EHRs that preserve complex temporal and cross-modal dependencies between clinical events?
- RQ2How effective is prompt learning in enabling flexible, conditional EHR generation based on patient demographics and prior clinical events?
- RQ3To what extent do synthetic EHRs generated by PromptEHR match the quality of real EHRs in downstream machine learning tasks?
- RQ4How robust are the synthetic EHRs to membership and attribute inference attacks, indicating their privacy-preserving potential?
- RQ5Can synthetic EHRs effectively augment real data to improve model performance, even surpassing models trained on limited real data?
Key findings
- PromptEHR reduces longitudinal imputation perplexity (lpl) by 53.1% on average compared to the best existing baseline, indicating superior modeling of temporal event sequences.
- PromptEHR reduces cross-modality imputation perplexity (mpl) by 45.3% on average, demonstrating better capture of relationships between different EHR modalities such as diagnoses and lab tests.
- Synthetic EHRs generated by PromptEHR achieve comparable or better performance than real EHRs in downstream LSTM-based classification tasks when combined with real data, with 50k synthetic records plus 30k real records outperforming a model trained on all 40k real records.
- The model is robust to membership inference and attribute inference attacks, indicating low privacy risk, though theoretical guarantees remain an open direction.
- In low-data regimes, PromptEHR trained on only 5k real records still outperforms the baseline LSTM+MLP model, showing strong generalization and suitability for low-resource settings.
- Conditional generation via completion (e.g., generating missing procedures after diagnosis and lab tests) is uniquely supported by PromptEHR, enabling diverse and realistic EHR synthesis through flexible prompting.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.