Skip to content

Add an HBN-EEG response time regression task - #1774

Open
AxelNoun wants to merge 3 commits into
sunlabuiuc:masterfrom
AxelNoun:hbn-response-time
Open

AxelNoun wants to merge 3 commits into
sunlabuiuc:masterfrom
AxelNoun:hbn-response-time

Conversation

@AxelNoun

@AxelNoun AxelNoun commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Contributor: Axel Coiffard-Donaty (@AxelNoun)

Contribution Type: New task

Description:

Adds HBNResponseTimeRegression for the contrast change detection recordings of HBNEEGDataset (#1767): one window per trial, 0.5 to 2.5 s after the target stimulus, labelled with the response time (s), as in challenge 1 of the EEG Foundation Challenge 2025. Trials follow build_trial_table of EEGDash, which the challenge starter kit uses. Optional filters drop fast or wrong-hand responses; both are off by default.

Files to Review:

  • pyhealth/tasks/hbn_response_time.py
  • tests/core/test_hbn_response_time.py
  • examples/eeg/hbn/hbn_response_time_regression.py
  • Docs page and export.

Testing:

  • 12 new tests on synthetic BDF and events files, including set_task with a PatientSplit; with the other HBN tests, 39 passed (Windows, Python 3.13). tools/check_pr_rules.py: passed.
  • Against EEGDash 0.9.1 on the 60 recordings of mini release 1: identical trial tables (1,733 trials), and the same 1,513 windows and targets as the starter kit pipeline, with signals equal to float32 precision.

Baseline (R1 to R5, 60/20/20 participant split, 3 seeds, scored per trial): EEGNet nRMSE 1.086 ± 0.050, constant predictor 1.005 ± 0.001. The example checks the pipeline; no predictive claim.

Data note: about 1% of channel windows exceed 1000 uV in release 1. Windows are left raw, as in the kit.

HBNResponseTimeRegression cuts one window per contrast change detection trial, 0.5 to 2.5 s after the target stimulus by default, and predicts the response time, as in challenge 1 of the EEG Foundation Challenge 2025. Trials are built with the rule of build_trial_table in EEGDash, which the challenge starter kit uses. Optional filters drop fast responses or wrong-hand responses.
The example trains EEGNet on one window per contrast change detection trial and scores it per test trial against the constant predictor, with the challenge nRMSE. Participants are split 60/20/20 by seed.
@solarsys solarsys added the status: automatic The PR will go through automatic review process. label Dec 1, 2026
Ruff 0.17 (RUF007) flags zip(starts, starts[1:]); the pairs are the same.
@solarsys

solarsys commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

Labeled status: automatic: everything is in the review folders, tests are in tests/core, and it builds on the merged HBN-EEG dataset. One thing blocks merging: the contribution-rules check fails on pyhealth/tasks/hbn_response_time.py:125 (ruff RUF007: use itertools.pairwise() instead of zip() over successive pairs). Once that is fixed and the build passes, the AI review will run.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: automatic The PR will go through automatic review process.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants