←
Amin Saberi309 posts
Amin Saberi avatar

Amin Saberi

@amnsbr

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

◷ Joined January 2010▧ 35 Photos and videos
Amin Saberi avatar
Amin Saberi@amnsbr·19 Nov 2025

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 🙏🏻

Amin Saberi avatar
Amin Saberi@amnsbr·19 Nov 2025

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

Amin Saberi avatar
Amin Saberi@amnsbr·19 Nov 2025

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

Amin Saberi avatar
Amin Saberi@amnsbr·19 Nov 2025

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

Amin Saberi avatar
Amin Saberi@amnsbr·19 Nov 2025

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

Amin Saberi avatar
Amin Saberi@amnsbr·19 Nov 2025

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

Amin Saberi avatar
Amin Saberi@amnsbr·19 Nov 2025

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

Amin Saberi avatar
Amin Saberi@amnsbr·19 Nov 2025

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

Amin Saberi avatar
Amin Saberi@amnsbr·19 Nov 2025

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

Amin Saberi avatar
Amin Saberi@amnsbr·19 Nov 2025

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

Amin Saberi avatar
Amin Saberi@amnsbr·19 Nov 2025

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

Amin Saberi avatar
Amin Saberi@amnsbr·19 Nov 2025

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

Amin Saberi avatar
Amin Saberi@amnsbr·19 Nov 2025

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

Amin Saberi avatar
Amin Saberi@amnsbr·19 Nov 2025

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