TL;DR
Your smartwatch shines a green light on your wrist to measure blood volume pulses (PPG), which is great for counting heartbeats, but doctors actually need the crisp electrical waveforms of an ECG to diagnose heart conditions. Rather than treating PPG-to-ECG translation as a blind curve-fitting exercise, PPG2ECG injects classical differential equations of cardiac physics into a modern latent flow-matching model. The result is a system that generates clinically faithful ECGs from everyday wearable signals—without hallucinating physically impossible heartbeats.
What Problem Does This Paper Address?
Electrocardiography (ECG) is the gold standard for diagnosing heart conditions, capturing the sharp P-QRS-T electrical spikes that coordinate each heartbeat. However, ECGs require dedicated electrodes and stable skin contact, making continuous daily monitoring impractical. Photoplethysmography (PPG)—the optical sensor in consumer wearables—is ubiquitous and cheap, but it only measures the downstream, delayed sloshing of blood in your peripheral vessels. It lacks crisp electrical features and is easily corrupted by motion noise.
Existing deep learning models try to bridge this gap by translating PPG into ECG using GANs, diffusion, or flow matching. However, they treat this purely as a statistical translation problem, ignoring biological causality: the heart’s electrical spark (ECG) causes the mechanical blood wave (PPG) after a physical transit delay, known as Pulse-Arrival Time ($\delta_{\text{PAT}}$). Purely data-driven models often fail to capture this asymmetric coupling and hallucinate physically impossible timing delays. Conversely, classic mathematical heart simulators obey physics, but use rigid templates that cannot capture messy, patient-specific arrhythmias.
Methods
PPG2ECG marries mechanistic physics with generative AI, using a physiological simulator as a soft guide during training rather than a rigid template.
The architecture has three main components:
- Electro-Hemodynamic Simulator (Novel): Extending the classic
ECGSYNdynamical model, the authors build a system of four ordinary differential equations (ODEs). A shared 2D limit-cycle oscillator acts as a master "cardiac clock," locking an upstream ECG generator and a delayed PPG generator to the exact same heartbeat phase. Its parameters are fitted to patient groups stratified by clinical ICD diagnostic codes. - Physiology-Aware AutoEncoder (PAE) (Novel): Standard latent models compress signals into an unstructured bottleneck. The PAE uses modality-specific blocks followed by shared layers (with lightweight adapters) to map both PPG and ECG into an aligned latent space. Crucially, a circular phase-delay loss forces the latent space to respect the simulator's pulse-arrival delay ($\delta_{\text{PAT}}$).
- Simulator-Guided Latent Rectified Flow (Standard + Novel Guidance): With the PAE frozen, a conditional Transformer learns a rectified flow—a generative technique that transports Gaussian noise to target ECG latents along straight, fast-to-integrate trajectories conditioned on the PPG latent. What’s new is how physics regularizes the end of this path: at the terminal step, the generated ECG is decoded and checked against the ODE simulator's vector fields using finite-difference Euler residuals. It is also passed through a pre-trained ECG-to-PPG forward mapper to ensure the generated electrical signal would plausibly induce the observed blood pulse.
At inference time, all simulators and mappers are discarded; you simply feed in a raw PPG and solve the fast ODE flow to get an ECG.
Datasets
No new datasets are introduced, though the model is rigorously tested across four public benchmarks:
- MC-MED (Primary training & evaluation): A massive multimodal emergency department dataset from Stanford Health Care (118,385 visits across 70,545 patients), providing synchronized 10-second windows of PPG (resampled to 40 Hz) and Lead II ECG (120 Hz), alongside clinical ICD diagnosis codes.
- External Validation: Tested on VitalDB, MIMIC-AFib, and BIDMC to verify generalization across surgical, atrial fibrillation, and critical care settings.
Key Insights and Ideas
- Physics belongs in the loss, not the inference pipeline: Enforcing differential equations strictly at test time causes severe model mismatch on abnormal hearts. Applying ODE Euler residuals as soft penalties during training gives the neural network physical intuition while retaining generative flexibility.
- Enforcing forward causality prevents hallucinations: By mapping the generated ECG back into a synthetic PPG during training, the model explicitly respects the forward electrical-to-mechanical pathway of human cardiovascular anatomy.
- Regularize the destination, not the noisy journey: Simulator losses are applied only to the terminal generated state ($t=1$) of the flow rather than noisy intermediate steps, avoiding unstable gradients while directly polishing the final waveform.
Key Results
On MC-MED, PPG2ECG outperforms strong diffusion, GAN, and flow baselines (RDDM, CardioGAN, CardioFlow, and PPGFlowECG).
- Beat Timing & Waveform Fidelity: PPG2ECG drops waveform MAE from 0.87 (
PPGFlowECG) to 0.71 and lowers Fréchet Inception Distance (FID) from 44.17 to 37.79. Most strikingly, for R-peak beat detection (within 50 ms), PPG2ECG achieves an F1 score of 0.74, crushing the next-best baseline (CardioFlowat 0.28). Removing simulator guidance drops this F1 to 0.62. - Clinical Morphology: Using
NeuroKit2to measure diagnostic intervals, PPG2ECG achieves the lowest error across all metrics—for instance, cutting QRS duration error from 48.1 ms (PPGFlowECG) down to 38.6 ms, and PR interval error from 68.9 ms to 59.9 ms. - Downstream Disease Detection: When training a multi-label classifier on six cardiovascular ICD categories (including atrial fibrillation and ischemic heart disease), using PPG2ECG's synthetic ECGs boosts Macro-AUROC from 0.543 (using raw PPG with the
PaPaGeibaseline) to 0.633.
Limitations and Future Work
The authors note that the clinical ICD codes used in MC-MED are broad, visit-level hospital billing labels rather than granular, beat-by-beat ECG diagnostic annotations. Consequently, while the downstream disease classification improvements prove that clinically useful electrical patterns are recovered, the authors explicitly caution that this serves as a utility benchmark rather than readiness for standalone clinical diagnostic deployment. Explicit directions for future work are not discussed in the visible main text.
Summary updated