EEL-Hack: Learning to develop an mTRF pipeline with eelbrain
Noemi Bonfiglio Vincenzo Verbeni
Nan
Brainhack Donostia
The Multivariate Temporal Response Function (mTRF) method is an advanced technique used to model the relationship between various features of an auditory stimulus—such as acoustic (e.g., sound envelope) and lexical (e.g., word boundaries, semantic information) features—and the brain’s electrical activity as measured by M/EEG signals. This approach provides insights into how the brain processes auditory information over time, enabling researchers to link neural dynamics with complex auditory inputs. In this project, we will walk through the process of analyzing EEG data using the mTRF method, leveraging the Python toolbox Eelbrain to manage data, prepare predictors, and analyze results. The main steps involved in this project will be:
1. Converting Data Structure from BIDS to Eelbrain Format
The BIDS format is a standardized organization of M/EEG datasets, but Eelbrain uses a different structure for managing and analyzing data. Therefore, we will organize the data according to Eelbrain’s requirements.
2. Defining the Experiment Design
Once the data has been converted, the next step is to define the experiment design. This involves inspecting the events recorded in the EEG data, which mark key moments such as stimulus presentation or participant responses, and ensuring they are correctly aligned with the corresponding auditory stimuli. This step is crucial because accurate event marking is essential for relating the brain signals to specific time points in the stimuli.
3. Building an experiment.py Script According to the Design
With the experiment design in place, we will implement the design in a Python script, experiment.py, which automates the process of loading and organizing the data for analysis. This script will: Load the EEG data and events from the converted Eelbrain format. Load the corresponding stimuli features (e.g., sound waveforms, lexical properties). Synchronize the EEG recordings with the stimuli based on the experiment design.
4. Preparing the Predictors (e.g., Gammatones)
Before fitting the mTRF model, we need to prepare the predictors that will be used to relate the brain’s response to the auditory stimuli. Predictors can include a variety of acoustic and lexical features. Our main goal will be to prepare acoustic predictors for our mTRFs. Optionally, depending on the time available during BrainHack, we will work on lexical predictors - such as word frequency and surprisal.
5. Fitting an mTRF at the Group Level and plotting the results
Once the data and predictors are prepared, we will fit the mTRF model at the group level to investigate how different stimulus features are encoded in the brain’s neural activity over time. We will then inspect the results plotting the mTRF coefficients over time and the topographical maps showing the variations of these coefficients across different regions of the scalp.
NaN
a) understanding how mTRF method works b) understanding how Eeelbrain works c) writing and editing scripts to prepare the data and fit an mTRFs
issue 1: converting data structure from bids to Eelbrain format issue 2: define the experiment design (i.e., checking events in the eeg data and the corresponding stimuli) issue 3: building an experiment.py script according to the design issue 3: prepare the predictors (e.g., gammatones) issue 4: fit an mTRF at the group level issue 5: plotting the mTRF results
NaN
NaN
How to use Eelbrain
The following is a link to the EEG dataset (published in BIDS format on OSF) that we will use for our project:
2
Project contributors will be listed in the project’s README.
Leave this text if you don’t have an image yet.
pipeline_development
1_basic structure
neural_encoding
MNE
Python
EEG
0_no_git_skills
No response
Hi @brainhackorg/project-monitors my project is ready!