
Thanks for reading! Do reach out to us if you plan to use cuBNM in your study, we are happy to help 🙂 And many thanks to all the collaborators on this project 🙏🏻

Postdoc, Cognitive Neurogenetics Group @MPI_CBS & @fzj_inm7 | MD

Thanks for reading! Do reach out to us if you plan to use cuBNM in your study, we are happy to help 🙂 And many thanks to all the collaborators on this project 🙏🏻

I’m now a bit obsessed with GPUs 🤓 They have great potential for scaling up neuroimaging and neuroscience analyses 📈 Coming up next: GPU-accelerated neuroimaging meta-analyses (work in progress 🚧: github.com/amnsbr/nimare-gpu) 20/n

This started as a small weekend curiosity and turned into a very fun project. I learned a lot along the way, and I hope cuBNM helps others with their modeling studies. 19/n

Community contributions are very welcome 🙌 If you’re interested to contribute new models, implement features, or help maintain the toolbox, visit the GitHub repo: github.com/amnsbr/cubnm 18/n

A few technical details: The frontend is written in Python (for ease of use), but to optimize efficiency, the simulation core is written in CUDA and C++. And not just simulations, but also calculation of FC, FC dynamics and goodness of fit measures is done on GPUs 🚀 17/n

As another example: An earlier version of this code was already used in our adolescent development study, where we found decreasing E-I ratio in association cortex with age: science.org/doi/full/10.1126… 16/n

As examples of the utility of these individualized models, we investigated test-retest reliability and heritability of simulated (and empirical) measures in the HCP dataset, and found simulated features to be fairly reliable and heritable. 15/n

This took a total of 1,426 hours on A100 GPUs (still considerable!) but multi-core supercomputer CPU nodes would have required 11x more time, 31x more cost and 14x more energy to do the same! 14/n

A key advantage of cuBNM’s GPU implementation is to make it possible to fit large numbers of individualized BNMs, in batches! To demonstrate this, we built individualized models for 430 HCP participants, running >28 million simulations. 13/n

cuBNM also supports regional heterogeneity of parameters, using map-based and node-based approaches. To demonstrate these approaches in the preprint, we applied them to fit group-level models of the HCP data, and as expected, found them to outperform the homogenous model. 12/n

Two optimization approaches are included in cuBNM: 1️⃣ grid search 2️⃣ evolutionary optimizers (via pymoo, with CMA-ES as the featured method) We demonstrate both in the preprint by fitting the rWW model to the group-averaged HCP data. 11/n

cuBNM currently includes five commonly used models (with rWW model featured in tutorials and the preprint). New models can be added via YAML model specification files. And a guide for contributing new models is included in the documentation. 10/n

Check out our comprehensive tutorials cubnm.readthedocs.io and read the preprint to learn how to 😊 And feel free to get in touch if you needed help. 9/n

Using cuBNM, if you have access to a few GPUs*, you can quickly and easily create individualized BNMs for your own dataset. All you need is: resting-state BOLD & structural connectivity (from DWI, or a template SC). * CPUs are also supported but not the focus 8/n

Why are GPUs so much faster? GPUs are designed for parallel processing, so computations across both *simulations* and *nodes* can be massively parallelized 🧠⚙️ 7/n

GPU implementation also makes it feasible to simulate denser networks with thousands of nodes: Compute time with number of nodes increases near-quadratically on CPUs, but near-linearly on GPUs. 6/n