Skip to main content

A toolbox for brain network modeling on GPUs

Project description

https://raw.githubusercontent.com/amnsbr/cubnm/main/docs/_static/logo_text.png https://zenodo.org/badge/DOI/10.5281/zenodo.12097797.svg https://img.shields.io/pypi/v/cubnm https://img.shields.io/readthedocs/cubnm https://img.shields.io/badge/docker-amnsbr/cubnm-blue.svg?logo=docker https://app.codacy.com/project/badge/Grade/e1af99e878bc4dbf9525d8eb610e0026 https://img.shields.io/github/license/amnsbr/cubnm

cuBNM toolbox is designed for efficient brain network modeling on GPUs.

Overview

cuBNM toolbox uses GPUs to efficiently run simulations of brain network models consisting of nodes (neural mass models) which are connected through a connectome, and fit them to empirical neuroimaging data through integrated optimization algorithms.

GPU parallelization enables massive scaling of the simulations into higher number of simulations and nodes. Below you can see how computing time varies as a funciton of number of simulations and nodes on GPUs versus CPUs. For example, running 2^17 simulations (duration: 60s, nodes: 100) would take 15 days on a single CPU core, but only 19 minutes on an A100 GPU:

Scaling plots

GPU usage is the primary focus of the toolbox but it also supports running the simulations on single or multiple cores of CPU. CPUs will be used if no GPUs are detected or if requested by the user.

Currently three models (rWW, rWWEx and Kuramoto) are implemented, but the modular design of the code makes it possible to add new models, and a guide is included on how to contribute new models.

The simulated activity of model neurons is fed into the Balloon-Windkessel model to calculate simulated BOLD signal. Functional connectivity (FC) and functional connectivity dynamics (FCD) from the simulated BOLD signal are calculated efficiently on GPUs/CPUs and compared to FC and FCD matrices derived from empirical BOLD signals to assess similarity (goodness-of-fit) of the simulated to empirical BOLD signal. The toolbox supports parameter optimization algorithms including grid search and evolutionary optimizers (via pymoo), such as the covariance matrix adaptation-evolution strategy (CMA-ES). Parallelization within the grid or the iterations of evolutionary optimization is done at the level of simulations (across the GPU ‘blocks’), and nodes (across each block’s ‘threads’). The models can incorporate global or regional free parameters that are fit to empirical data using the provided optimization algorithms. Regional parameters can be homogeneous or vary across nodes based on a parameterized combination of fixed maps or independent free parameters for each node or group of nodes.

At its core the toolbox runs highly parallelized simulations using C++/CUDA, while the user interface is written in Python and allows for user control over simulation configurations:

Flowchart of the cuBNM program

Documentation

Please find the documentations on installation, usage examples and API at https://cubnm.readthedocs.io.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cubnm-0.0.7.tar.gz (4.4 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

cubnm-0.0.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

cubnm-0.0.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

cubnm-0.0.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

cubnm-0.0.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

cubnm-0.0.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.0 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

cubnm-0.0.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.4 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

File details

Details for the file cubnm-0.0.7.tar.gz.

File metadata

  • Download URL: cubnm-0.0.7.tar.gz
  • Upload date:
  • Size: 4.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.5

File hashes

Hashes for cubnm-0.0.7.tar.gz
Algorithm Hash digest
SHA256 8379d5910085a8de3fbd6c0f04e8bee4bb56cbee7b7bb76a6ce5049f5894f22e
MD5 ddad64003b5db7b3430b22954268f500
BLAKE2b-256 b7a5a75ced9919c08753c1260fd0a204dd34e5b787cf3d98a909aeb319542065

See more details on using hashes here.

File details

Details for the file cubnm-0.0.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cubnm-0.0.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b5eb3bac31e1aa496dfaa6348e2ec242a5239a39b7115c59d5354c5fd6090582
MD5 c4b4dc1beaf34b89d3823a4774a2484b
BLAKE2b-256 099c3ba7881a34a5d8798041557c2bb02723a22f8e5b9e6fc4dae56890e06fe9

See more details on using hashes here.

File details

Details for the file cubnm-0.0.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cubnm-0.0.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3f3192b2b20d27fc73fa5257bd2fc62242fe29cf637212aeffc871d783d98af0
MD5 e8f8f2c53eb5e9ea2a029a85b6d92b81
BLAKE2b-256 06f434766c5f112f57f5188ba4b30f730a6d0fc27fe02705f0d1e7757eb6dcc7

See more details on using hashes here.

File details

Details for the file cubnm-0.0.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cubnm-0.0.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 063149995481f6efc7e15d92a9d744aafc8390babd5b249185cfb83fa9548aaa
MD5 4b520a43f249c6970a1f62f72d1cff2b
BLAKE2b-256 6459162b6d017bcfd884173bd5a6fee52da268465fec77a60c638ed89a336017

See more details on using hashes here.

File details

Details for the file cubnm-0.0.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cubnm-0.0.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 458ee367f9aaa1c4b003f51dc818f2ed984b9b3209b087c3cee86c4b5665c884
MD5 ad82b3b89686296b17a44f77a0cf53e7
BLAKE2b-256 b16e22ec6aed2a5c0efcc6102fed96ad08cc5d0fa9f3f0d86475e40774fac7de

See more details on using hashes here.

File details

Details for the file cubnm-0.0.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cubnm-0.0.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f04bddae96b961213efd71d2c5818336f94f7cb0dadeaa7ea5a83ab9857aa7ef
MD5 23df754dc9d8fa994c444f998be6c3e2
BLAKE2b-256 57ee963b25eb95e0d60ec47dd1651672b921d668f7d5f702069b42f58f1498fe

See more details on using hashes here.

File details

Details for the file cubnm-0.0.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cubnm-0.0.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ae4aab199295063eaa7a15be72c7bcf1c9136bd1e42f1ac0668d6a2b458876ff
MD5 87384172020a958feab3f76afa8fd451
BLAKE2b-256 2457347682fc4745d441dbed1c4cdfd98ce0ba876b49d5f76e9fe2b29e12a45d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page