JuliaCon 2023

Neuroblox.jl: biomimetic modeling of neural control circuits
2023-07-26 , 32-D463 (Star)

Neuroblox.jl is a Julia module designed for computational neuroscience and psychiatry applications. Our tools range from control circuit system identification to brain circuit simulations bridging scales from spiking neurons to fMRI-derived circuits, parameter-fitting models to neuroimaging data, interactions between the brain and other physiological systems, experimental optimization, and scientific machine learning.


Neuroblox.jl is based on a library of modular computational building blocks (“blox”) in the form of systems of symbolic dynamic differential equations that can be combined to describe large-scale brain dynamics. Once a model is built, it can be simulated efficiently and fit electrophysiological and neuroimaging data. Moreover, the circuit behavior of multiple model variants can be investigated to aid in distinguishing between competing hypotheses.
We employ ModelingToolkit.jl to describe the dynamical behavior of blox as symbolic (stochastic/delay) differential equations. Our libraries of modular blox consist of individual neurons (Hodgkin-Huxley, IF, QIF, LIF, etc.), neural mass models (Jansen-Rit, Wilson-Cowan, Lauter-Breakspear, Next Generation, microcanonical circuits etc.) and biomimetically-constrained control circuit elements. A GUI designed to be intuitive to neuroscientists allows researchers to build models that automatically generate high-performance systems of numerical ordinary/stochastic differential equations from which one can run stimulations with parameters fit to experimental data. Our benchmarks show that the increase in speed for simulation often exceeds a factor of 100 as compared to neural mass model implementation by the Virtual Brain (python) and similar packages in MATLAB. For parameter fitting of brain circuit dynamical models, we use Turing.jl to perform probabilistic modeling, including Hamilton-Monte-Carlo sampling and Automated Differentiation Variational Inference.

This talk will demonstrate Neuroblox.jl by building small dynamic brain circuits. We construct circuits by first defining the nodes (“blox”) and then either defining an adjacency matrix, building directed graphs, or sketching the circuit in our GUI to assemble the brain circuit ODE systems. Using symbolic equations through ModelingToolkit.jl allows us to define additional parameters of the system that are varied across the system, which later can be used for parameter fitting of data. We will also demonstrate the simulation of networks of several hundred spiking neurons representing a biomimetic reinforcement learning model. We present visual patterns to these spiking neuron networks and apply a learning algorithm to adjust the weights to classify the different patterns. The reinforcement learning feedback is implemented by frequent callbacks into the ODE system and allows us to monitor the learning rate continuously. In addition, we will show examples of a larger brain circuit generating an emergent systems-level cortico-striatal-thalamo-cortical loop, which selectively responds to learned visual patterns and matches many of the experimental data's dynamic behaviors from non-human primates. Finally, we will show benchmarks comparing Neuroblox.jl to other implementations of brain circuit simulations. We hope to convince the audience that Julia is the ideal language for computational neuroscience applications.