Command Palette
Search for a command to run...
CLEF: 임상 의미 학습을 위한 EEG 기반 모델
CLEF: 임상 의미 학습을 위한 EEG 기반 모델
Peng Cao Ali Mirzazadeh Jong Woo Lee Aleksandar Videnovic Dina Katabi
초록
임상 뇌파(EEG) 해석은 전체 EEG 세션에 대한 추론과 신호 패턴을 임상 맥락과 통합하는 것을 요구한다. 기존 EEG 기반 모델은 대부분 짧은 구간 디코딩을 위해 설계되었으며 임상 맥락을 반영하지 못한다. 본 연구에서는 임상적으로 근거한 장문 맥락 EEG 기반 모델인 CLEF를 소개한다. CLEF는 EEG 세션을 3D 멀티테이퍼 스펙트로그램 토큰으로 표현하여 세션 규모에서 효과적인 Transformer 모델링을 가능하게 하고, 대조 학습 목표를 통해 신경과 전문의 판독문 및 구조화된 EHR 데이터와 임베딩을 정렬한다. 우리는 108,000명 이상의 환자로부터 수집된 260,000건 이상의 EEG 세션을 포함하는, 질병 표현형, 약물 노출, EEG 소견에 걸친 234개 작업의 새로운 벤치마크에서 CLEF를 평가하였다. CLEF는 234개 작업 중 229개에서 기존 EEG 기반 모델을 능가하여 평균 AUROC를 0.65에서 0.74로 향상시켰다. 재구성만을 사용한 사전 학습도 기존 EEG 기반 모델을 능가했으며, 판독문 및 EHR 정렬은 추가적인 성능 향상을 가져왔다. 홀드아웃 개념 및 외부 코호트 실험은 이러한 표현이 관찰된 정렬 목표를 넘어 전이될 수 있음을 시사한다. 이러한 결과는 세션 규모의 임상적으로 근거한 표현 학습이 임상 EEG를 위한 유망한 기반 모델 패러다임임을 뒷받침한다.
One-sentence Summary
Researchers at MIT CSAIL, Brigham and Women's Hospital, and Massachusetts General Hospital introduce CLEF, a clinically grounded long-context EEG foundation model that tokenizes sessions as 3D multitaper spectrograms and aligns embeddings with neurologist reports and structured EHR data through contrastive objectives, outperforming prior EEG foundation models on 229 of 234 tasks and raising mean AUROC from 0.65 to 0.74.
Key Contributions
- The paper formulates clinical EEG foundation modeling as patient-level representation learning from full EEG sessions rather than short-window signal decoding.
- The paper introduces CLEF, a clinically grounded long-context EEG foundation model that represents sessions as 3D multitaper spectrogram tokens and aligns session-level embeddings with neurologist reports and structured EHR data through contrastive objectives.
- The paper curates a 234-task clinical EEG benchmark spanning disease phenotypes, medication exposures, and EEG findings across more than 260k sessions from over 108k patients. On this benchmark, CLEF outperforms prior EEG foundation models on 229 of 234 tasks, improving mean AUROC from 0.65 to 0.74 and transferring to held-out concepts and external cohorts.
Introduction
Electroencephalography (EEG) is a core clinical tool for diagnosing epilepsy, encephalopathy, and other neurological conditions, but many clinical EEGs are read without specialized neurophysiology training, motivating automated expert-level assessment. Prior EEG foundation models target brain-computer interface decoding from short 5 to 30 second segments and do not capture the session-level recurrence, evolution, and clinical context that neurologists use. The authors introduce CLEF, a clinical EEG foundation model that represents full recording sessions by tokenizing multitaper spectrograms into 2,048 tokens and aligns session embeddings with neurologist reports and structured electronic health record data. Evaluated on a curated 234-task clinical benchmark from over 108,000 patients, CLEF outperforms prior EEG foundation models on 229 tasks and generalizes to unseen diseases, medications, and external datasets.
Dataset
The authors use four main dataset components:
-
Pretraining corpus. CLEF is pretrained on a Harvard Electroencephalography Database (HEEDB) snapshot with 260,604 recordings totaling 2M hours from 108,341 patients with EHR data. Of these, 59.3% have linked neurologist reports. Patients are split 80/10/10 into train/validation/test at patient level, keeping all sessions from the same patient in the same split. The same split is reused for downstream benchmark evaluation, so no test patient is seen during pretraining.
-
Benchmark. From HEEDB, the authors construct 234 patient-level binary classification tasks across three clinical axes:
- 120 disease phenotype tasks derived from ICD-10 codes grouped into phecodes
- 99 medication exposure tasks derived from prescription records mapped to ATC codes
- 15 EEG feature tasks extracted from neurologist reports
For each task, each patient contributes at most one session. Up to 10 controls per positive case are matched on age, sex, site, and recording setting including ICU, EMU, and Routine EEG to reduce confounding.
-
Held-out clinical concepts. To test transfer to unseen concepts, the authors run an additional pretraining setup where 20% of benchmark tasks are randomly selected and the relevant terms are removed from both reports and EHRs. This creates a held-out set of diseases, medications, and EEG features that the model never sees during alignment.
-
External cohorts. Generalization is evaluated on three external datasets:
- TUAB for abnormal EEG detection, full-montage, from the TUH EEG Corpus
- TUEP for epilepsy detection, full-montage, from the TUH EEG Corpus
- HSP for 6-channel cognitive impairment detection from PhysioNet Challenge 2026
Each external cohort is split at patient level into 75% training and 25% test, with 15% of the training data held out for validation, and evaluated at patient level.
Method
The authors introduce CLEF, a framework built on the principles of long-context modeling at the scale of a full EEG session and grounding in clinical semantics. These principles map onto a two-stage pipeline.
As shown in the figure below:
To make session-scale modeling tractable, Stage I focuses on learning a compact spectro-temporal token representation through masked reconstruction. The authors first convert the raw multi-channel EEG into a log-magnitude multitaper spectrogram, discarding instantaneous phase while preserving spectral features. Since the resulting spectrogram is too large for direct Transformer processing, they employ a Vector Quantized Generative Adversarial Network to learn a discrete tokenizer that compresses the multi-channel spectrogram into a short sequence of 3D codes. The authors implement joint multi-channel tokenization by stacking channels as input channels to a 2D convolutional encoder, allowing each discrete code to summarize a time-frequency region across the entire montage. To handle missing channels in clinical settings, they apply random channel masking during tokenizer training. Furthermore, they design an inter-channel-emphasized reconstruction loss that explicitly decomposes the target into mean and differential components. Let Sˉ be the mean across channels and ΔS(c) be the differential component. The reconstruction loss is formulated as Lrec=∥Sˉ−Sˉ^∥1+Cγdiff∑c=1C∥ΔS(c)−ΔS^(c)∥1, which prevents the model from collapsing inter-channel variations.
Following tokenization, the authors apply Masked Image Modeling to pretrain the EEG encoder. The discrete codes are embedded and combined with factorized positional embeddings and a parallel patch-embedding branch that reinjects details lost to quantization. A Transformer encoder-decoder architecture is utilized, where a subset of positions is masked. The encoder produces contextualized representations that are pooled into a patient-level embedding and passed to a lightweight decoder to predict the masked tokens via a cross-entropy objective.
While Stage I captures spectro-temporal structure, it cannot recover clinical semantics not directly visible in the EEG. Therefore, the authors introduce Stage II to ground the patient-level embedding in clinical meaning by aligning it with two modalities: free-text neurologist reports and structured Electronic Health Record data. The patient-level embedding is projected into modality-specific subspaces and aligned using symmetric contrastive losses.
For report alignment, raw reports are first processed by a large language model summarizer. The authors select the optimal prompt and output length using an automated QA-consistency score, ensuring the summary preserves electrographic content without overfitting to specific questions. The summarized report is then encoded using a frozen T5-base encoder followed by learnable self-attention layers and mean pooling.
For Electronic Health Record alignment, the authors avoid naive serialization, which imposes arbitrary order and subword fragmentation. Instead, they encode the data according to its native structure using learnable codebooks for demographics, medications, and diagnoses. This permutation-invariant design allows codes to contextualize one another via self-attention before mean pooling.
The authors train the two stages sequentially. Stage I is trained to convergence using the dense, position-level masked reconstruction objective. Subsequently, the encoder is fine-tuned with the sparse, sequence-level contrastive alignment objectives of Stage II. Throughout both stages, random token dropping and channel masking are applied for regularization and to expose the model to partial-montage conditions.
Experiment
The authors evaluate CLEF by freezing its pretrained encoder and training lightweight probes on patient-level embeddings, comparing against five EEG foundation models across a 234-task benchmark spanning diseases, medications, and EEG features. CLEF consistently outperforms these baselines, with cross-modal alignment to reports and EHRs providing the largest gains for concepts whose EEG signatures are not visually obvious, while reconstruction alone already supports strong performance on salient EEG patterns. It also transfers to held-out clinical concepts without degradation and generalizes to external cohorts with different institutions and montages, and scaling analyses show monotonic improvements with larger models and more pretraining data.
CLEF with reconstruction and cross-modal alignment achieves the highest AUROC across feature, disease, medication, and overall task categories, outperforming all evaluated EEG foundation model baselines and its reconstruction-only variant. The reconstruction-only CLEF already surpasses every baseline, and adding report and EHR alignment yields further consistent gains, with the largest absolute improvement on EEG feature tasks. CLEF with reconstruction and cross-modal alignment leads for features, diseases, medications, and overall AUROC. The reconstruction-only CLEF variant already outperforms all baselines before alignment is added. Cross-modal alignment improves CLEF in every category, with the largest gain on EEG feature tasks relative to disease and medication tasks.
Under the held-out concept protocol, CLEF retains strong clinical concept performance across diseases, medications, and features. Its held-out AUROC matches or slightly exceeds its no-holdout AUROC, showing no degradation from excluding concepts during cross-modal alignment. CLEF also outperforms all compared baselines across the held-out tasks. CLEF's held-out performance is comparable to its no-holdout performance across disease, medication, and feature tasks, with no degradation. CLEF outperforms all baselines on held-out clinical concepts, with clear margins that are largest for features and medications.
CLEF achieves the highest AUROC and BACC across all three external cohort tasks, covering abnormal EEG, epilepsy, and cognitive impairment. Gains over the strongest baseline are largest on cognitive impairment, with clear improvements also on the TUAB and TUEP cohorts even though those cohorts derive from a corpus used in baseline pretraining. This suggests the learned representations generalize across institutions and montages. CLEF outperforms all baselines on AUROC and BACC for every external cohort task. The strongest relative improvement over baselines occurs on cognitive impairment, followed by epilepsy and abnormal EEG. CLEF still leads on TUAB and TUEP despite those cohorts coming from a corpus included in baseline pretraining data.
Mean AUROC over 234 benchmark tasks improves consistently as the encoder scales from 17M to 148M parameters, reaching 0.749. The improvements show no sign of saturation at the tested model sizes. Scaling pretraining data shows a similar monotonic trend, indicating that both model and data scale currently limit performance. Mean AUROC rises with each increase in encoder depth and width, from 0.729 at 17M parameters to 0.749 at 148M parameters. The largest tested model continues improving, with no evidence of saturation. Scaling the pretraining data fraction from 10% to 100% produces a similar monotonic gain in AUROC.
When the pre-training corpus fraction is increased from 10% to 100% while fixing the 17M encoder and training iterations, mean AUROC rises monotonically from 0.697 to 0.729. The steady improvement suggests data scale is currently a limiting factor and that scaling the corpus is a promising direction. Mean AUROC improves consistently as the pre-training data fraction increases from 10% to 100%. The largest single-step gain occurs between 25% and 50% of the pre-training corpus, with performance continuing to rise through 100%.
The evaluation covers CLEF, an EEG foundation model trained with reconstruction and cross-modal alignment against clinical reports and EHR data. Reconstruction-only CLEF already outperforms all baselines, and adding cross-modal alignment yields consistent gains across feature, disease, medication, and overall benchmarks, with the largest improvements on EEG feature tasks. CLEF also maintains strong performance on held-out clinical concepts and external cohort tasks, indicating generalization across concepts, institutions, and montages. Scaling experiments show steady improvements with larger encoders and more pretraining data, suggesting both model and data scale currently limit performance.