Source-linked AI summary

P2E-VQ: ECG-linked representation augmentation for PPG via discrete patch retrieval

Zhongli Wu, Zhuangzhi Gao, He Zhao, Feixiang Zhou, Fu Wang, Jinru Ding, Yuankai Wang, Hongyi Qin, Gregory Y. H. Lip, Bil Kirmani, Yalin Zheng

arXiv:2608.14656v1cs.LGcs.AI

TL;DR

PPG lacks ECG’s electrophysiological morphology, while reconstructing subject-specific ECG from PPG is inherently ambiguous. P2E-VQ retrieves ECG-linked information to augment PPG representations and consistently improves downstream performance across five datasets and six tasks.

  • Problem

    PPG lacks the electrophysiological morphology that makes ECG diagnostically informative, while subject-specific ECG reconstruction from PPG is inherently ambiguous.

  • Method

    P2E-VQ discretizes local PPG patches into tokens, links them to aligned ECG patches in training memory, and retrieves ECG-linked representations for PPG-only inference.

  • Results

    Average AUROC 0.70 versus 0.67 for the strongest baseline across five datasets and six downstream tasks, with gains confirmed by matched-capacity negative controls.

  • Takeaways & Limitations

    The benefit is task-dependent and most pronounced where ECG morphology provides information complementary to PPG.

  • Takeaways & Limitations

    Applicability is restricted by the need for synchronized PPG–ECG recordings, while robustness across consumer wrist-worn PPG and diverse skin tones remains untested.

Abstract

from arXiv · show

Photoplethysmography (PPG) is widely used in consumer wearables because of its low cost and ease of acquisition. However, unlike electrocardiography (ECG), PPG measures peripheral pulse dynamics rather than cardiac electrical activity, limiting its ability to predict cardiac conditions that rely on ECG-specific morphological cues. Existing methods attempt to bridge this gap by reconstructing ECG signals from PPG signals. However, this inverse mapping is inherently ill-posed, and faithful waveform reconstruction does not necessarily translate into improved downstream performance. To address this challenge, we propose P2E-VQ, a retrieval-augmented framework that replaces ECG waveform reconstruction with ECG-linked representation retrieval. Specifically, P2E-VQ converts PPG patches into discrete tokens and retrieves ECG-linked information from a memory bank constructed exclusively from the training data. This process augments PPG representations while requiring only PPG signals during inference. Extensive experiments on five public datasets covering six downstream tasks, including clinical endpoint prediction and affective state recognition, demonstrate that P2E-VQ consistently outperforms pretrained baselines under a unified frozen-feature linear-probing protocol.

I. INTRODUCTION

PPG enables scalable wearable monitoring but lacks the electrophysiological morphology that makes ECG diagnostically informative. P2E-VQ addresses this gap by retrieving ECG-linked information to augment PPG representations rather than reconstructing subject-specific ECG waveforms.

  • Motivation: PPG supports scalable, passive monitoring in consumer wearables but remains an indirect hemodynamic surrogate lacking ECG’s diagnostically informative electrophysiological morphology.PPG captures pulse-induced blood-volume changes and related heart-rate, vascular, and cardiovascular information, while ECG directly measures cardiac electrical activity.
  • Motivation: PPG-to-ECG studies learn waveform-level correspondences, but pointwise reconstruction losses are sensitive to temporal misalignment and the mapping is inherently ill-posed.These limitations motivate transferring ECG-linked information into PPG representations instead of estimating a subject’s own ECG.
  • P2E-VQ: P2E-VQ reformulates PPG-to-ECG learning as retrieval-augmented representation learning using discrete PPG tokens to retrieve ECG-linked information.ECG-linked information comes from real ECG patches paired with PPG in the training data and is transferred into PPG representations at inference.
  • P2E-VQ: P2E-VQ discretizes local PPG morphologies into codebook prototypes linked to aligned ECG patches, enabling non-parametric ECG-linked retrieval instead of direct waveform generation.Its efficient token-indexed retrieval strategy organizes ECG candidates by associated PPG tokens and avoids exhaustive search over the full training set.
  • Evaluation: P2E-VQ consistently improves over strong pretrained baselines across five public datasets and six downstream tasks, while matched-capacity negative controls attribute gains to ECG-linked content rather than feature dimensionality.The evaluation covers downstream prediction settings using the proposed ECG-linked representation augmentation.

II. RELATED WORK · A. PPG-to-ECG Cross-Modal Translation · B. Retrieval-Augmented Learning

Prior PPG-to-ECG work primarily reconstructs ECG waveforms, but this inverse mapping is ambiguous and can produce temporally misaligned, over-smoothed, or physiologically unfaithful morphologies. Retrieval-augmented learning instead motivates P2E-VQ’s use of discrete PPG tokens to retrieve ECG-linked information from paired training data for PPG-only inference.

  • A. PPG-to-ECG Cross-Modal Translation: Traditional PPG-to-ECG methods learn direct waveform mappings using handcrafted features, regression, transform-domain representations, dictionary learning, or kernel-based approaches.
  • A. PPG-to-ECG Cross-Modal Translation: PhotoECG predicts ECG interval ranges from handcrafted PPG features, while Zhu et al. map PPG and ECG beat DCT coefficients.Despite visually plausible reconstructions, these methods are sensitive to temporal misalignment and may produce over-smoothed or physiologically unfaithful ECG morphologies.
  • A. PPG-to-ECG Cross-Modal Translation: Deep-learning studies use recurrent, convolutional, adversarial, and diffusion-based models to reconstruct single-lead ECG signals from PPG recordings.Examples include subject-specific BiLSTM models, end-to-end PPG2ECGps, and CardioGAN.
  • A. PPG-to-ECG Cross-Modal Translation: Reconstruction-based methods assume ECG morphology can be inferred reliably from PPG, although similar peripheral pulse patterns may correspond to different P–QRS–T morphologies across individuals.This makes subject-specific ECG reconstruction inherently ambiguous.
  • B. Retrieval-Augmented Learning: Retrieval-augmented learning supplements parametric model knowledge with information retrieved from an external non-parametric memory at inference time.It has demonstrated strong performance in natural language processing and medical image analysis; vector quantization connects continuous representations with discrete retrieval keys through codebook indices.
  • B. Retrieval-Augmented Learning: Biomedical signal methods have used vector-quantized representations for ECG compression, while self-supervised pre-training and ECG foundation models support transferable ECG representations across datasets and tasks.Existing quantization-based methods generally consume discrete codes as internal compression variables or pretext targets for parametric decoders or classifiers.
  • B. Retrieval-Augmented Learning: P2E-VQ applies retrieval-augmented vector quantization by using PPG-derived discrete tokens to retrieve ECG-linked information from paired training data and integrate it into PPG representations.This enables ECG-linked inference from PPG-only recordings without parametric waveform generation.

III. METHODOLOGY · A. Overall Framework · B. Phase 1: PPG Codebook Learning

P2E-VQ uses three phases to learn ECG-linked PPG representations, beginning with aligned PPG–ECG patch extraction and discrete PPG morphology tokenization. Phase 1 learns a vector-quantized PPG codebook by reconstructing local patches, producing token assignments for subsequent ECG-memory retrieval.

  • A. Overall Framework: P2E-VQ is a three-phase retrieval-augmented framework that learns ECG-linked PPG representations from aligned PPG–ECG patches.Phase 2 uses the resulting tokens to index temporally aligned ECG patches from training data into a token-indexed memory.
  • B. Phase 1: PPG Codebook Learning: Phase 1 takes synchronized ECG–PPG recordings and extracts temporally aligned patch pairs.The input consists of paired signals, with ECG and PPG patches denoted x_ECG and x_PPG.
  • B. Phase 1: PPG Codebook Learning: A lightweight decoder reconstructs each original PPG patch from its selected code vector, while training combines reconstruction and commitment losses.The objective encourages code vectors to represent recurring local PPG pulse-shape patterns.
  • B. Phase 1: PPG Codebook Learning: After training, each learned index q(i) ∈ {1, . . . , K} serves as the discrete PPG morphology token for its patch.The Phase 1 outputs are the trained PPG codebook C and token assignments {q(i)}_N.
  • B. Phase 1: PPG Codebook Learning: R-peaks detected in ECG anchor fixed-length windows of t_len = 125 samples from both signals sampled at f_s = 125 Hz.At most 20 aligned patch pairs are retained per 10 s segment to control memory usage.
  • B. Phase 1: PPG Codebook Learning: Each PPG patch is encoded with frozen PaPaGei-S and a projection head into a latent representation with d_PPG = 64.The encoder is denoted ϕ_PPG(·), and the projection head is h_θ(·).
  • B. Phase 1: PPG Codebook Learning: Vector quantization implemented with CVQ-VAE clusters continuous PPG representations into discrete tokens representing recurring local pulse-shape patterns.These tokens organize paired ECG patches in the next phase.
  • B. Phase 1: PPG Codebook Learning: The PPG codebook contains K = 4096 code vectors, each representing a local PPG morphology prototype, and assigns each latent patch to its nearest vector.The selected code vector c_q(i) becomes the quantized representation.

C. Phase 2: Token-Indexed ECG Retrieval Memory Construction

Phase 2 constructs a token-indexed ECG retrieval memory linking learned PPG morphology tokens to temporally aligned ECG patch candidates from training data. Each paired PPG–ECG patch is assigned and stored by its PPG token, using only training subjects to prevent leakage.

  • Memory construction: Phase 2 links each learned PPG morphology token to temporally aligned ECG patch candidates from the training data.The resulting memory is indexed by discrete PPG tokens.
  • Memory construction: Each paired training PPG patch is encoded and quantized to token q(i), and its paired ECG patch is stored in memory entry q(i).M(k) denotes the set of ECG patches associated with token k.
  • Leakage control and retrieval: The memory uses only training subjects under strict subject-level splits to prevent data leakage.At inference, a query assigned to q∗ retrieves candidates directly from M(q∗), avoiding exhaustive training-set search.

D. Efficient Token-Indexed Retrieval Strategy

P2E-VQ’s Efficient Token-Indexed Retrieval Strategy replaces exhaustive database search with direct lookup through discrete PPG tokens. This reduces per-query retrieval complexity by restricting candidates to a matched memory entry while preserving ECG-linked augmentation.

  • Motivation: Conventional nearest-neighbor retrieval searches all N training patches at per-query complexity O(Nd), becoming prohibitive as the database grows.Approximate methods reduce cost but still require explicit similarity search at query time.
  • Memory construction and retrieval: P2E-VQ builds an ECG patch memory indexed by discrete ECG-aligned PPG tokens, then retrieves ECG-linked patches for unseen PPG-only recordings.The framework learns tokens from paired patches, indexes temporally aligned ECG patches, and integrates retrieved information with PPG features.
  • Token-indexed retrieval: ETIR assigns each query PPG patch to its nearest discrete code vector and uses that token as a retrieval index instead of searching the full training database.ECG candidates are retrieved directly from the matched memory entry.
  • Efficiency: The indexed strategy reduces per-query complexity to O(Kd + |M(q∗)|d), where K ≪N and |M(q∗)| ≪N in practice.This direct lookup is substantially more efficient than exhaustive search.

E. Phase 3: PPG-only Inference and ECG-linked Representation

Phase 3 performs inference using only PPG, retrieving and aggregating ECG-linked patch information to form pseudo-ECG signals. Frozen ECG and PPG encoders then produce concatenated representations for downstream linear-probe classification.

  • PPG-only patch extraction: PPG-only inference extracts 125-sample beat-level patches from detected PPG systolic peaks, whereas paired pretraining uses synchronized ECG R-peaks as anchors.The segmentation difference arises because ECG is unavailable during inference, with pulse transit time creating a train–test mismatch.
  • Candidate aggregation: Retrieved ECG candidates are combined into one patch estimate by a parameter-free average, sampling at most C candidates without replacement when necessary.Unless otherwise stated, C = 100; this aggregation adds no task-specific trainable capacity beyond the shared linear-probe classifier.
  • Pseudo-ECG construction: Patch estimates form a continuous pseudo-ECG through peak-aligned overlap-add with Hann cross-fades, cubic-spline gap filling, 1250-sample standardization, and 50% overlapping windows for longer inputs.The standardized waveform represents 10 s at 125 Hz.
  • ECG-linked representation: Frozen ECGFounder and PaPaGei-S encoders produce 512-dimensional ECG-linked and PPG embeddings, which are concatenated as the downstream linear-probe input.The pseudo-ECG is upsampled to 500 Hz and encoded by ECGFounder’s single-lead lead II variant, while the same PPG segment is encoded by PaPaGei-S.

IV. EXPERIMENTS · A. Datasets and Downstream Tasks · B. Evaluation Metrics

The experiments use paired PPG–ECG data to build P2E-VQ’s training resources and evaluate downstream performance across five public datasets and six prediction tasks. Classification is assessed primarily with AUROC, supplemented by F1 scores and bootstrap-based uncertainty and significance testing.

  • A. Datasets and Downstream Tasks: 465,480 synchronized 10-s PPG–ECG segments sampled at 125 Hz from PulseDB’s Vital subset train the PPG codebook and ECG retrieval memory.The memory is constructed exclusively from this paired training source.
  • A. Datasets and Downstream Tasks: Five public physiological signal datasets cover six downstream prediction tasks.The evaluation spans clinical endpoint prediction and other physiological prediction settings described in the experiments.
  • A. Datasets and Downstream Tasks: VitalDB evaluates postoperative ICU admission prediction after removing overlapping PulseDB Vital subjects, leaving 3,753 downstream subjects.Subject-level leakage is addressed by excluding overlapping subjects between the paired training source and downstream VitalDB cohort.
  • A. Datasets and Downstream Tasks: PPG-BP evaluates hypertension classification on 205 subjects, while SDB evaluates sleep-disordered breathing classification on 146 subjects.These cohorts are part of the five-dataset downstream evaluation.
  • B. Evaluation Metrics: AUROC is the primary metric for all downstream classification tasks, with F1 scores additionally reported for threshold-dependent performance.The metric design separates ranking-based evaluation from threshold-dependent assessment.
  • B. Evaluation Metrics: 95% confidence intervals use 10,000-repetition test-set bootstrap resampling, while ablations use paired bootstrap tests with two-sided exploratory p-values.The reported uncertainty and significance procedures are applied as specified for the main evaluations and ablation studies.

C. Baseline Model … A. Downstream Task Performance

P2E-VQ is evaluated against pretrained representation baselines using a unified frozen-feature linear-probing protocol, with implementation centered on discrete ECG-linked codebook retrieval. Across six downstream tasks, it achieves the strongest average AUROC and F1 performance, with gains spanning clinical and affective endpoints.

  • C. Baseline Model: P2E-VQ is compared with REGLE, Chronos, MOMENT, and PaPaGei-P/PaPaGei-S under the same frozen-feature linear-probing protocol.Representations are extracted without fine-tuning, and only an ℓ2-regularized logistic regression classifier is trained for each downstream task.
  • D. Implementation Details: Codebook training uses paired PPG–ECG patches sampled at 125 Hz, batch size 128, 30 epochs, AdamW, and learning rate 1 × 10−4.The codebook contains K = 4096 code vectors of dimensionality 64, with β = 0.25; the PPG encoder remains frozen.
  • A. Downstream Task Performance: 0.70 ± 0.07 is P2E-VQ’s highest average AUROC across the six downstream tasks, while its average F1 score is 0.54 ± 0.24.AUROC is the primary metric, and F1 is reported as a threshold-dependent measure.
  • A. Downstream Task Performance: P2E-VQ obtains the best AUROC on all evaluated endpoints under the frozen-feature linear-probing protocol.This result is reported in Table II alongside pretrained representation baselines.
  • A. Downstream Task Performance: Against PaPaGei-S, AUROC improves from 0.73 to 0.75 for ICU admission, 0.77 to 0.81 for hypertension, 0.56 to 0.62 for sleep-disordered breathing, and 0.59 to 0.63 for mood disturbance.For affective tasks, AUROC rises from 0.66 to 0.68 for valence and from 0.68 to 0.72 for arousal.
  • A. Downstream Task Performance: On sleep-disordered breathing and mood disturbance, AUROC gains are 0.06 and 0.04, while F1 increases from 0.47 to 0.51 and from 0.44 to 0.51.For arousal, AUROC rises from 0.68 to 0.72 while F1 remains comparable to PaPaGei-S at 0.87 vs. 0.88.
  • A. Downstream Task Performance: For hypertension, AUROC increases from 0.77 to 0.81 and F1 from 0.78 to 0.82, whereas ICU admission has lower F1 than PaPaGei-S at 0.19 vs. 0.26.Thus, improved ranking performance does not necessarily translate into improved threshold-dependent performance on every endpoint.
  • A. Downstream Task Performance: P2E-VQ improves affective prediction beyond PaPaGei-S, including valence F1 from 0.09 to 0.34 and arousal AUROC from 0.68 to 0.72 with comparable F1.The reported gains support ECG-linked retrieval as an augmentation of PPG representations rather than deterministic ECG waveform reconstruction; wider WESAD and ECSMP confidence intervals reflect smaller cohorts.

B. Retrieval Fidelity of ECG-linked Candidates · VI. ABLATION STUDY · A. Effect of ECG-linked Content

P2E-VQ’s token-matched retrieval yields ECG-linked candidates that more closely match paired ECG patches than shuffled retrieval. Ablation results further show that downstream gains arise from aligned ECG-linked content rather than added dimensionality or duplicated PPG features.

  • B. Retrieval Fidelity of ECG-linked Candidates: Matched retrieval outperforms shuffled retrieval on cosine similarity, Pearson correlation, and ℓ2 distance for held-out paired PPG–ECG patches.The respective results are 0.889 vs. 0.783, 0.739 vs. 0.479, and 1.508 vs. 1.987.
  • B. Retrieval Fidelity of ECG-linked Candidates: p < 10^-300 across waveform-similarity metrics, with matched retrieval superior in 86.2% of held-out patches by cosine similarity.The reported effect sizes are Cohen’s d = 0.90 for cosine similarity and Cohen’s d = 0.79 for Pearson correlation.
  • B. Retrieval Fidelity of ECG-linked Candidates: The learned PPG codebook preserves ECG-linked structure, making token-matched candidates structurally closer to the paired ECG than unmatched code-level retrieval.This supports using retrieved candidates as complementary information for downstream PPG-only prediction.
  • B. Retrieval Fidelity of ECG-linked Candidates: Averaging retrieved ECG patches preserves a distinct R-peak and visible T-wave, while overlap-add reconstruction follows the input PPG’s pulse rhythm.The retrieved candidates’ QRS complexes remain temporally consistent despite amplitude and baseline differences.
  • VI. ABLATION STUDY: The controlled ablations are conducted on WESAD because it shows the largest ECG-linked improvement among the evaluated tasks.The analysis isolates ECG-linked content, while extension to larger cohorts is noted as a limitation.
  • A. Effect of ECG-linked Content: Aligned ECG-linked fusion raises AUROC from 0.664 to 0.679 for valence and from 0.677 to 0.723 for arousal over the PPG-only baseline.These values are reported for the WESAD ablation in Table IV.
  • A. Effect of ECG-linked Content: Shuffled-test fusion lowers AUROC to 0.604 for valence and 0.633 for arousal, showing that breaking sample-wise PPG–ECG correspondence degrades performance.The reported ablations indicate that gains are driven by ECG-linked content rather than feature dimensionality, duplication, or added PPG capacity.
  • A. Effect of ECG-linked Content: Retrieved patches form population-level prototypes, but retrieval differs from parametric reconstruction because it uses morphologies observed in real recordings rather than synthesizing unobserved ones.The paper distinguishes this approach from recovering an individual’s unattainable true ECG from PPG alone.

B. Effect of the Number of Retrieved Candidates · VII. EFFICIENCY OF TOKEN-INDEXED RETRIEVAL

P2E-VQ gains most retrieval benefit from a moderate ECG candidate pool and remains effective across tested pool sizes. Token-indexed retrieval substantially lowers comparison count, memory use, and latency relative to brute-force kNN while preserving ECG-linked non-parametric retrieval.

  • B. Effect of the Number of Retrieved Candidates: P2E-VQ’s retrieval sensitivity is evaluated by varying the number of retrieved ECG candidates C and measuring downstream performance.The comparison focuses on retrieval pool size and downstream effects.
  • B. Effect of the Number of Retrieved Candidates: Arousal prediction improves over the PPG-only baseline for every tested C, whereas valence prediction improves once C ≥50.The two affective prediction tasks show different thresholds for improvement.
  • B. Effect of the Number of Retrieved Candidates: Increasing C from 50 to 200 or 500 produces only marginal additional gains, indicating that most benefits arise with a moderate candidate pool.Performance becomes relatively insensitive to the exact C after sufficient ECG candidates are available for aggregation.
  • VII. EFFICIENCY OF TOKEN-INDEXED RETRIEVAL: Token-indexed retrieval is compared with brute-force kNN over all training PPG embeddings to assess computational cost.The baseline searches the full training embedding set.
  • VII. EFFICIENCY OF TOKEN-INDEXED RETRIEVAL: K=4096 codebook entries route each query patch directly to a matched memory entry, avoiding comparison against approximately 5.6×10^6 training embeddings.P2E-VQ retrieves ECG candidates from the assigned codebook entry.
  • VII. EFFICIENCY OF TOKEN-INDEXED RETRIEVAL: 1367× fewer distance comparisons and a 1 MB codebook versus 1.4 GB of stored training embeddings demonstrate the index’s computational and memory advantages.These figures compare token-indexed retrieval with brute-force kNN.
  • VII. EFFICIENCY OF TOKEN-INDEXED RETRIEVAL: 15 ms versus 200 ms is the empirical retrieval time for a 10 s PPG segment on a single NVIDIA RTX 4090 GPU, favoring token-indexed retrieval.The timing comparison is measured against brute-force kNN.
  • VII. EFFICIENCY OF TOKEN-INDEXED RETRIEVAL: Token-indexed retrieval substantially reduces retrieval cost while preserving P2E-VQ’s non-parametric ECG-linked retrieval mechanism.The efficiency gains do not replace the ECG-linked retrieval design.

VIII. LIMITATION · IX. CONCLUSION

P2E-VQ transfers ECG-linked information into PPG representations through discrete tokenization and memory retrieval, improving frozen-feature performance while avoiding subject-specific ECG reconstruction. Its limitations concern population-level retrieval, signal-quality dependence, evaluation scope, paired-data requirements, untested deployment settings, privacy, and missing direct reconstruction comparisons.

  • VIII. LIMITATION: Retrieved ECG candidates form a population-level ECG prior rather than a subject-specific reconstruction and are intended for downstream representation cues, not direct clinical diagnosis.The memory aggregates candidates across training subjects sharing the same PPG token.
  • VIII. LIMITATION: Retrieval precision may degrade when ECG-anchored pretraining and systolic-peak inference create pulse-transit-time offsets or when PPG peak detection fails.Heavy motion artifacts, low signal-to-noise conditions, ectopic beats, and atrial fibrillation are identified as challenging settings.
  • VIII. LIMITATION: On the largest ICU-admission cohort, P2E-VQ improves AUROC but not F1, showing that ranking gains may not transfer to threshold-dependent performance under class imbalance.Matched-capacity controls and retrieval-fidelity analysis are reported only on WESAD, with fidelity measured on ECG-anchored held-out patches.
  • VIII. LIMITATION: All p-values are exploratory and uncorrected, while smaller cohorts use a single held-out split rather than leave-one-subject-out cross-validation.These choices constrain the evaluation scope.
  • VIII. LIMITATION: Synchronized PPG–ECG recordings are required for codebook and memory construction, limiting applicability where paired data are unavailable.Evaluation used clinical- or research-grade sensors, while consumer wrist-worn PPG, diverse skin tones, ambulatory conditions, privacy safeguards, and multiclass tasks remain untested or unaddressed.
  • VIII. LIMITATION: No head-to-head comparison with CardioGAN or RDDM was conducted, so the paper claims retrieval as a viable alternative rather than superiority over reconstruction for every task.Direct comparison is left for future work.
  • IX. CONCLUSION: P2E-VQ enables ECG-linked inference from PPG-only recordings through discrete patch tokenization, a token-indexed ECG memory, and efficient token-indexed retrieval.ETIR reduces distance comparisons by roughly 1367× relative to brute-force nearest-neighbor search.
  • IX. CONCLUSION: 0.70 versus 0.67 for the strongest baseline: P2E-VQ consistently improves average AUROC across five datasets and six tasks under frozen-feature linear probing.Matched-capacity negative controls attribute gains to ECG-linked content rather than increased feature dimensionality, with benefits strongest where ECG morphology complements PPG.
Loading 2608.14656v1…