Skip to main content

A benchmark for evaluating intracranial brain responses to naturalistic stimuli

Project description

Neuroprobe

Neuroprobe Logo

Python PyTorch License

Neuroprobe: Benchmark for Evaluating iEEG Foundation Models.

Evaluating Intracranial Brain Responses to Naturalistic Stimuli

🌐 Website | 📄 Paper | 🚀 Example Usage | 📤 Submit


By Andrii Zahorodnii¹²*, Christopher Wang¹*, Bennett Stankovits¹*, Charikleia Moraitaki¹, Geeling Chau³, Andrei Barbu¹, Boris Katz¹, Ila R Fiete¹²,

¹MIT CSAIL, CBMM | ²MIT McGovern Institute | ³Caltech | *Equal contribution

Overview

Neuroprobe is a benchmark for evaluating EEG/iEEG/sEEG/ECoG foundation models and understanding how the brain processes information across multiple tasks. It analyzes intracranial recordings during naturalistic stimuli using techniques from modern natural language processing. By probing neural responses across many tasks simultaneously, Neuroprobe aims to reveal the functional organization of the brain and relationships between different cognitive processes. The benchmark includes tools for decoding neural signals using both simple linear models and advanced neural networks, enabling researchers to better understand how the brain processes information across vision, language, and audio domains.

Please see the full technical paper for more details.

Getting Started

Prerequisites

  1. Install the package:
pip install neuroprobe
  1. If you haven't yet, download the BrainTreebank dataset from the official release webpage, or using the following script:
python braintreebank_download_extract.py --lite

(lite is an optional flag; if only using Neuroprobe as a benchmark, this flag will reduce the number of downloaded files by >50% by removing unnecessary files.)

Code Example

Start experimenting with quickstart.ipynb to create datasets and evaluate models. For example:

import os, torch
os.environ['ROOT_DIR_BRAINTREEBANK'] = '/path/to/braintreebank/'  # NOTE: Change this to your own path, or define an environment variable elsewhere

from neuroprobe import BrainTreebankSubject, BrainTreebankSubjectTrialBenchmarkDataset
subject = BrainTreebankSubject(subject_id=1, cache=True, dtype=torch.float32, coordinates_type="cortical")
dataset = BrainTreebankSubjectTrialBenchmarkDataset(subject, trial_id=2, dtype=torch.float32, eval_name="gpt2_surprisal") 

data_electrode_labels = dataset.electrode_labels 
data_electrode_coordinates = dataset.electrode_coordinates 

dataset.output_dict = True # Optionally, you can request the output_dict=True to get the data as a dictionary with a bunch of metadata.
dataset.output_indices = False # Optionally, you can request to output indices into the original BrainTreebank h5 files of the sessions, instead of raw data.
print(dataset[0])

will give the following output:

{
	'data': torch.tensor, # shape: (n_electrodes, 2048), where 2048 = 1 second at 2048 Hz
	'label': int, # 0 ot 1 
	'electrode_labels': list[str], # length: (n_electrodes, )
	'electrode_coordinates': torch.tensor, # shape: (n_electrodes, 3)
	'metadata': {'subject_identifier': 'btbank1', 'trial_id': 2, 'sampling_rate': 2048}
}

Evaluation Example

Run the linear regression model evaluation:

python single_electrode.py --subject SUBJECT_ID --trial TRIAL_ID --verbose --lite --eval_name onset --split_type CrossSession

Results will be saved in the eval_results directory according to leaderboard_schema.json.

Citation

If you use Neuroprobe in your work, please cite our paper:

@misc{neuroprobe,
      title={Neuroprobe: Evaluating Intracranial Brain Responses to Naturalistic Stimuli}, 
      author={Andrii Zahorodnii and Christopher Wang and Bennett Stankovits and Charikleia Moraitaki and Geeling Chau and Andrei Barbu and Boris Katz and Ila R Fiete},
      year={2025},
      eprint={2509.21671},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2509.21671}, 
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neuroprobe-0.1.1.tar.gz (26.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neuroprobe-0.1.1-py3-none-any.whl (26.9 MB view details)

Uploaded Python 3

File details

Details for the file neuroprobe-0.1.1.tar.gz.

File metadata

  • Download URL: neuroprobe-0.1.1.tar.gz
  • Upload date:
  • Size: 26.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for neuroprobe-0.1.1.tar.gz
Algorithm Hash digest
SHA256 36a01a167a02334459337972f83fa75ee9096e119d6161f2cd00f202d9b91ff9
MD5 8aef512f9546dc0e7162f6be79835486
BLAKE2b-256 76c345f30f540d1a80c203265427133a53db44ad56d64672f189833cdf0f09a8

See more details on using hashes here.

File details

Details for the file neuroprobe-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: neuroprobe-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 26.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for neuroprobe-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 90ed6f7cf2acb46fea3a5fcf250934264daa859efa0e602bca5d0684572e2164
MD5 6a3c918e4d98fde136a306a872bb2385
BLAKE2b-256 0161fd6ab8e2675d36a1b5aa221d4352004052cb00ab23b72c2e46449ade1610

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page