GSoC 2022 Project Idea 7.1: Computational modelling of FNIRS-EEG in Python with The Virtual Brain and Kernel Flow (350 h)

Lead Mentor: Dr. John Griffiths @John_Griffiths (CAMH, University of Toronto)

Co-Mentor: Dr. Davide Momi (CAMH)

Commitment Level: 350 Hours

Skill Level: Intermediate

The Virtual Brain (TVB) is a widely-used software library for connectome-based modelling of large-scale neural dynamics and neuroimaging data. To date, TVB models have mainly focused on brain dynamics as measured by fMRI, EEG, and LFPs. Functional Near Infrared Spectroscopy (FNIRS) is another noninvasive neuroimaging modality, which like fMRI measures haemodynamic signals reflecting neural activity, that has major potential in cognitive and clinical neuroscience. The aim of this GSoC project will be to build out the modelling and analysis capacity of TVB for simulations of whole-head, high-resolution FNIRS signals, as well as concurrently recorded EEG. This shall include writing code implementing a temporal forward model for FNIRS-specific haemodynamic signals, a spatial forward model for optical sensor projection, and running simulations exploring dynamics of concurrent FNIRS-EEG activity, and fNIRS data analysis libraries. In terms of hardware, these development activities will be primarily focused on the Kernel Flow FNIRS+EEG system, that we will have access to and be using as part of the project. The data analysis-based parts of the project will also build upon and extend our kftools Python library.

Candidates should have experience with Python for scientific computing, and a strong interest in computational neuroscience and neuroimaging. Experience with one or more of the following is desirable: FNIRS/fMRI/EEG data analyses, neural mass modelling, numerical simulations and numerical optimization / model fitting problems in neuroscience or other domains. The project will provide excellent experience and training for students interested in pursuing research in human neuroimaging, theoretical/computational/cognitive/clinical neuroscience, and brain-computer interfaces.

Tech keywords: Python, TVB, Computational Neuroscience, Neural mass modelling, Connectome, Biophysics, FNIRS, EEG

Hi, my name is Parsa, and I am really interested in the project that you have proposed. I think I could be a good match for this project since I have experience in both neural mass models, and neuroimaging data analysis. I am experienced in the MNE Python library used for EEG data analysis and NiLearn and NiBabel libraries used for fMRI/fNIRS analyses.

I am not sure to what extent the project has been developed so far, and I would love to know more details. Some questions that I had were which NMM models would you be using and if any structural data (DTI and connectome metrics) would be incorporated into the models.

I would be very excited to participate in this project and help out in any way I can. I would appreciate your guidance to what steps have to be taken next on my part in order to apply.

I’m not sure when the deadline to apply is, (or how specifically I can apply) but I just wanted to mention I am still very much interested in this project! I can send you my CV if you would like.

Looking forward to hearing from you!

Hi Parsa, I’ll tag the mentor for you (@John_Griffiths).

Hi @Parsa_Oveisi.

To answer your questions, the neural mass models that we intend to use would be the reduced Wong-Wang (also called ‘Wong-Wang-Deco’) and the Jansen-Rit models. One main goal of this project is to explore reproducibility of empirical phenomena observed in concurrent EEG-haemodynamic brain recordings (e.g., Alpha-BOLD anticorrelations) in our whole-brain model. So, we aim to incorporate NMMs that are able to produce these behaviours. Regarding your second question, though fNIRS also looks at haemodynamic responses (similar to fMRI), the technology is different from magnetic resonance imaging. We would not be acquiring structural brain data from the same participants as the fNIRS. We can however use group-averaged anatomical connectivity in our modelling, which we will take from public datasets (HCP).

Please send me your CV and a draft for your proposal to work through, and we’ll take it from there.



That’s awesome! Please check your direct messages.

Hope to hear from you soon!

I am interested in this Project. I have experience with making Machine Learning models and Scientific Programming in Python, Julia and Swift and EEG data analysis in MNE. Are there any introductory resources I could delve into? Additionally, are there any first issues I can look to solve? @John_Griffiths @malin

To all interested in applying for this project,

First, thanks for expressing your interest here.
(If you are lurking in the wings interested but not communicating, don’t do that. )

A few of you have asked how to proceed with applications for this opportunity.

So, here is some info on that:

Next steps for potential applicants:

  • First check that you are eligible according to the stated guidelines. Note that this includes that you should be new or beginners to open source.

  • Take a good look at the material on the kftools website , and tvb website, a lot of which relevant here.

  • After this background research you should come back here with questions and/or ideas for how to tackle the project described in outline above.

  • You will need to develop a compelling proposal as part of your submission, demonstrating a good understanding of the task at hand and the relevant requirements. You should use this forum to bounce ideas off me to make sure that your proposal is going in the right direction.

Hope that’s helpful. Good luck everyone!



Hi @John_Griffiths, I’ve shared a proposal doc with you.
Would be great to have your feedback and hope to collaborate!
Warm regards,

Hello, @John_Griffiths I have shared my proposal for this project via Google Doc for feedback.