EEL-Hack: Learning to develop an mTRF pipeline with eelbrain

Title

EEL-Hack: Learning to develop an mTRF pipeline with eelbrain

Leaders

Noemi Bonfiglio Vincenzo Verbeni

Collaborators

Nan

Brainhack Global 2024 Event

Brainhack Donostia

Project Description

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

Goals for Brainhack Global

a) understanding how mTRF method works b) understanding how Eeelbrain works c) writing and editing scripts to prepare the data and fit an mTRFs

Good first issues

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

Communication channels

NaN

Skills

Onboarding documentation

NaN

What will participants learn?

How to use Eelbrain

Data to use

A link will be provided to a public repository of EEG data.

Number of collaborators

2

Credit to collaborators

Project contributors will be listed in the project’s README.

Image

Leave this text if you don’t have an image yet.

Type

pipeline_development

Development status

1_basic structure

Topic

neural_encoding

Tools

MNE

Programming language

Python

Modalities

EEG

Git skills

0_no_git_skills

Anything else?

No response

Things to do after the project is submitted and ready to review.


Date
Jan 1, 0001 12:00 AM