Learning What Matters in FHIR Graph Generation for Synthetic Patient Trajectories
Abstract
We study the generation of synthetic longitudinal patient records as FHIR graphs, representing each patient as a sequence of encounters connected to diagnoses and procedures. Faithful generation requires jointly modeling the temporal structure and node content under extreme long-tail distributions of clinical event codes. In this setup, we identify information bottlenecks at the data, architecture, and training levels that constrain generation. Redundancy and power-law distributions in the data dilute training signal, the encoder capacity controls which patterns can be compressed into the latent representation, and in long sequential decoders, weak latent-to-decoder information flow shapes the latent space mainly by reconstruction quality while retaining little patient-specific signal. We address these difficulties with architectural modifications that improve information flow between the latent representation and decoder. We propose a variational graph autoencoder with dual-stream decoding, explicit hazard-based sequence termination, and retrieval-based code prediction. Across evaluations, we show that learnability is governed by structural regularities rather than frequency alone. Although frequency correlates with latent encoding, codes with higher recurrence, sequential dependencies, and contextual consistency are learned more reliably than irregular or weakly structured patterns. This is reflected across three complementary downstream tasks: 1) code-level imputation, where retrieval-based prediction improves rare-code recovery; 2) train-on-synthetic test-on-real classification, where synthetic data transfers clinically meaningful structure with moderate performance gaps; and 3) pattern reproduction, where recurring clinical protocols are preserved. Our results characterize structure-driven learnability in medical graph generation and show that faithful code generation emerges from coordinated data, architecture, and training design rather than isolated techniques.