acceptodds
Under review as a conference paper at ICLR 2027

C-SHARE: Cross-Subject Heterogeneity-Aware Retrieval Augmentation for Early CAP Phase A Forecasting

Abstract

Cyclic alternating pattern (CAP), an established EEG marker of NREM sleep instability and fragmentation, comprises recurrent Phase A activations alternating with Phase B intervals. Forecasting Phase A onsets could enable anticipatory monitoring and inform future interventions aimed at improving sleep quality. Realizing this potential requires overcoming three challenges: sparse event annotations, physiologically heterogeneous precursors, and generalization to unseen subjects. Parametric forecasters pool these limited observations into stable population-level predictions. Retrieval augmentation can use the same training data differently, retrieving source events as empirical corrections, but the retrieved observations do not necessarily constitute independent or transferable evidence. We introduce C-SHARE, a model-agnostic plug-in retrieval-augmentation module for frozen EEG forecasters. C-SHARE groups overlapping pre-onset windows into onset-indexed episodes, learns future-conditioned multi-subspace keys for predictive matching, and gates each correction using event- and subject-level support. In addition, we contribute NapCAP-128Ch, to our knowledge the first high-density CAP EEG dataset and the largest CAP-annotated EEG cohort by subject count, comprising 120 subjects. Across eight backbones and three horizons on this cohort and the public CAP Sleep Database, C-SHARE improves over the corresponding frozen backbone in AUPRC in all 48 dataset–backbone–horizon settings and in AUROC in 42 of 48, yielding more consistent gains than general-purpose retrieval baselines.

Primary area:
applications to neuroscience & cognitive science
Keywords:
Retrieval-augmented forecasting, Time-series forecasting, EEG event forecasting, Cyclic alternating pattern

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_GYBLOpenReview ↗
Rating
2(+1)
Confidence
2
Informativeness
1
Presentation
2
Soundness
2
Read review
Paper summary

The paper studies early CAP Phase A forecasting (predicting from a EEG window, whether a Phase A onset will occur in 10, 20, or 30 seconds) which could support closed-loop sleep interventions. The authors release NapCAP-128Ch, a new dataset of expert-annotated CAP events from 120 subjects, recorded with high-density EEG. Motivated by cross-subject physiological heterogeneity, they augment a baseline forecaster with a retrieval mechanism comprising episodic memory, multi-subspace keys learned from future annotations, and a reliability gate to regulate base predictions. Across 8 backbones and 3 horizons, the proposed retrieval-augmentation plug-in improves AUPRC over the base forecaster and outperforms RAFT and SARAF in nearly all settings.

Critical strengths

The NapCAP-128Ch dataset is valuable for future research in the domain.

Critical weaknesses

This paper investigates a novel task, making it particularly important to establish its value. However, the incremental gain of forecasting relative to existing automated CAP methods is never evaluated. And, the interface bridging the binary onset forecast to the input required by closed-loop sleep interventions is left unspecified. This undermines the paper's claimed significance.

The authors motivate retrieval augmentation by cross-subject physiological heterogeneity (a cross-subject conditional shift), however, the experimental baseline omits standard domain generalization benchmarks, such as DANN.

Questions for authors

Was the future-conditioned ranking supervision compared against an alternative learning objective (e.g., a supervised classification embedding trained on the same labels)? This is a major design choice that lacks an ablation experiment.

Have you analyzed how the gain of retrieval augmentation varies with data scale, relative to the parametric baseline itself? As the source pool grows, does the gap between base forecaster and base+C-SHARE widen or narrow? A simple test would be subsampling the source subjects and plotting both AUPRC curves.

4 comments
AuthorsOpenReview ↗

Early CAP forecasting offers the opportunity to act before onset

Thank you sincerely for your constructive feedback. We appreciate your recognition of the value of our collected NapCAP-128Ch, the largest CAP-annotated EEG dataset by number of subjects, for future research in the domain. In response to your concerns, we explain how the well-established value of forecasting over detection, namely the opportunity to act before onset, motivates our CAP forecasting task and its potential use in closed-loop interventions. Following your suggestions, we added a DANN comparison, retrieval-supervision ablations, and source-data scaling analysis. We sincerely appreciate these suggestions, as the additional experiments and statistical analyses further support C-SHARE's forecasting performance. We have incorporated these results into the revised manuscript.

W1. The incremental value of forecasting beyond existing automated CAP methods, all of which address detection.

To our knowledge, all existing automated CAP methods address detection, identifying Phase A events from EEG in which event-related activity is already present. Our work is the first to forecast CAP Phase A onsets from preceding EEG. The incremental gain of forecasting compared with detection is the opportunity to act before onset. Advance information can support corrective action before a disturbance affects a system [1] (Section 1.4, p. 22). Our task uses preceding EEG to predict future onsets, following the definition of forecasting [2] (2nd ed., Section 1.1). As motivated in the Introduction, this advance warning provides a potential intervention window for improving sleep stability (lines 47 to 48). Section 3.1 defines the task following established EEG event-forecasting formulations. Eq. 1 specifies whether a Phase A onset occurs within a given future interval (lines 159 to 160 and 186 to 190). We also evaluated existing automated CAP methods as comparison baselines by adapting GTransU and MuRAT to the same forecasting inputs and targets.

Our results provide empirical evidence that upcoming Phase A onsets are predictable from preceding EEG in unseen subjects. These forecast probabilities could serve as risk inputs to a closed-loop intervention controller, with thresholding and temporal post-processing determining when to trigger stimulation and suppress repeated triggers. As acknowledged in Section 5, translating these findings into a reliable closed-loop system requires further systematic design of intervention timing, repeated-trigger handling, and false-alarm tolerance.

[1] Åström K J, Murray R M. Feedback systems: an introduction for scientists and engineers[J]. 2008.

[2] Montgomery D C, Jennings C L, Kulahci M. Introduction to time series analysis and forecasting[M]. John Wiley & Sons, 2015.

AuthorsOpenReview ↗

Additional baselines, ablations, and scaling analysis further support C-SHARE’s performance.

W2. Additional comparison with DANN.

Our original comparisons focused on retrieval-augmentation methods to assess the contribution of our proposed retrieval design. Following your suggestion, we evaluated DANN with TimesNet at the 20 s forecasting horizon under the same LOSO protocol across all 120 NapCAP-128Ch subjects.

\hline \text{Method} & \text{AUROC} & \text{AUPRC} \\\\ \hline \text{TimesNet (base)} & 64.16 & 24.85\pm14.85 \\\\ \text{TimesNet + DANN} & 63.76 & 25.21\pm15.49 \\\\ \text{TimesNet + C-SHARE (ours)} & 67.65 & 34.03\pm14.03 \\\\ \hline \end{array}$$ DANN shows no clear AUPRC improvement over the baseline ($+0.36$ points, paired bootstrap 95% CI $[-1.36, +1.83]$). C-SHARE improves AUPRC by $9.18$ points ($[+5.28, +13.32]$), indicating that subject-invariant representations alone provide limited benefit in this forecasting task. These results are included in Appendix J.1 of the revised manuscript. ### Q1. Retrieval supervision ablation. Following your suggestion, we replaced future-conditioned ranking with a supervised classification embedding trained using a linear head and binary cross-entropy on the same onset labels. All other settings remained identical. The table reports retrieval-only and full-pipeline AUPRC (%, mean $\pm$ standard deviation) for TimesNet at the 20 s horizon across all 120 NapCAP-128Ch subjects under LOSO. $$\begin{array}{lcc} \hline \text{20 s horizon, AUPRC (\\%)} & \text{Retrieval-only} & \text{Full C-SHARE} \\\\ \hline \text{Supervised classification embedding} & 22.11\pm13.36 & 29.89\pm15.47 \\\\ \text{Future-conditioned ranking (ours)} & 24.18\pm13.47 & \mathbf{34.03}\pm14.03 \\\\ \hline \end{array}$$ The 4.14-point improvement in full-pipeline AUPRC (paired Wilcoxon $p=0.040$) supports the additional value of future-conditioned ranking over classification supervision for learning retrieval keys. This ablation is included in Appendix J.2 of the revised manuscript. ### Q2. Source-data scaling and retrieval gains. Following your suggestion, we evaluated nested subsets containing 25%, 50%, and 100% of the source subjects, retraining the backbone and retrieval encoder and rebuilding the memory at each scale. We used TimesNet at the 20 s horizon across all 120 NapCAP-128Ch subjects under LOSO, excluding the test subject throughout. The table reports mean AUPRC (%) and paired subject-level bootstrap 95% confidence intervals for the gains. $$\begin{array}{lccc} \hline \text{Source subjects} & \text{TimesNet (base)} & \text{+ C-SHARE} & \Delta\text{AUPRC [95\\% CI]} \\\\ \hline \text{25\\%} & 24.06 & 25.70 & +1.64\text{ [}+0.76, +3.46\text{]} \\\\ \text{50\\%} & 27.02 & 31.01 & +3.99\text{ [}+2.53, +7.04\text{]} \\\\ \text{100\\%} & 24.85 & \mathbf{34.03} & +9.18\text{ [}+5.28, +13.32\text{]} \\\\ \hline \end{array}$$ C-SHARE improves AUPRC at every source scale, with all confidence intervals above zero. Its gain increases from 1.64 to 3.99 to 9.18 points as the source pool grows, showing that the retrieval benefit persists and increases with more source data in this setting. This motivates us to collect a larger dataset to strengthen this benefit. This analysis is included in Appendix J.4 of the revised manuscript.

Thank you for the experiments and detailed responses! In particular, the comparison with DANN has addressed my concerns regarding the advantage of retrieval augmentation over conventional domain generalization approaches.

My remaining concern is primarily about the practical significance of the forecasting task, particularly its utility for real-world closed-loop sleep interventions. I will raise my final rating.

AuthorsOpenReview ↗

Further clarification on CAP forecasting for sleep interventions: motivation, preliminary evidence, and practical use

Thank you for recognizing the value of our additional experiments and raising your rating. To address your remaining concern, we further clarify the practical motivation already discussed in our paper and provide additional evidence and analysis.

Sleep forecasting has received growing attention in recent years. A shared motivation is to first establish whether future sleep changes can be predicted, providing a foundation for designing and evaluating interventions. For example, SSF-SET states that sleep stage forecasting “offers a proactive method from monitoring to intervention” [1]. DeepArousal-Net forecasts non-apneic arousals 30 seconds in advance and motivates this task through potential interventions and personalized sleep management [2]. Both studies focus their empirical evaluation on forecasting performance, with proactive and personalized interventions left for future work. Although our sleep-related prediction targets differ, our work follows the same procedure. We first establish whether CAP onsets can be forecast in unseen subjects, providing a basis for future closed-loop sleep interventions.

Specifically, reducing abnormally elevated CAP rates is a potential intervention target for improving sleep stability and quality. As described in the Introduction (lines 39 to 41), CAP rate is an established marker of NREM sleep instability and fragmentation. A large population study linked higher CAP rates to poorer subjective sleep quality [3]. A treatment study also found that reductions in CAP rate accompanied improvements in subjective sleep quality among patients with insomnia [4]. During the collection of NapCAP-128Ch, we conducted an additional sleep experiment with audio stimulation involving 20 participants from the 120-participant cohort. Using a specific fixed-frequency natural sound, we compared conditions with and without audio stimulation in the same participants. Mean CAP rate was 34.32% without audio stimulation and 30.98% with stimulation, a reduction of 3.34 percentage points. This preliminary observation supports the potential to modulate CAP through audio stimulation.

Intervention timing is a key link between forecasting and practical use. As described in the Introduction (lines 45 to 48), CAP forecasting offers an advance window for closed-loop auditory interventions. For example, appropriately timed auditory stimulation can enhance sleep slow oscillations [5], as already cited in line 48. We therefore propose using CAP onset predictions to decide when to deliver audio stimulation or adjust its parameters. One potential use is to intervene before arousal-related Phase A events to help reduce the risk of progression toward wakefulness and sleep disruption.

Overall, this work demonstrates the feasibility of forecasting CAP onsets. These forecast probabilities could serve as risk inputs to a closed-loop intervention controller. Thresholding and post-processing could determine when to trigger stimulation. However, developing and evaluating a complete forecast-guided intervention system requires a broader set of experiments. As acknowledged in Section 5 (lines 467 to 470), further studies need to evaluate safety, false-alarm tolerance, intervention timing, and effects on sleep stability and clinical outcomes. This also requires examining stimulation strategies and individual responses. Our next step is to combine forecasting with audio interventions and assess whether the complete system can further reduce abnormally elevated CAP rates and improve sleep stability and quality.

We hope this explanation addresses your remaining concern.

References:

[1] Kweon Y S, Shin G H, Lee D H, et al. SSF-SET: A Discrete EEG Token-based Framework for Sleep Stage Forecasting[J]. IEEE Journal of Biomedical and Health Informatics, 2026.

[2] Jamarani Z Y, Baker F C, de Zambotti M, et al. Deeparousal-net: A multi-block recurrent deep learning model for proactive forecasting of non-apneic arousals from multichannel psg[J]. IEEE Transactions on Biomedical Engineering, 2025, 73(3): 1003-1014.

[3] Hartmann S, Bruni O, Ferri R, et al. Characterization of cyclic alternating pattern during sleep in older men and women using large population studies[J]. Sleep, 2020, 43(7): zsaa016.

[4] Giovanni Terzano M, Parrino L. Evaluation of EEG cyclic alternating pattern during sleep in insomniacs and controls under placebo and acute treatment with zolpidem[J]. Sleep, 1992, 15(1): 64-70.

[5] Besedovsky L, Ngo H V V, Dimitrov S, et al. Auditory closed-loop stimulation of EEG slow oscillations strengthens sleep and signs of its immune-supportive function[J]. Nature communications, 2017, 8(1): 1984.

Reviewer_MoWMOpenReview ↗
Rating
2
Confidence
4
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

C-SHARE forecasts CAP Phase A onsets in ten-second intervals beginning 10, 20, or 30 seconds after a 60-second EEG history. It combines frozen forecasters with event-organized memory, future-supervised multi-subspace retrieval, and a controller using prediction disagreement and effective event/subject support. The paper introduces the 120-participant NapCAP-128Ch cohort and evaluates eight backbones on it and 16 public CAP recordings. It reports AUPRC gains in all 48 settings under a conditioned offline protocol.

Critical strengths
  1. The proposed cohort includes 120 participants, 128 analyzed channels, and independent expert annotation with reported kappa of 0.69 (pp. 3, 13). The review subset supplies 40 recordings and 472 event annotations. The subset confirms that some data are available. The complete cohort and annotation agreement have not been independently verified.

  2. Tables 4 and 5 support the stated 48 AUPRC and 42 AUROC improvements. Mean AUPRC gains are 6.19 and 1.64 percentage points on the new and public cohorts. The supplement contains executable retrieval and gating components, and small synthetic checks passed. Inspected training code separates target subjects. The manuscript reports unsuccessful fixed blending and limits its clinical claims (pp. 8, 9).

Critical weaknesses
  1. The released code differs from the stated method in several places, and I could not determine which version produced the tables. Equation 3 and Figure 2 (p. 4) assign one episode to each onset. The code instead groups complete onset-token sets. Windows containing {A} and {A,B} can therefore become separate retrieved units even though both contain event A. Appendix C (p. 15) permits several positive horizon targets, but retrieval supervision keeps only the nearest future onset. This can omit later-horizon positives as ranking anchors. Synthetic tests reproduce both behaviors.

    There is also a mismatch in controller training: p. 17 specifies final-epoch parameters, whereas the supplied default pipeline selects source-validation checkpoints when the validation fold contains both classes and averages five gates. Other problems prevent the released pipeline from working with the shared data: the label reader recognizes none of the 472 shared events, and the NPZ reader ignores the inspected file's stored 250-Hz sampling rate.

    Please identify the code and configurations used for Tables 4 and 5 and provide a command that works on the shared subset. A comparison in one representative setting would help quantify the effects of these discrepancies. The discrepancies are present in the release, but I do not know how they affected the reported scores.

  2. The comparisons do not show what the specialized retrieval design adds. Table 1 (p. 8) omits window memory with the same learned query-level gate. PFRP, already cited on p. 3, learns predictive similarity and adaptive forecast fusion (AAAI 2026). A window-memory control with the same gate would test whether event organization helps under the fusion rule used by the complete system. An adaptation of PFRP, or a predictive-retrieval control testing the same mechanism, would help clarify the remaining contribution. The authors would need to explain how they adapt the continuous-output objective to binary events. One backbone and a representative horizon would suffice. The package does not include the RAFT/SARAF implementations used in the reported comparisons, so I could not assess their adaptation.

To me now, to some extent, as a variant of PFRP tailored to a specific vertical domain.

Questions for authors
  1. Which implementation and configurations generated Tables 4 and 5? Please provide a command that works on the shared subset and the corresponding per-subject outputs so that this can be checked.

  2. What changes when event grouping, horizon-specific supervision, and controller training follow the manuscript? A representative comparison would show whether the gains persist when these parts follow the manuscript.

  3. Does the advantage persist with identical learned gating for window memory and a justified predictive-retrieval control?

4 comments
AuthorsOpenReview ↗

Implementation and training details are clarified, runnable inference is provided

Thank you sincerely for your detailed review and constructive feedback. We appreciate your recognition of our collected NapCAP-128Ch, the largest CAP-annotated EEG dataset by number of subjects, and our model's performance improvements across both cohorts. In response to your concerns, we clarify implementation and training details, supply a runnable inference package for reproducibility, and present additional ablations under matched gating.

R1. Clarifications on implementation details (Weakness 1, Question 2).

Episode corner case. Eq. 3 and the implementation describe the common single-onset case. Your example concerns the corner case of multiple onsets within a 10-second occurrence period. This is uncommon given CAP's dominant periodicity (the interval between successive Phase A onsets) near 25 seconds. To quantify how frequently this situation arises in practice, we examined both datasets and found that 99.0% of positive windows on NapCAP-128Ch and 98.6% on the public CAP dataset contain a single onset, for which the implementation agrees with Eq. 3. To assess its impact, we repeated the TimesNet + C-SHARE experiment at the 20 s horizon with grouping revised to follow Eq. 3, obtaining an AUROC of 67.42±13.0867.42\pm13.08\\% and an AUPRC of 34.27±13.8634.27\pm13.86\\%, close to the original results of 67.65±13.2467.65\pm13.24\\% and 34.03±14.0334.03\pm14.03\\%, respectively. Thank you for bringing this corner case to our attention.

Different supervision targets. The retrieval objective intentionally differs from the forecasting target by design. We supervise retrieval similarity using next-onset timing to identify historical windows with similar timing of the next Phase A onset. Thus, not every positive horizon label serves as a ranking anchor. A later onset can still provide supervision through other sampled windows for which it is the next event. We have clarified this distinction in Section 3.2, lines 230 to 233 of the revised manuscript.

Controller training details. We acknowledge that Appendix C described this training strategy too briefly. The training procedure used in our experiments is consistent with the submitted code. We use subject-grouped five-fold training to reduce dependence on a single source-subject partition. The additional cost is small because the controller is lightweight. Training runs for 300 epochs per fold, retaining parameters based on source-only validation. At inference, predictions from the five resulting gates are combined. The held-out test subject is excluded from both training and validation throughout the LOSO procedure. The “final parameters” refer to those retained after this 300-epoch training and validation procedure. We have added these training details to Appendix C.

R2. Experimental reproducibility (Weakness 1, Question 1).

Shared data preprocessing. The shared NPZ files are intermediate preprocessing outputs, rather than unprocessed raw recordings. They have undergone 0.1 to 50 Hz band-pass filtering and 50 Hz notch filtering and retain a sampling rate of 250 Hz. In the experimental pipeline, EEG is further resampled to 128 Hz before model inputs are constructed. The raw recordings will be released upon acceptance.

Runnable command and configurations. Tables 4 and 5 were produced by the route-mixture configuration of the submitted retrieval pipeline: four routes, K=10K{=}10, at most two episodes per source subject, top-two state aggregation within each episode, inner- and outer-level temperatures of 0.10.1, the three-descriptor linear controller described in the preceding response, and frozen backbones.

To enable verification as you requested, we have provided the full inference configuration, pretrained weights, inference commands, and reference outputs for both the baseline and baseline + C-SHARE in a new folder at the existing shared-data location. You can directly run both on recordings from the shared NapCAP-128Ch subset. Please note that baseline + C-SHARE inference additionally requires episode memory constructed from the complete source-training pool, whereas the shared subset alone would yield a reduced memory. We will release the complete NapCAP-128Ch dataset upon acceptance.

AuthorsOpenReview ↗

C-SHARE outperforms window-memory and predictive-retrieval controls under matched learned gating

R3. C-SHARE retains its advantage under matched gating (Weakness 2, Question 3).

To isolate the contribution of our retrieval design under the same learned gating procedure, we conducted the two additional ablation experiments you suggested: a window-memory control that changes only the retrieval unit, and a PFRP-inspired predictive-retrieval control. For the PFRP-inspired control, binary labels replace continuous future outputs when defining predictive similarity. Within each training batch, all cross-subject windows with the same horizon-specific label are treated as positive matches, since their binary future-output MSE is zero. All other training and evaluation settings remain identical to C-SHARE, including the controller architecture and training procedure. These controls assess whether C-SHARE retains its advantage under the same learned gating procedure. Below we report results for frozen TimesNet at the 20 s horizon across all 120 NapCAP-128Ch subjects under LOSO.

\hline \text{Method} & \text{AUPRC} & \text{AUROC} \\\\ \hline \text{TimesNet alone} & 24.85 & 64.16 \\\\ \text{Window memory, learned gate} & 30.29 & 65.23 \\\\ \text{Predictive-retrieval control, learned gate} & 28.68 & 64.85 \\\\ \text{C-SHARE, learned gate (ours)} & \mathbf{34.03} & \mathbf{67.65} \\\\ \hline \end{array}$$ C-SHARE improves AUPRC over window memory by 3.74 percentage points (paired bootstrap 95% CI $[+0.29, +4.42]$), supporting the additional contribution of episode organization. It exceeds the predictive-retrieval control by 5.35 points (95% CI $[+2.08, +8.86]$), supporting the full design beyond binary predictive retrieval under matched learned gating. Compared with PFRP, which targets general time-series forecasting, C-SHARE is specifically designed to address the challenges of sparse event annotations, heterogeneous EEG precursors, and cross-subject generalization from limited event observations. We introduce onset-centered episodes to reduce redundant window-level evidence, future-conditioned multi-subspace retrieval to learn partial predictive matches across subjects, and a reliability controller to weight corrections according to their episode- and subject-level support. The matched controls above support the additional predictive value of this design in the evaluated setting. We have added these controls and results to Appendix J.3 of the revised manuscript.
Reviewer_MoWMOpenReview ↗

Reviewer reply

I thank the authors for providing additional experiments and clarification. I found the new controls helpful. The new dataset is also a good addition.

While I acknowledge that the proposed method effectively solves this task (and the evidence in the authors' response reinforces this), I still struggle to see any significant methodological breakthrough that surpasses existing predictive retrieval methods. The main differences seem to lie only in the organization of events and the handling of reliability; while these design choices are quite reasonable, they still appear to me to be rather "task-specific."

Furthermore, there are issues with the code. Since I haven't actually implemented the updated version, I cannot confirm whether the problems I previously pointed out—especially regarding data loading, sampling rate, and inconsistencies between the code and the paper—have indeed been corrected. I am not asserting that these problems still exist, but because I cannot personally verify these revisions, my concerns regarding reproducibility cannot be completely eliminated. (Given that some issues were identified in the first version, my confidence in the soundness of the paper has diminished.)

Therefore, while I acknowledge the authors' efforts in responding to the review comments, my overall assessment does not change sufficiently to justify a higher score. I will maintain my score at 2 (Weak Reject).

AuthorsOpenReview ↗

C-SHARE addresses shared EEG challenges beyond CAP-specific adaptations, while reproducibility concerns are addressed through further clarification and the runnable command already provided for result verification.

Thank you for your follow-up response and for recognizing the effectiveness of our method and the value of the dataset. We would like to address your remaining concerns about the methodological contribution and reproducibility.

Our contributions include a new dataset, a new forecasting problem, and a new algorithm. Together, they form a cohesive study centered on CAP forecasting, which is therefore the focus of our experiments. However, the algorithm itself is not CAP-specific. Its design addresses common challenges in EEG event forecasting, which are not jointly addressed by existing predictive retrieval methods. The mechanisms address characteristics of EEG, including sparse event observations, cross-subject differences, and diverse precursor patterns, without relying on CAP-specific prior knowledge. Specifically, episodic memory prevents overlapping windows from repeatedly counting the same event. The reliability controller adjusts the influence of retrieved evidence according to its event- and subject-level support. Beyond the event organization and reliability handling you mentioned, our method also addresses how predictive similarity is learned through future-conditioned ranking and multi-subspace matching to accommodate heterogeneous precursors across subjects. The component ablations and matched-gating controls further support the contributions of these designs.

Regarding reproducibility, as requested, we have already provided the inference workflow before, including the required configurations and command for your verification (R2 Runnable command and configurations.). As explained in our preceding response, the points raised should not totally be regarded as code errors or inconsistencies between the code and the paper. We summarize the clarifications below.

Retrieval supervision. These are distinct targets for retrieval learning and final forecasting. Using “only the nearest future onset” is our intentional design for constructing time-to-event affinities that define the retrieval ranking supervision. By contrast, the “multiple positive horizon targets” in Appendix C define the final forecasting labels. They serve different purposes and need not coincide, as explained in our preceding response (R1 Different supervision targets.).

Controller training. The reported experimental results are consistent with the submitted code. The manuscript did not elaborate on these training details, which we have now added to the revised version (R1 Controller training details.).

Episode grouping. We thank you for identifying the multi-onset corner case, which we overlooked and which affects at most 1.4% of positive windows. The rerun with grouping aligned with Eq. 3 yields results close to the original ones (R1 Episode corner case.).

Shared example data. The shared NPZ files were provided as preprocessed example data rather than raw recordings. They retain a sampling rate of 250 Hz and require further model-input preprocessing. The single-command inference workflow handles this shared-data format and resampling to 128 Hz (R2 Shared data preprocessing.).

We hope these clarifications address your remaining concerns. Thank you again for your time and constructive feedback.

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

This paper proposes C-SHARE, a model-agnostic retrieval-augmentation module for forecasting Phase A onsets. It forecasts these onsets using not only a standard predictive model but also by retrieving similar past episodes from other subjects. To prevent counting bias, C-SHARE groups overlapping data windows into distinct, onset-centered episodes. It also employs a three-level reliability controller to dynamically determine how much weight to assign to the historical evidence. Furthermore, the paper introduces a new EEG dataset for CAP called NapCAP-128Ch, comprising 120 subjects aged 19 to 79. Empirical results demonstrate that C-SHARE improves model performance on both the NapCAP-128Ch and the PhysioNet CAP Sleep Database when compared to base models and two other cross-subject adaptation baselines (RAFT and SARAF).

Critical strengths
  • The idea of applying retrieval augmentation to EEG is novel.
  • The proposed onset-centered episode construction module addresses the counting bias problem.
  • NapCAP-128Ch is the largest CAP-annotated EEG dataset in terms of the number of subjects.
Critical weaknesses
  • The standard deviation of the performance metrics across held-out subjects is quite large, reflecting substantial cross-subject variability. Although the authors provide Wilcoxon signed-rank tests in Appendix I showing statistical significance in most settings, the high variance makes it difficult to discern which subject subgroups benefit most from C-SHARE. The paper would be strengthened by a deeper subgroup analysis (e.g., performance breakdown across different age groups or baseline sleep characteristics) to explain this variance.
  • The computational cost of this retrieval method could become prohibitive, especially when working with a large database.
  • The methodology section is confusing in certain places. For example, in lines 221–223, the authors use the index m to denote the subspace projection head, whereas in Equation (3), this same index is used for a different purpose.
Questions for authors
  • The current experiments only evaluate cross-subject performance within a single dataset, which likely shares a uniform data distribution. Have the authors evaluated the model's performance in a cross-dataset setting? A cross-dataset evaluation is crucial to demonstrate the method's robustness in real-world scenarios.
  • Although Figure 5 already shows that gg varies across queries, it would also be beneficial to include a table or histogram detailing the distribution of gg. This would clarify the proportion of samples that rely on the retrieved information and the extent of that reliance.
  • Why did the authors choose the specific values of h∈{10,20,30}h \in \{10, 20, 30\}? Does the model's performance vary significantly with other values, or is it relatively robust to this hyperparameter?
4 comments
AuthorsOpenReview ↗

Additional analyses of subgroup performance, scalability, generalization, gating, and forecasting horizons further support C-SHARE's performance.

Thank you sincerely for your constructive feedback and recognition of our methodological contributions to EEG forecasting. We appreciate your acknowledgment of our collected NapCAP-128Ch, which is the largest CAP-annotated EEG dataset by number of subjects. We provide further evidence and clarifications below. Your valuable suggestions prompted further analyses that provide additional support for C-SHARE's performance. We have included these results in the revised manuscript.

W1. Cross-subject variability and subgroup analysis.

Phase A observations vary substantially across the 30-minute naps. Appendix A, Table 2 reports 13.4±5.713.4\pm5.7 events per subject (range 3 to 27) and event durations of 4.8±2.44.8\pm2.4 seconds (range 2 to 24), providing context for the variability in subject-level performance. Following your suggestion, we evaluated TimesNet and TimesNet + C-SHARE at the 20 s forecasting horizon across groups defined by a baseline sleep characteristic, Phase A event count. AUPRC is reported in percent, and gains are in percentage points.

\hline \text{Events per subject} & \text{Base AUPRC} & \text{C-SHARE AUPRC} & \Delta\text{AUPRC} \\\\ \hline \leq9 & 25.7 & 39.6 & +13.96 \\\\ \text{10 to 14} & 20.7 & 31.1 & +10.38 \\\\ \geq15 & 29.5 & 32.4 & +2.81 \\\\ \hline \end{array}$$ C-SHARE improves mean AUPRC in all three groups, with the largest gain in subjects with the fewest Phase A events (+13.96 percentage points). Positive-window prevalence is strongly associated with baseline AUPRC (Spearman $\rho=0.77$, $p<0.001$), indicating higher baseline scores in subjects with more positive samples. Together, these findings suggest that cross-subject retrieval may be particularly valuable when Phase A events are sparse. We have added this analysis to Appendix J.5 of the revised manuscript. ### W2. Retrieval cost and scalability. Each LOSO source pool contains approximately $3.7\times10^4$ eligible windows. Historical keys are computed offline, so inference requires only encoding the current query and searching the stored memory. The first row reports measurements on our actual retrieval memory. The remaining rows use larger synthetic memories with the same key dimension to assess scalability. All timings include exact similarity search, aggregation of onset-centered episodes, and the per-subject cap. $$\begin{array}{lc} \hline \text{Memory size (windows)} & \text{CPU latency per query (s)} \\\\ \hline 3.7\times10^4 & 0.034 \\\\ 100{,}000 & 0.036 \\\\ 500{,}000 & 0.046 \\\\ 1{,}000{,}000 & 0.064 \\\\ 2{,}000{,}000 & 0.096 \\\\ \hline \end{array}$$ Exact search scales linearly with memory size, but operates on precomputed 128-dimensional keys, with subsequent episode aggregation restricted to a fixed candidate pool. Even at two million windows, the measured retrieval latency is only 0.096 seconds per query, well below the 2-second prediction stride. These measurements indicate that retrieval remains computationally manageable at the tested scales. We have added this analysis to Appendix J.6 of the revised manuscript. ### W3. Notation clarity. To avoid confusion from reusing $m$, we have replaced the window index $m$ in Eq. (3) with $k$, reserving $m$ for subspace projection heads. This change appears in Section 3.2, lines 212 to 213 of the revised manuscript. ### Q1. Cross-dataset generalization. Our current evaluation on unseen subjects within each dataset already involves differences in data distribution across subjects. For example, Appendix A, Table 2 shows that Phase A event counts in NapCAP-128Ch range from 3 to 27 per subject despite the fixed recording duration. We agree that cross-dataset evaluation is important for assessing external generalization. Following your suggestion, we combined the two datasets using a common single-channel input and evaluated TimesNet at the 20 s horizon under LOSO, excluding each held-out subject from training and the retrieval memory. TimesNet achieved an AUROC of $60.32\pm11.87\\%$ and an AUPRC of $20.71\pm14.12\\%$, while TimesNet + C-SHARE achieved $63.48\pm12.65\\%$ and $29.19\pm13.41\\%$, respectively. C-SHARE retained gains of 3.16 percentage points in AUROC and 8.48 percentage points in AUPRC in this combined-cohort LOSO evaluation. Absolute performance was lower than in the original within-dataset evaluations because the montage limitations of the public CAP Sleep Database require a common single-channel input, restricting spatial modeling. Cross-dataset evaluation is limited to these two CAP-annotated EEG datasets, with the public dataset constraining the spatial design that can be shared across cohorts. As acknowledged in Section 5 (Limitations), full-night high-density validation remains an important direction for future work. We therefore plan to collect a high-density overnight EEG dataset with CAP annotations to support further research on CAP onset forecasting and cross-dataset generalization.
AuthorsOpenReview ↗

Additional analyses of subgroup performance, scalability, generalization, gating, and forecasting horizons further support C-SHARE's performance.

Q2. Query-level gate gqg_q distribution.

We computed the distribution of the query-level gate gqg_q across all evaluated queries for TimesNet. The table reports the proportion of queries receiving different retrieval weights and the resulting mean absolute change in predicted probability.

\hline & h=10\text{ s} & h=20\text{ s} & h=30\text{ s} \\\\ \hline g_q<0.1 & \text{45.5\\%} & \text{51.3\\%} & \text{49.8\\%} \\\\ 0.1\le g_q<0.5 & \text{14.4\\%} & \text{21.1\\%} & \text{12.1\\%} \\\\ 0.5\le g_q<0.9 & \text{38.2\\%} & \text{24.8\\%} & \text{33.6\\%} \\\\ g_q\ge0.9 & \text{1.9\\%} & \text{2.8\\%} & \text{4.5\\%} \\\\ \hline \text{Mean }|p_{\mathrm{final}}-p_{\mathrm{base}}| & 0.15 & 0.13 & 0.16 \\\\ \hline \end{array}$$ These results show that retrieval is used selectively across queries. Approximately half receive little retrieval weight ($g_q<0.1$), while 40.1%, 27.6%, and 38.1% receive a weight of at least 0.5 at the three forecasting horizons, respectively. Near-exclusive reliance on retrieval ($g_q\ge0.9$) occurs in only 1.9% to 4.5% of queries, indicating that retrieval generally contributes to a blended correction. The mean absolute change in predicted probability is 0.13 to 0.16, quantifying its influence on the final forecast. We have added this analysis to Appendix D.1 of the revised manuscript. ### Q3. Forecasting horizon $h$: choice and sensitivity. CAP scoring defines both Phase A and Phase B as lasting 2 to 60 seconds, while physiological studies describe a dominant CAP periodicity near 25 seconds and related NREM infraslow dynamics around 50 seconds, motivating forecasting comparisons on a timescale of tens of seconds. We therefore selected $h\in\\{10,20,30\\}$ seconds and fixed the occurrence period at 10 seconds to define three adjacent, non-overlapping future intervals, $(t+10,t+20]$, $(t+20,t+30]$, and $(t+30,t+40]$. This design varies the forecasting horizon while keeping the target duration and EEG history unchanged. Following your suggestion, we additionally trained and evaluated TimesNet and TimesNet + C-SHARE at $h\in\\{40,50,60\\}$ seconds using the same training and evaluation protocol to assess whether the benefit extends beyond the originally selected forecasting horizons. $$\begin{array}{lcccc} \hline & \text{TimesNet (base)} & & \text{TimesNet + C-SHARE (ours)} & \\\\ h\text{ (s)} & \text{AUROC (\\%)} & \text{AUPRC (\\%)} & \text{AUROC (\\%)} & \text{AUPRC (\\%)} \\\\ \hline 10 & 63.90\pm13.08 & 29.10\pm14.99 & 68.94\pm9.97 & 36.77\pm16.44 \\\\ 20 & 64.16\pm12.49 & 24.85\pm14.85 & 67.65\pm13.24 & 34.03\pm14.03 \\\\ 30 & 64.98\pm14.16 & 27.05\pm16.16 & 69.00\pm15.10 & 35.04\pm18.30 \\\\ \hline 40 & 66.88\pm13.45 & 31.32\pm18.82 & 71.86\pm13.60 & 41.94\pm19.80 \\\\ 50 & 67.75\pm11.93 & 24.79\pm14.78 & 71.74\pm13.40 & 35.53\pm20.79 \\\\ 60 & 62.64\pm12.07 & 24.35\pm22.31 & 68.68\pm13.78 & 38.39\pm25.90 \\\\ \hline \end{array}$$ C-SHARE improves both AUROC and AUPRC at all six forecasting horizons, with AUPRC gains ranging from 7.67 to 14.04 percentage points. Performance does not decline consistently as the forecasting horizon increases, indicating that its predictive benefit extends beyond the originally selected forecasting horizons. We have added this analysis to Appendix J.7 of the revised manuscript.

I appreciate the detailed responses and additional experiments, which confirm my initial positive rating, and I therefore maintain my score.

We sincerely thank you for your positive assessment and recognition of the significance of our work. We greatly appreciate your time and thoughtful feedback throughout the review process.

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

Related papers

Loading the map…

Discussion (0)

Sign in to comment.