- The paper introduces the CAP framework, leveraging patient-level electronic health records (EHR) and a pretrained language model to enhance photoplethysmography (PPG) representation learning on 5-minute segments, outliers in the existing approach of downstream processing on bedside-PPG
- Pretraining CAP on 5 minute segments significantly improves accuracy and reduces mean absolute error rates in downstream tasks such as atrial fibrillation (AF) detection, heart rate (HR) estimation, respiratory rate estimation, and blood pressure (BP) estimation.
- CAP demonstrates robust handling of low-quality PPG signals using a gated dual-path architecture, where clinical semantics serve as a fallback ensuring valid results which can be useful in bedside-testing applications.
CAP introduces a patient-centric paradigm for photoplethysmography (PPG) representation learning, pairing large-scale PPG recordings with patient-level electronic health records (EHR) distilled by a LLM, and anchoring pretraining to this clinical semantics via cross-modal contrastive alignment (2606.15284). The work targets three diagnosed deficiencies of signal-level PPG self-supervised learning (pSSL): reliance on geometric waveform similarity, augmentation-induced semantic corruption, and limited temporal scope from short-window pretraining.
The authors argue that PPG representations should encode a patient's overall physiological state rather than waveform-level heuristics, since morphologically similar signals can correspond to different clinical states. Their diagnosis identifies three failure modes of existing pSSL: (i) contrastive objectives that align samples by geometric similarity miss clinically relevant distinctions; (ii) standard augmentations (masking, temporal perturbation, morphological transforms) can destroy fine-grained diagnostic structure; and (iii) pretraining on 5–30 second windows cannot capture chronic conditions or long-horizon physiological drift. The proposed remedy is to extend the temporal field of view to 5-minute segments and inject patient-level clinical history as supervision within the corresponding window.
PPG–EHR dataset construction
The pretraining corpus is curated from MC-MED, an emergency-department (ED) dataset, under three principles: strict temporal causality, where text paired to a PPG segment at time Tcurrent excludes any future information such as discharge diagnoses; hierarchical multimodal alignment, organizing clinical context into static, cumulative, and concurrent streams; and clinical quality-aware filtering using the pyPPG Signal Quality Index (SQI) with a stringent threshold of SQI > 90%. Fragmented diagnosis codes and narrative records are distilled into a structured EHR document by a pretrained LLM, yielding ek=LLM(Ck) for each 5-minute PPG window.
Curation is aggressive: the source data of 721,840 segments from 52,398 patients is reduced to 31,393 high-quality pairs from 2,279 patients, with mean SQI rising from 88.29% to 93.47%. This trade-off between fidelity and scale is a material constraint — the pretraining corpus is roughly two orders of magnitude smaller in segment count than the raw data, and the authors acknowledge the cohort is predominantly Western and may not generalize globally.
The CAP framework
Physical-Semantic Unified Patching (PSUP) addresses the granularity mismatch between 5-minute, 125 Hz pretraining segments and 30-second, 40 Hz downstream inputs. Signals are dynamically resampled to a target frequency ftarget=Np/Td and partitioned into non-overlapping patches of consistent physical time span, making representations invariant to sampling-rate variation and temporally aligned with diagnostic windows.
Pretraining optimizes three cooperative objectives:
- Morphological reconstruction (Lmorph): masked signal modeling that reconstructs masked waveform samples to preserve fine-grained morphology such as systolic peaks and dicrotic notches.
- Physiological stability (Linv): a contrastive loss enforcing invariance between two latent views generated by independent dropout perturbations within the encoder — notably, views are created in representation space rather than by corrupting the raw waveform, which the ablations show is critical.
- Clinical anchored loss (Lclin): a bidirectional cross-modal contrastive objective (CLIP-style) aligning the aggregated PPG representation with a MedCPT embedding of the distilled EHR text.
At finetuning, CAP combines a ResNet-based local morphology encoder over a three-channel input [x,∇x,∇2x] (raw signal, first and second derivatives) with the pretrained clinical-semantic encoder, fused via a learned sigmoid gate h=α⊙g+(1−α)⊙ℓ followed by an MLP prediction head.
Downstream results
CAP is evaluated on four heterogeneous tasks with subject-disjoint splits and 99% confidence intervals over three seeds, using 8× A800 GPUs:
| Task |
Dataset |
Metric |
Best baseline |
CAP |
| AF detection |
Stanford |
F1 |
0.841 (GPT-PPG 1B) |
0.883 |
| HR estimation |
WESAD (LoSo) |
MAE |
4.20 (TAPIR) |
3.99 |
| RR estimation |
BIDMC (5-fold CV) |
MAE |
0.89 (SiamQuality) |
0.11 |
| BP estimation |
PulseDB |
MAE |
8.12 (GPT-PPG 1B) |
8.04 |
The respiratory rate result is the most striking: an MAE of 0.11 versus 0.89 for the strongest baseline, a claimed relative improvement of up to +87.6%, with an average relative gain of +26.7% across all tasks. Two fairness points strengthen these comparisons: CAP is evaluated on 100% of raw test data without quality-based filtering, whereas some baselines (e.g., TAPIR, BayesBeat at high coverage) filter test samples; and the authors replicate the GPT-PPG pipeline exactly. The BP comparison, however, is explicitly flagged as a reference rather than a strictly controlled benchmark because prior works adopt non-matching preprocessing on PulseDB, and the margin over GPT-PPG 1B there (8.04 vs 8.12) is modest. CAP also attains these results with 130M parameters, versus 1B for the strongest GPT-PPG variant.
Ablation findings
The ablations support each design choice. Removing Lclin from the full model degrades AF F1 from 0.88 to 0.79, and the clinical anchored loss provides the largest single-component gain, directly supporting the patient-centric motivation. For Linv, latent dropout substantially outperforms waveform-level augmentations (cutout: F1 0.72; drop: 0.82; latent dropout: 0.88), confirming that raw-signal augmentation corrupts semantics. Performance is sensitive to the dropout ratio, peaking at 0.2. MedCPT outperforms BioClinicalBERT and PubMedBERT as the EHR encoder. The finetuning ablations show that neither the pretrained embedding alone (F1 0.68) nor the ResNet branch alone (0.79) matches the fused model (0.88), and that both derivative channels contribute.
The gating analysis offers a mechanistic account: mean ek=LLM(Ck)0 is highest for AF detection (0.55), consistent with a need for long-term context in arrhythmia detection, and lowest for respiratory rate (0.42), which depends on cycle-to-cycle morphology. Most notably, ek=LLM(Ck)1 increases monotonically from 0.43 (SQI 90–100%) to 0.61 (SQI < 50%) on AF samples, indicating the model automatically shifts reliance from local morphology to pretrained clinical semantics as signal quality degrades — an adaptive robustness property that plausibly explains CAP's advantage under no-filter evaluation.
Interpretability analyses
Three complementary visualizations corroborate the anchoring hypothesis. Cross-modal token–patch attention maps show high weights on clinically meaningful EHR keywords. Signal-level attention concentrates on the PPG rising phase and peak-to-peak regions, which are physiologically tied to vascular compliance and cardiac cycle dynamics. UMAP projections of the encoder output show substantially clearer AF-positive/negative separation under EHR-anchored pretraining than under unimodal pretraining.
Limitations and open questions
The authors concede several constraints. The pretraining cohort is drawn from a single ED source and is predominantly Western, raising generalization concerns to ambulatory and global populations. Patient-level supervision requires multiple windows per patient, which may not exist in all clinical settings. The aggressive SQI > 90% filter reduces the corpus to ~4% of available segments, so the benefit of clinical anchoring on lower-quality data remains untested at pretraining scale. Evaluation heterogeneity persists: the BP comparison is not strictly controlled, and PaPaGei/GPT-PPG small variants lack LoSo results on WESAD. Open questions include whether the gains hold under leave-one-site-out transfer across institutions, how the framework behaves with ambulatory rather than ED PPG, and whether the LLM-distilled EHR representation introduces biases from the distillation model itself.
Conclusion
CAP demonstrates that anchoring PPG pretraining to patient-level clinical semantics — rather than signal-only objectives — yields consistently stronger universal representations, with the largest gains on tasks sensitive to long-horizon context (a +87.6% relative improvement in respiratory rate MAE) and an average +26.7% relative improvement across four tasks, achieved at a fraction of the parameter count of the largest competing foundation model. The gated dual-path architecture and the observed quality-adaptive gating behavior suggest the clinical anchor acts as a robust fallback under signal degradation, though the small, heavily filtered, single-site pretraining cohort leaves the scalability and external validity of the patient-centric paradigm as the central open questions.