EEG-MedRAG
EEG-MedRAG pairs an English clinical question-answering benchmark with the patient cases and multichannel EEG recordings needed to study evidence retrieval. A question can be linked to an individual acquisition and, for waveform-based questions, to a specific 30-second EEG window. The collection draws on seven OpenNeuro cohorts and includes 700 expert-reviewed questions, 576 participants, 2,353 recordings, and 694,386 EEG windows.
Benchmark
The benchmark covers four kinds of clinical questions. Each of its 140 fact families asks about the same underlying fact from five perspectives: doctor, hospital intern, nurse, patient, and researcher. Each clinical domain contributes 100 questions.
| Question type | Questions | Fact families |
|---|---|---|
| Foundational knowledge | 140 | 28 |
| Knowledge application | 140 | 28 |
| Case reasoning | 280 | 56 |
| EEG-linked inference | 140 | 28 |
Questions and reference answers were drafted from source facts and reviewed by clinical experts. questions.json contains the questions, their accepted answers, source pointers, and the participant split. Case-linked questions identify a source case and supply the information available to the respondent in masked_case. The 140 EEG-linked questions also identify a query window in EEG; the five variants in each family share that window.
Evaluation split. Use the 489 participants in patient_split.reference to build case and waveform retrieval indexes. All acquisitions from the 87 participants in patient_split.test are held out together. At query time, use the question, role, supplied case view, and any designated query waveform. Keep hidden fields from the full query case, golden_answers, and answer_source for evaluation or source inspection. For document-backed questions, the source pointer identifies a filename and page in the separate knowledge corpus. The accompanying knowledge documents retain their respective licenses.
Clinical cohorts
A domain identifies the source study. For example, the dementia cohort includes participants with Alzheimer’s disease, frontotemporal dementia, and cognitively normal controls. Other comparisons depend on the study design, such as recordings after normal sleep and after sleep deprivation. The links below identify the OpenNeuro versions used to construct this release.
| Domain folder | OpenNeuro source | Participants | Recordings | EEG windows | Channels |
|---|---|---|---|---|---|
| Alzheimer EEG | ds004504 v1.0.8 | 88 | 88 | 2,132 | 19 |
| Depression EEG | ds003478 v1.1.0 | 121 | 239 | 2,027 | 64 |
| Epilepsy EEG | ds005873 v1.1.0 | 67 | 1,432 | 669,224 | 2 |
| Mild TBI EEG | ds005114 v1.0.0 | 91 | 215 | 13,126 | 63 |
| Parkinson EEG | ds003509 v1.1.0 | 56 | 84 | 5,526 | 63 |
| Psychiatric EEG | ds003944 v1.0.1 | 82 | 82 | 662 | 60 |
| Sleep deprivation EEG | ds004902 v1.0.8 | 71 | 213 | 1,689 | 61 |
The seven source datasets are available on OpenNeuro under CC0. If you use recordings from any of these cohorts, please cite the corresponding dataset versions listed above.
Files and data preparation
| Path | Contents |
|---|---|
questions.json |
Benchmark items, fact-family identifiers, and fixed reference/test participant lists |
index.sqlite |
Links between participants, cases, recordings, windows, and source events, including file locations and source timestamps |
eeg_spaces.json |
Ordered channel names and EEG space definitions for each domain |
<domain folder>/cases.jsonl |
One case per acquisition, with source medical attributes, recording conditions, and an English case narrative |
<domain folder>/signals/<record_id>.npy |
Multichannel waveforms for one acquisition |
Case narratives are rendered from recorded attributes and study metadata. A participant may have multiple cases reflecting different sessions, tasks, or recording conditions. The index locates each case by its byte offset and length in the original JSONL file. Preserve the relative paths and JSONL bytes when using the index.
EEG recordings were band-pass filtered at 0.5–40 Hz, resampled to 128 Hz, and divided into non-overlapping 30-second windows after technical quality screening. Each NumPy array has shape (windows, channels, 3840) and stores float32 voltages in volts. Channel layouts are specific to each domain. Use segments.onset_seconds to recover source time because gaps can occur between retained windows.
The index retains 108,582 source events. Event coverage varies by cohort: the epilepsy data include seizure and background intervals, and the depression data include eye-condition markers. In the epilepsy cohort, a null seizure-overlap flag means annotation coverage was unavailable. A negative flag means the window fell outside annotated seizures in a recording with coverage.
Read a benchmark waveform
Run this example from the dataset root with Python and NumPy. It selects an EEG-linked question and reads its designated window using the read-only index.
import json
import sqlite3
from contextlib import closing
from pathlib import Path
import numpy as np
root = Path.cwd()
benchmark = json.loads((root / "questions.json").read_text(encoding="utf-8"))
item = next(q for q in benchmark["questions"] if q["EEG"])
record_id, row = item["EEG"][0].rsplit("__seg-", 1)
uri = (root / "index.sqlite").as_uri() + "?mode=ro"
with closing(sqlite3.connect(uri, uri=True)) as db:
(path,) = db.execute(
"SELECT signal_path FROM records WHERE record_id = ?", (record_id,)
).fetchone()
windows = np.load(root / path, mmap_mode="r", allow_pickle=False)
waveform = windows[int(row)]
print(item["question"], waveform.shape)
Considerations for use
The seven domains contribute equally to the benchmark but differ substantially in EEG duration and channel layout. The epilepsy cohort accounts for 669,224 of the 694,386 windows. Distinguish question-, participant-, and window-level results when reporting performance. For comparisons across user roles, retain family_id so that questions about the same fact can be paired.
Some source acquisitions contain identical waveforms. The depression cohort includes a duplicate across two runs of sub-107, and the mild TBI cohort includes a duplicate across sub-036 and sub-037 in session 01. The release preserves their source identifiers.
Citation
If you use the EEG-MedRAG dataset or benchmark in your research, please cite the following paper.
@misc{meng2026eegmedragenhancingeegbasedclinical,
title = {{EEG-MedRAG}: Enhancing {EEG}-based Clinical Decision-Making via Hierarchical Hypergraph Retrieval-Augmented Generation},
author = {Lu Meng and Zan Li and Yi Wang and Yi Ding and Ziyue Zhu and Fang Li and Ziyu Jia and Anh Tuan Luu and Xinliang Zhou and Qingsong Wen and Haoran Luo},
year = {2026},
eprint = {2508.13735},
archivePrefix = {arXiv},
primaryClass = {cs.CL},
url = {https://arxiv.org/abs/2508.13735}
}
- Downloads last month
- 98