K01
ICML 2026 · SD4H Workshop · July 2026

DCDM-ECG: Demographic-Conditional Diffusion Model for 12-Lead ECG Generation.

Benedikt Kolbeinsson · Arinbjörn Kolbeinsson

Conditional ECG generators get the diagnoses right and the patients wrong. The synthetic cohorts come out younger and narrower than the data they stand in for. We route age, sex, height, weight and heart rate into the generator as numbers, alongside the labels.

Abstract

Conditional 12-lead ECG generators are used as drop-in synthetic cohorts, but they distort patient demographics. The cohorts come out younger and narrower than the real data. The cause is the conditioning interface, which exposes diagnostic labels or free text but not the patient's numeric demographics, so every downstream use inherits the distortion. We introduce DCDM-ECG, a 10.1M-parameter conditional latent diffusion model whose 76-dimensional condition concatenates 71 multi-hot SCP codes with five z-normalised demographic axes: age, sex, height, weight and heart rate. On PTB-XL it tracks the real age distribution to within one standard deviation, follows a specified heart rate with a per-sample MAE of 2.4 bpm and reaches TSTR macro-AUROC 0.885 ± 0.012, 4.5 points above the strongest reported label-only baseline. Removing the demographic axes under the same recipe drops macro TSTR to 0.561 ± 0.021.

Key findings

  1. Demographics belong in a numeric channel. The strongest label-only checkpoint, SSSD-ECG, produces ECGs about eight years younger than real PTB-XL, with height and weight spread compressed by 30 to 40 per cent. Text prompts lose the number before the denoiser. No published baseline exposes all five axes as numbers.
  2. A small model beats the strongest label-only baseline. TSTR macro-AUROC 0.885 on PTB-XL fold 10, 4.5 points above SSSD-ECG's reported 0.840 with roughly 6× fewer parameters, and within 0.022 of a same-size real-data ceiling. The SSSD-ECG gap is indicative, not head-to-head.
  3. The demographic channel accounts for the ablation gap. The same backbone with labels only reaches 0.561 ± 0.021 against 0.885 ± 0.012. Validation loss converges similarly in both, and the full model sampled without classifier-free guidance still gives 0.878. Which axis drives the gap is left open.
  4. The axes split into three fidelity tiers. Heart rate is followed per sample. Age is monotonic but range-compressed, sex directional with high variance. Height and weight are ignored. The tiers track PTB-XL coverage, 32% for height and 42% for weight.
  5. Rare classes are the bright spot. The rare-class bucket sits within 0.011 of its real-data ceiling, 0.887 against 0.898. Common and moderate classes sit about 0.05 below theirs. Part of that is a ceiling effect, but it indicates the generator is not the bottleneck on the long tail.

Why it matters

Synthetic ECGs are used to augment classifiers, stress-test subgroups and share data without releasing records. All of that assumes the cohort resembles a real one in who the patients are, not only in what they have. A generator that quietly makes everyone younger and more average breaks a subgroup analysis before it starts. Numeric conditioning turns demographics from something the model infers into something the user specifies, for the axes the waveform can ground.

The per-axis result is the warning. A channel only works when the training loss can ground it in the waveform. Height and weight are mostly missing in PTB-XL and imputed with cohort means, so the model learns to ignore them. That reads as a coverage limit of the dataset, not of the modality. A presence mask on the condition, or training only on complete records, is the natural next step.

Scope and limitations

A single dataset, PTB-XL, on its official patient-disjoint folds. One generator size. Realism is assessed distributionally, with no expert review of morphology. The sex marginal is biased male, 34% female against 46% real. Demographic fidelity is measured by external predictors with their own error floors, and the 2.4 bpm heart-rate MAE sits above a Pan-Tompkins floor of 1.45 bpm. The SSSD-ECG TSTR and DiffuSETS heart-rate comparisons use those papers' own protocols. DCDM-ECG underperforms SSSD-ECG on one class, IVCD. Memorisation is argued against indirectly, not measured.

Cite

@inproceedings{kolbeinsson2026dcdm,
  title     = {{DCDM-ECG}: Demographic-Conditional Diffusion Model for 12-Lead {ECG} Generation},
  author    = {Kolbeinsson, Benedikt and Kolbeinsson, Arinbj{\"o}rn},
  booktitle = {ICML 2026 Workshop on Structured Data for Health (SD4H)},
  year      = {2026},
  url       = {https://openreview.net/forum?id=iTPbysd9s1}
}