TrialSynth: Generation of Synthetic Sequential Clinical Trial Data

Chufan Gao, Mandis Beigi, Afrah Shafquat, Jacob Aptekar, Jimeng Sun

TL;DR

TrialSynth is a novel generative framework that produces high-fidelity, time-sequential synthetic clinical trial data by combining Variational Autoencoders (VAEs) with Neural Hawkes Processes. It successfully addresses the "small data" challenge inherent in clinical trials, generating realistic patient trajectories that preserve privacy while maintaining high utility for downstream machine learning tasks.

What Problem Does This Paper Address?

Clinical trial data is a gold mine for drug development and trial optimization, but it is notoriously difficult to access due to stringent patient privacy regulations and the limited number of participants in any given study. While recent progress has been made in generating static synthetic data (like patient demographics), generating sequential data—the specific timing and order of medical events—remains a major hurdle.

Patient trajectories are critical for identifying adverse events and optimizing trial protocols. However, most generative models (like GANs or LLMs) require massive datasets to function effectively. Clinical trials often involve fewer than 1,000 patients, creating a "small data" problem where standard models fail to capture the complex temporal dynamics of patient care without compromising privacy.

Methods

The authors introduce TrialSynth, which merges two powerful probabilistic frameworks:

  1. Variational Autoencoders (VAE): Used to learn a compressed, latent representation ($z$) of patient data. By sampling from this latent space, the model can generate new, "similar-but-different" patient records.
  2. Transformer Hawkes Processes (HP): This is the core innovation. Hawkes Processes are statistical models designed to predict the timing and type of discrete events. Unlike standard RNNs, they use an "intensity function" to model how past events influence the probability of future ones (e.g., how a dose of medication might decrease the likelihood of a specific symptom over time).

The architecture uses a Transformer-based encoder to map event sequences and timestamps into the latent space. The decoder then reconstructs these sequences by maximizing the Hawkes log-likelihood. The authors also propose two variants:

  • Events Unknown: A fully generative mode that predicts both event types and their timing.
  • Events Known: A guided mode where the model generates timestamps for a pre-specified set of events, which is useful for "up-sampling" specific patient profiles.
Figure 2: Diagram of the TrialSynth Encoder-Decoder structure. Here, the model input is the real patient event sequence + time, which trains a VAE model to the same output time + event sequence. The event sequence length for each event is also predicted. The transformer encoder processes each input timestep, then output embeddings are individually transformed to the z-latent space via a neural network. Sampling and decoding occur from each timestep-specific z-latent representation.

Datasets

The model was evaluated on 7 real-world clinical trial datasets obtained from Project Data Sphere. These datasets cover various conditions, including:

  • Small Cell Lung Cancer (LC1, LC2)
  • Breast Cancer (BC1, BC2, BC3)
  • Colon Cancer (CC)
  • Venous Thromboembolism in Cancer Patients (VTE)

These datasets are characterized by small patient populations (ranging from 47 to 953 subjects) and varying sequence lengths, making them a rigorous test for generative fidelity.

Key Insights and Ideas

  • Hawkes Processes are a Natural Fit: Clinical events aren't random; they are interdependent. The Hawkes Process's ability to model excitation (one event triggering another) or inhibition (medication preventing a symptom) makes it far more effective for medical data than standard sequence models.
  • The Privacy-Utility Knob: TrialSynth allows researchers to tune the "Var Multiplier" during VAE sampling. Increasing this variance creates more diverse (and thus more private) data, while decreasing it produces data that more closely mirrors the source population's utility.
  • Handling Small Samples: By leveraging the structured inductive bias of Hawkes Processes, TrialSynth avoids the overfitting common when applying deep generative models to small clinical cohorts.

Key Results

TrialSynth was compared against several baselines, including LSTM-VAEs, TabDDPM (diffusion-based), and HALO (an EHR-specific model).

  • Utility: To test if the synthetic data was "useful," the authors trained a separate model on the synthetic data to predict patient mortality. TrialSynth variants consistently achieved the highest ROCAUC scores, often performing nearly as well as models trained on the original real data.
  • Privacy: The model achieved superior results in the ML Inference Score, meaning an adversarial classifier struggled to distinguish between real and synthetic sequences (aiming for a score of 0.5).
  • Fidelity: Visual inspections of generated sequences (e.g., for white blood cell counts or nausea events) showed that TrialSynth accurately captured the temporal "rhythm" of the original trials.
Figure 3: Example of a generated sequence from TrialSynth from NCT00003299 plotted by the individual events. Red dots and lines denote ground truth event occurrence and time between events respectively. In this case, the time is in Days. The blue dots and lines are the predicted events. Numerical events such as wbc (white blood cell count) are discretized based on their unique values in the real data. This will be corrected in the new version. Each prediction is linked with dashed lines for clarity.

Limitations and Future Work

The authors acknowledge several areas for improvement:

  • Generalizability: While it works well on small datasets, its performance on massive, heterogeneous Electronic Health Record (EHR) systems remains untested.
  • Temporal Complexity: The current Hawkes Process implementation might struggle with highly non-linear or extremely complex temporal dynamics found in some chronic conditions.
  • Interpretability: Like most VAE-based systems, the latent space $z$ can be difficult for clinicians to interpret directly.
  • Privacy Robustness: While empirical privacy metrics are strong, the authors note a need for more formal re-identification risk assessments to satisfy the highest regulatory standards.

Summary updated

BibTeX
@inproceedings{gao2024trialsynth,
  author = {Chufan Gao and Mandis Beigi and Afrah Shafquat and Jacob Aptekar and Jimeng Sun},
  title = {{TrialSynth: Generation of Synthetic Sequential Clinical Trial Data}},
  booktitle = {GenAI4Health @ NeurIPS},
  year = {2024},
  url = {https://openreview.net/forum?id=UJsD6bdkA2},
}
Figure