GSoC 2021 Project Idea 27.1 Brain Dynamics Toolbox for Matlab: Contribute new models to the collection

Computational neuroscience seeks to understand the brain by modelling the behaviour of

neurons (brain cells) using nonlinear dynamical systems. Likewise, computational cardiology uses nonlinear dynamics to understand the behaviour of cardiac myocytes (heart cells). In both cases, the nonlinear systems produce surprisingly complex behaviours that offer insights into the underlying electrophysiology.

The Brain Dynamics Toolbox (https://bdtoolbox.org) is an open-source toolbox for simulating nonlinear dynamical systems in Matlab. It allows user-defined models to be rapidly prototyped in an intuitive graphical application where interchangeable solvers and plotting tools can be applied with no additional programming effort. This frees the researcher to focus on the core concepts with minimal implementation burden.

The Brain Dynamics Toolbox currently ships with approximately 40 example models, ranging from point models of neurons to spatially-extended neural fields. These examples serve as both

teaching tools and starting points for new models in research. Many of the examples are based on textbook models and published papers in computational neuroscience (e.g. Hodgkin-Huxley

action potential; Wilson-Cowan neural masses). Others are based on classic models from

dynamical systems (e.g. wave equation; the damped-and-driven pendulum; Brownian motion).

See Gallery | bdtoolbox.org for a preview.

The aim of this Google Summer of Code project is to contribute more models to that collection.

Students are free to implement any model of their choosing from computational neuroscience,

computational cardiology or dynamical systems theory. These may be textbook examples or

models from published papers. Guidance will be provided in choosing an appropriate model. It is feasible that students will be able to implement several models in the time available. In doing so they gain practical programming experience in Matlab as well as exposure to theoretical problems in their chosen field. The students can publish their finished models on the Zenodo digital archive (https://zenodo.org) where they will be credited with authorship and assigned a digital object identifier (doi) for their work.

Requirements: Basic programming experience with Matlab is recommended. Training will be provided for programming dynamical systems.

Lead Mentor: Stewart Heitmann @heitmann, Creator of the Brain Dynamics Toolbox and Computational Scientist at the Victor Chang Cardiac Research Institute.

Co-Mentor: Adam Hill, Head of Computational Cardiology at the Victor Chang Cardiac Research Institute

Hi everyone, My name is Shivaditya. I am currently majoring in computer science with specialisation in cyber physical systems at VIT Chennai. I have used brain fMRI and EEG data in various projects using MATLAB. I would love to contribute to this project.

Hope you have a great day!

Thanking You
Shivaditya

Hi @sshivaditya2019 , did you get a chance to look into the resources that are already shared in the project idea? Also, can you please share some approximate steps about how you would go about implementing the solution for this project idea?

If no, you may do so and get back with any queries and questions you have so that the mentors of this project can guide you in case of queries.

Cheers!
Arnab

Hi @arnab1896,

my name is Ante and I am a graduate student in bioelectromagnetics.

To be very short: I am extremely interested in this project!

Is there a way to communicate directly to mentors since I want to talk details of the project, code and possible deliverables. I think I could potentially be a good candidate for this project since I am currently dealing with the implementation of memristive electric circuit element into the classical deterministic Hodgkin-Huxley model (for some reason I even chose MATLAB to do so, even though most of my work typically involve Python :slight_smile: ). Since the aim of this project, as stated in the official GSoC 2021 Ideas list document here, is to “contribute more models to (existing) collection”, I would like to suggest to mentors to consider the idea of extending existing models to be able to capture noise and/or external electromagnetic radiation (e.g., from TMS, TES, DBS, or even hazardous electromagnetic radiation) and observe changes in dynamical response and electrophysiology of a single cortical neuron.

I am looking forward to your response.
Best,
Ante

Dear Shivaditya,
My apologies for not responding sooner. The broad scope of this project is contribute new models to the existing collection for the Brain Dynamics Toolbox. In case you are not familiar with it, the toolbox is essentially a graphical front-end to the existing matlab ODE solvers. These solvers allow you to compute numerical solutions (trajectories) of dynamical systems from a given starting point (initial conditions). You can think of the “input” as a differential equation and the “output” as a time series. It sounds like your previous experience with fMRI and EEG analysis may be the inverse scenario where the “input” is a time series and the “output” is some conclusion about the correlations in the data. If you want to get a better feel for the Brain Dynamics Toolbox, take a look at the Gallery of models on https://bdtoolbox.org.

I hope that helps
Stewart

Dear Ante
My apologies for not responding sooner. Yes, you are correct. The general aim of the project is to add more models to the existing collection. The proposed models can be any nonlinear dynamical system but in your case I think it makes sense to implement your model form your paper. I presume you already have Matlab code for the differential equations, so it would be a case of taking that code and rewriting it in a form for the Brain Dynamics Toolbox.

If you are not familiar with it, the Brain Dynamics Toolbox is essentially a graphical front-end to the matlab ODE and DDE solvers. It also has its own solvers for Stochastic Differential Equations (SDEs). So you could certainly use those to build noise into your model. The code code is available from https://bdtoolbox.org

The prerequisites for the project are basic programming experience with matlab and some familiarity with dynamical systems (which you have). Experience with the Matlab ODE solvers is also a bonus.

I suggest that you frame your proposal with three broad aims:

  1. Something for the toolbox: eg Implement a memristive circuit using the Hodgkin-Huxley formulism.
  2. Something for the community: eg: extending the current collection of models for use by researchers and instructors.
  3. Something for yourself: eg: experience in programming dynamical models in your chosen field; getting your software published in an (open) digital archive.

Here are some links to general GSOC info that you might find useful. Below that is the INCF timeline for GSOC projects.

GSoC FAQ Explainer videos

GSoC guides for students and mentors

I hope that helps.

Stewart

1 Like

Hi @heitmann

I am Pranav Rai , a 2nd year Masters Student at Indian Institute of Technology Kanpur (IIT Kanpur) currently working on my thesis in Computational Neuroscience. For my Masters Thesis I am building a computational model of Spiking Neuron Network for Insect Olfaction System in MATLAB. I also have extensive background in mathematical theory of solving Initial Value Problems in Differential Equations computationally through my Bachelor degree in Aerospace Engineering. There I had to routinely use ODE and PDE solvers for solving Fluid Dynamics Equation in MATLAB.
I was introduced to the dynamical systems approach to computational neuroscience through the book -“Dynamical Systems in Neuroscience” by Eugene M. Izhikevich and found the whole approach very interesting. I am very interested in the Brain Dynamics Toolbox project (especially for Neural Mass Models) and would love to contribute to it.
Before that, I had a question to ask from you. Can I contribute by building more than one model - let’s say one which is easy to implement (like Hopfield Networks) and other slightly more complex (like Mitral Neurons of Olfactory Bulb which is more relevant to my thesis as well). The simpler model can be used as a tutorial to teach students and the more complex model can be used in research activities ?

Thanks
Pranav Rai

Hi Pranav, yes you certainly could build more than one model. I think the approach of starting with a simpler model is very wise. From there you can progressively build up to more complex models as you go. A simple model for teaching plus a complex model for research would be a great combination. The beauty of this project is that you can build as many models as time permits. Izhikevich’s book on Dynamical Systems in Neuroscience is a great resource and you could implement some of the examples from that book if you wished. But in your case, I think it makes more sense to implement the same model(s) that you will be using in your thesis. That way you can double your benefit. I presume you already have some primary references for that model, so it makes sense to stick with it. You might find that during your thesis you will want to have a small suite of variants of it. Say a single-cell version and a network version, or perhaps a cable. You might even want to isolate some part of the model, such as an ion-channel, and implement that separately. So I would advise keeping as close your thesis work as possible.

Hi Arnab,
My name is Swarag. T, a student in IISER Pune. A third-year BS-MS student(undergrad). It would be a great help for me if I can be a part of this project. It would be a great opportunity for me to learn and do things that are really helpful for the community. I am interested in Neuro+AI+Cognitive sciences. MATLAB was used for one of my earlier courses(Numerical Computation) and I had gone through courses on neurobiology and currently crediting Computational and Mathematical Biology. I had gained some knowledge about spiking neural networks from some papers and about DL and ML through Coursera courses( Mathematics for Machine Learning; Specialization, Neural Networks and Deeplearning,Improving Neural Networks,Natural Language Processing with Classification and Vector Spaces,Computational Neuroscience, The Brain and Space, Simulation and Modeling of Natural Processes, Intro to Programing With MATLAB)
It will be a great help for me to be a part of the team and to learn something. Thank you. Looking forward to hearing from you

@Swarag_T ,
Thanks for reaching out. Can I please request you to go through the linked resources in this project idea and come up with any queries/questions you might have. Also, feel free to share how you will go about tackling the project idea through your proposed solution. Queries can be resolved by taking help from respective mentors, which in this case would be Stewart and Adam.

However, before tagging Stewart/Adam, I request you to first come up with your proposed solution to this problem statement or any queries you might have.

Cheers!
Arnab

Hi Swarag,
Thanks for your interest. The aims of this project are to contribute new dynamical models to the existing collection for the Brain Dynamics Toolbox. The toolbox is a graphical front-end to the Matlab ODE solvers (plus some solvers of its own). The graphical interface allows the user to interactively explore the dynamics of any user-defined system of equations. Those equations can be from any field but historically the focus has been on computational neuroscience, and its close cousin computational cardiology. The models typically seek to describe some aspect of physiology as you will have encountered in your Computational and Mathematical Biology course. It is different from AI and Machine Learning. I suggest you take a look at the Gallery of models on the https://bdtoolbox.org website to get an idea of the type of models that can be built. A good proposal would be to find some published models that interest you and aim to replicate them in the toolbox. That will give you some programming experience as well as some exposure to the literature. Perhaps look to your Mathematical Biology course for inspiration. Implementing the models used in that course could be useful for yourself and the instructor.
Hope that helps,
Stewart

Sir,
Is models like DDM and HDDM also included in the project. In fact I had searched for an HDDM model in MATLAB as it would be a lot more faster than in Python. And also I couldn’t find a DDM model except the one available from MATLAB file share.

I don’t know what you mean by “DDM” and “HDDM” models.

Sir,
The Drift Diffusion Models and Hierarchical Drift Diffusion Models

Sir,
I couldn’t get any response. I am not sure whether this comes under the dynamics toolbox. But, it is shown that in a binary decision-making process, there is an accumulation of evidence and analogously we can see activity differences in brain areas, which could be analyzed using a regression model by using theta power of the fMRI data obtained.
The drift-diffusion model is described with some simple parameters. The threshold- a is defined as the upper and lower decision boundary. It shows the noisy accumulation of evidence that is analogous to the actual neural systems. There would be a drift parameter and initial point, which lies between the lower and upper threshold(v and z). And what we are interested in understanding here is the dependency of these parameters on different stimulus conditions or could be the activity of certain regions. By doing so, we may be able to understand which model fits best for a behavioral task, from the reaction times that we had obtained. Thus we could make an inference on the likely neuronal process that would generate the process.
But, diffusion models have a weakness in that in most of the experiments, the sample size would be low to produce inferences. There a hierarchical Bayesian framework helps. We can use Markov Chain Monte Carlo methods to produce multiple chains of samples by fitting the data. This gives us enough samples(after checking for convergence and correlation). Here the posterior probability distribution of the parameters could be used to draw inferences.
This is currently available in python. They had used the already existing PyMC library for building the Hierarchical model. But, I couldn’t find an alternative for MCMC or for HDDM in MATLAB. The reason why I want to develop one is that it would be much faster in MATLAB as it is a C-based language compared to Python. Thus the modeling could be done faster.
I don’t know whether this is a part of GSoC, but will be useful, as it would greatly reduce computation time. Kindly respond to this request.
Thank you

Hi Swarag,
The Brain Dynamics Toolbox does support Stochastic Differential Equations (SDEs) so you will be able to model drift and diffusion processes. The Gallery of Models on the bdtoolbox.org website includes a few examples at the bottom of the page. The toolbox also ships with an example of an Ornstein-Uhlenbeck process which is a popular choice for modelling decision-making processes. No doubt you can use that as your starting point for your own model. As for speed, I am not convinced that MATLAB will be noticeably faster than Python. So you may well find that porting the existing Python code to Matlab may cost you weeks of coding time for little benefit.

Hi @heitmann
I am Sahil Walke, a fourth-year Electrical major at the Indian Institute of Technology, Bombay. I am extremely interested to work on the Brain dynamics toolbox as a part of this year’s GSOC. I have mailed you my draft proposal and I would love to have your feedback on this proposal.
Thanks
Sahil Walke

Hi Sahil,
Yes I received your draft proposal and have emailed you a response separately. Time is running out so get it in quick!
Thanks
Stewart

All students, remember to tag your proposals with ‘Brain Dynamics Toolbox’ (or ‘bdtoolbox’ for short) when submitting them to the GSoC portal so that they don’t get overlooked.