amnsbr/cubnm ↗
Created Jul 3, 2025 · View the amnsbr/cubnm repository page
A toolbox for brain network modeling on GPUs
Want this for your repo?
Render a free sample of any GitHub repo in seconds.
Contributors
2
Lines of Code
1,624
From
Oct 24, 2023
To
Jun 26, 2025
About amnsbr/cubnm
cuBNM is a GPU-accelerated toolbox for simulating and fitting brain network models to neuroimaging data. The toolbox is built around a C++/CUDA backend that runs highly parallelized simulations, with a Python interface for user interaction and configuration. It includes several standard neural mass models such as reduced Wong-Wang, Jansen-Rit, Kuramoto, and Wilson-Cowan, and allows researchers to define custom models through YAML configuration files.
The core functionality involves simulating neural activity across interconnected brain regions defined by structural connectomes, converting this activity to simulated BOLD signals using the Balloon-Windkessel model, and computing functional connectivity metrics to compare against empirical neuroimaging data. GPU parallelization provides substantial computational speedup—simulations that would take days on a CPU can complete in minutes on modern NVIDIA GPUs. The toolbox includes integrated optimization algorithms for parameter fitting, including grid search and evolutionary algorithms like CMA-ES via pymoo, with support for both global and regional parameters that can vary across brain nodes or be constrained to specific spatial patterns.
The package is designed for neuroscientists and computational neuroscientists working on whole-brain modeling and parameter optimization. It can run on CPUs if GPUs are unavailable, supports Linux and Windows Subsystem for Linux, and is distributed via PyPI with extensive documentation, tutorials, and example datasets included. The project was recognized as a JuRSE Code Pick in June 2026.