betaFeedback

WorksComputer Science

Evidence-Conditioned Completion and Synthesis of Electronic Health Records

Abstract

Patient information can guide electronic health record (EHR) generation, but how its amount shapes predictive utility and disclosure risk remains poorly characterized. Here we present EHRDiB, which unifies visit completion and synthesis by distinguishing original missingness from withheld inputs and combining a shared multimodal representation with an evidence-conditioned latent diffusion bridge. We compared EHRDiB with three completion and eight synthesis methods on MIMIC-IV and numerical and discretized Duke Health representations. Evaluation covered downstream predictive utility, generative diversity, and distributional fidelity for both tasks, and disclosure risk for synthesis. EHRDiB achieved the smallest utility gaps from real-data-trained classifiers in seven of eight completion comparisons. In synthesis, AUPRC gaps were 45.2% smaller for ten MIMIC-IV principal-diagnosis targets and 53.3% smaller for numerical Duke Health data relative to the best comparator. Synthesis with calibrated thresholding yielded the lowest marginal distribution error across all three datasets, with Coverage above 0.95 for both output rules. Across twelve evidence-fraction intervals in MIMIC-IV synthesis, membership-inference AUROC increased from 0.516 to 0.598 as the mean target evidence fraction rose from 0.20 to 0.50; utility gaps narrowed relative to the lowest evidence configuration but did not decrease monotonically. Our study provides a unified framework and empirical foundation for EHR generation that considers both its utility for clinical analysis and its information disclosure risk.

Introduction

Introduction

Electronic health records (EHRs) capture rich relationships among diseases, treatments, and physiological measurements, but these records are often incomplete and difficult to share across institutions[1, 2]. By learning clinical associations from existing records, generative models can complete partial patient records to support analysis of existing populations, or synthesize surrogate records for method development, validation, and data sharing. Patient information available to guide generation - including observed clinical findings, patterns of clinical information availability, and information from clinically related patient populations - can provide clinical context, but links between generated records and real individuals may pose disclosure risks[3]. It is therefore necessary to examine how analytical utility and disclosure risk vary with the amount of clinical information used to guide generation.

Generative modeling can now handle heterogeneous clinical variables, preserve cross-modal and longitudinal relationships, and accommodate incomplete records and missing modalities[4, 5, 6]. Conditional generative models can use observed clinical information to complete partially observed records or synthesize new records under specified clinical conditions[7, 8]. Despite these advances, variational models face a trade-off between reconstruction accuracy and latent-space regularization[9]. Mode collapse in adversarial models can limit coverage of diverse clinical feature combinations[10]. Diffusion models operating directly on sparse visit-level records can struggle to recover clinical events and their cross-modal relationships after corruption[11]. Beyond these modeling challenges, reproducing variable distributions well does not necessarily imply that generated records are diverse, that the relationships needed for analysis are well preserved, or that disclosure risk is lower[2, 12]. These findings indicate that the value of generated data depends on their intended use, and choices about generation conditions therefore require evidence that reflects both utility and disclosure risk.

In this study, we introduce EHRDiB, an EHR Diffusion Bridge framework that unifies the completion of partially observed visit records and the synthesis of new records while systematically varying the amount of supplied clinical information to assess the utility gains and disclosure risks associated with additional patient information (Figure 1). EHRDiB models heterogeneous clinical variables using type-appropriate distributions, incorporates clinical information availability into its representations, explicitly identifies which clinical information is supplied as generation conditions, and models measurement values separately from their presence in the original record. These representations are integrated through clinical context fusion (CCF) guided by the principal diagnosis and coupled with an evidence-conditioned latent diffusion bridge.

Figure 1. Fig. 1 | Overview of EHRDiB. Availability-gated encoders and clinical context fusion map clinical information from data and evidence views into a shared latent space, with presence and values encoded separately for continuous-valued modalities. A latent diffusion bridge uses an evidence-conditioned denoising network to predict the data endpoint from intermediate latent states, guiding the generation of a visit representation from the evidence representation. The starting distribution is perturbed for synthesis. Parallel decoders map the generated representation to all clinical modalities, with two output rules: Bernoulli sampling and calibrated thresholding (Cali-T). Visual elements adapted from Li et al. [5]; example EHR image from VA Blue Button[13].

We compared EHRDiB with three completion baselines and eight synthesis baselines on MIMIC-IV and Duke Health data in numerical (DH) and discretized (DH-D) representations. Evaluation covered downstream predictive utility, generative diversity, and distributional fidelity for both tasks, and disclosure risk for synthesis. EHRDiB achieved the smallest utility gaps from real-data-trained classifiers in seven of eight completion comparisons. In synthesis, EHRDiB with Bernoulli sampling reduced the AUPRC gap relative to real-data training by 45.2% on the ten MIMIC-IV principal-diagnosis prediction tasks and by 53.3% on numerical Duke Health data, compared with the best-performing baseline in each setting. With calibrated thresholding (Cali-T), EHRDiB achieved the lowest marginal distribution error across all three data settings. Both output rules maintained Coverage above 0.95, indicating broad coverage of real-data neighborhoods. Across twelve MIMIC-IV synthesis configurations, increasing the mean proportion of supplied clinical variables from 0.20 to 0.50 was associated with membership-inference AUROC rising from 0.516 to 0.598. Utility gaps narrowed relative to the lowest evidence configuration but did not decrease monotonically. Our study provides a unified framework and empirical evidence for assessing downstream predictive utility and disclosure risk under different clinical conditioning settings, while maintaining high distributional fidelity and generative diversity.

Results

Study Population

The MIMIC-IV cohort comprised 245,130 visits from 119,425 patients. The estimated median age at the first included admission was 61 years (IQR 43-74), and 52.6% were female. The Duke Health cohort comprised 936,471 visits from 120,856 patients seen between 2015 and 2018. We analyzed the same Duke Health visits in two representations: Duke Health (DH), which retained clinical measurements as numerical values, and Duke Health Discrete (DH-D), which discretized these values into categories using binning. The mean age at the PREVENT study baseline was 53.7 years (SD 12.5), and 56.8% were female. A median of 7.8% of clinical measurement variables was present per MIMIC-IV visit and 25% per Duke visit. Prevalence of the ten principal-diagnosis targets ranged from 0.5% to 3.5% in MIMIC-IV and from 1.8% to 27.9% in the Duke data. Detailed information on the study populations is provided in Supplementary Tab. S1.

Completion

We first evaluated the predictive utility of completed records for phenotyping in MIMIC-IV and Duke Health. MIMIC-IV included two downstream tasks targeting ten principal diagnoses and seven Phecode-defined phenotypes. For Duke Health, we evaluated the same ten diagnosis targets in DH and DH-D. Relative to LightGBM classifiers trained on real data, EHRDiB achieved the smallest performance gaps in seven of eight comparisons across the four phenotyping tasks and two metrics, AUROC and AUPRC (Table 1). For the ten MIMIC-IV principal-diagnosis targets, EHRDiB’s ΔAUROC\Delta\mathrm{AUROC} and ΔAUPRC\Delta\mathrm{AUPRC} were 0.0021 and 0.0319, representing reductions of 23.0% and 19.5% relative to the best comparators for the respective metrics, GAIN and CSDI. In DH and DH-D, its ΔAUPRC\Delta\mathrm{AUPRC} values were 0.0152 and 0.0150, representing reductions of 38.5% and 42.6% relative to the best comparators in the respective datasets, CISS-VAE and GAIN.

ModelUtility, set 1Utility, set 2DiversityFidelity (×103\times10^{3})
ModelΔ\DeltaAUROCΔ\DeltaAUPRCΔ\DeltaAUROCΔ\DeltaAUPRCCoverageAPDRFDDBCMD
MIMIC-IV
CISS-VAE0.00480.06240.03340.08480.94170.829616.2513.34
GAIN0.00270.05040.03160.07870.60760.925721.6916.76
CSDI0.00380.03960.03960.08730.97110.96719.7012.85
EHRDiB0.00210.03190.03140.08370.99380.943413.1711.93
DH
CISS-VAE0.00940.0248--0.74430.89583.6015.95
GAIN0.00950.0259--0.78190.92774.7626.26
CSDI0.01080.0287--0.92801.01350.9713.24
EHRDiB0.00600.0152--0.97080.90441.8015.32
DH-D
CISS-VAE0.02060.0594--0.86740.91163.339.69
GAIN0.01030.0262--0.80140.84313.8810.34
CSDI0.01300.0285--0.92570.96970.617.86
EHRDiB0.00590.0150--0.96270.93571.449.86

Table 1. Completion results across three datasets. Utility gaps are differences in AUROC and AUPRC between LightGBM classifiers trained on real and completed records. Set 1 comprises ten principal-diagnosis targets in MIMIC-IV and ten diagnosis targets in DH and DH-D; set 2 comprises seven Phecode-defined phenotypes in MIMIC-IV. Bold indicates the best result for each metric within each dataset.

Beyond predictive utility, we examined the diversity of completed records using Coverage and the average pairwise distance ratio (APDR), as defined in Methods. EHRDiB achieved the highest Coverage in MIMIC-IV, DH, and DH-D, with values of 0.9938, 0.9708, and 0.9627, respectively, indicating broad coverage of real-data neighborhoods. EHRDiB yielded APDR values of 0.9434, 0.9044, and 0.9357 in MIMIC-IV, DH, and DH-D, respectively. Its APDR performance was slightly below that of CSDI across all three datasets, suggesting more conservative completion.

For distributional fidelity, CSDI achieved the lowest feature distribution distance (FDD) in all three datasets and the lowest blockwise correlation matrix distance (BCMD) in DH and DH-D. However, EHRDiB achieved the lowest BCMD in MIMIC-IV at 11.93, compared with 12.85 for CSDI, indicating closer agreement with real-data correlations.

Synthesis

We next evaluated the predictive utility of synthetic records for the same phenotyping tasks. Relative to LightGBM classifiers trained on real data, EHRDiB (Bernoulli) achieved the smallest Δ\DeltaAUROC and Δ\DeltaAUPRC for the ten MIMIC-IV principal-diagnosis targets, at 0.0042 and 0.0457, representing reductions of 63.4% and 45.2% relative to EMR-WGAN, the best comparator for both metrics (Table 2; Figure 2). For the seven Phecode-defined phenotypes, EHRDiB (Cali-T) achieved the smallest gaps at 0.0388 and 0.0947, compared with 0.0411 and 0.0962 for EMR-WGAN (Supplementary Fig. S1). Target-specific ROC curves are provided in Supplementary Figs. S2 and S3.

Macro-averaged ROC and precision-recall curves for VAE, GAN, and Diffusion models

Figure 2. MIMIC-IV synthesis utility for the ten principal-diagnosis targets. Macro-averaged ROC (top) and precision-recall (bottom) curves compare LightGBM classifiers trained on real (TRTR) or synthetic records and evaluated on the same real test set. Columns group variational, adversarial, and diffusion comparators, with EHRDiB (Bernoulli) and EHRDiB (Cali-T) shown in each.

Tab. 2 | Synthesis results across three datasets. Utility gaps are differences in AUROC and AUPRC between LightGBM classifiers trained on real and synthetic records. Set 1 comprises ten principal-diagnosis targets in MIMIC-IV and ten diagnosis targets in DH and DH-D; set 2 comprises seven Phecode-defined phenotypes in MIMIC-IV. Bold indicates the best result for each metric within each dataset.

ModelΔ\DeltaAUROCΔ\DeltaAUPRCΔ\DeltaAUROCΔ\DeltaAUPRCCoverageAPDRFDDBCMD
Utility, set 1
MIMIC-IV
MVAE0.03810.23100.12720.14870.81160.744242.8925.52
MoPoE-VAE0.08760.34790.19130.21650.59560.654862.3832.08
medGAN0.14400.44120.18310.23860.06634.8867382.7938.86
medBGAN0.08970.37550.14740.21260.08905.0766556.9433.57
EMR-WGAN0.01160.08350.04110.09620.16732.5711474.6417.14
TabSyn0.17220.42610.13060.16240.70120.838173.33203.72
TabDiff0.04060.25860.05100.13310.57361.038221.8418.47
ScoEHR0.02910.15870.07930.14410.80830.776842.0220.47
EHRDiB (Bernoulli)0.00420.04570.04100.09690.98150.954822.3814.72
EHRDiB (Cali-T)0.00490.05510.03880.09470.98250.968321.1016.63
Utility, set 2
DH
MVAE0.12400.1922--0.49540.72206.6937.84
MoPoE-VAE0.30980.3173--0.03920.48009.9761.81
medGAN0.10150.1617--0.44211.641815.79191.86
medBGAN0.06100.1090--0.67121.356311.8343.96
EMR-WGAN0.01930.0318--0.86871.07036.0924.15
TabSyn0.39670.3730--0.09740.366210.6564.66
TabDiff0.37580.3606--0.32160.95491.6648.93
ScoEHR0.15520.2091--0.50170.83722.5732.98
EHRDiB (Bernoulli)0.00550.0149--0.96310.93521.9712.05
EHRDiB (Cali-T)0.00690.0163--0.95800.96800.7827.27
DH-D
MVAE0.08750.1274--0.59440.90225.1521.42
MoPoE-VAE0.30700.3370--0.03990.62777.7833.83
medGAN0.10500.1678--0.64820.94733.9827.68
medBGAN0.06690.1092--0.74931.00362.2821.90
EMR-WGAN0.01880.0346--0.92621.00390.568.79
TabSyn0.38620.3726--0.07650.48018.7330.15
TabDiff0.41370.3659--0.39960.93741.0718.63
ScoEHR0.00420.0140--0.95100.99490.719.98
EHRDiB (Bernoulli)0.00590.0136--0.96480.95161.448.40
EHRDiB (Cali-T)0.00660.0139--0.96101.00390.4515.23

Table 2. Synthesis results across three datasets. Utility gaps are differences in AUROC and AUPRC between LightGBM classifiers trained on real and synthetic records. Set 1 comprises ten principal-diagnosis targets in MIMIC-IV and ten diagnosis targets in DH and DH-D; set 2 comprises seven Phecode-defined phenotypes in MIMIC-IV. Bold indicates the best result for each metric within each dataset.

In DH, EHRDiB (Bernoulli) achieved the smallest Δ\DeltaAUROC and Δ\DeltaAUPRC at 0.0055 and 0.0149, representing reductions of 71.4% and 53.3% relative to EMR-WGAN, the best comparator. In DH-D, its Δ\DeltaAUROC and Δ\DeltaAUPRC were 0.0059 and 0.0136, respectively. Its Δ\DeltaAUPRC was the smallest among all models, compared with 0.0140 for ScoEHR, whereas its Δ\DeltaAUROC was higher than ScoEHR’s 0.0042.

Beyond predictive utility, we also used Coverage and APDR to assess the diversity of synthetic records. In MIMIC-IV, EHRDiB (Cali-T) achieved the highest Coverage at 0.9825, a gain of 17.1 percentage points over MVAE (0.8116), the best comparator. EHRDiB (Bernoulli) achieved the highest Coverage in DH and DH-D at 0.9631 and 0.9648, respectively, exceeding the best comparators, EMR-WGAN (0.8687) and ScoEHR (0.9510), by 9.4 and 1.4 percentage points. EHRDiB (Cali-T) achieved APDR closest to one in MIMIC-IV and DH, with values of 0.9683 and 0.9680. In DH-D, its APDR was 1.0039, slightly farther from one than medBGAN’s 1.0036.

Marginal Distribution and Modality Correlation

We then assessed how well synthetic records preserved marginal distributions. EHRDiB (Cali-T) achieved the lowest FDD in all three datasets (Table 2). In MIMIC-IV, its FDD was 21.10, 3.4% lower than TabDiff’s 21.84. In DH, its FDD was 0.78, 52.8% lower than TabDiff’s 1.66, representing the largest relative improvement. In DH-D, FDD was 0.45, 20.0% lower than EMR-WGAN’s 0.56. The modality-level comparison showed that EHRDiB (Cali-T) achieved the lowest FDD for diagnoses and medications across all three datasets, and for procedures in MIMIC-IV. Its advantage over EHRDiB (Bernoulli) was most pronounced in these clinical code modalities, whereas TabDiff achieved the lowest FDD for clinical measurements (Figure 3).

Marginal distribution fidelity of synthetic records across variational, adversarial, and diffusion models

Figure 3. Marginal distribution fidelity of synthetic records in MIMIC-IV (top), DH (middle), and DH-D (bottom). D, diagnosis; P, procedure (MIMIC-IV only); M, medication; C, clinical measurement. Each modality’s FDD is normalized to the lowest value among models within the same dataset. The reversed logarithmic radial scale runs from 1×1 \times at the outer ring to 100×100 \times at the center; larger radii indicate lower errors. Columns show variational, adversarial, and diffusion baselines alongside EHRDiB under both output rules.

Beyond marginal distributions, we evaluated the preservation of within- and cross-modality correlations. EHRDiB (Bernoulli) achieved the lowest BCMD in all three datasets (Table 2). In MIMIC-IV, BCMD was 14.72, a 14.1% reduction from EMR-WGAN’s 17.14. In DH, it was 12.05, 50.1% lower than EMR-WGAN’s 24.15. In DH-D, it was 8.40, 4.5% lower than EMR-WGAN’s 8.79. In the displayed 120-feature MIMIC-IV subset, EHRDiB under both output rules showed lower errors within the clinical-measurement block than the comparators. EHRDiB (Bernoulli) further reduced errors within procedures and between procedures and clinical measurements relative to EHRDiB (Cali-T) (Figure 4). EHRDiB showed complementary strengths under the two output rules across all three datasets: EHRDiB (Cali-T) achieved lower FDD, whereas EHRDiB (Bernoulli) achieved lower BCMD.

Figure 4. Absolute Pearson-correlation errors between real and synthetic MIMIC-IV records. All models share the same 120 features, with 30 each from diagnosis (D), procedure (P), medication (M), and clinical measurement (C). Darker colors indicate larger errors on a shared scale. This exploratory subset was selected using test-set error contrasts.

Disclosure Risk and Supplied Evidence

We next evaluated synthesis disclosure risk using a membership inference attack (MIA) and an attribute inference attack (AIA) (Table 3). Across the two output rules for EHRDiB, MIA AUROC ranged from 0.5336 to 0.5393 in MIMIC-IV, 0.5105 to 0.5119 in DH, and 0.5138 to 0.5162 in DH-D. These values exceeded the range across comparator models in the three datasets (0.4920-0.5078), indicating a stronger membership-inference signal under this attack. For AIA, EHRDiB (Bernoulli) had negative attribute-inference advantages (Δ\DeltaAIA) of −0.0049, −0.0065, and −0.0046 in MIMIC-IV, DH, and DH-D, respectively. Negative values indicate lower attack AUPRC when synthetic records were used as the reference compared with real auxiliary data. EHRDiB (Cali-T) also had negative Δ\DeltaAIA in DH and DH-D, but a small positive value in MIMIC-IV (0.0035). All comparators had negative Δ\DeltaAIA.

ModelMIMIC-IV MIAMIMIC-IV Δ\DeltaAIADH MIADH Δ\DeltaAIADH-D MIADH-D Δ\DeltaAIA
MVAE0.5068-0.01610.4983-0.03790.4990-0.0291
MoPoE-VAE0.5010-0.03250.4969-0.08260.4920-0.0774
medGAN0.4995-0.03580.5017-0.04140.5018-0.0511
medBGAN0.5002-0.05460.5013-0.02890.5013-0.0370
EMR-WGAN0.5078-0.01030.5028-0.00620.5031-0.0095
TabSyn0.5023-0.04900.5023-0.12290.5050-0.1169
TabDiff0.5039-0.02700.5022-0.12240.5037-0.1161
ScoEHR0.5074-0.00610.5046-0.00780.5003-0.0061
EHRDiB (Bernoulli)0.5336-0.00490.5119-0.00650.5162-0.0046
EHRDiB (Cali-T)0.53930.00350.5105-0.00310.5138-0.0026

Table 3. Synthesis disclosure risk across three datasets. Membership inference attack (MIA) performance is measured by AUROC, with chance at 0.5. Attribute inference advantage (Δ\DeltaAIA) is the difference in attack AUPRC between a synthetic reference and a real auxiliary reference. Bold indicates MIA AUROC closest to 0.5 and the lowest Δ\DeltaAIA within each dataset.

To examine how disclosure risk varied with the amount of input information, we evaluated EHRDiB across twelve evidence-fraction intervals in MIMIC-IV synthesis. For each reference visit, we drew one target evidence fraction from a uniform distribution over the specified interval. Within each modeling group, this fraction determined the number of eligible clinical variables randomly selected without replacement and supplied as generation conditions (Methods). MIA AUROC increased from 0.5162 to 0.5984 as the mean evidence fraction rose from 0.20 to 0.50, indicating that more input information was associated with a stronger membership-inference signal (Figure 5a). At the same mean fraction of 0.40, the intervals [0.1, 0.7], [0.2, 0.6], and [0.3, 0.5] yielded MIA AUROCs of 0.5694, 0.5593, and 0.5582, respectively. ΔAIA\Delta\mathrm{AIA} remained negative across all twelve intervals, ranging from −0.0049 to −0.0023.

Figure 5. Disclosure risk and phenotyping utility in MIMIC-IV synthesis across evidence-fraction intervals. Points show individual intervals at their mean evidence fraction; each line connects the minimum observed value at each mean. (a) MIA AUROC; the gray band shows the comparator range and the dashed line marks random discrimination (0.5). (b) AUPRC gaps for set 1 (ten principal-diagnosis targets) and set 2 (seven Phecode-defined phenotypes); dashed lines indicate the best comparator for each set.

Even at the lowest evidence-fraction interval, EHRDiB’s utility gaps for the ten principal-diagnosis targets remained smaller than those of every comparator. Relative to the lowest evidence configuration, all four utility gaps narrowed in the other eleven configurations, but increasing the amount of input information did not yield monotonic improvements in phenotyping utility (Figure 5b; Supplementary Tab. S4). For the ten principal-diagnosis targets, ΔAUROC\Delta\mathrm{AUROC} and ΔAUPRC\Delta\mathrm{AUPRC} ranged from 0.0027 to 0.0054 and from 0.0327 to 0.0625, respectively. For the seven Phecode-defined phenotypes, the corresponding ranges were 0.0342-0.0426 and 0.0914-0.1018. The smallest ΔAUPRC\Delta\mathrm{AUPRC} values for the two tasks occurred at [0.2, 0.5] and [0.2, 0.7], respectively, whereas the highest evidence configuration, [0.3, 0.7], yielded values of 0.0432 and 0.0981, both above their respective minima.

Across the twelve evidence-fraction intervals, EHRDiB maintained Coverage of 0.9759-0.9933. From the lowest to the highest evidence configuration, APDR increased from 0.9407 to 0.9632, moving closer to one, while FDD decreased from 24.01 to 21.19 and BCMD from 15.43 to 13.70. The lowest FDD (20.84) and the APDR closest to one (0.9724) both occurred at [0.3, 0.6], indicating that the highest evidence configuration did not achieve the best result for every measure. Full configuration-level results are provided in Supplementary Tabs. S2-S5.

Model Components and Ablation Study

We finally examined the contributions of model components in MIMIC-IV synthesis. We first compared four approaches to encoding clinical information availability. Compared with no explicit availability encoding, gating reduced FDD from 23.11 to 22.11 and BCMD from 15.19 to 14.94. Coverage increased from 0.986 to 0.988, while the Δ\DeltaAUROC and Δ\DeltaAUPRC gaps decreased from 0.0064 to 0.0058 and from 0.0693 to 0.0595, respectively. Gating achieved the best values for these five measures among the four approaches. Availability concatenation had the APDR closest to one (0.9582), slightly higher than gating’s 0.9576 (Supplementary Tab. S6).

Kullback-Leibler (KL) regularization strength and forward bridge choice further influenced generation performance. Across KL weights from 10−610^{-6} to 10−110^{-1}, 10−510^{-5} achieved the lowest FDD and BCMD (22.11 and 14.94), APDR closest to one (0.9576), and the smallest Δ\DeltaAUROC and Δ\DeltaAUPRC (0.0058 and 0.0595). The two largest weights, 10−210^{-2} and 10−110^{-1}, degraded fidelity and phenotyping utility. Coverage was highest at 10−410^{-4} (0.9891, compared with 0.9884 at 10−510^{-5}) (Supplementary Tab. S7). We also compared VE, VP, Linear, and Schrödinger forward bridge paths. The Schrödinger path achieved the lowest FDD and BCMD (20.91 and 14.37), APDR closest to one (0.9741), and the smallest Δ\DeltaAUROC (0.0047). Linear yielded slightly higher Coverage (0.9896 versus 0.9892) and a slightly smaller Δ\DeltaAUPRC (0.0514 versus 0.0517) than the Schrödinger path (Supplementary Tab. S8).

Finally, we evaluated how evidence-endpoint perturbation and sampling stochasticity affected EHRDiB synthesis. For the hybrid sampler, an unperturbed endpoint with a stochasticity level of 0.125 yielded the lowest FDD (20.85), whereas perturbation of 1 with zero stochasticity yielded the smallest Δ\DeltaAUPRC (0.0458). For the stochastic-interpolant sampler, the lowest FDD (21.33) occurred at perturbation 0.5 and stochasticity 1, whereas the smallest Δ\DeltaAUPRC (0.0464) occurred at perturbation 1 and stochasticity 0.5. Neither sampler had a configuration that led all measures within its tested grid. Sampling hyperparameters should therefore be selected according to the specific experimental configuration and the priorities given to fidelity, diversity, and phenotyping utility (Supplementary Tabs. S9 and S10).

Discussion

This study evaluated EHRDiB, a unified framework for evidence-conditioned EHR completion and synthesis. Results from MIMIC-IV and Duke Health showed that the framework supported downstream tasks and covered real-data neighborhoods in both tasks. The MIMIC-IV evidence-fraction analysis further indicated that supplying more patient information was associated with a stronger membership-inference signal, while predictive utility did not improve monotonically.

EHR completion and synthesis should generate records that support downstream tasks while maintaining good distributional fidelity and diversity. In completion, although CSDI more closely matched the marginal distributions and overall dispersion of real data, EHRDiB achieved smaller utility gaps in all four phenotyping tasks and broader coverage of real-data neighborhoods across all three datasets. In synthesis, EHRDiB (Bernoulli) achieved smaller utility gaps in three of the four phenotyping tasks and better preserved correlations, whereas EHRDiB (Cali-T) more closely matched marginal distributions and overall dispersion. Cali-T calibrates output thresholds using training-set prevalence, so part of its marginal fidelity advantage is expected by design.

EHRDiB showed clear advantages over the baselines in predictive utility, diversity, and distributional fidelity on the mixed-type MIMIC-IV and DH datasets, and remained among the leading methods on DH-D. Diffusion baselines did not consistently outperform GAN or VAE baselines across datasets and representations, while the evaluated VAE baselines showed severe shortcomings in downstream utility and coverage. These limitations further motivate EHRDiB’s integration of variational representation learning with an evidence-conditioned latent diffusion bridge.

Across the evidence-fraction intervals evaluated in MIMIC-IV synthesis, utility improved relative to the lowest evidence configuration, but further increases in supplied information did not yield monotonic gains and were associated with a stronger membership-inference signal. These findings support tailoring the evidence fraction to the intended use of generated data. Completion retains supplied patient information and is suited to analyses within the environment holding the source records. For synthesis, evidence fractions should be chosen to meet downstream utility requirements while accounting for disclosure risk assessed through attacks. Additionally, synthesis introduces randomness into both the sampling starting state and intermediate sampling steps, with the aim of minimizing disclosure risk arising from links between synthetic and reference records.

Synthetic visits generated with limited evidence could supplement clinical AI evaluation, including assessments across clinically defined subgroups, when access to source records is restricted. Our experiments evaluated classifiers trained on synthetic data and tested on real data; the use of synthetic visits as evaluation inputs remains to be validated. Further work should test whether evaluations on synthetic and real data yield consistent conclusions and assess disclosure risk in the intended setting of use.

This study has several limitations. Data were drawn from MIMIC-IV and Duke Health, and applicability to other institutions and populations requires further validation. Mapping tables used during preprocessing grouped clinical codes into coarser categories, which may limit analyses requiring finer clinical detail. In seeking to preserve source-data statistics, the framework may also carry forward data-quality issues such as randomly missing entries and residual outliers. The model generates single visits without capturing temporal dependencies across visits, limiting its use for longitudinal disease and treatment trajectories. Individual-level conditioning information was not matched across synthesis methods. The observed performance differences therefore reflect the complete evidence-conditioned framework and do not isolate the contribution of the diffusion bridge. Results are reported as point estimates without confidence intervals. Privacy was assessed empirically using membership and attribute inference attacks, and EHRDiB provides no formal privacy guarantee.

Future work could integrate differential privacy into evidence-conditioned generation to assess utility and disclosure risk under formal privacy constraints. Extending the framework to multiple visits could enable modeling of longitudinal patient trajectories. Federated learning could support cross-hospital training without centrally pooling patient records, while requiring appropriate privacy protection for model updates.

EHRDiB unifies EHR visit completion and synthesis through a shared representation and an evidence-conditioned latent diffusion bridge, with task-specific rules for retaining supplied information. Across MIMIC-IV and Duke Health, the framework supported downstream tasks while maintaining distributional fidelity and diversity; the evidence-fraction analysis further showed that more supplied evidence was associated with a stronger membership-inference signal. Explicit control over the amount of supplied evidence provides a basis for matching generated EHR data to its intended setting of use.

Methods

Data Sources

This study used visit-level EHR data from MIMIC-IV and Duke Health. MIMIC-IV version 3.1 is a publicly available, deidentified database covering care at Beth Israel Deaconess Medical Center from 2008 to 2022 [14, 15]. We included diagnosis, procedure, medication, and clinical measurement data in this study. The Duke Health data comprised diagnosis, medication, and clinical measurement records from 2015 to 2018 for patients in the Duke PREVENT cohort, which selected individuals aged 30-79 years without established cardiovascular disease at the study baseline[16]. In the numerical Duke Health representation (DH), clinical measurement values and their presence indicators were encoded separately. In the discretized representation (DH-D), measurement values were binned into categories, and missing measurements were represented by an explicit missing state. Data from each source were partitioned by patient into training, validation, and test sets in an 80:10:10 ratio.

Clinically Structured Representation

Visit Representation and Task Definition

To define completion and synthesis on these data, a visit is represented by KK modeling groups, denoted by x=(x(1),…,x(K))\mathbf{x} = (\mathbf{x}^{(1)}, \ldots, \mathbf{x}^{(K)}). Each modeling group corresponds to a distinct combination of clinical modality and variable type present in the dataset. For example, categorical and numerical variables within the same clinical modality form separate modeling groups. Categorical variables have finite state spaces that include an explicit absence state. A numerical group represents the binary presence state and value of each measurement separately. A binary availability mask m\mathbf{m} indicates which entries of the visit representation are observed. Measurement presence, in contrast, indicates whether a measurement is recorded. For example, when the absence of a laboratory result is known, its presence indicator is observed. The visit representation x\mathbf{x} and its availability mask m\mathbf{m} together form the data view.

Generation is conditioned on a subset of the available information, termed an evidence view:

xe=me⊙x,me⪯m,(1)\mathbf{x}_{e} = \mathbf{m}_{e} \odot\mathbf{x}, \qquad\mathbf{m}_{e} \preceq\mathbf{m}, \tag*{(1)}

where me\mathbf{m}_{e} identifies the supplied variables, ⊙\odot denotes elementwise multiplication, and me⪯m\mathbf{m}_{e} \preceq\mathbf{m} restricts selection to available information. The variables preserve the original record state, while the mask marks which information is supplied to the generator. To construct this mask, eligible clinical variables are randomly selected within each group at a specified evidence fraction, which controls the amount of input information. In addition to the randomly selected variables, we always include a diagnosis code recorded for the same visit to provide reliable clinical context. For MIMIC-IV, we use the recorded principal diagnosis. For the Duke Health data, we assign a proxy principal diagnosis by selecting, among the eligible diagnoses recorded for that visit, the one occurring most frequently across training visits. Variable encoding and evidence-selection rules are detailed in Supplementary Methods S1.

For both tasks, we denote EHRDiB’s conditional generative distribution by pΘ(x∣xe,me)p_{\Theta}(\mathbf{x} \mid\mathbf{x}_{e}, \mathbf{m}_{e}), where Θ\Theta denotes the model parameters learned from training data. This distribution is induced by the encoder-decoder architecture and latent diffusion bridge described below. Completion uses the evidence view of the target visit to generate a candidate record, then restores all supplied information to obtain the completed record:

x^∼pΘ(x∣xe,me),x~=xe+(1−me)⊙x^.(2)\widehat{\mathbf{x}} \sim p_{\Theta}(\mathbf{x} \mid\mathbf{x}_{e}, \mathbf{m}_{e}), \qquad\widetilde{\mathbf{x}} = \mathbf{x}_{e} + (1 - \mathbf{m}_{e}) \odot\widehat{\mathbf{x}}. \tag*{(2)}

Here, x^\widehat{\mathbf{x}} is the generated record and x~\widetilde{\mathbf{x}} is the completed record. Synthesis uses a reference population R\mathcal{R} to generate new visits containing a specified principal diagnosis. Unless otherwise specified, reference visits are drawn from the training set. A reference visit r∈R\mathbf{r} \in\mathcal{R} with that diagnosis supplies the evidence view used to condition generation:

x^∼pΘ(x∣re,me),re=me⊙r.(3)\widehat{\mathbf{x}} \sim p_{\Theta}(\mathbf{x} \mid\mathbf{r}_{e}, \mathbf{m}_{e}), \qquad\mathbf{r}_{e} = \mathbf{m}_{e} \odot\mathbf{r}. \tag*{(3)}

Only the principal diagnosis is explicitly retained in the synthetic record; all other variables are generated, including those supplied as conditioning information.

Clinically Structured Representation

EHRDiB uses the same group-specific encoders for the data view and the evidence view to construct representations in a common latent space. Each encoder maps clinical variables and their availability mask to a learned Gaussian factor over z∈Rdzz \in\mathbb{R}^{d_z}, parameterized by a mean vector and a diagonal covariance matrix. Multiplicative gating incorporates clinical information availability into the encoding alongside variable values. Binary and categorical groups each use one encoder, whereas a numerical group uses separate encoders for measurement presence and value. These two branches remain within the same modeling group, and the value branch receives only present, available results. For categorical variables with an explicit absence state, non-absence categories are represented by indicators, while absence is represented by an all-zero vector with a zero encoding mask. The absence state remains a reconstruction target in the data view.

For each data or evidence view, clinical context fusion (CCF) combines the available encoder factors across subsets of modeling groups. Each valid subset includes the diagnosis group containing the principal diagnosis, providing a shared clinical context:

Sv={S∈P(Kv)∣kdiag∈S},(4)S_v = \{S \in\mathcal{P}(K_v) \mid k_{\mathrm{diag}} \in S\}, \tag*{(4)}

where KvK_v indexes groups with at least one available encoder factor, P(Kv)\mathcal{P}(K_v) denotes its power set, and kdiagk_{\mathrm{diag}} identifies the diagnosis group. Within each subset, a product of experts combines the available Gaussian factors with a single standard normal prior p(z)p(z) to form a Gaussian subset posterior. The presence and value factors of a numerical group remain within the same modeling group. An equal-weight mixture of these subset posteriors gives the variational posterior for the view[17, 18]:

qϕ(z∣xv,mv)=1∣Sv∣∑S∈Svp(z)ZS,v∏k∈S∏r∈Ek,vqϕk,r(z∣xv(k),mv(k)).(5)q_{\phi}(z \mid x_v, m_v) = \frac{1}{\lvert S_v \rvert} \sum_{S \in S_v} \frac{p(z)}{Z_{S,v}} \prod_{k \in S} \prod_{r \in E_{k,v}} q_{\phi_{k,r}}\left(z \mid x_v^{(k)}, m_v^{(k)}\right). \tag*{(5)}

Here, vv identifies the data or evidence view, and ϕ\phi denotes encoder parameters. Within each group, r∈Ek,vr \in E_{k,v} indexes the available encoders, whose Gaussian factors are denoted by qϕk,rq_{\phi_{k,r}}. The constant ZS,vZ_{S,v} normalizes the product of the prior and all included encoder factors.

Parallel decoders map the shared latent representation zz to observation distributions for their respective modeling groups. The groups are assumed conditionally independent given zz, with their dependencies captured through the shared latent representation. Binary variables use Bernoulli distributions, and categorical variables use distributions over all categories, including the explicit absence state[19]. For numerical groups, separate decoders model measurement presence and value. Measurement presence follows a Bernoulli distribution, while present values follow a Gaussian distribution. Further methodological details, including the variational network architecture, are provided in Supplementary Methods S2.

Evidence-Conditioned Latent Bridge

In the shared latent space, paired data and evidence views of the same visit define the data endpoint z0z_0 and the evidence endpoint zTz_T, respectively. Each endpoint is the posterior mean of the subset containing all available modeling groups in the corresponding view. Conditioning a zero-drift reference diffusion on these paired endpoints yields a Gaussian bridge marginal with the following analytic form[20]:

q(zt∣z0,zT)=N(atz0+btzT,ct2I),0<t<T,(6)q(z_t \mid z_0, z_T) = \mathcal{N}(a_t z_0 + b_t z_T, c_t^2 I), \qquad0 < t < T, \tag*{(6)}

where

at=σˉt2σt2+σˉt2,bt=σt2σt2+σˉt2,ct2=σt2σˉt2σt2+σˉt2.(7)a_t = \frac{\bar{\sigma}_t^2}{\sigma_t^2 + \bar{\sigma}_t^2}, \qquad b_t = \frac{\sigma_t^2}{\sigma_t^2 + \bar{\sigma}_t^2}, \qquad c_t^2 = \frac{\sigma_t^2 \bar{\sigma}_t^2}{\sigma_t^2 + \bar{\sigma}_t^2}. \tag*{(7)}

Here, σt2=∫0tβ(τ) dτ\sigma_t^2 = \int_0^t \beta(\tau)\,\mathrm{d}\tau and σˉt2=∫tTβ(τ) dτ\bar{\sigma}_t^2 = \int_t^T \beta(\tau)\,\mathrm{d}\tau are the diffusion variances accumulated over the two intervals, with β(t)>0\beta(t) > 0 specifying the diffusion variance rate. Completion uses the evidence-endpoint distribution directly as its starting distribution. Synthesis applies additive Gaussian perturbation to this distribution, using the same perturbation rule during training and generation[21]. The resulting perturbed state replaces the evidence endpoint as the terminal boundary in the bridge distribution above.

The analytic bridge marginal above assumes that both endpoints are known. During generation, however, the data endpoint is unknown, and reverse sampling requires the conditional score. EHRDiB estimates this score through endpoint prediction[22]. A conditional endpoint network Fθ(zt,t,zT)F_\theta(z_t, t, z_T), with parameters θ\theta, estimates z0z_0 from the intermediate latent state, diffusion time, and unperturbed evidence endpoint. Time embeddings encode the position along the bridge, while evidence-conditioned feature-wise modulation incorporates the clinical context into the hidden representations[23]. For the unperturbed bridge, the analytic relationship yields the score estimate:

sθ=atct2Fθ(zt,t,zT)+btct2zT−1ct2zt.(8)\mathbf{s}_\theta= \frac{a_t}{c_t^2}F_\theta(\mathbf{z}_t,t,\mathbf{z}_T) + \frac{b_t}{c_t^2}\mathbf{z}_T - \frac{1}{c_t^2}\mathbf{z}_t. \tag*{(8)}

Here, zT\mathbf{z}_T denotes the unperturbed evidence endpoint. For synthesis, the terminal endpoint sampled from the perturbed starting distribution replaces zT\mathbf{z}_T in the second term, while the network remains conditioned on the unperturbed evidence endpoint. Together with the analytic transition score of the reference diffusion, this estimate guides reverse sampling toward time zero. The hybrid sampler alternates stochastic updates with deterministic Heun integration. Starting-distribution perturbation and sampling stochasticity control variation in generation; their effects on diversity and disclosure risk are assessed empirically. Further methodological details, including the endpoint network architecture, are provided in Supplementary Methods S3.

Training and Generation

Learning this generator involves two stages. First, the encoders and decoders are jointly trained on data views and randomly constructed evidence views. The objective combines type-specific reconstruction losses with Kullback-Leibler regularization toward the standard normal prior. Reconstruction scores only available targets in the current view, and regularization averages over valid subset posteriors rather than taking the exact KL divergence of their mixture. The encoders and decoders are then frozen, and a separate bridge is fitted for each task configuration by weighted regression to the encoded data endpoints.

After reverse integration, the frozen decoders produce the parameters of the observation distributions used to generate a visit. Synthesis is evaluated with two output rules applied to the same trained model: Bernoulli sampling draws binary outcomes and categorical states, whereas calibrated thresholding (Cali-T) uses training-set prevalence to set output thresholds. Numerical values are bounded decoder estimates and are used only when a result is marked present. The task-specific preservation rules are then applied to the generated visit. Further training and generation details are provided in Supplementary Methods S4, and the training and sampling settings for the main experiments are summarized in Supplementary Tab. S11.

Comparison Methods

To assess EHRDiB against existing approaches, methods operating on the same fixed-dimensional visit representations were evaluated using shared data partitions and measures. Completion was compared with CISS-VAE, GAIN, and CSDI[24, 25, 26], with supplied evidence restored in all completed outputs. Synthesis was compared with the variational models MVAE and MoPoE-VAE[17, 18], the adversarial models medGAN, medBGAN, and EMR-WGAN[10, 27, 28], and the diffusion models TabSyn, TabDiff, and ScoEHR[9, 29, 30].

Evaluation Measures

Evaluation assessed downstream predictive utility, generative diversity, and distributional fidelity for both completion and synthesis, and disclosure risk for synthesis. Prediction targets, metric formulas, and evaluation settings are detailed in Supplementary Methods S5.

Predictive utility assessed whether generated or completed records supported phenotype identification on real patients. Classifiers trained on generated or completed training visits were compared with those trained on real visits, evaluated on the same real test partition[2]. LightGBM configuration and training-set sizes were matched[31]. MIMIC-IV used ten principal-diagnosis targets and seven Phecode-based phenotypes; DH and DH-D used ten diagnosis targets. Target-defining diagnosis features were removed from classifier inputs. We report target-averaged differences in AUROC and AUPRC.

Generative diversity was evaluated using the Average Pairwise Distance Ratio (APDR) and Coverage, both computed in a common principal-component space fitted on real training data. APDR compares the mean distance between generated visits with that between real visits; a value near one indicates similar overall dispersion. Coverage measures the proportion of real-data neighborhoods containing at least one generated visit[32]. Higher Coverage indicates greater coverage of the real data.

Fidelity assessed the distributions of individual variables and the relationships between them. Feature Distribution Distance (FDD) combines prevalence discrepancies with differences in the distributions of recorded numerical values. Blockwise Correlation Matrix Distance (BCMD) compares correlations within and between clinical modalities. Lower FDD and BCMD indicate smaller discrepancies from real data.

Disclosure risk for synthesis was assessed using a membership inference attack (MIA) and an attribute inference attack (AIA)[3, 33]. MIA performance is measured by AUROC, which quantifies how well nearest-synthetic-visit distances distinguish patient-disjoint training members from test nonmembers. A value near 0.5 indicates little discrimination under this attack; departures in either direction can carry membership information. For AIA, we compare the AUPRC for inferring hidden diagnosis and medication codes from known patient information, using either synthetic records or an independent, equally sized real auxiliary set as the reference. The reported advantage (Δ\DeltaAIA) is the AUPRC difference between the synthetic and real auxiliary references; positive values indicate improved inference using synthetic data. These attacks do not establish formal privacy guarantees.

Evidence-Fraction and Component Analyses

Beyond the default task settings, we further varied the evidence fraction in MIMIC-IV synthesis to examine how the amount of supplied patient information affected utility and disclosure risk. Models were trained and evaluated under twelve evidence-fraction intervals. All configurations used the same data partitions, model architecture, training budget, and other experimental settings. Each interval was summarized by its mean evidence fraction and evaluated using the measures described above. The intervals are listed in Supplementary Methods S5.

To assess individual design choices, model components were examined in MIMIC-IV synthesis by varying the availability encoding method, the KL weight, the analytical formulation of the bridge path, and the sampler type with the remaining components fixed within each study (Supplementary Methods S6). Sampling hyperparameters are evaluated in relation to the specific experimental configuration and the priorities given to fidelity, diversity, and utility.

Data Availability

MIMIC-IV is available to credentialed users through PhysioNet.[14] The Duke Health data contain protected health information and are not available for sharing.

Code Availability

Code will be made publicly available on GitHub upon publication.

Ethics Statement

Use of the Duke Health data was approved by the Duke University Health System Institutional Review Board (Pro00110219) with a waiver of informed consent. MIMIC-IV was accessed under the PhysioNet credentialed data use agreement.

Supplementary Methods

Input Representation and Evidence Selection

We analyzed the same Duke Health visits in two representations: Duke Health (DH), which retained clinical measurements as numerical values, and Duke Health Discrete (DH-D), which discretized these values into categories using binning.

For MIMIC-IV, we used the recorded principal diagnosis. For Duke Health, we assigned a proxy principal diagnosis by selecting the eligible visit diagnosis with the highest training-set frequency.

Binary variables use one encoded coordinate each. A categorical variable uses one indicator for each non-absence category, with an all-zero input vector for absence; its decoder still assigns probability to every state. All indicators of a categorical variable share one evidence-selection decision. Numerical presence and value are paired during selection, and a value is eligible only when it is available and its measurement is present. Thus the general mask relation is

me,val(k)=me,pres(k)⊙xpres(k)⊙mval(k).(9)\mathbf{m}^{(k)}_{\mathrm{e,val}}=\mathbf{m}^{(k)}_{\mathrm{e,pres}}\odot\mathbf{x}^{(k)}_{\mathrm{pres}}\odot\mathbf{m}^{(k)}_{\mathrm{val}}. \tag*{(9)}

When every recorded present measurement has an available value, the last factor is redundant. An absent categorical variable is supervised as an output state in a data view but is excluded from randomly selected categorical evidence. The encoder-eligibility rules in Supplementary Methods S2 implement this distinction.

Evidence selection draws one ratio per visit and applies it to every eligible group. With n>1n>1 eligible variables, the selected count is the rounded ratio times nn, clipped to [1,n−1][1,n-1]; random ranking chooses the variables. A single eligible variable is retained by a Bernoulli draw with that ratio. Empty groups supply no evidence. Categorical absence states are ineligible, numerical presence and value are paired, and the principal diagnosis is added after selection.

Clinically Structured Representation

Architecture Overview EHRDiB has two sequentially trained neural systems. The variational network encodes data and evidence views into a shared dzd_z-dimensional space and parameterizes typed output likelihoods. It is then frozen while the endpoint network learns the evidence-to-data bridge.

Variational Representation Network Each modeling group has its own encoder parameters. Let m~v(k)\widetilde{\mathbf{m}}^{(k)}_v be its encoder-eligibility mask. For binary and numerical branches it is the aligned view mask; for a categorical variable with absence state zero, its logical-variable entry is

m~v,j(k)=mv,j(k)I[xv,j(k)≠0],(10)\widetilde{m}^{(k)}_{v,j}=m^{(k)}_{v,j}\mathbb{I}\left[x^{(k)}_{v,j}\ne0\right], \tag*{(10)}

expanded across its non-absence input indicators. This suppresses absent categorical variables at the encoder while leaving their data-view reconstruction targets active. Numerical value eligibility additionally requires an available, positive measurement-presence indicator.

With x‾v(k)=xv(k)⊙m~v(k)\overline{\mathbf{x}}^{(k)}_v=\mathbf{x}^{(k)}_v\odot\widetilde{\mathbf{m}}^{(k)}_v, the first hidden layer is

a1(k)=SiLU⁡(Wx(k)x‾v(k)+bx(k)),g1(k)=1+tanh⁡(Wm(k)m~v(k)+bm(k)),h1(k)=Dropout⁡(a1(k)⊙g1(k)).(11)\begin{aligned} \mathbf{a}^{(k)}_1&=\operatorname{SiLU}\left(\mathbf{W}^{(k)}_x\overline{\mathbf{x}}^{(k)}_v+\mathbf{b}^{(k)}_x\right),\\ \mathbf{g}^{(k)}_1&=\mathbf{1}+\tanh\left(\mathbf{W}^{(k)}_m\widetilde{\mathbf{m}}^{(k)}_v+\mathbf{b}^{(k)}_m\right),\\ \mathbf{h}^{(k)}_1&=\operatorname{Dropout}\left(\mathbf{a}^{(k)}_1\odot\mathbf{g}^{(k)}_1\right). \tag*{(11)} \end{aligned}

Both projections map encoded coordinates to the first hidden width. Zero-initialized gate weights and biases give g(k)=1g^{(k)} = 1 initially. Linear-SiLU-dropout layers then feed independent posterior-mean and clipped-log-variance heads. The same network processes data and evidence views.

Numerical presence and value have separate encoders and remain inner experts of one numerical modeling group. Categorical and numerical measurements form different outer groups when both are present. Analytic fusion includes a standard-normal prior in every valid diagnosis-containing subset product, then mixes the subset posteriors with equal weights[17, 18]. Balanced component selection is used for variational learning; the largest valid subset mean defines each data or evidence endpoint.

Every decoder branch receives the same latent vector and has a separate linear-SiLU-dropout trunk. Its head produces binary logits, grouped categorical logits, numerical-presence logits, or numerical values. The output rules and task-level preservation are specified in Supplementary Methods S4.

Gaussian Fusion Let Ek,vE_{k,v} denote the available encoder experts within modeling group kk for view vv. For a valid subset SS, qϕ,S(z∣xv,S,mv,S)q_{\phi,S}(z \mid x_{v,S}, m_{v,S}) denotes the normalized product of its available encoder factors and the standard normal prior. This subset posterior has diagonal Gaussian parameters

λS,v=1+∑k∈S∑r∈Ek,vσk,r,v−2,σS,v2=λS,v−1,\lambda_{S,v}=1+\sum_{k\in S}\sum_{r\in E_{k,v}}\sigma_{k,r,v}^{-2},\qquad\sigma_{S,v}^{2}=\lambda_{S,v}^{-1},
μS,v=σS,v2⊙∑k∈S∑r∈Ek,vμk,r,v⊙σk,r,v−2.(12)\mu_{S,v}=\sigma_{S,v}^{2}\odot\sum_{k\in S}\sum_{r\in E_{k,v}}\mu_{k,r,v}\odot\sigma_{k,r,v}^{-2}. \tag*{(12)}

The encoder factors are learned jointly. A single standard-normal prior contributes the unit precision term.

Numerical Observation Likelihood In numerical group kk, xpres(k)∈{0,1}Dkx_{\mathrm{pres}}^{(k)}\in\{0,1\}^{D_k} records binary presence for DkD_k measurements, and xval(k)∈RDkx_{\mathrm{val}}^{(k)}\in\mathbb{R}^{D_k} contains their values. For the preprocessed data views, in which presence indicators are observed and present measurements have available values, the likelihood factorizes as

pψk(xpres(k),xval,obs(k)∣z)=pψk,pres(xpres(k)∣z)∏j:xpres,j(k)=1N(xval,j(k);x^val,j(k)(z),σval2).(13)p_{\psi_k}\left(x_{\mathrm{pres}}^{(k)},x_{\mathrm{val,obs}}^{(k)}\mid z\right) =p_{\psi_k,\mathrm{pres}}\left(x_{\mathrm{pres}}^{(k)}\mid z\right)\prod_{j:x_{\mathrm{pres},j}^{(k)}=1}\mathcal{N}\left(x_{\mathrm{val},j}^{(k)};\widehat{x}_{\mathrm{val},j}^{(k)}(z),\sigma_{\mathrm{val}}^{2}\right). \tag*{(13)}

Here, ψk\psi_k denotes the decoder parameters, and xval,obs(k)x_{\mathrm{val,obs}}^{(k)} contains the values of present measurements. The presence likelihood is Bernoulli, while the value likelihood is Gaussian with decoder-predicted mean x^val,j(k)(z)\widehat{x}_{\mathrm{val},j}^{(k)}(z) and fixed variance σval2\sigma_{\mathrm{val}}^{2}. Thus, a known absence contributes to the presence likelihood without being assigned a numerical-value likelihood.

Evidence-Conditioned Latent Bridge

Forward Bridge Process Let EϕE_\phi denote expert encoding, clinical context fusion, and extraction of the posterior mean of qϕ,Kvq_{\phi,\mathcal{K}_v} for the full available subset Kv\mathcal{K}_v. Two views of the same visit define paired endpoints:

z0=Eϕ(x,m),zT=Eϕ(xe,me).(14)z_0=E_\phi(x,m),\qquad z_T=E_\phi(x_e,m_e). \tag*{(14)}

The data endpoint z0z_0 represents the target visit, and the evidence endpoint zTz_T conditions generation. The starting state zTstartz_T^{\mathrm{start}} equals the evidence endpoint for completion and a perturbed version for synthesis. The symbol zTz_T always denotes the unperturbed evidence representation; the path boundary at time TT is zTstartz_T^{\mathrm{start}}. Bridge time parameterizes the latent diffusion trajectory. Reverse sampling proceeds from the terminal boundary toward time zero.

The reference process is a zero-drift diffusion,

dzt=β(t) dWt,σt2=∫0tβ(τ) dτ,σˉt2=∫tTβ(τ) dτ(15)\mathrm{d}z_t = \sqrt{\beta(t)}\,\mathrm{d}W_t,\qquad\sigma_t^2 = \int_0^t \beta(\tau)\,\mathrm{d}\tau,\qquad\bar{\sigma}_t^2 = \int_t^T \beta(\tau)\,\mathrm{d}\tau \tag*{(15)}

where WtW_t is a standard dzd_z-dimensional Wiener process and β(t)>0\beta(t) > 0 is an integrable diffusion variance rate on [0,T][0,T]. Conditioning this reference on the endpoints gives a Gaussian bridge marginal for 0<t<T0 < t < T[20]:

q(zt∣z0,zTstart)=N(atz0+btzTstart,ct2I),(16)q(z_t \mid z_0, z_T^{\mathrm{start}}) = \mathcal{N}\left(a_t z_0 + b_t z_T^{\mathrm{start}}, c_t^2 I\right), \tag*{(16)}
at=σˉt2σt2+σˉt2,bt=σt2σt2+σˉt2,ct2=σt2σˉt2σt2+σˉt2.(17)a_t = \frac{\bar{\sigma}_t^2}{\sigma_t^2 + \bar{\sigma}_t^2},\qquad b_t = \frac{\sigma_t^2}{\sigma_t^2 + \bar{\sigma}_t^2},\qquad c_t^2 = \frac{\sigma_t^2 \bar{\sigma}_t^2}{\sigma_t^2 + \bar{\sigma}_t^2}. \tag*{(17)}

For this continuous reference, at+bt=1a_t + b_t = 1 and ct2>0c_t^2 > 0 in the interior; the distributions converge to point masses at the prescribed endpoints as t→0t \to0 and t→Tt \to T.

Endpoint Prediction and Conditional Score The endpoint predictor estimates the data representation from an intermediate state, time, and the unperturbed evidence endpoint:

z^0=Fθ(zt,t,zT).(18)\hat{z}_0 = F_\theta(z_t, t, z_T). \tag*{(18)}

The predictor is trained by weighted endpoint regression (Supplementary Methods S4).

For the continuous reference, let qt(zt∣zTstart,zT)q_t(z_t \mid z_T^{\mathrm{start}}, z_T) denote the bridge marginal after integrating over data endpoints. Differentiating this Gaussian mixture gives the exact conditional score; replacing its conditional mean by the endpoint prediction gives the score used by the model[22]:

s∗=∇ztlog⁡qt(zt∣zTstart,zT)=−zt−atE[z0∣zt,t,zTstart,zT]−btzTstartct2,(19)s^* = \nabla_{z_t} \log q_t(z_t \mid z_T^{\mathrm{start}}, z_T) = -\frac{z_t - a_t \mathbb{E}[z_0 \mid z_t, t, z_T^{\mathrm{start}}, z_T] - b_t z_T^{\mathrm{start}}}{c_t^2}, \tag*{(19)}
sθ(zt,t,zTstart,zT)=−zt−atz^0−btzTstartct2.s_\theta(z_t, t, z_T^{\mathrm{start}}, z_T) = -\frac{z_t - a_t \hat{z}_0 - b_t z_T^{\mathrm{start}}}{c_t^2}.

When the starting state equals the evidence endpoint, endpoint regression under the corresponding bridge marginal targets the conditional mean in the score identity. For synthesis, FθF_\theta conditions on the intermediate state, time, and unperturbed evidence endpoint. Substituting this evidence-conditioned prediction into the terminal-conditioned score formula defines the plug-in approximation used for sampling.

For independent Gaussian endpoint perturbation, marginalizing the perturbed boundary gives

q(zt∣z0,zT)=N(atz0+btzT,(ct2+bt2σstart2)I),(20)q(z_t \mid z_0, z_T) = \mathcal{N}\left(a_t z_0 + b_t z_T, \left(c_t^2 + b_t^2 \sigma_{\mathrm{start}}^2\right)I\right), \tag*{(20)}
∇ztlog⁡qt(zt∣zT)=−zt−atE[z0∣zt,t,zT]−btzTct2+bt2σstart2.\nabla_{z_t} \log q_t(z_t \mid z_T) = -\frac{z_t - a_t \mathbb{E}[z_0 \mid z_t, t, z_T] - b_t z_T}{c_t^2 + b_t^2 \sigma_{\mathrm{start}}^2}.

The added variance follows from Gaussian convolution. Integrating over data endpoints gives the evidence-conditioned score above, using the conditional-score argument of DDBM and ECSI[21, 22]. At zero endpoint perturbation, the terminal-conditioned and perturbation-marginalized score identities coincide. Sampling uses Eq. (19) with the finite coefficients defined below.

Conditional Endpoint Prediction Network. The analytic wrapper takes ztz_t, t>0t > 0, and zTz_T, supplies the coefficients defined under Endpoint Preconditioning below, and combines the residual network output with the state skip term. The trainable network concatenates cin(t)ztc_{\mathrm{in}}(t)z_t and zTz_T once at its input, giving a 2dz2d_z-dimensional vector projected to the first hidden width.

A fixed sinusoidal encoding of cnoise(t)c_{\mathrm{noise}}(t), followed by a two-layer SiLU MLP, gives a time embedding ete_t[22, 34]. A separate two-layer SiLU MLP maps zTz_T to the evidence embedding eee_e. Both embeddings have dimension dtd_t and are reused in every residual block. The evidence embedding provides affine scale and shift, adapting feature-wise conditioning[23].

For block ll, the exact operation order is

ul=WlinSiLU⁡(LN⁡(hl))+blin+AlSiLU⁡(et)+blt,[γl∥δl]=BlSiLU⁡(ee)+ble,u~l=(1+γl)⊙LN⁡(ul)+δl,hl+1=Plhl+WloutDropout⁡(SiLU⁡(u~l))+blout.(21)\begin{aligned} u_l &= W_l^{\mathrm{in}}\operatorname{SiLU}(\operatorname{LN}(h_l)) + b_l^{\mathrm{in}} + A_l\operatorname{SiLU}(e_t) + b_l^t, \\ [\gamma_l \mathbin{\|} \delta_l] &= B_l\operatorname{SiLU}(e_e) + b_l^e, \\ \widetilde{u}_l &= (1+\gamma_l)\odot\operatorname{LN}(u_l)+\delta_l, \\ h_{l+1} &= P_lh_l + W_l^{\mathrm{out}}\operatorname{Dropout}(\operatorname{SiLU}(\widetilde{u}_l)) + b_l^{\mathrm{out}}. \tag*{(21)} \end{aligned}

The shortcut PlP_l is identity at equal width and a learned bias-free projection otherwise. The residual output weights and bias start at zero. Hidden widths contract to a central bottleneck and expand symmetrically. A final LayerNorm-SiLU-linear head, also zero-initialized, returns the dzd_z-dimensional residual prediction.

Reverse Bridge Dynamics. For 0<t<T0 < t < T, the continuous reference has transition score toward the starting state

sT(zt,t,zTstart)=∇ztlog⁡pref(zTstart∣zt)=−zt−zTstartσt2.(22)s_T(z_t,t,z_T^{\mathrm{start}})=\nabla_{z_t}\log p_{\mathrm{ref}}(z_T^{\mathrm{start}}\mid z_t)=-\frac{z_t-z_T^{\mathrm{start}}}{\sigma_t^2}. \tag*{(22)}

Here prefp_{\mathrm{ref}} is the reference diffusion’s transition density from tt to TT. With the exact bridge score, time reversal gives the stochastic and probability-flow dynamics[22]. Substituting sθs_\theta gives their estimated drift forms:

uθSDE=β(t)(sT−sθ),vθ=β(t)(sT−12sθ),g2(t)=β(t).(23)u_\theta^{\mathrm{SDE}}=\beta(t)(s_T-s_\theta),\qquad v_\theta=\beta(t)\left(s_T-\frac{1}{2}s_\theta\right),\qquad g^2(t)=\beta(t). \tag*{(23)}

Here g(t)g(t) is the stochastic diffusion amplitude. These drifts use decreasing time, dt<0dt<0, while stochastic increments have covariance g2(t)∣dt∣Ig^2(t)|dt|I. Reverse sampling combines stochastic updates with deterministic integration toward time zero. The finite approximation and numerical solver are specified below.

Finite Bridge Approximation. The implementation uses a finite symmetric variance schedule. For positive increments δβ0,…,δβN−1\delta\beta_0,\ldots,\delta\beta_{N-1}, define

Un=∑j=0nδβj,Vn=∑j=nN−1δβj,V=∑j=0N−1δβj.(24)U_n=\sum_{j=0}^{n}\delta\beta_j,\qquad V_n=\sum_{j=n}^{N-1}\delta\beta_j,\qquad V=\sum_{j=0}^{N-1}\delta\beta_j. \tag*{(24)}

With normalized time T=1T=1 and n(t)=round⁡((N−1)t)n(t)=\operatorname{round}((N-1)t), the implemented coefficients are

atdisc=Vn(t)V,btdisc=Un(t)V,(ctdisc)2=Un(t)Vn(t)V,βdisc(t)=(N−1)δβn(t).(25)a_t^{\mathrm{disc}}=\frac{V_{n(t)}}{V},\qquad b_t^{\mathrm{disc}}=\frac{U_{n(t)}}{V},\qquad(c_t^{\mathrm{disc}})^2=\frac{U_{n(t)}V_{n(t)}}{V},\qquad\beta_{\mathrm{disc}}(t)=(N-1)\delta\beta_{n(t)}. \tag*{(25)}

Both cumulative sums include the current increment, giving Un+Vn=V+δβnU_n+V_n=V+\delta\beta_n. The superscript distinguishes the finite coefficients used during training and sampling from the continuous reference in the main text. Intermediate training states are sampled directly:

qdisc(zt∣z0,zTstart)=N(atdiscz0+btdisczTstart,(ctdisc)2I)(26)q^{\mathrm{disc}}(\boldsymbol{z}_t \mid\boldsymbol{z}_0,\boldsymbol{z}_T^{\mathrm{start}})=\mathcal{N}\left(a_t^{\mathrm{disc}}\boldsymbol{z}_0+b_t^{\mathrm{disc}}\boldsymbol{z}_T^{\mathrm{start}},(c_t^{\mathrm{disc}})^2 I\right) \tag*{(26)}
zt=atdiscz0+btdisczTstart+ctdiscϵ,ϵ∼N(0,I).\boldsymbol{z}_t=a_t^{\mathrm{disc}}\boldsymbol{z}_0+b_t^{\mathrm{disc}}\boldsymbol{z}_T^{\mathrm{start}}+c_t^{\mathrm{disc}}\boldsymbol{\epsilon},\quad\boldsymbol{\epsilon}\sim\mathcal{N}(0,I).

The conditional endpoint network is fitted to these finite-schedule states. In the score used for sampling, ata_t, btb_t, ctc_t in Eq. (19) are replaced by atdisca_t^{\mathrm{disc}}, btdiscb_t^{\mathrm{disc}}, ctdiscc_t^{\mathrm{disc}}. The shared increment in the cumulative sums makes atdisc+btdisc>1a_t^{\mathrm{disc}}+b_t^{\mathrm{disc}}>1 and leaves nonzero conditional variance at the finite schedule boundaries.

Endpoint Preconditioning In the preconditioning expressions below, ata_t, btb_t, ctc_t abbreviate the finite coefficients in Eq. (25). Analytic preconditioning separates the residual network from endpoint prediction[22, 35]. Let ν0,νT>0\nu_0,\nu_T>0 and χ\chi be fixed scale and cross-covariance hyperparameters, with ∣χ∣<ν0νT\lvert\chi\rvert<\nu_0\nu_T. For preconditioning, we set the effective evidence scale to νTeff=νT+σstart\nu_T^{\mathrm{eff}}=\nu_T+\sigma_{\mathrm{start}}, where σstart≥0\sigma_{\mathrm{start}}\geq0 is the endpoint perturbation scale. Define

vt=at2ν02+bt2(νTeff)2+2atbtχ+ct2,v_t=a_t^2\nu_0^2+b_t^2\left(\nu_T^{\mathrm{eff}}\right)^2+2a_tb_t\chi+c_t^2,
rt=bt2(ν02(νTeff)2−χ2)+ν02ct2,r_t=b_t^2\left(\nu_0^2\left(\nu_T^{\mathrm{eff}}\right)^2-\chi^2\right)+\nu_0^2c_t^2,
cin(t)=vt−1/2,cskip(t)=atν02+btχvt,c_{\mathrm{in}}(t)=v_t^{-1/2},\qquad c_{\mathrm{skip}}(t)=\frac{a_t\nu_0^2+b_t\chi}{v_t},
cout(t)=rtvt,cnoise(t)=κlog⁡t,κ>0, t>0.(27)c_{\mathrm{out}}(t)=\sqrt{\frac{r_t}{v_t}},\qquad c_{\mathrm{noise}}(t)=\kappa\log t,\qquad\kappa>0,\ t>0. \tag*{(27)}

The positive residual scale defines the predictor:

Fθ(zt,t,zT)=cskip(t)zt+cout(t)fθ(cin(t)zt,cnoise(t),zT),(28)F_\theta(\boldsymbol{z}_t,t,\boldsymbol{z}_T)=c_{\mathrm{skip}}(t)\boldsymbol{z}_t+c_{\mathrm{out}}(t)f_\theta\left(c_{\mathrm{in}}(t)\boldsymbol{z}_t,c_{\mathrm{noise}}(t),\boldsymbol{z}_T\right), \tag*{(28)}

Numerical Reverse Integration Let sθdiscs_\theta^{\mathrm{disc}} be Eq. (19) evaluated with the finite bridge coefficients. The transition score and drifts used by the sampler are

sTdisc=−zt−zTstartVn(t),s_T^{\mathrm{disc}}=-\frac{\boldsymbol{z}_t-\boldsymbol{z}_T^{\mathrm{start}}}{V_n(t)},
uθdisc=βdisc(t)(sTdisc−sθdisc),\boldsymbol{u}_\theta^{\mathrm{disc}}=\beta_{\mathrm{disc}}(t)\left(s_T^{\mathrm{disc}}-s_\theta^{\mathrm{disc}}\right),
vθdisc=βdisc(t)(sTdisc−12sθdisc),gdisc2(t)=βdisc(t).(29)\boldsymbol{v}_\theta^{\mathrm{disc}}=\beta_{\mathrm{disc}}(t)\left(s_T^{\mathrm{disc}}-\frac{1}{2}s_\theta^{\mathrm{disc}}\right),\qquad g_{\mathrm{disc}}^2(t)=\beta_{\mathrm{disc}}(t). \tag*{(29)}

These drifts evaluate the reference drift forms in Eq. (23) with the finite bridge coefficients at the current state and time.

On a decreasing grid ti>ti+1t_i>t_{i+1}, a stochasticity parameter ωi∈[0,1)\omega_i\in[0,1) allocates part of an interval to an Euler-Maruyama substep:

t^i=ti+ωi(ti+1−ti),δiS=t^i−ti≤0,\widehat{t}_i=t_i+\omega_i(t_{i+1}-t_i),\qquad\delta_i^{S}=\widehat{t}_i-t_i\leq0,
z^i=zti+δiSuθdisc(zti,ti,zTstart,zT)+∣δiS∣ gdisc(ti)ξi,ξi∼N(0,I).(30)\widehat{\boldsymbol{z}}_i=\boldsymbol{z}_{t_i}+\delta_i^{S}\boldsymbol{u}_\theta^{\mathrm{disc}}(\boldsymbol{z}_{t_i},t_i,\boldsymbol{z}_T^{\mathrm{start}},\boldsymbol{z}_T)+\sqrt{\lvert\delta_i^{S}\rvert}\,g_{\mathrm{disc}}(t_i)\boldsymbol{\xi}_i,\qquad\boldsymbol{\xi}_i\sim\mathcal{N}(0,I). \tag*{(30)}

At zero stochasticity this leaves both time and state unchanged. A Heun step integrates the remaining interval, Δti=ti+1−t^i\Delta t_i=t_{i+1}-\widehat{t}_i:

z~i+1=z^i+Δtivθdisc(z^i,t^i,zTstart,zT),\widetilde{\boldsymbol{z}}_{i+1}=\widehat{\boldsymbol{z}}_i+\Delta t_i\boldsymbol{v}_\theta^{\mathrm{disc}}(\widehat{\boldsymbol{z}}_i,\widehat{t}_i,\boldsymbol{z}_T^{\mathrm{start}},\boldsymbol{z}_T),
zti+1=z^i+Δti2[vθdisc(z^i,t^i,zTstart,zT)+vθdisc(z~i+1,ti+1,zTstart,zT)].(31)\boldsymbol{z}_{t_{i+1}}=\widehat{\boldsymbol{z}}_i+\frac{\Delta t_i}{2}\left[\boldsymbol{v}_\theta^{\mathrm{disc}}(\widehat{\boldsymbol{z}}_i,\widehat{t}_i,\boldsymbol{z}_T^{\mathrm{start}},\boldsymbol{z}_T)+\boldsymbol{v}_\theta^{\mathrm{disc}}(\widetilde{\boldsymbol{z}}_{i+1},t_{i+1},\boldsymbol{z}_T^{\mathrm{start}},\boldsymbol{z}_T)\right]. \tag*{(31)}

At the final interval ending at zero, only the Euler predictor is used, avoiding a network evaluation at zero time. Sampling starts below TT with the starting state as its initial state and proceeds toward the final integrated state z0genz_0^{\mathrm{gen}}. The sampler alternates stochastic updates and deterministic integration[22], using a second-order Heun update for the latter[35]. Stochasticity controls path randomness; the solver controls deterministic integration error.

The final integrated latent state z0genz_0^{\mathrm{gen}} is passed to the frozen decoders. Completion sets σstart=0\sigma_{\mathrm{start}}=0; synthesis samples the perturbed starting state once and keeps the unperturbed evidence endpoint as the network condition throughout integration. Supplementary Tab. S11 gives the task-specific stochasticity values.

Training and Generation

Variational Learning Representation learning uses data and evidence views. Let Lrec(k)\mathcal{L}_{\mathrm{rec}}^{(k)} denote the normalized reconstruction loss for available variables in group kk, averaged over training views and latent samples from the selected subset posterior. It uses the observation distributions defined above. The objective combines reconstruction with regularization of the subset posteriors:

LVAE(ϕ,ψ)=∑k=1KLrec(k)+λKLLKL,LKL=E(xv,mv)[1∣Sv∣∑S∈SvDKL(qϕ,S(z∣xv,S,mv,S)∥p(z))].(32)\begin{aligned} \mathcal{L}_{\mathrm{VAE}}(\phi,\psi) &= \sum_{k=1}^{K}\mathcal{L}_{\mathrm{rec}}^{(k)}+\lambda_{\mathrm{KL}}\mathcal{L}_{\mathrm{KL}},\\ \mathcal{L}_{\mathrm{KL}} &= \mathbb{E}_{(x_v,m_v)}\left[\frac{1}{\lvert S_v\rvert}\sum_{S\in S_v}D_{\mathrm{KL}}\left(q_{\phi,S}(z\mid x_{v,S},m_{v,S})\mathbin{\|}p(z)\right)\right]. \tag*{(32)} \end{aligned}

Here λKL≥0\lambda_{\mathrm{KL}}\ge0 weights the regularizer, and the expectation is over training visits and their views. The objective combines group-normalized reconstruction with component-average KL regularization over the subset posteriors of the mixture-of-products construction[18].

After representation learning, the encoders and decoders are frozen. The data and evidence endpoints are posterior means formed from all groups available in their respective views. This provides a deterministic representation of each view while retaining the same observation model for both generation tasks.

Reconstruction and Regularization Balanced selection cycles through valid subset components across training examples. Given a selected component,

z=μS,v+σS,v⊙ϵ,ϵ∼N(0,I).(33)z=\boldsymbol{\mu}_{S,v}+\boldsymbol{\sigma}_{S,v}\odot\boldsymbol{\epsilon},\qquad\boldsymbol{\epsilon}\sim\mathcal{N}(0,I). \tag*{(33)}

Training includes data views and randomly constructed evidence views. Reconstruction scores only the current view. Define Avg⁡(ℓ,A)\operatorname{Avg}(\ell,A) as an active-variable average within each visit, followed by an average over visits with any active target:

Avg⁡(ℓ,A)=1∣IA∣∑i∈IA∑jAijℓij∑jAij,IA={i:∑jAij>0}.(34)\operatorname{Avg}(\ell,A)=\frac{1}{\lvert I_A\rvert}\sum_{i\in I_A}\frac{\sum_j A_{ij}\ell_{ij}}{\sum_j A_{ij}},\qquad I_A=\{i:\sum_j A_{ij}>0\}. \tag*{(34)}

An empty active set contributes zero. Binary losses use binary cross-entropy and categorical losses use categorical negative log-likelihood. Data views score every categorical variable, including absence; evidence views score selected categories. For numerical groups,

Lpres(k)=Avg⁡(BCE⁡(xpres(k),πpres(k)),Apres(k)),\mathcal{L}_{\mathrm{pres}}^{(k)}=\operatorname{Avg}\left(\operatorname{BCE}\left(\mathbf{x}_{\mathrm{pres}}^{(k)},\boldsymbol{\pi}_{\mathrm{pres}}^{(k)}\right),A_{\mathrm{pres}}^{(k)}\right),
Lval(k)=Avg⁡((xval(k)−x^val(k))22σval2,Aval(k)),\mathcal{L}_{\mathrm{val}}^{(k)}=\operatorname{Avg}\left(\frac{\left(\mathbf{x}_{\mathrm{val}}^{(k)}-\hat{\mathbf{x}}_{\mathrm{val}}^{(k)}\right)^2}{2\sigma_{\mathrm{val}}^2},A_{\mathrm{val}}^{(k)}\right),
Lrec(k)=12(Lpres(k)+Lval(k)),Lrec=∑k=1KLrec(k).(35)\mathcal{L}_{\mathrm{rec}}^{(k)}=\frac{1}{2}\left(\mathcal{L}_{\mathrm{pres}}^{(k)}+\mathcal{L}_{\mathrm{val}}^{(k)}\right),\qquad\mathcal{L}_{\mathrm{rec}}=\sum_{k=1}^{K}\mathcal{L}_{\mathrm{rec}}^{(k)}. \tag*{(35)}

Here Apres(k)A_{\mathrm{pres}}^{(k)} selects available presence targets and Aval(k)A_{\mathrm{val}}^{(k)} additionally requires a present measurement. The value loss omits the fixed Gaussian normalization constant. The two numerical branches use separate active-set denominators before their half-weighted combination.

All losses and masks above refer to the current sample and view; the view index is omitted for readability. The presence probabilities πpres(k)\boldsymbol{\pi}_{\mathrm{pres}}^{(k)} are obtained from the decoder logits. Reconstruction uses the selected subset sample, whereas the regularizer above averages the component KLs over all valid subsets.

For fixed view weights wS=1/∣Sv∣w_S=1/\lvert S_v\rvert, write q=∑SwSqSq=\sum_S w_Sq_S, suppressing the view conditions. The distinction between component and mixture regularization follows from

∑SwSDKL(qS∥p)=DKL(q∥p)+∑SwSDKL(qS∥q).(36)\sum_S w_SD_{\mathrm{KL}}(q_S\Vert p)=D_{\mathrm{KL}}(q\Vert p)+\sum_S w_SD_{\mathrm{KL}}(q_S\Vert q). \tag*{(36)}

Thus the component average bounds the mixture KL from above.

Training Schedule During VAE warmup in the reference implementation, the fraction of evidence views increases linearly from zero to one half, while the evidence-fraction lower bound decreases from the configured upper bound to its minimum. The KL coefficient warms up over the same interval. Thereafter, half the minibatch contains data views and half evidence views. Bridge fitting and generation draw partial evidence under the configured task bounds. Optimization settings are listed in Table S11.

ComponentSetting
Latent and embedding dimensionsdz=dt=384d_z = d_t = 384
VAE widthsEncoder: 512-512-384; decoder: 384-512-512
VAE dropout and value variance0.1; σval2=0.5\sigma_{\mathrm{val}}^2 = 0.5
VAE optimizationAdamW; 50,000 updates; batch 2,048; learning rate 5×10−45 \times10^{-4}; weight decay 10−510^{-5}
KL regularizationTarget 10−510^{-5}; linear warmup over 20,000 updates for MIMIC-IV, 10,000 for Duke
Endpoint networkWidths 1,024-512-384-384-384-512-1,024; dropout 0.05
Bridge optimizationAdamW; 200,000 updates; batch 1,024; learning rate 5×10−45 \times10^{-4}; weight decay 0; EMA 0.9999
Checkpoint selectionMinimum validation objective; evaluate every 500 VAE / 1,000 bridge updates; EMA weights for bridge selection
Preconditioningν0=νT=0.5\nu_0 = \nu_T = 0.5, χ=0\chi= 0, κ=250\kappa= 250
Bridge schedule and training timeN=1,000N = 1,000; symmetric schedule in Supplementary Methods S4; t∼U(10−4,1)t \sim U(10^{-4}, 1)
Evidence-fraction boundsSynthesis: U(0.1,0.5)U(0.1, 0.5); completion: U(0.3,0.7)U(0.3, 0.7)
Endpoint perturbation and stochasticitySynthesis: 0.5 and 0.25; completion: 0 and 0.5
Reverse grid128 positive grid points for MIMIC-IV; 64 for Duke; ρ=7\rho= 7, followed by zero

Table S11. Default training and sampling settings for the main EHRDiB completion and synthesis experiments.

Bridge Training The endpoint predictor is learned through weighted endpoint regression[22]:

Lbridge(θ)=E[λ(t)MSE⁡(Fθ(zt,t,zT),z0)],λ(t)>0.(37)\mathcal{L}_{\mathrm{bridge}}(\theta)=\mathbb{E}\left[\lambda(t)\operatorname{MSE}\left(F_\theta(\mathbf{z}_t,t,\mathbf{z}_T),\mathbf{z}_0\right)\right],\qquad\lambda(t)>0. \tag*{(37)}

The expectation covers paired visit views, bridge time, intermediate noise, and task-specific endpoint perturbation. With finite second moments, the unrestricted population optimum under this training distribution is E[z0∣zt,t,zT]\mathbb{E}[\mathbf{z}_0\mid\mathbf{z}_t,t,\mathbf{z}_T]. Positive time-only weighting does not change that conditional-mean target. The predictor parameterization is specified under Endpoint Preconditioning in Supplementary Methods S3.

The bridge objective uses λ(t)=cout−2(t)=vt/rt\lambda(t)=c_{\mathrm{out}}^{-2}(t)=v_t/r_t, and MSE averages over latent coordinates. Training samples time uniformly over the configured positive interval together with intermediate noise and the task-specific starting state. Only fθf_\theta is learned; representation parameters and analytic coefficients remain fixed. The noise embedding cnoise(t)c_{\mathrm{noise}}(t) is a deterministic transformation of time.

Record Generation The frozen decoders map the final shared latent state to the clinical modalities:

x^=G(Dψ(z0gen)).(38)\hat{\mathbf{x}}=\mathcal{G}\left(D_\psi\left(\mathbf{z}_0^{\mathrm{gen}}\right)\right). \tag*{(38)}

Here DψD_{\psi} produces the observation-model parameters and G\mathcal{G} applies the output rules to generate a record from them. The rules for each variable type are specified under Output Rules below.

Completion Completion uses the target visit’s evidence as both the starting state and the neural condition:

zT=Eϕ(xe,me),zTstart=zT.(39)z_T = E_{\phi}(\mathbf{x}_e,\mathbf{m}_e), \qquad z_T^{\mathrm{start}} = z_T. \tag*{(39)}

Stochastic reverse sampling generates variation in the unspecified information. After decoding, the evidence-covering rule of the main text (Eq. (2)) restores the supplied values.

Synthesis For a reference visit r∈Rr \in\mathcal{R} with the requested principal diagnosis,

re=me⊙r,zT=Eϕ(re,me),zTstart=zT+σstartξ,ξ∼N(0,I).(40)r_e = \mathbf{m}_e \odot r, \qquad z_T = E_{\phi}(r_e,\mathbf{m}_e), \qquad z_T^{\mathrm{start}} = z_T + \sigma_{\mathrm{start}}\boldsymbol{\xi}, \qquad\boldsymbol{\xi} \sim\mathcal{N}(0,I). \tag*{(40)}

The nonnegative endpoint perturbation scale σstart\sigma_{\mathrm{start}} controls the Gaussian perturbation applied to the evidence endpoint. The noise ξ\boldsymbol{\xi} is independent of the paired visit views and intermediate bridge noise. This separates variation in the starting latent state from the reference evidence that conditions generation[21]: the unperturbed evidence endpoint remains the network condition. The synthesis bridge is trained with the same perturbation rule, with the score approximation specified in Eq. (19). After reverse sampling and decoding, the synthetic visit is

xsynthetic=ddiag+(1−ddiag)⊙x^.(41)\mathbf{x}_{\mathrm{synthetic}} = \mathbf{d}_{\mathrm{diag}} + (1-\mathbf{d}_{\mathrm{diag}}) \odot\hat{\mathbf{x}}. \tag*{(41)}

Only the principal diagnosis is explicitly retained. The other clinical variables are generated jointly from the shared latent state, conditioned on the reference evidence.

Output Rules Bernoulli sampling draws binary outcomes and categorical states from their respective probabilities. Cali-T fits fixed thresholds for binary and categorical-presence probabilities on decoded training predictions to approximate training-set prevalences, subject to probability ties. The thresholds are reused for generated records; when a categorical variable is present, its most probable non-absence category is selected. Numerical values use decoder estimates bounded according to the data representation, gated by generated measurement presence, rather than Gaussian draws. Both output rules use the same trained observation model.

For completion, supplied evidence is restored after applying the output rules. Completed numerical values are multiplied by completed measurement presence, including when the supplied evidence specifies an absent measurement. The masks obey the presence-value constraints above. In synthesis, only the principal-diagnosis coordinate is explicitly retained. The randomness and calibration settings of G\mathcal{G} are implicit in Eq. (38).

Reference Implementation Tab. S11 summarizes the training and sampling settings for the main experiments. The default evidence fraction is drawn uniformly from [0.3,0.7][0.3, 0.7] for completion and [0.1,0.5][0.1, 0.5] for synthesis. The corresponding starting-state perturbation scales are 0 and 0.5.

The variance schedule first constructs a 1,000-element squared linear grid between 0.1/1000\sqrt{0.1/1000} and 0.3/1000\sqrt{0.3/1000}. Its first 500 entries are concatenated with their reverse to obtain the symmetric increments in Eq. (25). For SS positive sampling times, the reference reverse grid is

ti=[(1−ui)(1−10−4)1/ρ+ui(10−4)1/ρ]ρ,ui=iS−1,i=0,…,S−1,(42)t_i = \left[(1-u_i)(1-10^{-4})^{1/\rho} + u_i(10^{-4})^{1/\rho}\right]^{\rho}, \qquad u_i = \frac{i}{S-1}, \qquad i=0,\ldots,S-1, \tag*{(42)}

followed by tS=0t_S = 0. The stochastic and final updates are specified under Numerical Reverse Integration in Supplementary Methods S3.

Evaluation Measures and Settings

Predictive utility is a primary evaluation criterion for both tasks, asking whether generated or completed visits support clinical phenotype prediction on real test data; disclosure is an additional primary criterion for synthesis. Diversity and fidelity provide complementary evidence on coverage of the real-data distribution and preservation of feature distributions and dependencies. Each measure is defined together with its evaluation settings below.

Utility Utility compares Train on Synthetic, Test on Real (TSTR) with Train on Real, Test on Real (TRTR), following synthetic-EHR benchmarking practice[2]. For completion, the TSTR arm uses completed training visits. Within each run, LightGBM classifiers use a shared configuration, matched training-set sizes, and the same real test partition[31]. Diagnosis features that directly define the targets are removed from classifier inputs. The tasks identify recorded phenotypes rather than future outcomes.

MIMIC-IV uses two target sets on the same real test visits. The first comprises ten fixed principal-diagnosis groups; its inputs mask each visit’s principal diagnosis and all ten target diagnosis columns. The second comprises seven Phecode-based phenotypes; all diagnosis columns associated with these targets are masked. Both use the remaining diagnosis indicators, procedure and medication indicators, clinical measurement values or categories, and measurement-presence indicators. For the second set, real labels use the original diagnosis codes and Phecode mapping, whereas synthetic labels use mapped three-character diagnosis groups. Each Duke representation uses ten fixed diagnosis targets; inputs mask each visit’s assigned principal diagnosis and all ten target columns and include the remaining diagnosis indicators, medication indicators, and clinical measurements with presence indicators. The first and second MIMIC-IV metric pairs in the Utility tables correspond to the ten- and seven-target sets, respectively.

For target jj, the signed gaps are

ΔAUROCj=AUROCTRTR,j−AUROCTSTR,j,ΔAUPRCj=AUPRCTRTR,j−AUPRCTSTR,j.(43)\begin{aligned} \Delta\mathrm{AUROC}_{j} &= \mathrm{AUROC}_{\mathrm{TRTR},j} - \mathrm{AUROC}_{\mathrm{TSTR},j},\\ \Delta\mathrm{AUPRC}_{j} &= \mathrm{AUPRC}_{\mathrm{TRTR},j} - \mathrm{AUPRC}_{\mathrm{TSTR},j}. \tag*{(43)} \end{aligned}

Here, AUPRC is computed as average precision, the recall-increment-weighted sum of precision, rather than trapezoidal integration. For JJ valid targets, each run’s reported gap is the arithmetic mean of its JJ target-specific gaps. The main comparisons and evidence-fraction analyses use the seed-42 target averages; component analyses additionally average these gaps over seeds 42, 123, and 2026. Zero denotes parity, positive gaps a TSTR shortfall, and negative gaps higher TSTR performance. The comparison uses closeness to zero after the applicable averaging, retaining the sign in the table.

Each binary LightGBM classifier has 200 estimators, learning rate 0.05, 31 leaves, subsample=0.9, and colsample_bytree=0.9. Within each run, the real-trained and generated-data-trained classifiers share these hyperparameters and the same classifier random seed. A single-class training target receives its observed prevalence as a constant score.

All figures use seed 42. Utility curves use saved predictions from that run. MoPoE-VAE and medGAN classifiers were refitted for curve export; the maximum macro-score differences from the tabulated seed-42 reports were below 0.00015 for AUROC and 0.000024 for AUPRC.

Diversity Real and generated visits use the feature representation specified for BCMD below and are embedded in the same PCA space fitted on the real training partition. Average Pairwise Distance Ratio (APDR) compares global dispersion. For equal-sized real and generated sets R={ri}i=1NR = \{r_i\}_{i=1}^{N} and S={si}i=1NS = \{s_i\}_{i=1}^{N}, let QQ be a common collection of sampled index pairs (a,b)(a,b), with a≠ba \ne b. The same pairs are used for both samples:

APDR⁡=∑(a,b)∈Q∥sa−sb∥2∑(a,b)∈Q∥ra−rb∥2.(44)\operatorname{APDR} = \frac{\sum_{(a,b)\in Q} \lVert s_a-s_b\rVert_2}{\sum_{(a,b)\in Q} \lVert r_a-r_b\rVert_2}. \tag*{(44)}

The same normalization cancels from numerator and denominator. A value near one indicates similar average dispersion; smaller values indicate contraction and larger values overdispersion.

Coverage adapts the local-support measure of Naeem et al.[32]. If ρi\rho_i is the distance from rir_i to its kk-th nearest non-self real neighbor, where kk specifies the neighborhood size,

Coverage⁡=1N∑i=1NI[min⁡j∥ri−sj∥2≤ρi].(45)\operatorname{Coverage} = \frac{1}{N}\sum_{i=1}^{N} \mathbb{I}\left[\min_j \lVert r_i-s_j\rVert_2 \le\rho_i\right]. \tag*{(45)}

Higher Coverage means that more real-data neighborhoods contain a generated sample. APDR and Coverage are interpreted together because global spread does not determine local support.

The common PCA space has 32 dimensions. For APDR, QQ is a multiset of NN ordered index pairs sampled with replacement, excluding self-pairs, where NN is the size of each matched sample. Coverage uses the fifth-nearest non-self real neighbor, corresponding to k=5k=5.

Fidelity Feature Distribution Distance (FDD) measures marginal discrepancies. For a binary or non-absence one-hot feature jj, the contribution is the absolute prevalence difference,

dj=∣preal,j−pgen,j∣.(46)d_j = \left|p_{\mathrm{real},j}-p_{\mathrm{gen},j}\right|. \tag*{(46)}

For a standardized numerical variable, presence and present-value discrepancies are

dpres,j=∣preal,jpres−pgen,jpres∣,d_{\mathrm{pres},j} = \left|p^{\mathrm{pres}}_{\mathrm{real},j}-p^{\mathrm{pres}}_{\mathrm{gen},j}\right|,
dval,j=1L∑ℓ=1L∣Qreal,j(uℓ)−Qgen,j(uℓ)∣.(47)d_{\mathrm{val},j} = \frac{1}{L}\sum_{\ell=1}^{L}\left|Q_{\mathrm{real},j}(u_\ell)-Q_{\mathrm{gen},j}(u_\ell)\right|. \tag*{(47)}

Here, LL is the number of quantile levels. Quantiles use present values only, on the grid uℓ=(ℓ−1)/(L−1)u_\ell=(\ell-1)/(L-1). A numerical variable contributes dj=(dpres,j+dval,j)/2d_j=(d_{\mathrm{pres},j}+d_{\mathrm{val},j})/2. Here DD counts one term per binary feature or non-absence categorical indicator and one combined term per numerical variable; numerical presence is not counted again:

FDD⁡=1D∑j=1Ddj.(48)\operatorname{FDD} = \frac{1}{D}\sum_{j=1}^{D}d_j. \tag*{(48)}

The quantile-grid term approximates a one-dimensional first-order Wasserstein distance. Because measurement representation changes the terms and their count, FDD comparisons are interpreted within a data setting.

Blockwise Correlation Matrix Distance (BCMD) measures dependence. The evaluation representation uses zero-filled feature values. MIMIC-IV appends clinical measurement-presence indicators, and DH includes numerical-presence indicators; DH-D uses non-absence categorical indicators without an additional presence column. Let BB be the number of clinical modalities, four for MIMIC-IV and three for the Duke Health data, and let DaD_a be the width of modality aa. Using Pearson correlation matrices,

da,b=∥Creal(a,b)−Cgen(a,b)∥FDaDb,BCMD⁡=2B(B+1)∑a≤bda,b.(49)d_{a,b} = \frac{\left\lVert C_{\mathrm{real}}^{(a,b)}-C_{\mathrm{gen}}^{(a,b)}\right\rVert_F}{\sqrt{D_aD_b}}, \qquad\operatorname{BCMD} = \frac{2}{B(B+1)}\sum_{a\le b}d_{a,b}. \tag*{(49)}

Within-modality blocks retain their diagonals. These clinical modalities may contain multiple modeling groups used for variational fusion. BCMD gives equal weight to each within- or cross-modality block. Lower FDD and BCMD indicate smaller discrepancies; both are study-defined summaries.

Numerical FDD uses L=100L = 100 equally spaced quantile levels, including both endpoints. The present-value term is zero if both present-value sets are empty and one if exactly one is empty. For BCMD, correlations involving a column with sample standard deviation at most 10−810^{-8} are set to zero; other diagonal entries are one.

Disclosure risk Disclosure risk is assessed using a membership inference attack (MIA) and an attribute inference attack (AIA)[3, 33]. The evaluations apply distance-based attacks used in synthetic-EHR studies[10, 28] to the released synthetic training visits.

For MIA, the attacker scores a query visit by the negative distance to its nearest synthetic training visit. The mixed distance combines Jaccard discrepancies for binary clinical modalities with categorical mismatch or empirical-quantile differences for clinical measurements, giving clinical modalities equal weight. The attacker compares patient-disjoint training members and test nonmembers, with at most 5,000 patients per group and one visit per patient. Attack performance is measured by AUROC, with members as the positive class. A score near 0.5 indicates little discrimination under this attack; either direction of departure can carry membership information.

For AIA, the attacker observes a randomly selected half of the original variables in each modality, together with the principal diagnosis, and predicts hidden diagnosis and medication codes using five nearest neighbors. Eligible targets have at least 20 positive examples in an independent real auxiliary set and contain both classes among the hidden-target queries. The auxiliary set is drawn from a disjoint 20% subset of test patients and capped at 5,000 visits; a synthetic reference set of equal size is used for comparison. The auxiliary patients are excluded from the nonmember evaluation pool. Numerical distance transforms are fitted on this auxiliary set. Let Jhid\mathcal{J}_{\mathrm{hid}} be the valid hidden targets among training-member queries. The reported AUPRC advantage is

ΔAIA=1∣Jhid∣∑j∈Jhid(AUPRCsyn,j−AUPRCaux,j).(50)\Delta_{\mathrm{AIA}} = \frac{1}{\lvert\mathcal{J}_{\mathrm{hid}}\rvert} \sum_{j \in\mathcal{J}_{\mathrm{hid}}} \left(\mathrm{AUPRC}_{\mathrm{syn},j} - \mathrm{AUPRC}_{\mathrm{aux},j}\right). \tag*{(50)}

A positive value indicates improved inference from the synthetic reference under this control; a negative value indicates worse inference. ΔAIA\Delta_{\mathrm{AIA}} compares synthetic-reference and real-auxiliary-reference inference on training-member queries. The two attacks assess disclosure risk under the specified adversarial knowledge and reference-set protocols.

Evidence-Fraction Configurations For the MIMIC-IV synthesis analysis, models were trained and evaluated under twelve evidence-fraction intervals: [0.1, 0.3], [0.1, 0.4], [0.1, 0.5], [0.1, 0.6], [0.1, 0.7], [0.2, 0.4], [0.2, 0.5], [0.2, 0.6], [0.2, 0.7], [0.3, 0.5], [0.3, 0.6], and [0.3, 0.7]. All configurations used the same patient partitions, model architecture, training budget, and other experimental settings. Each interval was summarized by its mean evidence fraction. The resulting configuration-level measures are reported in Supplementary Tabs. S2–S5.

Supplementary Methods S6. Component Analysis Design

Component analyses were conducted for MIMIC-IV synthesis, varying one component at a time with the remaining settings fixed within each study. Entries are arithmetic means over seeds 42, 123, and 2026, without standard deviations. FDD and BCMD are reported on the ×103\times10^{3} scale; mean utility gaps are assessed by absolute distance from zero, Coverage is maximized, and mean APDR is assessed by distance from one.

Patient partitions are regenerated for each seed. MIMIC-IV training, validation, and test visit counts are 196,188, 24,292, and 24,650 for seed 42; 196,263, 24,036, and 24,831 for seed 123; and 196,295, 24,490, and 24,345 for seed 2026. Within a seed, all compared component configurations share the same patient partitions and real-trained utility reference.

Availability Encoding We compare no explicit availability encoding, availability concatenation, a learned availability embedding, and availability gating. The gate modulates the first hidden layer without changing its width and starts from the identity because its affine parameters are zero-initialized.

KL Regularization We vary the KL weight over 10−610^{-6}, 10−510^{-5}, 10−410^{-4}, 10−310^{-3}, 10−210^{-2}, 10−110^{-1}, holding the remaining components fixed.

Forward Bridge We compare variance-exploding (VE), variance-preserving (VP), Linear, and Schrödinger paths within the same endpoint-prediction framework.

Synthesis Sampling The sampler analysis separates perturbation of the evidence-endpoint distribution from stochasticity along the reverse path. Hybrid SDE-ODE sampling crosses evidence-endpoint perturbation levels {0,0.5,1}\{0, 0.5, 1\} with stochasticity levels {0,0.125,0.25,0.33,0.5}\{0, 0.125, 0.25, 0.33, 0.5\}. Stochastic-interpolant sampling crosses the same endpoint-perturbation levels with stochasticity levels {0,0.3,0.5,0.8,1}\{0, 0.3, 0.5, 0.8, 1\}. The two reported grids contain fifteen configurations each. At zero endpoint perturbation, the unperturbed evidence endpoint initializes synthesis, and the decoded record retains only the principal diagnosis.

Within each seed, the sampling study shares one trained variational representation and trains a separate bridge for each endpoint-perturbation level. At a fixed level, sampler variants use the same bridge checkpoint, partitions, and evaluation protocol. Hybrid sampling combines stochastic Euler steps with Heun updates of the deterministic substep and a terminal Euler update. The stochastic-interpolant implementation uses Euler-Maruyama updates followed by coefficient-based terminal transfers. The samplers differ in stochastic dynamics, integration rules, and neural-evaluation counts.

The synthesis configuration used in the main comparisons has KL weight 10−510^{-5}, availability gating, the Schrödinger bridge, evidence-endpoint perturbation 0.5, and stochasticity 0.25. The completion configuration uses an unperturbed endpoint and stochasticity 0.5.

Supplementary Results

Study Populations and Predictive Utility

The main experiments used patient-level partitions into training, validation, and test sets, comprising 196,188, 24,292, and 24,650 visits in MIMIC-IV and 750,817, 92,220, and 93,434 visits in Duke Health, respectively. The MIMIC-IV partitions used for the component analyses are described in Supplementary Methods S6.

Supplementary Tab. S1 provides characteristics by data partition. Supplementary Figs. S1-S3 show the additional MIMIC-IV utility curves.

Evidence-Fraction Configurations

Tabs. S2-S5 report MIMIC-IV synthesis with EHRDiB under the twelve evidence-fraction intervals described in Supplementary Methods S5.

Component Analyses

Availability Mask Encoding Tab. S6 shows that gating gives the lowest FDD and BCMD, highest Coverage, and smallest AUROC and AUPRC gaps among the four included encodings. Compared with no explicit availability encoding, gating reduced FDD from 23.11 to 22.11 and BCMD from 15.19 to 14.94, while increasing Coverage and narrowing utility gaps, supporting the use of availability gating. Availability concatenation gives APDR closest to one.

KL Regularization Tab. S7 shows a stable low-weight region and marked degradation at larger weights. The selected 10−510^{-5} setting has the lowest FDD and BCMD, APDR closest to one, and the smallest AUROC and AUPRC gaps. The 10−410^{-4} setting gives the highest Coverage. These results support the selected weight for the evaluated architecture.

Forward Bridge Tab. S8 shows that the Schrödinger path gives the lowest FDD and BCMD, APDR closest to one, and the smallest phenotyping AUROC gap. Linear gives the highest Coverage and smallest AUPRC gap. The selected path therefore offers a favorable combination of the measured outcomes, with different paths leading different measures.

Synthesis Sampling Tabs. S9 and S10 show that the best results for different measures occur under different combinations of sampler and hyperparameters. Across all tested configurations, the lowest FDD and APDR closest to one occurred with the hybrid SDE-ODE sampler at endpoint perturbation 0 and stochasticity 0.125; the lowest BCMD occurred with the same sampler at endpoint perturbation 0 and stochasticity 0. The highest Coverage occurred with the stochastic-interpolant sampler at endpoint perturbation 1 and stochasticity 0, whereas the smallest AUROC and AUPRC gaps occurred with the hybrid SDE-ODE sampler at the same hyperparameter values. These results support jointly selecting the sampler, endpoint perturbation, and stochasticity according to the specific experimental configuration and evaluation priorities.

Supplementary Tables

CharacteristicMIMIC-IV TrainingMIMIC-IV ValidationMIMIC-IV TestDuke Health TrainingDuke Health ValidationDuke Health Test
Patients, n95,53211,94611,94796,70412,07312,079
Visits, n196,18824,29224,650750,81792,22093,434
Age, years61 (43-74)61 (43-74)61 (44-74)53.9 (43.7-63.8)53.9 (43.6-63.8)54.0 (43.9-63.8)
Female, %52.552.952.856.757.057.3
Measurement variables present per visit, median (IQR), %7.8 (5.2-11.3)7.8 (4.9-11.3)7.6 (5.0-11.3)25.0 (25.0-37.5)25.0 (25.0-37.5)25.0 (25.0-37.5)
Diagnosis codes per visit, median (IQR)11 (7-17)11 (7-17)11 (7-17)3 (2-5)3 (2-5)3 (2-5)
Medications per visit, median (IQR)14 (8-22)14 (8-22)14 (8-22)2 (1-4)2 (1-4)2 (1-4)
Target prevalence, range, %0.5-3.50.5-3.40.5-3.31.8-27.81.8-28.31.7-27.6

Table S1. Characteristics of the study populations by data partition. Age is reported as median (IQR), estimated at the first included admission for MIMIC-IV and measured at the PREVENT study baseline for Duke Health. Age and sex summarize unique patients; other distributions summarize visits. Measurement presence uses 462 distinct laboratory items in MIMIC-IV and eight clinical indicators in Duke Health. Target prevalence spans ten principal-diagnosis targets in MIMIC-IV and ten diagnosis targets in Duke Health within each partition. DH and DH-D share the same patients and visits.

Evidence-fraction intervalFDDBCMD
[0.1, 0.3]24.0115.43
[0.1, 0.4]22.9215.05
[0.1, 0.5]22.3814.72
[0.1, 0.6]23.2114.74
[0.1, 0.7]21.8714.20
[0.2, 0.4]22.4214.96
[0.2, 0.5]22.1914.50
[0.2, 0.6]21.5014.34
[0.2, 0.7]20.8614.12
[0.3, 0.5]21.8214.27
[0.3, 0.6]20.8414.14
[0.3, 0.7]21.1913.70

Table S2. Distributional fidelity of EHRDiB in MIMIC-IV synthesis across evidence-fraction intervals. FDD, feature distribution distance; BCMD, blockwise correlation matrix distance. Bold indicates the lowest value for each metric. Fidelity (×103\times10^{3}).

Evidence-fraction intervalAPDRCoverage
[0.1, 0.3]0.94070.9759
[0.1, 0.4]0.94710.9786
[0.1, 0.5]0.95480.9815
[0.1, 0.6]0.95830.9865
[0.1, 0.7]0.96210.9883
[0.2, 0.4]0.95870.9830
[0.2, 0.5]0.95880.9852
[0.2, 0.6]0.96310.9883
[0.2, 0.7]0.96590.9905
[0.3, 0.5]0.96950.9885
[0.3, 0.6]0.97240.9920
[0.3, 0.7]0.96320.9933

Table S3. Diversity of EHRDiB in MIMIC-IV synthesis across evidence-fraction intervals. Coverage measures the proportion of real-data neighborhoods containing a synthetic record in the shared principal-component space; the average pairwise distance ratio (APDR) compares the dispersion of synthetic and real records. Bold indicates the highest Coverage and APDR closest to 1.

Evidence-fraction intervalUtility, set 1: Δ\DeltaAUROCUtility, set 1: Δ\DeltaAUPRCUtility, set 2: Δ\DeltaAUROCUtility, set 2: Δ\DeltaAUPRC
[0.1, 0.3]0.00540.06250.04260.1018
[0.1, 0.4]0.00430.04930.03960.0996
[0.1, 0.5]0.00420.04570.04100.0969
[0.1, 0.6]0.00370.04710.03910.1005
[0.1, 0.7]0.00340.04500.03820.0970
[0.2, 0.4]0.00330.04040.03960.0995
[0.2, 0.5]0.00490.03270.03640.0959
[0.2, 0.6]0.00400.03850.03530.0954
[0.2, 0.7]0.00350.03310.03630.0914
[0.3, 0.5]0.00350.04120.03420.0962
[0.3, 0.6]0.00370.04630.03450.0915
[0.3, 0.7]0.00270.04320.03470.0981

Table S4. Predictive utility of EHRDiB in MIMIC-IV synthesis across evidence-fraction intervals. Utility gaps are differences in AUROC and AUPRC between LightGBM classifiers trained on real and synthetic records. Set 1 comprises ten principal-diagnosis targets; set 2 comprises seven Phecode-defined phenotypes. Bold indicates the smallest utility gap for each metric and target set.

Tab. S5 | Disclosure risk of EHRDiB in MIMIC-IV synthesis across evidence-fraction intervals. Membership inference attack (MIA) performance is measured by AUROC, with chance at 0.5. Attribute inference advantage (Δ\DeltaAIA) is the difference in attack AUPRC between a synthetic reference and a real auxiliary reference. Bold indicates MIA AUROC closest to 0.5 and the lowest Δ\DeltaAIA.

Evidence-fraction intervalMIAΔ\DeltaAIA
[0.1, 0.3]0.5162-0.0036
[0.1, 0.4]0.5218-0.0028
[0.1, 0.5]0.5336-0.0049
[0.1, 0.6]0.5467-0.0024
[0.1, 0.7]0.5694-0.0035
[0.2, 0.4]0.5273-0.0023
[0.2, 0.5]0.5431-0.0037
[0.2, 0.6]0.5593-0.0034
[0.2, 0.7]0.5809-0.0048
[0.3, 0.5]0.5582-0.0043
[0.3, 0.6]0.5744-0.0024
[0.3, 0.7]0.5984-0.0028

Table S5.

Tab. S6 | Availability-encoding results for EHRDiB in MIMIC-IV synthesis. Utility gaps are differences in AUROC and AUPRC between LightGBM classifiers trained on real and synthetic records for the ten principal-diagnosis targets. Bold indicates the best result for each metric before rounding.

EncodingFidelity (×103\times10^{3})DiversityUtility
FDDBCMDCoverageAPDRΔ\DeltaAUROCΔ\DeltaAUPRC
No explicit encoding23.1115.190.9860.9580.0060.069
Availability concatenation22.9115.410.9850.9580.0070.074
Availability embedding23.3415.180.9870.9570.0060.060
Availability gating22.1114.940.9880.9580.0060.060

Table S6.

Tab. S7 | KL-regularization results for EHRDiB in MIMIC-IV synthesis. Utility gaps are differences in AUROC and AUPRC between LightGBM classifiers trained on real and synthetic records for the ten principal-diagnosis targets. Bold indicates the best result for each metric before rounding.

λKL\lambda_{\mathrm{KL}}Fidelity (×103\times10^{3})DiversityUtility
FDDBCMDCoverageAPDRΔ\DeltaAUROCΔ\DeltaAUPRC
10−110^{-1}44.2429.690.1130.3360.3610.584
10−210^{-2}27.3720.360.8950.8490.0840.393
10−310^{-3}23.2615.520.9870.9420.0100.107
10−410^{-4}22.3515.110.9890.9520.0060.068
10−510^{-5}22.1114.940.9880.9580.0060.060
10−610^{-6}22.8215.060.9890.9550.0060.062

Table S7.

Fidelity (×103\times10^{3})DiversityUtility
BridgeFDDBCMDCoverageAPDRΔ\DeltaAUROCΔ\DeltaAUPRC
VE22.0614.940.9890.9590.0050.060
VP22.1114.950.9890.9690.0050.059
Linear21.7814.630.9900.9640.0060.051
Schrödinger20.9114.370.9890.9740.0050.052

Table S8. Forward-bridge results for EHRDiB in MIMIC-IV synthesis. All paths use the same endpoint-prediction framework. Utility gaps are differences in AUROC and AUPRC between LightGBM classifiers trained on real and synthetic records for the ten principal-diagnosis targets. Bold indicates the best result for each metric before rounding.

Fidelity (×103\times10^{3})DiversityUtility
Perturbation, stochasticityFDDBCMDCoverageAPDRΔ\DeltaAUROCΔ\DeltaAUPRC
0, 023.2214.220.9900.9210.0040.053
0, 0.12520.8514.410.9880.9860.0050.049
0, 0.2520.9414.350.9890.9780.0050.049
0, 0.3320.9314.340.9890.9760.0050.050
0, 0.520.9514.360.9890.9720.0050.048
0.5, 021.8314.260.9940.9570.0050.046
0.5, 0.12521.3014.360.9920.9710.0050.054
0.5, 0.2521.3814.390.9920.9710.0050.055
0.5, 0.3321.3314.370.9910.9710.0050.054
0.5, 0.521.2814.370.9910.9720.0050.052
1, 021.6714.300.9930.9620.0040.046
1, 0.12521.4114.350.9920.9680.0040.053
1, 0.2521.4114.380.9920.9680.0050.053
1, 0.3321.4414.400.9910.9690.0050.050
1, 0.521.4314.400.9910.9690.0050.055

Table S9. Hybrid SDE-ODE sampling results for EHRDiB in MIMIC-IV synthesis, varying evidence-endpoint perturbation and stochasticity. Utility gaps are differences in AUROC and AUPRC between LightGBM classifiers trained on real and synthetic records for the ten principal-diagnosis targets. Bold indicates the best result for each metric before rounding.

Perturbation, stochasticityFDDBCMDCoverageAPDRΔ\DeltaAUROCΔ\DeltaAUPRC
0, 025.5014.560.9890.8730.0050.063
0, 0.322.8114.530.9910.9190.0050.051
0, 0.522.0314.510.9910.9360.0050.050
0, 0.821.5714.470.9910.9510.0050.049
0, 121.4014.440.9900.9560.0050.052
0.5, 023.3314.390.9940.9230.0050.053
0.5, 0.321.9214.380.9930.9470.0050.050
0.5, 0.521.6014.400.9920.9560.0050.048
0.5, 0.821.4314.400.9900.9640.0050.052
0.5, 121.3314.400.9890.9680.0050.047
1, 022.8814.350.9940.9330.0040.052
1, 0.322.0214.370.9930.9510.0050.052
1, 0.521.8414.390.9920.9570.0050.046
1, 0.821.6114.430.9910.9640.0050.052
1, 121.5914.450.9900.9670.0050.057

Table S10. Stochastic-interpolant sampling results for EHRDiB in MIMIC-IV synthesis, varying evidence-endpoint perturbation and stochasticity. Utility gaps are differences in AUROC and AUPRC between LightGBM classifiers trained on real and synthetic records for the ten principal-diagnosis targets. Bold indicates the best result for each metric before rounding.

Supplementary Figures

ROC and precision-recall curves for MIMIC-IV synthesis utility

Figure S1. MIMIC-IV synthesis utility for the seven Phecode-defined phenotypes. Macro-averaged ROC (top) and precision-recall (bottom) curves compare LightGBM classifiers trained on real (TRTR) or synthetic records and evaluated on the same real test set. Columns group variational, adversarial, and diffusion comparators, with EHRDiB (Bernoulli) and EHRDiB (Cali-T) shown in each.

MIMIC-IV synthesis ROC curves for the ten principal-diagnosis targets

Figure S2. MIMIC-IV synthesis ROC curves for the ten principal-diagnosis targets: (a) sepsis; (b) acute myocardial infarction; (c) major depressive disorder; (d) type 2 diabetes mellitus; (e) cerebral infarction; (f) cholelithiasis and cholecystitis; (g) fracture of femur; (h) alcoholic liver disease; (i) malignant neoplasm of bronchus and lung; (j) respiratory failure. Each panel compares LightGBM classifiers trained on real (TRTR) or synthetic records and evaluated on the same real test set. EHRDiB (Bernoulli) and EHRDiB (Cali-T) are shown alongside the comparators. FPR, false positive rate; TPR, true positive rate.

Figure S3. MIMIC-IV synthesis ROC curves for the seven Phecode-defined phenotypes: (a) type 2 diabetes mellitus; (b) heart failure; (c) cerebrovascular disease; (d) bipolar disorder; (e) suicidal ideation; (f) rheumatoid arthritis; (g) multiple sclerosis. Each panel compares LightGBM classifiers trained on real (TRTR) or synthetic records and evaluated on the same real test set. EHRDiB (Bernoulli) and EHRDiB (Cali-T) are shown alongside the comparators. FPR, false positive rate; TPR, true positive rate.

References

  1. [1]Agniel, D., Kohane, I. S. & Weber, G. M. Biases in electronic health record data due to processes within the healthcare system: Retrospective observational study. BMJ 361, k1479 (2018). https://doi.org/10.1136/bmj.k1479.
  2. [2]Yan, C. et al. A multifaceted benchmarking of synthetic electronic health record generation models. Nat. Commun. 13, 7609 (2022). https://doi.org/10.1038/s41467-022-35295-1.
  3. [3]Stadler, T., Oprisanu, B. & Troncoso, C. Synthetic data - anonymisation groundhog day. In 31st USENIX Security Symposium, 1451-1468 (USENIX Association, 2022). https://www.usenix.org/conference/usenixsecurity22/presentation/stadler.
  4. [4]Yoon, J. et al. EHR-Safe: Generating high-fidelity and privacy-preserving synthetic electronic health records. npj Digit. Med. 6, 141 (2023). https://doi.org/10.1038/s41746-023-00888-7.
  5. [5]Li, J., Cairns, B. J., Li, J. & Zhu, T. Generating synthetic mixed-type longitudinal electronic health records for artificial intelligent applications. npj Digit. Med. 6, 98 (2023). https://doi.org/10.1038/s41746-023-00834-7.
  6. [6]He, H. et al. A flexible generative model for heterogeneous tabular EHR with missing modality. In International Conference on Learning Representations, 20486-20502 (2024). https://proceedings.iclr.cc/paper_files/paper/2024/hash/59e828197370fad05ee2f975b5bda6cd9-Abstract-Conference.html.
  7. [7]Gong, Y., Hajimirsadeghi, H., He, J., Durand, T. & Mori, G. Variational selective autoencoder: Learning from partially-observed heterogeneous data. In Proceedings of the 24th International Conference on Artificial Intelligence and Statistics, vol. 130 of Proceedings of Machine Learning Research, 2377-2385 (2021). https://proceedings.mlr.press/v130/gong21a.html.arxiv.org/abs/2102.12679
  8. [8]Wang, Z. & Sun, J. PromptEHR: Conditional electronic healthcare records generation with prompt learning. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, 2873-2885 (2022). https://doi.org/10.18653/v1/2022.emnlp-main.185.
  9. [9]Zhang, H. et al. Mixed-type tabular data synthesis with score-based diffusion in latent space. In International Conference on Learning Representations, 52829-52857 (2024). https://proceedings.iclr.cc/paper_files/paper/2024/hash/e975061e963c3e7a849cfff746bf60dbd-Abstract-Conference.htmlarxiv.org/abs/2310.09656
  10. [10]Choi, E. et al. Generating multi-label discrete patient records using generative adversarial networks. In Proceedings of the 2nd Machine Learning for Healthcare Conference, vol. 68 of Proceedings of Machine Learning Research, 286-305 (2017). https://proceedings.mlr.press/v68/choi17a.html.arxiv.org/abs/1703.06490
  11. [11]Han, J. et al. Guided discrete diffusion for electronic health record generation. Trans. Mach. Learn. Res. (2025). https://openreview.net/forum?id=N2rWhTgits.arxiv.org/abs/2404.12314
  12. [12]Sella, N. et al. Preserving information while respecting privacy through an information theoretic framework for synthetic health data generation. npj Digit. Med. 8, 49 (2025). https://doi.org/10.1038/s41746-025-01431-6.
  13. [13]U.S. Department of Veterans Affairs. VA Blue Button: Exploring your mental health notes - mental health clinical note examples. Patient information handout, https://portlandcoin.research.va.gov/PORTLANDCOINRESEARCH/docs/Mental_Health_Note_Examples.pdf. Illustrative psychiatrist note on page 2; accessed October 21, 2026.
  14. [14]Johnson, A. E. W. et al. MIMIC-IV, a freely accessible electronic health record dataset. Sci. Data 10, 1 (2023). https://doi.org/10.1038/s41597-022-01899-x.
  15. [15]Johnson, A. et al. MIMIC-IV (version 3.1). PhysioNet, https://doi.org/10.13026/kpb9-mt58 (2024).
  16. [16]Hong, C. et al. Performance of PREVENT cardiovascular risk in electronic health record-based clinical practice. JAMA Netw. Open 9, e266838 (2026). https://doi.org/10.1001/jamanetworkopen.2026.6838.
  17. [17]Wu, M. & Goodman, N. Multimodal generative models for scalable weakly-supervised learning. In Advances in Neural Information Processing Systems, vol. 31, 5575-5585 (2018). https://proceedings.neurips.cc/paper/2018/hash/1102a326d5f7c9e04fc3c89d0ede88c9-Abstract.html.arxiv.org/abs/1802.05335
  18. [18]Sutter, T. M., Daunhawer, I. & Vogt, J. E. Generalized multimodal ELBO. In International Conference on Learning Representations (2021). https://openreview.net/forum?id=5Y21V0RDBV.arxiv.org/abs/2105.02470
  19. [19]Nazábal, A., Olmos, P. M., Ghahramani, Z. & Valera, I. Handling incomplete heterogeneous data using VAEs. Pattern Recognit. 107, 107501 (2020). https://doi.org/10.1016/j.patcog.2020.107501.
  20. [20]Liu, G.-H. et al. I²SB: Image-to-image Schrödinger bridge. In Proceedings of the 40th International Conference on Machine Learning, vol. 202 of Proceedings of Machine Learning Research, 22042-22062 (2023). https://proceedings.mlr.press/v202/liu23ai.html.
  21. [21]Zhang, S., Cheng, Y. & Ver Steeg, G. Exploring the design space of diffusion bridge models. In Advances in Neural Information Processing Systems, vol. 38, 48112-48154 (2025). https://doi.org/10.52202/085713-1605.
  22. [22]Zhou, L., Lou, A., Khanna, S. & Ermon, S. Denoising diffusion bridge models. In International Conference on Learning Representations, 8160-8171 (2024). https://proceedings.iclr.cc/paper_files/paper/2024/hash/20e45668fefa793bd9f2edf19be12c4b-Abstract-Conference.html.arxiv.org/abs/2309.16948
  23. [23]Perez, E., Strub, F., de Vries, H., Dumoulin, V. & Courville, A. FiLM: Visual reasoning with a general conditioning layer. Proc. AAAI Conf. Artif. Intell. 32, 3942-3951 (2018). https://doi.org/10.1609/aaai.v32i1.11671.
  24. [24]Khadem Gharavdeh, Y. et al. Clustering-informed shared-structure variational autoencoder for missing data imputation in large-scale healthcare data. Stat. Med. 44, e70335 (2025). https://doi.org/10.1002/sim.70335.
  25. [25]Yoon, J., Jordon, J. & van der Schaar, M. GAIN: Missing data imputation using generative adversarial nets. In Proceedings of the 35th International Conference on Machine Learning, vol. 80 of Proceedings of Machine Learning Research, 5689-5698 (2018). https://proceedings.mlr.press/v80/yoon18a.html.arxiv.org/abs/1806.02920
  26. [26]Tashiro, Y., Song, J., Song, Y. & Ermon, S. CSDI: Conditional score-based diffusion models for probabilistic time series imputation. In Advances in Neural Information Processing Systems, vol. 34, 24804-24816 (2021). https://proceedings.neurips.cc/paper/2021/hash/cfe8504bda37b575c70ee1a8276f3486-Abstract.html.arxiv.org/abs/2107.03502
  27. [27]Baowaly, M. K., Lin, C.-C., Liu, C.-L. & Chen, K.-T. Synthesizing electronic health records using improved generative adversarial networks. J. Am. Med. Inform. Assoc. 26, 228-241 (2019). https://doi.org/10.1093/jamia/ocy142.
  28. [28]Zhang, Z., Yan, C., Mesa, D. A., Sun, J. & Malin, B. A. Ensuring electronic medical record simulation through better training, modeling, and evaluation. J. Am. Med. Inform. Assoc. 27, 99-108 (2020). https://doi.org/10.1093/jamia/ocz161.
  29. [29]Shi, J. et al. TabDiff: A mixed-type diffusion model for tabular data generation. In International Conference on Learning Representations, 37353-37375 (2025). https://proceedings.iclr.cc/paper_files/paper/2025/hash/5c882988ce5fac487974ee4f415b96a9-Abstract-Conference.html.arxiv.org/abs/2410.20626
  30. [30]Naseer, A. A. et al. ScoEHR: Generating synthetic electronic health records using continuous-time diffusion models. In Proceedings of the 8th Machine Learning for Healthcare Conference, vol. 219 of Proceedings of Machine Learning Research, 489-508 (2023). https://proceedings.mlr.press/v219/naseer23a.html.
  31. [31]Ke, G. et al. LightGBM: A highly efficient gradient boosting decision tree. In Advances in Neural Information Processing Systems, vol. 30, 3146-3154 (2017). https://proceedings.neurips.cc/paper/2017/hash/6449f44a102fde848669bdd9eb6b76fa-Abstract.html.
  32. [32]Naeem, M. F., Oh, S. J., Uh, Y., Choi, Y. & Yoo, J. Reliable fidelity and diversity metrics for generative models. In Proceedings of the 37th International Conference on Machine Learning, vol. 119 of Proceedings of Machine Learning Research, 7176-7185 (2020). https://proceedings.mlr.press/v119/naeem20a.html.arxiv.org/abs/2002.09797
  33. [33]Shokri, R., Stronati, M., Song, C. & Shmatikov, V. Membership inference attacks against machine learning models. In 2017 IEEE Symposium on Security and Privacy, 3-18 (2017). https://doi.org/10.1109/SP.2017.41.
  34. [34]Ho, J., Jain, A. & Abbeel, P. Denoising diffusion probabilistic models. In Advances in Neural Information Processing Systems, vol. 33, 6840-6851 (2020). https://proceedings.neurips.cc/paper/2020/hash/4c5bcfec8584af0d967f1ab10179ca4b-Abstract.html.arxiv.org/abs/2006.11239
  35. [35]Karras, T., Aittala, M., Aila, T. & Laine, S. Elucidating the design space of diffusion-based generative models. In Advances in Neural Information Processing Systems, vol. 35, 26565-26577 (2022). https://doi.org/10.52202/068431-1926.

Paper details

vlnc:W_ghdsq5j4
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 4

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents