acceptodds
Under review as a conference paper at ICLR 2027

Episodic Context Memory: Patient-State Adaptation for Longitudinal Cardiovascular Monitoring

Abstract

Physiological classifiers trained on short, independently sampled recordings are often deployed on continuous streams from unseen individuals, where observations become temporally correlated and patient-specific. We study this mismatch as longitudinal personalization and introduce Episodic Context Memory (ECM), a stateful adaptation framework that keeps a pretrained population predictor fixed while learning how to construct and retrieve patient-specific context. Using labeled streams from separate calibration patients, ECM learns shared rules for writing preceding observations into a compact multi-slot memory and retrieving context relevant to the current query. At deployment on an unseen patient, only the memory state evolves, without target-patient labels or gradient updates. We evaluated atrial fibrillation (AF) detection from the electrocardiogram (ECG) on patient-disjoint internal and external cohorts against supervised fine-tuning, test-time adaptation, prototype methods, recurrent conditioning, and neural memory. Under external dataset shift, the primary ECM variant increased AUROC by +1.1% and decreased AF burden error by -1.2% relative to the best comparator, and an AF-specific extension increased macro-F1 by +2.7% and AUROC by +2.1%. In longitudinal analyses, ECM approaches achieved the highest macro-F1 improvement of up to +15.1%. Ablations identified patient-specific context and query-conditioned retrieval as the main contributors, while evaluations on additional cardiovascular tasks and sensing modalities provided promising evidence beyond AF detection. These results show that patient-state adaptation can provide robust, label-free personalization for longitudinal deployment under distribution shift.

Primary area:
applications to physical sciences (physics, chemistry, biology, etc.)
Keywords:
ECG, physiological time-series, test-time adaptation, atrial fibrillation detection

Reviews

Among:
Shape:
1234this paper, Top 49%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.33 over 3 reviews, above 51% of the others.
Reviewer_iJhVOpenReview ↗
Rating
2
Confidence
2
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

This paper proposes Episodic Context Memory (ECM) for patient adaptation. A frozen population ECG encoder is combined with a trained multi-slot memory that retrieves prior context and corrects predictions. At deployment, unseen patients are processed chronologically without target labels or gradient updates.

Critical strengths

S1: The evaluation is comprehensive, covering external cohorts and additional physiological tasks. Repeated runs and comparisons with strong baselines provide a thorough assessment of performance and memory design.

S2: The experimental protocol clearly separates population pretraining, calibration, and target-patient inference. Its chronological design and non-overlapping windows also prevent future-information leakage.

Critical weaknesses

W1: ``Label-free personalization'' applies only at target inference. Training requires over one million labeled windows from 101 calibration patients, but no calibration-size analysis is provided.

W2: The experiments do not clearly isolate persistent multi-slot memory as the source of improvement. EMA, causal attention, and recent-context variants are close, and some transition-model ablations outperform the full router.

W3: Results vary across datasets: an appendix comparison gives the LSTM adapter the best F1/AUROC on MIT-BIH AF. This weakens the claim that ECM is consistently preferable.

Questions for authors

Q1: How does performance scale with the number of labeled calibration patients and episodes?

Q2: Which paired results show a reliable benefit from persistent multi-slot memory over recent-context conditioning?

8 comments
AuthorsOpenReview ↗

Response to weaknesses W1-W3

We would like to thank you for the detailed assessment and constructive review. Please let us address your concerns.

  1. W1: We thank the reviewer for pointing this out. We agree that understanding calibration cost is important to further qualify our method. As acknowledged in the Conclusion, supervised calibration enables task-aligned learning of the adaptation parameters, but simoultaneusly represents a limitation of the approach, as it introduces a further, expensive step into the pipeline. We will revise the manuscript to qualify the terminology as label-free adaptation at deployment. The requested calibration scale experiment is provided in response to Q1.

  2. W2: We agree that the contribution of persistent memory should be distinguished from the overall benefit of patient-context adaptation. However, the simpler alternatives do not fully recover ECM’s performance: paired analyses support higher external AUROC for ECM-S and t-ECM-S than EMA and causal attention, together with prolonged monitoring improvements over EMA. Adding slow memory to recent-context conditioning improves F1 and AUROC, and removing slow memory from t-ECM-S degrades both metrics. We provide these paired comparisons under the response to Q2. Multiple slots provide separately addressable contextual representations rather than a single summary. We also explicitly report that removing the router improves mean external F1 and burden error, while the full model has slightly higher AUROC. The router was retained based on calibration-validation selection, without reselecting the architecture based on external outcomes. While this limits the evidence for routing, we believe it does not negate the improvements over simpler context models.

  3. W3: We agree that method rankings vary across external datasets. Additional analyses help characterize this heterogeneity. 97.4% of SHDB-AF patients fall in the high embedding-distance group, compared with 34.8% of MIT-BIH AF patients. Within this group, ECM-S exceeds LSTM by 2.4% in macro-F1 (95% CI: [1.07, 3.73]) and 3.2% in AUROC ([1.64, 4.94]), whereas LSTM performs better in the medium-distance group. Separately, ECM-S’s mean F1 gain over Population is larger in the high than low waveform-distance group (19.1 vs 6.5%). These findings are therefore consistent with greater benefits under substantial measured source–deployment differences.

AuthorsOpenReview ↗

Response to question Q1 - Part 1/2

Q1: We thank the reviewer for suggesting this important experiment. We evaluated ECM under multiple calibration budgets in terms of available patients (Table 1) and episodes per patient (Table 2). ECM-S was tested against the best 3 non-ECM comparators: LSTM, fine-tuning, and EMA.

Table 1 shows the per-patient performance on the external cohorts when increasing the number of calibration patients in {10, 30, 50, 70}, keeping the full recording durations for each patient. Patients were subsampled from the original calibration seeds. With only 10 calibration patients, ECM-S raises external F1 from 63.6 to 75.7, reduces burden error from 24.0 to 10.3, and reduces false-AF rate from 22.8 to 4.7. ECM-S has the highest mean F1 and AUROC among the evaluated adaptation methods at every cohort size. Its advantage over fine-tuning is particularly large with limited calibration data. With 70 patients, ECM-S reaches 77.8 F1, close to the original full-cohort result of 78.5, and leads all four reported metrics. The results show that ECM-S retains substantial external benefits with substantially fewer labeled calibration patients.

Table 1. External patient-macro performance (%) across calibration cohort sizes using full recording durations. Scores are mean ± sample SD across five seeds.

Calibration trainingMethodAF F1 ↑AUROC ↑AF BE ↓nAF FA ↓
NonePopulation63.6 ± 0.091.0 ± 0.024.0 ± 0.022.8 ± 0.0
10 patients; 96,376.6 ± 11,055.9 10-s ECGs
ECM-S75.7 ± 2.191.0 ± 1.610.3 ± 2.94.7 ± 3.3
LSTM74.1 ± 4.389.6 ± 3.111.7 ± 6.07.0 ± 7.6
EMA73.4 ± 6.490.0 ± 2.511.3 ± 7.57.3 ± 6.0
Fine-tuning64.0 ± 3.884.4 ± 6.718.3 ± 3.59.8 ± 4.8
30 patients; 291,348.8 ± 28,933.0 10-s ECGs
ECM-S76.5 ± 5.291.7 ± 2.910.7 ± 4.56.5 ± 3.5
LSTM75.4 ± 4.791.1 ± 3.79.0 ± 4.55.0 ± 4.1
EMA74.9 ± 1.390.5 ± 1.68.4 ± 0.83.6 ± 2.0
Fine-tuning67.4 ± 2.886.3 ± 2.715.6 ± 2.04.6 ± 2.5
50 patients; 511,685.4 ± 71,048.5 10-s ECGs
ECM-S76.4 ± 1.591.8 ± 0.88.9 ± 0.72.1 ± 1.8
LSTM75.8 ± 3.391.4 ± 2.58.0 ± 2.53.3 ± 2.8
EMA75.3 ± 7.090.6 ± 3.011.1 ± 7.35.2 ± 6.1
Fine-tuning70.5 ± 2.787.7 ± 3.413.3 ± 2.32.8 ± 1.0
70 patients; 735,310.8 ± 44,365.1 10-s ECGs
ECM-S77.8 ± 1.492.0 ± 1.37.8 ± 0.91.4 ± 1.2
LSTM75.3 ± 4.687.7 ± 5.110.6 ± 3.63.4 ± 3.3
EMA75.6 ± 2.290.5 ± 2.09.5 ± 2.03.6 ± 1.9
Fine-tuning71.3 ± 4.485.5 ± 6.312.6 ± 1.83.0 ± 1.9
AuthorsOpenReview ↗

Response to question Q1 - Part 2/2

Table 2 shows the per-patient performance on the external cohorts when calibration recordings are capped at 6, 12, or 16 hours per patient.

With only 10 calibration-training patients and up to 6 hours each, ECM-S achieves 74.6 F1 versus the population model’s 63.6, and has the highest mean F1 among the evaluated methods at all three duration caps. Additional recording duration does not produce monotonic improvements in this small-cohort setting.

With the full calibration-training cohort, ECM-S’s AUROC increases from 91.3 to 91.8 to 92.4, leading the comparators at every cap. At 16 hours, it also achieves the highest mean F1 and lowest burden error, while LSTM has the lowest false-AF rate.

Therefore, substantial adaptation benefits are observed with limited calibration-training data, while benefits of additional recording duration depend on cohort size and the evaluation metric.

Table 2. External patient-macro performance (%) with 10 or 101 calibration patients and different recording-duration caps. Scores are mean ± sample SD across five seeds. Bold indicates the best mean within each condition, determined before rounding.

PatientsDuration cap per patientMethodAF F1 ↑AUROC ↑AF BE ↓nAF FA ↓
106 h (20,744.2 ±\pm 1,195.3 10-s ECGs)ECM-S74.6 ± 1.490.1 ± 1.110.9 ± 1.87.2 ± 3.3
LSTM74.4 ± 3.290.0 ± 1.011.7 ± 2.96.1 ± 5.4
EMA72.2 ± 4.589.8 ± 1.613.4 ± 5.17.1 ± 5.1
Fine-tuning59.2 ± 5.875.8 ± 7.924.1 ± 7.88.1 ± 4.8
1012 h (40,600.0 ±\pm 2,779.7 10-s ECGs)ECM-S75.5 ± 3.090.5 ± 1.810.6 ± 2.45.7 ± 3.7
LSTM74.2 ± 3.890.9 ± 1.211.4 ± 4.35.9 ± 5.5
EMA74.0 ± 5.190.5 ± 1.812.1 ± 6.77.6 ± 6.9
Fine-tuning61.0 ± 3.381.0 ± 4.621.8 ± 4.37.7 ± 7.5
1016 h (53,272.0$\pm$ 3,565.8 10-s ECGs)ECM-S75.7 ± 2.890.7 ± 0.812.8 ± 1.46.5 ± 4.8
LSTM74.4 ± 4.190.3 ± 1.212.5 ± 5.47.3 ± 6.4
EMA73.4 ± 5.990.7 ± 2.512.2 ± 6.67.7 ± 6.3
Fine-tuning57.8 ± 7.177.4 ± 10.625.4 ± 7.416.0 ± 9.1
1016 h (163,036.8 ±\pm 2,209.6 10-s ECGs)ECM-S76.8 ± 1.491.3 ± 0.39.2 ± 1.12.8 ± 2.7
LSTM77.2 ± 3.289.6 ± 4.58.8 ± 1.40.8 ± 0.6
EMA76.9 ± 2.890.7 ± 2.68.6 ± 0.81.3 ± 0.9
Fine-tuning64.3 ± 3.478.5 ± 4.116.9 ± 2.32.8 ± 2.0
10112 h (309,538.0 ±\pm 6,127.2 10-s ECGs)ECM-S76.0 ± 3.191.8 ± 0.69.8 ± 2.83.2 ± 5.7
LSTM77.5 ± 1.990.8 ± 3.38.7 ± 0.72.3 ± 2.7
EMA77.2 ± 2.491.6 ± 0.98.6 ± 0.82.0 ± 1.2
Fine-tuning66.8 ± 2.984.4 ± 2.815.8 ± 2.02.9 ± 1.2
10116 h (403,418.6 ±\pm 7,983.4 10-s ECGs)ECM-S77.7 ± 1.692.4 ± 1.07.9 ± 1.31.6 ± 2.0
LSTM77.6 ± 4.389.8 ± 4.28.5 ± 2.01.3 ± 1.3
EMA77.3 ± 2.091.5 ± 0.68.9 ± 0.43.2 ± 2.2
Fine-tuning68.5 ± 3.184.3 ± 5.015.1 ± 1.44.4 ± 2.2

We will include the analysis in the Ablation section of the appendix.

Reviewer_8o7AOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
3
Read review
Paper summary

This work introduces a new method, Episodic Context Memory (ECM), of test-time adaptation for atrial fibrillation detection from electrocardiogram (ECG) signals given a pre-trained deep learning model. This framework maintains a memory state for a given target subject and avoids modifying model parameters learned from the source data. The paper compares ECM with several other methods, including established source-free test-time adaptation (TTA) approaches, fine-tuning, and other deep learning architectures. ECM performs best at a patient level on external datasets not used in pre-training or calibration, but not on several other downstream settings. Ablation experiments probe the contributions of different components of ECM. Finally, additional tasks of hypotension and 4-class ectopy classification are also included.

Critical strengths

The following strengths stood out:

  1. Presents a solution to a real-world deployment challenge of adapting a pre-trained ECG deep learning model to a new subject without labels or source-dataset parameter updates in the model.
  2. Compares ECM to a number of well-established approaches: supervised fine-tuning, source-free test-time adaptation, prototype-based methods, recurrent conditioning, and neural memory.
  3. Ablation studies highlight the contributions of each ECM component.
  4. Evaluates on several key ECG/PPG downstream tasks of atrial fibrillation detection, hypotension detection, ECG ectopy classification.
Critical weaknesses

The following weaknesses were identified:

  1. Some of the terminology, as well as Section 4, is difficult to follow. ‘Label-free personalization’ and ‘patient-state adaptation’ suggests that personalized models are trained for each subject; however, the approach is more akin to meta-learning, where the shared ECM parameters do require labels for calibration. In addition, new functions, variables, and transformations appear without being properly introduced and defined. Key parameters should also be included in the main text, not limited to the appendix.
  2. Some details regarding the calibration and evaluation procedures remain unclear, especially the episode definition (duration in minutes, sampling procedure) and memory slot initialization. In Table 15, it is unclear how the calibration set changes.
  3. Some of the claims are overstated. Firstly, fine-tuning demonstrates significantly higher performance than ECM and t-ECM-S in the held-out internal dataset evaluation setting, but was not tested in the setting of external ECG performance. Ablation experiments show that ECM-S does not perform significantly better than the causal-attention adapter across any metric; t-ECM-S does not outperform the recent-context-only and fast + slow memory configurations either. Hypotension performance matches the source-free TTA approaches.
  4. The calibration evaluation settings are inconsistent. Including the same architectures and calibration approaches across all settings would make the results easier to parse, and better isolate the performance gains of ECM. In addition, the 15.5% increase in macro-F1 score of ECM is in comparison to the baseline, not the other calibration methods.

Overall, the approach presented in this paper does not contain significant methodological novelty. Empirical results are mixed, with ECM and its variants performing either within the noise margin of other approaches, or worse (Tables 5, 8, 9, 11, 12, 15, 17).

Questions for authors

How is the initial patient state S0 initialized, and what is the variance in downstream performance across different initialization approaches?

How were samples normalized, if at all? How does ECM compare with and without normalization?

The carry coefficients were set to 0.25; what does this correspond to in the ECM formulation? I assume it relates to the decay of the history contribution. With ρ = 0.25, prior patient states decay very quickly. How would longer memory context impact performance??

9 comments
AuthorsOpenReview ↗

Response to weaknesses W1-W3

We would like to thank you for the very detailed assessment and constructive review. Please let us address your concerns.

  1. W1: We agree that the terminology should distinguish supervised calibration from label-free deployment more explicitly. Supervised calibration is necessary to train ECM's adaptation parameters, and label-free refers exclusively to deployment on unseen patients, where neither these parameters nor the population predictor are optimized. Personalization occurs through updates to the patient-specific memory state, as the memory is initialized at the beginning of a new patient's recording and evolves longitudinally. We will make this distinction explicit in the main text and qualify the terminology as label-free adaptation at deployment. We will also revise Section 4 to define each function, variable, and transformation before use, and include the principal configuration parameters in the main text: context/query lengths, memory size and dimension, the carry coefficient, the regularization term in Equation 20 and the transition-aware variant details (Appendix A.1.4).

  2. W2: We thank the reviewer for pointing this out. Episode definition: Each AF episode is defined as KK preceding context windows followed by QQ query windows, where each window is a 10-s ECG. Hyperparameter tuning on the calibration-validation splits found the optimal K=Q=50K=Q=50, corresponding to 8 min and 20 s of recording. Sampling procedure: ECM-S calibration samples patients uniformly, then samples contiguous episodes using a mixture of random (50%), mixed-rhythm (30%), and transition-containing episodes (20%). This protocol was consistent across each evaluated method. t-ECM-S additionally targets onset/offset episodes. Memory initialization: The initial memory S0∈R16×d\mathbf{S}_0 \in \mathbb{R}^{16 \times d} is a shared learnable parameter matrix. Before calibration, its entries are independently initialized from N(0,0.022)\mathbf{\mathcal{N}(0,0.02^2)}. During calibration, S0\mathbf{S}_0 is optimized jointly with the ECM parameters and each independent training episode starts from its current value. At deployment, every new patient starts from the same calibrated S0\mathbf{S}_0. Calibration set ablation: In Table 15, `Original' denotes the original calibration cohort used in the main experiments. Source-near/far cohorts are sampled from the internal-domain patient pool, excluding the fixed validation patients, while preserving training-patient counts within each dataset and AF-burden stratum. Sampling favors smaller/larger (source-near/source-far) patient-median nearest-class Mahalanobis distances in frozen source-encoder space, as defined in Appendix A.2.3. We will integrate these details in the revised manuscript.

  3. W3: Several statements above appear to overlook results already included in the submitted manuscript. Fine-tuning...was not tested in the setting of external ECG performance: Fine-tuning was evaluated externally in Table 2 and the complete deployment table in the appendix, and its stronger internal performance was explicitly acknowledged. The relevant finding is the different ranking under external distribution shift. Ablation experiments show...configurations either: In Table 11, ECM-S improves all three reported means over causal attention: +1.6+1.6% in F1, +1.2+1.2% in AUROC, and −0.3-0.3% in burden error. This supports a discrimination benefit, although the paired F1 and burden-error intervals include zero. Table 12 likewise shows higher mean F1/AUROC for full t-ECM-S than recent-context-only (+1.5/+1.9+1.5/+1.9%) and fast+slow memory (+0.2/+0.6+0.2/+0.6%), although burden error is worse. Furthermore, removing slow memory from t-ECM-S reduces F1 by 3.63.6% and AUROC by 1.41.4%, while increasing burden error by 2.72.7%. Hypotension performance matches the source-free TTA approaches: The main text states that ECM-S improves F1 and burden error ``while preserving its AUROC.'' Table 17 reports higher mean F1 (58.3 vs 57.5) and lower burden error (21.7 vs 23.1) than the best source-free TTA results, with comparable AUROC. Thus, ECM-S matches TTA in AUROC, but outperforms TTA in the reported F1 and burden-error improvements, which outperform the other non-ECM adaptation methods.

AuthorsOpenReview ↗

Response to weakness W4

W4:

The calibration evaluation settings are inconsistent.: The main AF comparison uses the same source-pretrained backbone, seed-specific calibration-training/validation partitions, internal test partitions, and external cohorts across methods. Source-free TTA methods (TENT, CoTTA, EATA, and SAR) adapt through their respective unsupervised objectives on unlabeled deployment streams. Their hyperparameters are nevertheless selected using labeled calibration-validation patients, as for the supervised calibration methods, and are fixed before deployment. The additional 2 tasks also compare the methods across the same 3-seed calibration and evaluation protocol.

...the 15.5% increase in macro-F1 score of ECM is in comparison to the baseline...: We will explicitly state the improvement as relative from the opulation model in the revised abstract. The main text explicitly identifies the population predictor as the reference for the reported macro-F1 improvement (Section 5.3, lines 366-367), which is not presented as the margin over other calibrated methods.

We kindly encourage the reviewer to refer to the specific sources of inconsistency in case we missed them in this response.

AuthorsOpenReview ↗

Response to overall weaknesses

Overall weakness

Overall, the approach presented in this paper does not contain significant methodological novelty. We would like to clarify the methodological novelty introduced in our study. ECM learns how a patient’s preceding observations should adapt a fixed predictor’s subsequent decisions, using task supervision from separate patients. This differs from the closest approaches in three substantive respects:

  1. Compared with optimization-based TTA, adaptation is learned from labeled context–query episodes before deployment, rather than driven by an unsupervised deployment-time objective such as entropy minimization [1]. Patient-specific adaptation therefore does not require online parameter optimization and the calibration-objective is aligned with the pre-training task objective.
  2. Compared with prototype and reference-based personalization, ECM learns the patient-conditioning rule for subsequent predictions, rather than prescribing classification by pseudo-class centroids or requiring an expert-selected target-patient reference [2,3]. Therefore, ECM learns task-supervised use of patient history, it does not simply store prototypes. Learning the adaptation parameters separately enables population-knowledge retention by the pretrained predictor, clearly separating population diagnostic criteria from patient-specific variation.
  3. Compared with simply extending ECG models to longer inputs [4], ECM preserves the short-window prediction task and adapts successive predictions through patient state.

The relevance of our approach is tested against adaptation, prototype, recurrent, and memory alternatives under matched evaluation conditions, including external distribution shifts and prolonged monitoring. The three-task evaluation and mechanistic controls establish its practical benefits, which especially emerge with marked distribution shift.

Empirical results are mixed, .. We would like to qualify the results reported in the tables, with additional paired analyses.

Table 5: ECM variants have the best reported means for 13 of the 15 interval–metric combinations. Beyond 10 hours, ECM-S improves F1 over EMA (the best longitudinal comparator) by 1.27% [95% CI: 0.35, 2.22], reduces BE by 1.07% [0.20, 2.06], and reduces non-AF false-AF rate by 2.33% [1.26, 3.67].

Table 8: Externally, ECM-S outperforms fine-tuning F1 by 5.57% [2.22, 8.96] and reduces BE by 3.95% [1.16, 6.75].

Table 9: This reports calibration-validation performance, not deployment performance.

Table 11: ECM-S improves AUROC over causal attention by 1.17 points [0.34, 2.09] and F1 by 1.6% [0.76, 2.43].

Table 12: The analysis supports AUROC improvements for full t-ECM-S over recent-context-only of 1.93% [0.98, 3.00] and over fast + slow memory of 0.64% [0.28, 1.07]. Relative to t-ECM-S without slow memory, the full model improves F1 by 2.99% [2.08, 3.92], AUROC by 1.42% [0.75, 2.22], and reduces BE by 2.68% [1.72, 3.70]. Removing the router improves mean F1 and BE but the full model has slightly higher AUROC. The router was selected based on calibration-validation performance, therefore it was retained when deploying on the evaluation cohorts.

Table 15: This analysis evaluates sensitivity to calibration-cohort composition using source-distance-based selection. It characterizes when calibration transfers effectively in relation to the distribution shift from pretraining data.

Table 17: ECM-S has the highest mean F1 and jointly best AUROC and BE. Against CoTTA, ECM-S reduces BE by 1.38%[0.16, 2.62]. Its F1 difference is +0.81%[+0.07, 1.67].

We acknowledge metric-dependent trade-offs and cases where simpler configurations perform better. However, these qualify the scope of the contribution rather than negate its empirical value.

References:

[1] Wang et al. (2021). Tent: Fully Test-Time Adaptation by Entropy Minimization. ICLR.

[2] Iwasawa & Matsuo (2021). Test-Time Classifier Adjustment Module for Model-Agnostic Domain Generalization. NeurIPS.

[3] An et al. (2025). Personalized ECG arrhythmia classification using single normal beat guidance: A minimal supervision approach for atypical morphology cases. Research Square preprint, 2025.

[4] Tang et al. (2026). Extending Pretrained 10-Second ECG Foundation Models to Longer Horizons. arXiv:2605.16975.

Reviewer_XvpROpenReview ↗
Rating
3(+1)
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

The paper addresses the mismatch between physiological classifiers trained on short recordings and their deployment on continuous recordings from unseen patients. It proposes Episodic Context Memory (ECM), which uses preceding patient observations to maintain a memory that adjusts a frozen classifier’s predictions without requiring patient labels or parameter updates during deployment. Evaluation focuses on atrial fibrillation detection, where ECM improves performance under external dataset shift, while full fine-tuning performs better internally. Additional experiments explore its applicability to hypotension detection and multi-class ectopy classification.

Critical strengths

The paper addresses the practical challenge of adapting short-window physiological classifiers to continuous recordings from unseen patients without deployment-time labels or parameter updates. Comparisons with diverse adaptation and memory baselines, independent external cohorts, paired patient-level uncertainty analyses, and controlled ablations provide substantive evidence that patient context improves the evaluated detector under distribution shift. The ablations support the contributions of patient-matched context and query-conditioned retrieval. It strengthens confidence in the reported benefits, despite the remaining questions about generalizability.

Critical weaknesses

W1. The evaluation relies on a single CNN–Transformer backbone per task and does not include a representative pretrained ECG foundation model. This leaves a central question unresolved: does ECM provide additional value over strong, transferable physiological representations, or primarily compensate for limitations of the selected population model? Evaluating a strong pretrained ECG backbone with and without ECM under the same calibration and testing protocol would clarify whether the reported benefits extend beyond the selected population representation. W2. The strongest evaluation and mechanistic evidence concerns AF detection. The modest hypotension gains without AUROC improvement and mixed class-specific ectopy results provide limited support for broader generalizability across cardiovascular tasks and sensing modalities.

Questions for authors

Q1. Does ECM provide consistent improvements when applied to a representative strong pretrained ECG backbone? Evaluating that backbone with and without ECM under the same calibration and testing protocol would clarify its incremental value. Q2. What explains the substantially smaller benefit on hypotension detection, including the absence of an AUROC improvement? Which characteristics of the task or source-model errors determine when patient context is useful? Q3. All models use a fixed 0.5 decision threshold (Appendix A.1.3). How much of the ECM variants’ F1 and burden-error improvement over the population model could be achieved simply by choosing a better threshold for that baseline using calibration-validation patients? Could the authors also report AUROC for each time interval in Table 5, especially beyond 10 hours, to show whether t-ECM-S’s +15.1-point F1 gain is accompanied by better separation of AF from non-AF windows?

Q4. Could the authors clarify what information in patient context accounts for ECM’s gains? One possibility is that memory captures relatively stable characteristics, such as the patient’s ECG morphology, that help interpret subsequent windows. Another is that it tracks recent rhythm: if preceding windows contain AF, the next window is also likely to contain AF. The wrong-patient ablation changes both kinds of information, so it does not distinguish these explanations. The small effect of resetting carried memory and the strong recent-context-only baseline further motivate this distinction. Two additional controls would help. First, could the authors use context from an earlier part of the same patient’s recording to predict a later query, keeping memory fixed during the intervening gap? This would test whether patient context remains useful when it no longer contains immediately preceding rhythm information. Second, could a simpler baseline learn AF/non-AF transition patterns from the same calibration patients and adjust each current prediction using preceding model outputs? Comparing this baseline with ECM would help determine how much benefit requires patient-specific feature memory beyond modeling rhythm persistence. Q5. Could the authors compare fine-tuning and ECM-S with the same CNN–Transformer trained from scratch on the pooled calibration-training patients, using the same validation and evaluation protocol? This would clarify whether MIMIC-IV-ECG pretraining offers an advantage over directly learning from the available labeled long-term recordings, particularly under external dataset shift.

8 comments
AuthorsOpenReview ↗

Response to weaknesses - Part 1/2

We would like to thank you for the very detailed assessment and constructive review. Please let us address your concerns.

W1/Q1: We thank the reviewer for this important suggestion. We agree that evaluating further ECG backbones is necessary to demonstrate the benefit of ECM and its generalizability. We selected the following ECG foundation models: CLEF [1] (medium configuration) and ECGFounder [2] (single lead configuration) and fine-tuned them on AF detection, followed by evaluation on the same cohorts used for the CNN-Transformer. Table 1 and Table 2 show the 5-seed results of using the models with and without ECM-S on the internal and external cohorts, respectively. ECGFounder without ECM-S outperforms the CNN-Transformer on the internal deployment cohort, whereas the performance is very similar externally. The frozen CLEF model achieved lower scores than the CNN-Transformer on both cohorts. Adaptation with ECM-S strongly improved the evaluated metrics for both models. Thus, the results suggest robust benefits of ECM across neural architectures.

Table 1. Internal patient-level deployment performance (%), mean ± SD across five seeds.

BackboneMethodAF F1 ↑AUROC ↑AF BE ↓AUPRC ↑nAF FA ↓
CLEFPopulation75.65 ± 0.8392.85 ± 0.6211.14 ± 0.4879.46 ± 1.6018.00 ± 1.97
CLEFECM-S84.94 ± 0.5096.47 ± 0.315.79 ± 0.8788.69 ± 1.455.89 ± 2.75
ECGFounderPopulation82.48 ± 0.6694.91 ± 0.405.59 ± 0.3486.62 ± 0.997.24 ± 1.27
ECGFounderECM-S90.06 ± 0.6997.84 ± 0.352.47 ± 0.3393.40 ± 1.183.40 ± 1.73

Table 2. External patient-level deployment performance (%), mean ± SD across five seeds.

BackboneMethodAF F1 ↑AUROC ↑AF BE ↓AUPRC ↑nAF FA ↓
CLEFPopulation55.09 ± 0.0081.70 ± 0.0032.41 ± 0.0056.72 ± 0.0027.60 ± 0.00
CLEFECM-S69.60 ± 2.3086.67 ± 1.1014.14 ± 2.2568.99 ± 1.152.47 ± 1.18
ECGFounderPopulation63.53 ± 0.0091.13 ± 0.0024.74 ± 0.0076.65 ± 0.0019.17 ± 0.00
ECGFounderECM-S82.45 ± 2.2693.52 ± 0.656.69 ± 1.3782.74 ± 1.420.56 ± 0.53

We will include the analysis in an additional section of the Appendix.

References:

[1] Yuxuan Shu et al. Clinically-Guided Contrastive Learning for Electrocardiogram Foundation Models. arXiv:2512.02180, 2025.

[2] Jun Li et al. An Electrocardiogram Foundation Model Built on over 10 Million Recordings with External Evaluation across Multiple Domains. arXiv:2410.04133v4, 2025.

AuthorsOpenReview ↗

Response to Weaknesses - Part 2/2

W2: We agree that the experimental results mainly involve the AF detection task. We extended the evaluation of the two additional tasks by performing the same mechanistic and longitudinal analyses.

Benefits extend across monitoring periods. For hypotension, ECM-S achieves the lowest mean burden error in every interval and the highest mean F1 in three of four intervals, while AUROC remains close to the population model (Table 3). In ectopy classification, ECM-S achieves the highest mean macro-AUROC in every interval. Beyond 10 hours, ECM-S achieves the highest macro-F1/AUROC (Table4).

Table 3. Longitudinal hypotension detection on the external cohort (%).

IntervalMethodMacro-F1 ↑AUROC ↑BE ↓
0–30 minPopulation53.9083.3626.75
Fine-tuning40.81 ± 2.2969.65 ± 5.2038.56 ± 0.96
LSTM49.52 ± 5.0982.70 ± 3.2131.68 ± 5.49
EMA54.05 ± 1.3881.97 ± 0.4125.89 ± 1.68
ECM-S55.09 ± 0.3283.16 ± 0.2224.89 ± 0.76
30–60 minPopulation44.8080.6029.87
Fine-tuning32.94 ± 1.5063.03 ± 5.8748.82 ± 1.77
LSTM42.39 ± 3.1378.25 ± 4.4030.99 ± 2.31
EMA45.95 ± 0.7277.25 ± 2.2529.86 ± 2.29
ECM-S45.22 ± 0.5180.03 ± 0.5127.39 ± 1.51
1–3 hPopulation42.3770.6134.69
Fine-tuning32.32 ± 2.6959.69 ± 7.3751.82 ± 3.65
LSTM41.64 ± 2.5770.09 ± 1.9433.89 ± 2.78
EMA41.95 ± 1.4070.38 ± 1.0437.79 ± 2.38
ECM-S44.42 ± 2.1671.04 ± 0.8030.27 ± 3.24
>3 hPopulation51.8870.0827.19
Fine-tuning44.28 ± 1.1660.75 ± 2.0934.37 ± 0.29
LSTM48.74 ± 2.8867.86 ± 3.2129.74 ± 2.60
EMA52.05 ± 1.4468.30 ± 0.6927.52 ± 2.27
ECM-S53.06 ± 1.5970.05 ± 0.1026.89 ± 1.29

Table 4. Longitudinal ectopy classification on external LTAFDB recordings: class-macro performance (%).

IntervalMetricPopulationFine-tuningLSTMEMAECM-S
0–30 minMacro-F1 ↑46.5164.90 ± 2.8963.37 ± 1.7669.93 ± 1.9671.36 ± 4.26
Macro-AUROC ↑87.2591.49 ± 0.4290.92 ± 0.0691.26 ± 1.1692.41 ± 0.25
30–60 minMacro-F1 ↑48.8067.61 ± 2.2365.88 ± 2.2973.97 ± 2.4773.74 ± 6.91
Macro-AUROC ↑88.1792.25 ± 0.3492.11 ± 0.3292.24 ± 1.0092.91 ± 0.17
1–3 hMacro-F1 ↑47.6766.88 ± 2.2367.68 ± 2.0672.36 ± 2.3170.91 ± 7.92
Macro-AUROC ↑88.3392.47 ± 0.3992.61 ± 0.0792.85 ± 0.7693.80 ± 0.29
3–10 hMacro-F1 ↑44.6959.78 ± 2.5159.40 ± 2.6163.98 ± 2.0164.78 ± 6.87
Macro-AUROC ↑87.4289.97 ± 0.3490.41 ± 0.0990.00 ± 0.8892.22 ± 0.23
>10 hMacro-F1 ↑44.2257.77 ± 2.4858.51 ± 3.0962.72 ± 1.7163.86 ± 5.55
Macro-AUROC ↑87.6191.93 ± 0.4592.28 ± 0.3692.58 ± 0.6993.44 ± 0.69

Patient-matched context matters, persistence is metric-dependent. Wrong-patient context reduces hypotension F1 and increases burden error, whereas wrong-record context reduces ectopy macro-F1/AUROC. Mean-slot retrieval also reduces F1 in both tasks. Resetting memory lowers AUROC for hypotension and for ectopy, but improves ectopy F1 (Tables 5 and 6). These results broaden the evidence for patient-state adaptation beyond AF.

Table 5. Mechanistic analysis for hypotension detection task. Changes relative to full ECM-S, in percentage points.

InterventionΔ Macro-F1Δ AUROCΔ BE
No correction-0.81 ± 1.10+0.08 ± 0.21+1.37 ± 0.95
Mean-slot read-0.23 ± 0.53-0.33 ± 0.11+0.27 ± 0.32
Reset state-0.19 ± 0.73-1.39 ± 1.19-0.96 ± 1.05
Wrong-patient context-1.87 ± 1.93-0.27 ± 0.49+1.82 ± 1.85

Table 6. Mechanistic analysis for ectopy classification task. Changes relative to full ECM-S, in percentage points.

InterventionΔ Macro-F1Δ Macro-AUROC
No correction-18.84 ± 5.91-5.39 ± 0.43
Reset state+1.38 ± 2.64-0.41 ± 0.40
Mean-slot read-1.56 ± 0.84-0.07 ± 0.43
Wrong-record context-9.12 ± 5.33-3.31 ± 1.59

We will gladly add these analyses in the Appendix.

AuthorsOpenReview ↗

Response to questions Q2-Q4

  1. Q2: We agree that the hypotension benefits are more limited than those observed for AF. On 200 external patients, ECM-S reduces burden error by 1.4% (95% CI: [0.14, 2.61]), and F1 is improved by +0.8% CI: [+0.07, 1.66]), while AUROC remains essentially unchanged (-0.08%; CI: [-0.36, 0.19]). Several task differences may contribute. Hypotension calibration contains substantially fewer, longer windows than AF calibration. Labels are derived from arterial-pressure measurements using margin-separated thresholds, and quality filtering leaves temporal gaps. In external evaluation, threshold-adjacent windows remain available as context but are excluded from scoring. These differences affect the available temporal context and supervised information. Patient context nevertheless contains useful information: replacing it with another patient's context reduces F1 by 1.87% (95% CI: [1.20, 2.58]), as shown in the previous response. We will additionally include the annotation and signal quality uncertainty as further limitations of our study.

  2. Q3a: We thank the reviewer for suggesting this control. We evaluated two global adjustments to the frozen population predictor, separately for each of the five original calibration splits. Threshold selection: We selected one decision threshold τ\tau by maximizing mean patient-level macro-F1 across AF-containing calibration-validation patients. Affine-logit calibration: We fitted two global parameters, aa and bb, defining:p~=σ!(a,logit⁡(p)+b),a>0.\widetilde{p} = \sigma\\!\left(a\\,\operatorname{logit}(p)+b\right), \qquad a > 0. with a∈[0.05,20]a\in[0.05,20] and b∈[−20,20]b\in[-20,20]. Table 7 shows that the observed benefits are not fully explained by the global calibration controls. Q3b: We report the AUROC for each elapsed time interval in Table 8. t-ECM-S achieves higher mean AUROC than the population model in all five monitoring intervals. Beyond 10 hours, AUROC increases from 90.34%90.34\% to 93.72±1.48%93.72 \pm 1.48\%, (~+3.383.38%), and ECM-S reaches 92.28±1.18%92.28 \pm 1.18\%, outperforming all non-ECM comparators.

Table 7. External patient-macro results using controls (%), mean ± SD across five seeds.

MethodF1 ↑BE ↓AUROC ↑
Population (threshold = 0.5)63.624.091.0
Validation-selected F1 threshold71.1 ± 11.015.8 ± 12.791.0 ± 0.0
Global affine-logit calibration75.2 ± 0.29.8 ± 0.191.0 ± 0.0
ECM-S (threshold = 0.5)78.5 ± 2.47.9 ± 1.592.7 ± 0.7

Table 8. External deployment AUROC (%) across elapsed monitoring intervals.

Elapsed timePopulationEMALSTMECM-St-ECM-S
0–30 min85.5984.96 ± 1.7186.42 ± 2.8183.93 ± 2.7488.87 ± 2.59
30–60 min94.8492.81 ± 1.3491.40 ± 5.1092.07 ± 1.4695.28 ± 1.99
1–3 h91.3490.38 ± 0.7689.13 ± 3.2690.72 ± 1.0092.65 ± 1.28
3–10 h90.0189.60 ± 0.9190.03 ± 1.6890.73 ± 0.6091.94 ± 1.18
>10 h90.3490.91 ± 2.2488.96 ± 4.1292.28 ± 1.1893.72 ± 1.48
  1. Q4a: We thank the reviewer for suggesting these controls. For each later query, we retrieved a carried memory snapshot saved 50, 200, or 400 segments earlier. Earlier context retains substantial F1 gains over the population predictoand its deficit relative to current-context ECM-S increases from 1.56 to 3.24% as the gap grows (Table 9). This indicates that useful context need not be immediately preceding, although recent updates provide additional benefit. Q4b: We implemented a causal output-history baseline that learns transition probabilities from calibration-training labels. At deployment, it combines the current affine-calibrated source prediction with a Markov prior computed from the preceding filtered prediction. The learned rhythm filter recovers some of ECM's AUROC improvement (Table 10). However, ECM-S achieves 3.06% higher mean F1. Paired differences also favor ECM-S for burden error (-1.65%; 95% CI: [-3.09, -0.47]) and non-AF false-AF rate (-2.80%; 95% CI: [-4.62, -1.42]), supporting benefits beyond this output-history control.

Table 9. Earlier-context control on external patients. AF F1 differebces (%), with 95% CIs.

Gap (segments)Frozen snapshot − PopulationFrozen snapshot − Current ECM-S
50+14.36 [9.65, 19.10]-1.56 [-1.95, -0.87]
200+12.74 [8.07, 17.32]-2.00 [-2.67, -1.41]
400+11.01 [6.41, 15.51]-3.24 [-4.16, -2.40]

Table 10. External performance of ECM-S and output-based controls (%), mean ± SD across five seeds.

MethodAF F1 ↑AUROC ↑AF BE ↓nAF FA ↓
Population63.6490.9623.9922.81
Learned rhythm filter75.46 ± 0.7491.32 ± 0.289.50 ± 0.274.40 ± 1.32
ECM-S78.52 ± 2.4492.67 ± 0.687.85 ± 1.541.60 ± 1.68

Comments on the paper

1 comment
AuthorsOpenReview ↗

Summary of the rebuttal

Dear Area Chairs and Reviewers,

We would like to thank you for the careful evaluation of our submission. We have provided responses to all reviewer questions, additional experiments, and a revised manuscript. Below, we summarize the overall rebuttal.

Motivation and impact:

Our study addresses the mismatch between short-window physiological prediction and longitudinal monitoring of unseen patients. ECM separates fixed population knowledge from evolving patient-specific state: adaptation rules are learned on separate labeled calibration patients, while deployment uses preceding observations without patient labels or parameter updates. This enables existing predictors to exploit patient history without retraining for each new patient. Extensive comparisons and the additional rebuttal experiments support its value for generalization under distribution shift and for applicability in clinical longitudinal prediction.

Rebuttal details:

  1. Generalization across backbones and tasks: see responses to reviewer XvpR (W1–W2, Q1). Five-seed evaluations with two foundation models show that ECM-S improves all displayed metrics over both frozen predictors, extending the evidence beyond the original backbone. Additional longitudinal and mechanistic analyses for hypotension and ectopy further demonstrate benefits beyond AF while identifying task-specific limitations. Manuscript changes: new foundation model results appear in Appendix A.4 and the extended additional-task analyses appear in Appendix A.7.

  2. Calibration-data sensitivity: see responses to reviewer iJhV (Q1/W1). We varied calibration cohort size and available recording duration across five seeds, comparing ECM-S with the best 3 comparators. The experiments demonstrate benefits with smaller calibration cohorts while quantifying dependence on labeled data. Manuscript changes: Appendix A.6 includes cohort-size and recording-duration analyses; Section 6 explicitly acknowledges calibration dependence.

  3. Methodological contribution and qualified results interpretation: see responses to reviewers 8o7A (W3–W4, overall weaknesses), iJhV (W2–W3, Q2). We identified the external fine-tuning results already present in the submission and clarified the common evaluation protocol and reference baseline for reported gains. Additional paired comparisons and controls support specific contributions from memory capacity and persistence. We also acknowledge dataset-dependent rankings and that routing and persistence do not improve every metric. Manuscript changes: Sections 2 and 4 describe the methodological distinctions; Appendix A.3.1 and A.6 contain the underlying comparisons. The revised conclusion explicitly qualifies dataset- and component-level claims.

  4. Prediction controls and memory sensitivity: see responses to reviewers XvpR (Q3-Q4), 8o7A (Q1,Q3). We evaluated further requested controls. These controls show benefits not fully recovered by global calibration or output-history filtering, further strengthening our approach. Manuscript changes: Section 4 clarifies initialization and the carry formulation.

  5. Clarifications and acknowledged limitations: see responses to reviewers XvpR (Q2), 8o7A (W1-W2), iJhV (W1). We explicitly distinguish supervised calibration from label-free adaptation at deployment. We clarified notation, episode duration and sampling, memory initialization, principal hyperparameters, and calibration-cohort construction. For hypotension detection, additional analyses were provided and we acknowledge label uncertainty and temoral gaps as limitations. Manuscript changes: Sections 4 and 5.1 contain the methodological and protocol clarifications; Appendix A.6 explains calibration-cohort construction; The Conclusion (Section 6) expands the limitations.

  6. Pretraining and preprocessing controls: see responses to reviewers XvpR (Q5), 8o7A (Q2). Training from scratch, with and without ECM-S, supports the external-generalization advantage of source pretraining. ECM retains benefits over the corresponding unnormalized population baseline.

Reviewer follow-up:

  1. In the follow-up, Reviewer XvpR acknowledged that the additional experiments addressed most concerns and increased the recommendation to 3.

  2. Reviewer 8o7A maintains concerns about novelty and performance relative to strong comparators. Our novelty claim concerns the separately learned memory adapter around a frozen population predictor, enabling patient-specific label-free deployment on longitudinal recordings.

  3. At the time of this summary, reviewer iJhV has not provided follow-up comments, so we cannot determine which concerns they consider resolved or outstanding.

We hope the Area Chairs will find that the additional evidence and revisions strengthen the contribution.

Best regards, The Authors

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.