Datasets:
File size: 7,112 Bytes
c5becc4 26d98f6 c5becc4 a5cec24 c5becc4 26d98f6 c5becc4 a5cec24 c5becc4 a5cec24 c5becc4 a5cec24 c5becc4 a5cec24 c5becc4 a5cec24 c5becc4 a5cec24 902b966 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | ---
pretty_name: BrainBench
viewer: false
language:
- en
license: other
task_categories:
- question-answering
tags:
- eeg
- sleep
- biomedical
- benchmark
- agents
- codeact
- scientific-reasoning
size_categories:
- 1K<n<10K
---
# BrainBench
BrainBench is a benchmark for evaluating AI agents on practical EEG and polysomnography reasoning tasks. This repository hosts the fixed case JSON files used by the benchmark. Each JSON file contains the agent input, parsing instructions, ground truth, and evaluation metrics for one benchmark instance.
No original EEG or PSG recordings are distributed in this repository. Users must obtain the required source datasets from their official providers and prepare them locally with the BrainBench framework.

## Quick links
- Dataset: <https://huggingface.co/datasets/xbb083/BrainBench>
- Code: <https://github.com/xiaobaben/BrainBench>
- Paper: <https://arxiv.org/abs/2608.04156>
## Contents
| Subset | BrainBench ID | Tasks | Instances | Status |
|---|---|---:|---:|---|
| Foundational Analysis | `foundational_analysis` | 40 | 950 | Released |
| Sleep Assessment | `sleep_assessment` | 43 | 1,025 | Released |
| Neurocognitive Assessment | `neurocognitive_assessment` | - | - | In progress |
| Physiological Integration | `physiological_integration` | - | - | In progress |
The current release contains 1,975 fixed evaluation instances across the first two subsets.
## Folder layout
```text
<root>/
├── foundational_analysis/
│ └── cases/
│ ├── case01/
│ │ ├── case01_01.json
│ │ └── ...
│ └── ...
└── sleep_assessment/
└── cases/
├── case01/
│ ├── case01_01.json
│ └── ...
└── ...
```
Conventions:
- `<subset>/cases/` contains all fixed instances for one BrainBench subset.
- `caseNN/` identifies one benchmark task; the numeric suffix is zero-padded for natural file-browser ordering.
- `caseNN_XX.json` identifies one fixed instance of that task.
- Case JSON files are intended to remain unchanged during evaluation.
## Case JSON format
Each case keeps the benchmark input and validation configuration together:
```json
{
"meta_info": {
"case_id": "...",
"bench_subset": "...",
"difficulty": 1.0
},
"agent_input": {
"data_path": "data/core/example.edf",
"label_path": "data/sleep/example.npy",
"instruction": "..."
},
"eval_config": {
"parser_prompt": "...",
"metrics": []
}
}
```
Depending on the task, `agent_input` may contain `data_path`, `label_path`, or both. Paths are relative to the BrainBench repository after local data preparation.
## Download
Install the Hugging Face CLI:
```bash
python -m pip install --upgrade huggingface_hub
```
Download all released cases:
```bash
hf download xbb083/BrainBench \
--repo-type dataset \
--local-dir ./benchmarks
```
Download only Foundational Analysis:
```bash
hf download xbb083/BrainBench \
--repo-type dataset \
--include "foundational_analysis/**" \
--local-dir ./benchmarks
```
Download only Sleep Assessment:
```bash
hf download xbb083/BrainBench \
--repo-type dataset \
--include "sleep_assessment/**" \
--local-dir ./benchmarks
```
When `--local-dir ./benchmarks` is used from the BrainBench code repository, cases are placed directly at:
```text
benchmarks/foundational_analysis/cases/
benchmarks/sleep_assessment/cases/
```
## Use with BrainBench
The complete workflow is:
1. Clone and install the BrainBench code repository.
2. Download the case JSON files from this Hugging Face dataset.
3. Obtain the required EEG/PSG datasets from their official providers.
4. Run the subset prepare command to create local benchmark inputs.
5. Run the subset with the built-in CodeAct paradigm or a custom Agent adapter.
Example commands after the code repository is released:
```bash
# Prepare all Foundational Analysis inputs from locally downloaded source data.
python main.py prepare foundational_analysis \
--data-root /path/to/foundational_analysis_raw_data
# Evaluate all 950 Foundational Analysis instances with CodeAct.
python main.py run foundational_analysis --agent codeact
```
```bash
# Prepare all Sleep Assessment inputs from locally downloaded source data.
python main.py prepare sleep_assessment \
--data-root /path/to/sleep_assessment_raw_data
# Evaluate all 1,025 Sleep Assessment instances with CodeAct.
python main.py run sleep_assessment --agent codeact
```
Prepared EEG/PSG inputs stay on the user's machine under `data/core/` or `data/sleep/`. They are not uploaded back to Hugging Face.
## Inspect a case
Case files are plain JSON and do not execute code when loaded:
```python
import json
from pathlib import Path
case_path = Path(
"benchmarks/foundational_analysis/cases/case01/case01_01.json"
)
case = json.loads(case_path.read_text(encoding="utf-8"))
print(case["meta_info"])
print(case["agent_input"]["instruction"])
print(case["eval_config"]["metrics"])
```
List available tasks and count instances:
```python
from pathlib import Path
for subset in ("foundational_analysis", "sleep_assessment"):
case_root = Path("benchmarks") / subset / "cases"
tasks = sorted(path.name for path in case_root.iterdir() if path.is_dir())
instances = list(case_root.rglob("*.json"))
print(subset, "tasks:", len(tasks), "instances:", len(instances))
```
## Data availability
This repository contains benchmark case definitions only. It does not redistribute any source EEG/PSG dataset or locally prepared EDF/NPY files.
The BrainBench code release will document the official access routes and required local folder layout for every source dataset. Users are responsible for complying with the corresponding dataset licenses, data-use agreements, and access requirements.
## Reproducibility and integrity
- Treat the case JSON files as immutable evaluation inputs.
- Use a tagged dataset revision together with the matching BrainBench code release.
- Do not modify instructions, ground truth, parser prompts, metric parameters, or relative data paths.
- Report the BrainBench code version, case dataset revision, model configuration, and execution mode with evaluation results.
- A case with an infrastructure or parser error should not be interpreted as an Agent capability failure without further diagnosis.
## License and citation
The current Hugging Face metadata uses `license: other` because the formal dataset license is maintained with the BrainBench code and paper releases.
If you use BrainBench, please cite:
```bibtex
@misc{zhou2026brainbenchbenchmarkinglargelanguage,
title={BrainBench: Benchmarking Large Language Models for Comprehensive EEG Understanding},
author={Yangxuan Zhou and Sha Zhao and Yuning Chen and Chen Wu and Jiquan Wang and Shijian Li and Gang Pan},
year={2026},
eprint={2608.04156},
archivePrefix={arXiv},
primaryClass={cs.AI},
url={https://arxiv.org/abs/2608.04156},
}
``` |