Abstract
Deep learning models for Electronic Health Records (EHR) often struggle due to the scarcity of labeled data and the high-dimensional, irregular nature of medical histories. This paper introduces ehrGAN, a generative adversarial network framework designed to augment small, labeled datasets with high-quality synthetic patient records. By employing a Variational Contrastive Divergence (VCD) approach, ehrGAN generates realistic "hallucinated" data that preserves the statistical properties of real records. Experimental results on heart failure and diabetes cohorts demonstrate that semi-supervised learning with ehrGAN significantly improves prediction accuracy, outperforming traditional baselines and standard CNNs.
Introduction
While deep learning has seen immense success in computer vision and natural language processing, its application to healthcare remains challenging. Electronic Health Records (EHRs) are abundant, but labeled data—where specific diagnoses or clinical outcomes are explicitly confirmed—is often scarce, costly to obtain, and restricted by privacy regulations.
Furthermore, EHR data is inherently "messy": it is high-dimensional, irregular, and contains complex temporal patterns where the sequence of medical events is critical. Standard data augmentation techniques, such as image rotation or flipping, are inapplicable to longitudinal patient histories. This research addresses the "small data" bottleneck by leveraging semi-supervised learning and generative modeling to create high-fidelity synthetic training data.
Methodology
The proposed framework consists of two primary components: the generative model (ehrGAN) and the predictive model (SSL-GAN).
ehrGAN: The Generative Model
To overcome the common GAN issue of "mode collapse"—where the generator produces a limited variety of samples—the authors developed ehrGAN using a Variational Contrastive Divergence (VCD) approach.
As illustrated in the architecture above, ehrGAN employs an encoder-decoder structure. It takes a real patient record ($x$), encodes it into a latent representation ($h$), and then "mixes" this representation with random noise ($z$) using a binary mask ($m$). The decoder then reconstructs this hybrid representation into a new, synthetic patient record ($\tilde{x}$) that resides near the real data manifold while remaining unique.
SSL-GAN: The Predictive Model
The predictive component utilizes a semi-supervised learning schema. A Convolutional Neural Network (CNN) with 1D convolutions is trained simultaneously on a small set of real labeled records and a larger set of synthetic records generated by ehrGAN. The 1D convolutions are specifically designed to capture the temporal dependencies inherent in medical event sequences.
Experimental Setup
The framework was evaluated using a massive real-world longitudinal EHR database comprising 218,680 patients and over 14 million observations. The data included 8,627 unique medical features, such as ICD-9 codes and prescriptions. Two specific cohorts were targeted:
- Congestive Heart Failure: 3,357 cases and 6,714 controls.
- Diabetes: 2,248 cases and 4,496 controls.
Results and Discussion
The ehrGAN successfully produced realistic "hallucinations" of patient records. Statistical analysis confirmed that the synthetic data maintained the properties of the original dataset, including record length, feature frequency, and critical comorbidities (e.g., the co-occurrence of hypertension and diabetes).
The SSL-GAN outperformed several baselines, including standard CNNs, Random Forests, and other semi-supervised methods like SSL-SMIR and LGC. Key performance metrics include:
- Heart Failure: With only 50% of labels available, SSL-GAN achieved an AUROC of 0.9075, compared to 0.8784 for a basic CNN.
- Diabetes: SSL-GAN improved the AUROC from 0.9156 to 0.9354.
- Robustness: Even when trained on partial data augmented with synthetic records, SSL-GAN remained highly competitive with a CNN trained on the full labeled dataset, typically trailing by only approximately 2%.
The researchers also identified a "sweet spot" for augmentation. Performance peaked when the ratio of synthetic to real data was approximately 0.6; beyond this point, the noise introduced by synthetic data began to diminish the predictive benefits.
Conclusion
This work demonstrates that generative adversarial networks can effectively mitigate the labeled data scarcity problem in medical AI. By generating realistic synthetic records that preserve complex clinical patterns, ehrGAN enables more robust risk prediction. Future research will focus on explicit privacy testing to ensure HIPAA compliance and qualitative clinical validation by medical experts to ensure the generated "patient journeys" are medically plausible.
Summary updated