PPG2ECG: Physiology-Guided Latent Rectified Flow for Electro-Hemodynamic PPG-to-ECG Generation

Xiaoda Wang, Minxiao Wang, Kaiqiao Han, Defu Cao, Ching Chang, Yidan Shi, Runze Yan, Xiao Luo, Yan Liu, Xiao Hu, Yizhou Sun, Wei Wang, Carl YangNeurIPS 2026

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.

Figure 1: Overview Framework of PPG2ECG. (a) The Electro-Hemodynamic Physiological Simulator: co-models ECG and PPG through shared cardiac phase dynamics. (b) Physiology-Aware AutoEncoder: learns an aligned electro-hemodynamic latent space from resampled PPG and ECG windows. (c) Simulator-Guided Latent Rectified Flow: generates ECG latents conditioned on PPG and regularizes the transport with ECG morphology and ECG-to-PPG hemodynamic consistency.

The architecture has three main components:

  • Electro-Hemodynamic Simulator (Novel): Extending the classic ECGSYN dynamical 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).

Table 1: ECG generation on MC-MED (mean ± SD over three runs).
  • 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 (CardioFlow at 0.28). Removing simulator guidance drops this F1 to 0.62.
  • Clinical Morphology: Using NeuroKit2 to 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 PaPaGei baseline) 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

Abstract

Electrocardiography (ECG) is the clinical standard for cardiac assessment but requires dedicated hardware that does not scale to daily-life monitoring. Photoplethysmography (PPG) is ubiquitous in wearables but lacks ECG-specific diagnostic morphology and is corrupted by motion and sensor noise. PPG-to-ECG generation aims to bridge this gap by recovering electrical morphology and timing from peripheral pulse signals. However, existing methods largely rely on statistical alignment and data-driven generation. They fail to explicitly structure the latent space around physiology-aware electro-hemodynamic factors and lack constraints from forward physiological dynamics. To address these challenges, we propose PPG2ECG, a physiology-guided latent rectified flow framework. PPG2ECG introduces an electro-hemodynamic simulator that co-models ECG and PPG through shared cardiac phase dynamics. Guided by this simulator, a Physiology-Aware AutoEncoder learns a structured electro-hemodynamic latent space. Then we integrate this simulator guidance into a PPG-conditioned latent rectified flow, enforcing ECG-side morphology consistency and ECG-to-PPG forward hemodynamic consistency during generative transport. Experiments on the large-scale MC-MED dataset demonstrate that PPG2ECG significantly improves PPG-to-ECG generation and downstream cardiovascular disease classification, proving its ability to generate ECGs that are both signal-faithful and physiologically plausible under the ECG-to-PPG hemodynamic pathway
BibTeX
@inproceedings{wang2026ppg,
  author = {Xiaoda Wang and Minxiao Wang and Kaiqiao Han and Defu Cao and Ching Chang and Yidan Shi and Runze Yan and Xiao Luo and Yan Liu and Xiao Hu and Yizhou Sun and Wei Wang and Carl Yang},
  title = {{PPG2ECG: Physiology-Guided Latent Rectified Flow for Electro-Hemodynamic PPG-to-ECG Generation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=iOvXn5DzBr},
}
Figure