Preventing Data Leakage in EEG-Based Survival Prediction: A Two-Stage Embedding and Transformer Framework

arXiv cs.LG / 3/30/2026

💬 OpinionSignals & Early TrendsIdeas & Deep AnalysisModels & Research

Key Points

  • The paper highlights a subtle but impactful form of data leakage in multi-stage EEG modeling pipelines used for survival outcome prediction after cardiac arrest, where reusing segmented windows across stages can allow label information to be implicitly encoded.
  • It shows that breaking strict patient-level separation can greatly inflate validation metrics while substantially reducing performance on truly independent test data, undermining reliability.
  • The authors propose a leakage-aware two-stage framework that first converts short EEG segments into embeddings using a convolutional neural network trained with an ArcFace objective.
  • In the second stage, a Transformer aggregates segment-level embeddings into patient-level predictions while enforcing strict cohort isolation to eliminate leakage pathways.
  • Experiments on a large post-cardiac-arrest EEG dataset demonstrate more stable, generalizable performance, with strong sensitivity performance even at stringent specificity thresholds.

Abstract

Deep learning models have shown promise in EEG-based outcome prediction for comatose patients after cardiac arrest, but their reliability is often compromised by subtle forms of data leakage. In particular, when long EEG recordings are segmented into short windows and reused across multiple training stages, models may implicitly encode and propagate label information, leading to overly optimistic validation performance and poor generalization. In this study, we identify a previously overlooked form of data leakage in multi-stage EEG modeling pipelines. We demonstrate that violating strict patient-level separation can significantly inflate validation metrics while causing substantial degradation on independent test data. To address this issue, we propose a leakage-aware two-stage framework. In the first stage, short EEG segments are transformed into embedding representations using a convolutional neural network with an ArcFace objective. In the second stage, a Transformer-based model aggregates these embeddings to produce patient-level predictions, with strict isolation between training cohorts to eliminate leakage pathways. Experiments on a large-scale EEG dataset of post-cardiac-arrest patients show that the proposed framework achieves stable and generalizable performance under clinically relevant constraints, particularly in maintaining high sensitivity at stringent specificity thresholds. These results highlight the importance of rigorous data partitioning and provide a practical solution for reliable EEG-based outcome prediction.