Patient-Aware Contrastive Learning Preserves Per-Patient Structure in RR-Interval Representations
Pith reviewed 2026-06-26 08:54 UTC · model grok-4.3
The pith
Patient-aware contrastive learning preserves per-patient structure for better generalization to unseen patients in AF detection from RR intervals.
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
By forming positive pairs exclusively from same-patient, same-class RR-interval segments, the patient-aware contrastive objective preserves each patient's unique sinus rhythm baseline while separating the paroxysmal atrial fibrillation class, leading to per-patient SR cohesion of 0.850 and a patient-independent AUROC of 0.989 ± 0.003 on the IRIDIA-AF dataset.
What carries the argument
Patient-aware contrastive objective that restricts positive pairs to same-patient same-class segments to maintain per-patient geometric structure.
If this is right
- Per-patient SR structure cohesion is highest at 0.850 compared to 0.800 for SupCon and 0.772 for BCE.
- The representation achieves 0.989 AUROC with 2.6 times lower seed variance than supervised contrastive baselines.
- Binary cross-entropy produces clean global class separation but the most disordered per-patient structure, causing poor performance on unseen patients.
- Per-subject geometric consistency is more important than global class separability for robust cross-patient generalization.
Where Pith is reading between the lines
- The method may extend to other time-series medical signals where inter-subject variability dominates class differences.
- Alternative pair selection strategies could be explored to balance patient consistency with class discrimination in contrastive frameworks.
- Validation on diverse datasets from multiple centers would test if the preserved structure holds across different recording conditions.
Load-bearing premise
Forming positive pairs only from same-patient same-class segments is enough to keep per-patient structure while learning features that work across different patients.
What would settle it
If experiments on new patient cohorts show that the patient-aware method does not improve per-patient cohesion or reduce AUROC variance compared to standard losses, the central claim would be falsified.
Figures
read the original abstract
Contrastive representation learning struggles on physiological signals when each subject contributes a distinct baseline pattern. If class differences overlap with subject differences,class-level objectives such as supervised contrastive learning tend to merge per-subject structure into a single per-class cluster,removing the individual variation that a model needs to generalize to unseen patients. We study this problem in the setting of Paroxysmal Atrial Fibrillation(PAF) detection from RR-interval(RRI) sequences and propose a patient-aware contrastive objective that forms positive pairs only from same-patient, same-class segments, preserving each patient's own sinus rhythm(SR) baseline while still pushing the two classes apart. Examining the learned embeddings directly, our objective achieves the most consistent per-patient SR structure (cohesion $0.850$ vs. $0.800$ for supervised contrastive loss (SupCon) and $0.772$ for binary cross-entropy (BCE)). We also identify that BCE produces the cleanest global class separation yet the most disordered per-patient structure. This is precisely why a linear probe trained on its features breaks down on unseen patients. On the IRIDIA-AF dataset, the resulting representation reaches a patient-independent Area Under the Receiver Operating Characteristic Curve (AUROC) of $0.989 \pm 0.003$ with $2.6\times$ lower seed variance than supervised contrastive baselines.These results highlight that per-subject geometric consistency, rather than global class separability, is key to robust cross-patient generalization.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The manuscript proposes a patient-aware contrastive objective for learning RR-interval representations in Paroxysmal Atrial Fibrillation detection. Positive pairs are formed exclusively from same-patient, same-class segments to preserve per-patient sinus rhythm baselines while separating classes. On the IRIDIA-AF dataset this yields embedding cohesion of 0.850 (vs. 0.800 for SupCon and 0.772 for BCE) and patient-independent AUROC of 0.989 ± 0.003 with 2.6× lower seed variance than supervised contrastive baselines.
Significance. If the results hold, the work provides concrete evidence that per-patient geometric consistency, rather than global class separability, drives robust cross-patient generalization on physiological signals. The direct empirical comparison of cohesion and downstream AUROC on held-out patients, together with the explicit test of the same-patient pair design choice, strengthens the mechanistic claim and may generalize to other subject-varying time-series tasks.
major comments (2)
- [Results] Results section: the cohesion scores (0.850 vs. 0.800 vs. 0.772) are central to the claim that the proposed loss best preserves per-patient SR structure, yet the manuscript provides no equation, pseudocode, or verification that this metric is computed identically across the three methods; any difference in normalization, sampling, or distance definition would undermine the comparison.
- [Method] Method section: the patient-aware contrastive loss is introduced without an explicit derivation showing how the same-patient positive-pair constraint modifies the gradient or embedding geometry relative to standard SupCon; this makes it difficult to assess whether the reported gains are due to the intended mechanism or to incidental changes in pair statistics.
minor comments (2)
- [Abstract] Abstract: the cohesion metric is reported as a point estimate while AUROC includes ±0.003 error bars; adding variability measures or statistical tests for cohesion would improve comparability.
- [Results] The manuscript does not report the number of patients or segments used for the cohesion calculation, which would help readers assess the reliability of the 0.850 figure.
Simulated Author's Rebuttal
We thank the referee for the constructive feedback and the recommendation for minor revision. We address each major comment below and will update the manuscript accordingly.
read point-by-point responses
-
Referee: [Results] Results section: the cohesion scores (0.850 vs. 0.800 vs. 0.772) are central to the claim that the proposed loss best preserves per-patient SR structure, yet the manuscript provides no equation, pseudocode, or verification that this metric is computed identically across the three methods; any difference in normalization, sampling, or distance definition would undermine the comparison.
Authors: We agree that the cohesion metric requires an explicit definition and verification of identical computation. The current manuscript reports the scores but omits the equation and pseudocode. In the revised manuscript we will add the mathematical definition of cohesion (including normalization and distance), pseudocode for its computation, and an explicit statement confirming that the identical procedure was applied to all three methods. This will be inserted in the Results section. revision: yes
-
Referee: [Method] Method section: the patient-aware contrastive loss is introduced without an explicit derivation showing how the same-patient positive-pair constraint modifies the gradient or embedding geometry relative to standard SupCon; this makes it difficult to assess whether the reported gains are due to the intended mechanism or to incidental changes in pair statistics.
Authors: We acknowledge that a derivation would strengthen the mechanistic explanation. The manuscript presents the loss formulation but does not derive its gradient differences. In the revised version we will add a concise derivation in the Method section that shows how restricting positive pairs to same-patient, same-class segments alters the gradient relative to standard SupCon and affects embedding geometry, thereby clarifying that the gains arise from the intended per-patient constraint rather than incidental pair statistics. revision: yes
Circularity Check
No significant circularity; empirical results on held-out data
full rationale
The paper proposes a patient-aware contrastive loss that restricts positive pairs to same-patient same-class segments and then reports measured embedding cohesion (0.850) and patient-independent AUROC (0.989 ± 0.003) on the IRIDIA-AF dataset. These quantities are computed on held-out patients after training; they are not algebraically forced by the loss definition or by any self-citation chain. No equation equates a claimed performance metric to a fitted parameter, no uniqueness theorem is imported from prior author work, and the central claim (per-patient structure aids cross-patient generalization) is tested rather than presupposed. The derivation therefore remains self-contained against external benchmarks.
Axiom & Free-Parameter Ledger
free parameters (1)
- contrastive temperature
axioms (1)
- domain assumption Positive pairs should be restricted to same-patient same-class segments to preserve per-patient structure.
Reference graph
Works this paper leans on
-
[1]
Gilon, Cédric and Grégoire, Jean-Marie and Mathieu, Marianne and Carlier, Stéphane and Bersini, Hugues , month = oct, year =. Sci Data , publisher =. doi:10.1038/s41597-023-02621-1 , abstract =
-
[2]
2023. Circulation , author =. 2024 , keywords =. doi:10.1161/CIR.0000000000001193 , abstract =
-
[3]
Chen, Wenjing and Zheng, Peirong and Bu, Yuxiang and Xu, Yuanning and Lai, Dakun , month = sep, year =. Achieving. Bioengineering , publisher =. doi:10.3390/bioengineering11090903 , abstract =
-
[4]
Gavidia, Marino and Zhu, Hongling and Montanari, Arthur N. and Fuentes, Jesús and Cheng, Cheng and Dubner, Sergio and Chames, Martin and Maison-Blanche, Pierre and Rahman, Md Moklesur and Sassi, Roberto and Badilini, Fabio and Jiang, Yinuo and Zhang, Shengjun and Zhang, Hai-Tao and Du, Hao and Teng, Basi and Yuan, Ye and Wan, Guohua and Tang, Zhouping and...
-
[5]
2020 ESC Guidelines for the diagnosis and management of atrial fibrillation developed in collaboration with the European Association for Cardio-Thoracic Surgery (EACTS). , volume =. European Heart Journal , author =. 2020 , doi =. doi:10.1093/eurheartj/ehaa612 , abstract =
-
[6]
Archives of Cardiovascular Diseases , author =
Role of the autonomic nervous system and premature atrial contractions in short-term paroxysmal atrial fibrillation forecasting: Insights from machine learning models , volume =. Archives of Cardiovascular Diseases , author =. 2022 , keywords =. doi:10.1016/j.acvd.2022.04.006 , abstract =
-
[7]
Autonomic Nervous System Activity before Atrial Fibrillation Onset as Assessed by Heart Rate Variability , volume =. Rev Cardiovasc Med , author =. 2025 , keywords =. doi:10.31083/RCM25364 , abstract =
-
[8]
Bootstrap
Grill, Jean-Bastien and Strub, Florian and Altché, Florent and Tallec, Corentin and Richemond, Pierre and Buchatskaya, Elena and Doersch, Carl and Avila Pires, Bernardo and Guo, Zhaohan and Gheshlaghi Azar, Mohammad and Piot, Bilal and kavukcuoglu, koray and Munos, Remi and Valko, Michal , year =. Bootstrap. Advances in
-
[9]
Temporal and spatial self supervised learning methods for electrocardiograms , volume =. Sci Rep , author =. 2025 , keywords =. doi:10.1038/s41598-025-90084-2 , abstract =
-
[10]
and Healy, Graham and Smeaton, Alan F
Contrastive. IEEE Access , author =. 2020 , keywords =. doi:10.1109/ACCESS.2020.3031549 , abstract =
-
[11]
A simple framework for contrastive learning of visual representations , volume =
Chen, Ting and Kornblith, Simon and Norouzi, Mohammad and Hinton, Geoffrey , month = jul, year =. A simple framework for contrastive learning of visual representations , volume =. Proceedings of the 37th
-
[12]
Supervised contrastive learning,
Khosla, Prannay and Teterwak, Piotr and Wang, Chen and Sarna, Aaron and Tian, Yonglong and Isola, Phillip and Maschinot, Aaron and Liu, Ce and Krishnan, Dilip , month = mar, year =. Supervised. doi:10.48550/arXiv.2004.11362 , abstract =
-
[13]
, month = jul, year =
Kiyasseh, Dani and Zhu, Tingting and Clifton, David A. , month = jul, year =. Proceedings of the 38th
-
[14]
Patient contrastive learning:. PLoS Comput Biol , author =. 2022 , keywords =. doi:10.1371/journal.pcbi.1009862 , abstract =
-
[15]
Temporal patterns and short-term progression of paroxysmal atrial fibrillation: data from. Europace , author =. 2020 , pages =. doi:10.1093/europace/euaa123 , abstract =
-
[16]
Shashikumar, Supreeth P. and Shah, Amit J. and Clifford, Gari D. and Nemati, Shamim , month = jul, year =. Detection of. Proceedings of the 24th. doi:10.1145/3219819.3219912 , abstract =
-
[17]
Going deeper with convolutions , issn =
Szegedy, Christian and Liu, Wei and Jia, Yangqing and Sermanet, Pierre and Reed, Scott and Anguelov, Dragomir and Erhan, Dumitru and Vanhoucke, Vincent and Rabinovich, Andrew , month = jun, year =. Going deeper with convolutions , issn =. 2015. doi:10.1109/CVPR.2015.7298594 , abstract =
-
[18]
Proceedings of the European Conference on Computer Vision (ECCV) , month =
Wu, Yuxin and He, Kaiming , title =. Proceedings of the European Conference on Computer Vision (ECCV) , month =
-
[19]
Understanding
Wang, Tongzhou and Isola, Phillip , month = nov, year =. Understanding. Proceedings of the 37th
-
[20]
An automated detection of atrial fibrillation from single-lead. J Electrocardiol , author =. 2022 , keywords =. doi:10.1016/j.jelectrocard.2022.07.069 , abstract =
-
[21]
An. Front Physiol , author =. 2021 , pages =. doi:10.3389/fphys.2021.657304 , abstract =
-
[22]
Saiz-Vivo, Javier and Corino, Valentina D. A. and Hatala, Robert and de Melis, Mirko and Mainardi, Luca T. , month = may, year =. Heart. Front. Physiol. , publisher =. doi:10.3389/fphys.2021.672896 , abstract =
-
[23]
Complexity and spectral analysis of the heart rate variability dynamics for distant prediction of paroxysmal atrial fibrillation with artificial intelligence methods , volume =. Artif Intell Med , author =. 2008 , keywords =. doi:10.1016/j.artmed.2008.03.009 , abstract =
-
[24]
Automated detection of atrial fibrillation using long short-term memory network with. Comput Biol Med , author =. 2018 , keywords =. doi:10.1016/j.compbiomed.2018.07.001 , abstract =
-
[25]
Expert Systems with Applications , author =
A deep learning approach for real-time detection of atrial fibrillation , volume =. Expert Systems with Applications , author =. 2019 , keywords =. doi:10.1016/j.eswa.2018.08.011 , abstract =
-
[26]
Information Sciences , author =
Dense lead contrast for self-supervised representation learning of multilead electrocardiograms , volume =. Information Sciences , author =. 2023 , keywords =. doi:10.1016/j.ins.2023.03.099 , abstract =
-
[27]
Computers in Biology and Medicine , author =
A novel multimodal self-supervised framework for. Computers in Biology and Medicine , author =. 2025 , keywords =. doi:10.1016/j.compbiomed.2025.111137 , abstract =
-
[28]
Sun, Xiaoyu and Yang, Yang and Dong, Xunde , month = may, year =. Enhancing. doi:10.48550/arXiv.2506.06310 , abstract =
-
[29]
Akiba, Takuya and Sano, Shotaro and Yanase, Toshihiko and Ohta, Takeru and Koyama, Masanori , month = jul, year =. Optuna:. doi:10.48550/arXiv.1907.10902 , abstract =
work page internal anchor Pith review Pith/arXiv arXiv doi:10.48550/arxiv.1907.10902 1907
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.