Virtual Brain Inference (VBI), a flexible and integrative toolkit for efficient probabilistic inference on whole-brain models

  1. Abolfazl Ziaeemehr  Is a corresponding author
  2. Marmaduke Woodman
  3. Lia Domide
  4. Spase Petkoski
  5. Viktor Jirsa  Is a corresponding author
  6. Meysam Hashemi  Is a corresponding author
  1. Aix Marseille University, INSERM, INS, Inst Neurosci System, France
  2. Codemart, Romania

eLife Assessment

This paper presents a valuable software package, named "Virtual Brain Inference" (VBI), that enables faster and more efficient inference of parameters in dynamical system models of whole-brain activity, grounded in artificial network networks for Bayesian statistical inference. The authors have provided convincing evidence, across several case studies, for the utility and validity of the methods using simulated data from several commonly used models, but more thorough benchmarking could be used to demonstrate the practical utility of the toolkit. This work will be of interest to computational neuroscientists interested in modelling large-scale brain dynamics.

https://doi.org/10.7554/eLife.106194.4.sa0

Abstract

Network neuroscience has proven essential for understanding the principles and mechanisms underlying complex brain (dys)function and cognition. In this context, whole-brain network modeling—also known as virtual brain modeling—combines computational models of brain dynamics (placed at each network node) with individual brain imaging data (to coordinate and connect the nodes), advancing our understanding of the complex dynamics of the brain and its neurobiological underpinnings. However, there remains a critical need for automated model inversion tools to estimate control (bifurcation) parameters at large scales associated with neuroimaging modalities, given their varying spatio-temporal resolutions. This study aims to address this gap by introducing a flexible and integrative toolkit for efficient Bayesian inference on virtual brain models, called Virtual Brain Inference (VBI). This open-source toolkit provides fast simulations, taxonomy of feature extraction, efficient data storage and loading, and probabilistic machine learning algorithms, enabling biophysically interpretable inference from non-invasive and invasive recordings. Through in-silico testing, we demonstrate the accuracy and reliability of inference for commonly used whole-brain network models and their associated neuroimaging data. VBI shows potential to improve hypothesis evaluation in network neuroscience through uncertainty quantification and contribute to advances in precision medicine by enhancing the predictive power of virtual brain models.

Introduction

Understanding the complex dynamics of the brain and their neurobiological underpinnings, with the potential to advance precision medicine (Falcon et al., 2016; Tan et al., 2016; Vogel et al., 2023; Williams and Whitfield Gabrieli, 2025), is a central goal in neuroscience. Modeling these dynamics provides crucial insights into causality and mechanisms underlying both normal brain function and various neurological disorders (Breakspear, 2017; Wang et al., 2023b; Ross and Bassett, 2024). By integrating the average activity of large populations of neurons (e.g. neural mass models; Wilson and Cowan, 1972; Jirsa and Haken, 1996; Deco et al., 2008; Jirsa et al., 2014; Montbrió et al., 2015; Cook et al., 2022) with information provided by structural imaging modalities (i.e. connectome; Honey et al., 2009; Sporns et al., 2005; Schirner et al., 2015; Bazinet et al., 2023), the whole-brain network modeling has proven to be a powerful tractable approach for simulating brain activities and emergent dynamics as recorded by functional imaging modalities (such as (s)EEG, MEG, and fMRI; Sanz-Leon et al., 2015; Schirner et al., 2022; Amunts et al., 2022; D’Angelo and Jirsa, 2022; Patow et al., 2024; Hashemi et al., 2025).

The whole-brain models have been well-established in network neuroscience (Sporns, 2016; Bassett and Sporns, 2017) for understanding the brain structure and function (Ghosh et al., 2008; Honey et al., 2010; Park and Friston, 2013; Melozzi et al., 2019; Suárez et al., 2020; Feng et al., 2024; Tanner et al., 2024) and investigating the mechanisms underlying brain dynamics at rest (Deco et al., 2011; Wang et al., 2019; Ziaeemehr et al., 2020; Kong et al., 2021), normal aging (Lavanga et al., 2023; Zhang et al., 2024), and also altered states such as anesthesia and loss of consciousness (Barttfeld et al., 2015; Hashemi et al., 2017; Luppi et al., 2023; Perl et al., 2023b). This class of computational models, also known as virtual brain models (Jirsa et al., 2010; Sanz Leon et al., 2013; Sanz-Leon et al., 2015; Schirner et al., 2022; Jirsa et al., 2023; Wang et al., 2024), has shown remarkable capability in delineating the pathophysiological causes of a wide range of brain diseases, such as epilepsy (Jirsa et al., 2017; Proix et al., 2017; Wang et al., 2023b), multiple sclerosis (Wang et al., 2024; Mazzara et al., 2025), Alzheimer’s disease (Yalçınkaya et al., 2023; Perl et al., 2023a), Parkinson’s disease (Jung et al., 2022; Angiolelli et al., 2025), neuropsychiatric disorders (Deco and Kringelbach, 2014; Iravani et al., 2021), stroke (Allegra Mascaro et al., 2020; Idesis et al., 2022), and focal lesions (Rabuffo et al., 2025). In particular, they enable the personalized simulation of both normal and abnormal brain activities, along with their associated imaging recordings, thereby stratifying between healthy and diseased states (Liu et al., 2016; Patow et al., 2023; Perl et al., 2023a) and potentially informing targeted interventions and treatment strategies (Jirsa et al., 2017; Proix et al., 2018; Wang et al., 2023b; Jirsa et al., 2023; Hashemi et al., 2025). Although there are only a few tools available for forward simulations at the whole-brain level, for example the brain network simulator The Virtual Brain (TVB; Sanz Leon et al., 2013), there is a lack of tools for addressing the inverse problem, that is finding the set of control (generative) parameters that best explains the observed data. This study aims to bridge this gap by addressing the inverse problem in large-scale brain networks, a crucial step toward making these models operable for clinical applications.

Accurately and reliably estimating the parameters of whole-brain models remains a formidable challenge, mainly due to the high dimensionality and nonlinearity inherent in brain activity data, as well as the non-trivial effects of noise and network inputs. A large number of previous studies in whole-brain modeling have relied on optimization techniques to identify a single optimal value from an objective function, scoring the model’s performance against observed data (Wang et al., 2019; Kong et al., 2021; Cabral et al., 2022; Liu et al., 2023). This approach often involves minimizing metrics such as the Kolmogorov-Smirnov distance or maximizing the Pearson correlation between observed and generated data features such as functional connectivity (FC), functional connectivity dynamics (FCD), and/or power spectral density (PSD). Although fast, such a parametric approach results in only point estimates and fails to capture the relationship between parameters and their associated uncertainty. This limits the generalizability of findings and hinders identifiability analysis, which explores the uniqueness of solutions. Furthermore, optimization algorithms can easily get stuck in local extrema, requiring multi-start strategies to address potential parameter degeneracies. These additional steps, while necessary, ultimately increase the computational cost. Critically, the estimation heavily depends on the form of the objective function defined for optimization (Svensson et al., 2012; Hashemi et al., 2018). These limitations can be overcome by employing Bayesian inference, which naturally quantifies the uncertainty in the estimation and statistical dependencies between parameters, leading to more robust and generalizable models. Bayesian inference is a principal method for updating prior beliefs with information provided by data through the likelihood function, resulting in a posterior probability distribution that encodes all the information necessary for inferences and predictions. This approach has proven essential for understanding the intricate relationships between brain structure and function (Hashemi et al., 2021; Lavanga et al., 2023; Rabuffo et al., 2025), as well as for revealing the pathophysiological causes underlying brain disorders (Hashemi et al., 2023; Yalçınkaya et al., 2023; Wang et al., 2024; Wang et al., 2024; Hashemi et al., 2025; Hashemi et al., 2024).

In this context, simulation-based inference (SBI; Cranmer et al., 2020; Gonçalves et al., 2020; Hashemi et al., 2023; Hashemi et al., 2024) has gained prominence as an efficient methodology for conducting Bayesian inference in complex models where traditional inference techniques become inapplicable. SBI leverages computational simulations to generate synthetic data and employs advanced probabilistic machine learning methods to infer the joint distribution over parameters that best explain the observed data, along with associated uncertainty. This approach is particularly well-suited for Bayesian inference on whole-brain models, which often exhibit complex dynamics that are difficult to retrieve from neuroimaging data with conventional estimation techniques. Crucially, SBI circumvents the need for explicit likelihood evaluation and the Markovian (sequential) property required in sampling. Markov chain Monte Carlo (MCMC; Gelman et al., 1995) is the gold-standard nonparametric technique and asymptotically exact for sampling from a probability distribution. However, for Bayesian inference on whole-brain models given high-dimensional data, the likelihood function becomes intractable, rendering MCMC sampling computationally prohibitive. SBI offers significant advantages, such as parallel simulation while leveraging amortized learning, making it effective for personalized inference from large datasets (Hashemi et al., 2024). Amortization in artificial neural networks refers to the idea of reusing learned computations across multiple tasks or inputs (Gershman and Goodman, 2014). Amortization in Bayesian inference refers to the process of training a shared inference network (e.g. a neural network) with an intensive upfront computational cost, to perform fast inference across many different observations. Instead of re-running inference for each new observation, the trained model can rapidly return posterior estimates, significantly reducing computational cost at test time. Following an initial computational cost during simulation and training to learn all posterior distributions, subsequent evaluation of new hypotheses can be conducted efficiently, without additional computational overhead for further simulations (Hashemi et al., 2023). Importantly, SBI sidesteps the convergence issues caused by complex geometries that are often encountered when using gradient-based MCMC methods (Betancourt and Girolami, 2013; Betancourt et al., 2014; Hashemi et al., 2020). It also substantially outperforms approximate Bayesian computation (ABC) methods, which rely on a threshold to accept or reject samples (Sisson et al., 2007; Beaumont et al., 2009; Gonçalves et al., 2020). Such a likelihood-free approach provides us with generic inference on complex systems as long as we can provide three modules:

  1. A prior distribution, describing the possible range of parameters from which random samples can be easily drawn, that is θp(θ).

  2. A simulator in computer code that takes parameters as input and generates data as output, that is xp(xθ).

  3. A set of low-dimensional data features, which are informative of the parameters that we aim to infer.

These elements prepare us with a training data set {(θi,xi)}i=1Nsim with a budget of Nsim simulations. Then, using a class of deep neural density estimators, such as masked autoregressive flows (MAFs; Papamakarios and Pavlakou, 2017) or neural spline flows (NSFs; Durkan et al., 2019), we can approximate the posterior distribution of parameters given a set of observed data, that is p(θxobs). Therefore, a versatile toolkit should be flexible and integrative, adeptly incorporating these modules to enable efficient Bayesian inference over complex models.

To address the need for widely applicable, reliable, and efficient parameter estimation from different (source-localized) neuroimaging modalities, we introduce Virtual Brain Inference (VBI), a flexible and integrative toolkit for probabilistic inference at whole-brain level. This open-source toolkit offers fast simulation through just-in-time (JIT) compilation of various brain models in different programming languages (Python/C++) and devices (CPUs/GPUs). It supports space-efficient storage of simulated data (HDF5/NPZ/PT), provides a memory-efficient loader for batched data, and facilitates the extraction of low-dimensional data features (FC/FCD/PSD). Additionally, it enables the training of deep neural density estimators (MAFs/NSFs), making it a versatile tool for inference on neural sources corresponding to (s)EEG, MEG, and fMRI recordings. VBI leverages high-performance computing, significantly enhancing computational efficiency through parallel processing of large-scale datasets, which would be impractical with current alternative methods. Although SBI has been used for low-dimensional parameter spaces (Gonçalves et al., 2020; Wang et al., 2024; Baldy et al., 2024), we demonstrate that it can scale to whole-brain models with high-dimensional unknown parameters, as long as informative data features are provided. VBI is now accessible on the cloud platform EBRAINS (https://ebrains.eu), enabling users to explore more realistic brain dynamics underlying brain (dys)functioning using Bayesian inference.

In the following sections, we will describe the architecture and workflow of the VBI toolkit and demonstrate the validation through a series of case studies using in silico data. We explore various whole-brain models corresponding to different types of brain recordings: a whole-brain network model of Wilson-Cowan (Wilson and Cowan, 1972), Jansen-Rit (Jansen and Rit, 1995; David and Friston, 2003), and Stuart-Landau (Selivanov et al., 2012) for simulating neural activity associated with EEG/MEG signals, the Epileptor (Jirsa et al., 2014) related to stereoelectro-EEG (sEEG) recordings, and Montbrió (Montbrió et al., 2015), and Wong-Wang (Wong and Wang, 2006; Deco et al., 2013) mapped to fMRI BOLD signals. Although these models represent source signals and could be applied to other modalities (e.g. Stuart-Landau representing generic oscillatory dynamics), we focused on their capabilities to perform optimally in specific contexts. For instance, some are better suited for encephalographic signals (e.g. EEG/MEG) due to their ability to preserve spectral properties, while others have been used for fMRI data, emphasizing their ability to capture dynamic features such as bistability and time-varying functional connectivity.

VBI workflow

Figure 1 illustrates an overview of our approach in VBI, which combines virtual brain models and SBI to make probabilistic predictions on brain dynamics from (sourc-localized) neuroimaging recordings. The inputs to the pipeline include the structural imaging data (for building the connectome), functional imaging data such as (s)EEG/MEG, and fMRI as the target for fitting, and prior information as a plausible range over control parameters for generating random simulations. The main computational costs involve model simulations and data feature extraction. The output of the pipeline is the joint posterior distribution of control parameters (such as excitability, synaptic weights, or effective external input) that best explains the observed data. Since the approach is amortized (i.e. it learns across all combinations in the parameter space), it can be readily applied to any new data from a specific subject.

The workflow of Virtual Brain Inference (VBI).

This probabilistic approach is designed to estimate the posterior distribution of control parameters in virtual brain models from whole-brain recordings. (A) The process begins with constructing a personalized connectome using diffusion tensor imaging and a brain parcellation atlas, such as Desikan-Killiany (Desikan et al., 2006), Automated Anatomical Labeling (Tzourio-Mazoyer et al., 2002), or VEP (Wang et al., 2021). (B) The personalized virtual brain model is then assembled. Neural mass models describing the averaged activity of neural populations, in the generic form of x˙=f(x,θ,Iinput), are placed to each brain region and interconnected via the structural connectivity matrix. Initially, the control parameters are randomly drawn from a simple prior distribution. (C) Next, the VBI operates as a simulator that uses these samples to generate time series data associated with neuroimaging recordings. (D) We extract a set of summary statistics from the low-dimensional features of the simulations (FC, FCD, PSD) for training. (E) Subsequently, a class of deep neural density estimators is trained on pairs of random parameters and their corresponding data features to learn the joint posterior distribution of the model parameters. (F) Finally, the amortized network allows us to quickly approximate the posterior distribution for new (empirical) data features, enabling us to make probabilistic predictions that are consistent with the observed data.

In the first step, non-invasive brain imaging data, such as T1-weighted MRI and Diffusion-weighted MRI (DW-MRI), are collected for a specific subject (Figure 1A). T1-weighted MRI images are processed to obtain brain parcellation, while DW-MRI images are used for tractography. Using the estimated fiber tracts and the defined brain regions from the parcellation, the connectome (i.e. the complete set of links between brain regions) is constructed by counting the fibers connecting all regions. The SC matrix, with entries representing the connection strength between brain regions, forms the structural component of the virtual brain which constrains the generation of brain dynamics and functional data at arbitrary brain locations (e.g. cortical and subcortical structures).

Subsequently, each brain network node is equipped with a computational model of average neuronal activity, known as neural mass models (see Figure 1B and Materials and methods). They can be represented in the generic form of a dynamical model as x˙=f(x,θ,Iinput), with the system variables x (such as membrane potential and firing rate), the control parameters θ (such as excitability), and the input current Iinput (such as stimulation). This integration of mathematical mean-field modeling (neural mass models) with anatomical information (connectome) allows us to efficiently analyze functional neuroimaging modalities at the whole-brain level.

To quantify the posterior distribution of control parameters given a set of observations, p(θx), we first need to define a plausible range for the control parameters based on background knowledge p(θ), that is a simple base distribution known as a prior. We draw random samples from the prior and provide them as input to the VBI simulator (implemented by Simulation module) to generate simulated time series associated with neuroimaging recordings, as shown in Figure 1C. Subsequently, we extract low-dimensional data features (implemented by Features module), as shown in Figure 1D for FC/FCD/PSD, to prepare the training dataset {(θi,xi)}i=1Nsim , with a budget of Nsim simulations. Then, we use a class of deep neural density estimators, such as MAF or NSF models, as schematically shown in Figure 1E, to learn all the posterior p(θx). Finally, we can readily sample from p(θxobs), which determines the probability distribution in parameter space that best explains the observed data.

Figure 2 depicts the structure of the VBI toolkit, which consists of three main modules. The first module, referred to as the Simulation module, is designed for fast simulation of whole-brain models, such as Wilson-Cowan (Wilson-Cowan model), Jansen-Rit (Jansen-Rit model), Stuart-Landau (Stuart-Landau oscillator), Epileptor (Epileptor model), Montbrió (Montbrió model), and Wong-Wang (Wong-Wang model). These whole-brain models are implemented across various numerical computing libraries such as Cupy (GPU-accelerated computing with Python), C++ (a high-performance systems programming language), Numba (a JIT compiler for accelerating Python code), and PyTorch (an open-source machine learning library for creating deep neural networks).

Figure 2 with 3 supplements see all
Flowchart of the VBI Structure.

This toolkit consists of three main modules: (1) The Simulation module, implementing various whole-brain models, such as Wilson-Cowan (WCo), Jansen-Rit (JR), Stuart-Landau (SL), Epileptor (EPi), Montbrió (MPR), and Wong-Wang (WW), across different numerical computing libraries (C++, Cupy, PyTorch, Numba). (2) The Features module, offering an extensive toolbox for extracting low-dimensional data features, such as spectral, temporal, connectivity, statistical, and information theory features. (3) The Inference module, providing neural density estimators (such as MAF and NSF) to approximate the posterior of parameters.

The second module, Features, provides a versatile tool for extracting low-dimensional features from simulated time series (see Comprehensive feature extraction). The features include, but are not limited to, spectral, temporal, connectivity, statistical, and information theory related features, and the associated summary statistics. The third module focuses on Inference, that is training the deep neural density estimators, such as MAF and NSF (see Simulation-based inference), to learn the joint posterior distribution of control parameters. See Figure 2—figure supplement 1 and Figure 2—figure supplement 2 for benchmarks comparing CPU/GPU and MAF/NSF performances, and Figure 2—figure supplement 3 for the estimation of the global coupling parameter across different whole-brain network models, evaluated under multiple configurations.

Results

In the following, we demonstrate the capability of VBI for inference on the state-of-the-art whole-brain network models using in silico testing, where the ground truth is known. We apply this approach to simulate neural activity and associated measurements, including (s)EEG/MEG and fMRI, while also providing diagnostics for the accuracy and reliability of the estimation. Note that for (s)EEG/MEG neuroimaging, we perform inference at the regional level rather than at the sensor level, whereas for fMRI, it is mapped using the Balloon-Windkessel model (see The Balloon-Windkessel model). The results presented are based on synthetic data generated using a set of predefined parameters, referred to as the ground truth, randomly selected within biologically plausible ranges and incorporating a certain level of heterogeneity.

Whole-brain network of Wilson-Cowan model

We first demonstrate inference on the whole-brain network model of the Wilson-Cowan (see Equation 1), which is capable of generating a wide range of oscillatory dynamics depending on the control parameters. Specifically, we estimate the bifurcation parameters PiR88, representing the external input to each excitatory population, and the global excitatory coupling parameter ge. Figure 3A and B present the observed and predicted EEG-like signals, represented by the activity of excitatory populations E across regions, and Figure 3C and D show the corresponding power spectral density (PSD), as data features. Figure 3E and F illustrate the inferred posterior distributions for parameters Pi and ge, respectively, given θ={ge,Pi}R89. For training, we conducted 250 k random simulations from uniform priors geU(0,3) and PiU(0,3). After approximately 2 hr of training using MAF density estimators, posterior sampling was completed within a few seconds. Due to the large number of simulations and informativeness of data features, we achieved accurate estimations of the high-dimensional and heterogeneous control parameters. Ground-truth values (shown in green) are well recovered, leading to close agreement between observed and predicted PSDs of the signals. Finally, Figure 3G reports the posterior shrinkage and z-score metrics used to evaluate the quality of the parameter estimation. The results indicate that the inferred posteriors are both precise and well-centered around the ground-truth values, as reflected by high shrinkage and low z-scores. See Figure 3—figure supplement 1 for estimation over other configurations. Moreover, Figure 3—figure supplement 2, and Figure 3—figure supplement 3, show the estimations by ignoring the spatial information in the data features, indicating the higher accuracy of NSF, though with substantially more computational cost for training compared to MAF.

Figure 3 with 3 supplements see all
Bayesian inference on heterogeneous control parameters in the whole-brain network of Wilson-Cowan model.

The set of inferred parameters is θ={G,Pi}R89, with the global scaling parameter G and average external input current to excitatory populations Pi per region, given i{1,2,...,Nn=88} parcelled regions. Summary statistics of power spectrum density (PSD) were used for training of MAF density estimators, with a budget of 260 k simulations. (A) and (B) illustrate the observed and predicted neural activities, respectively. (C) and (D) show the observed and predicted PSDs as the data features. (E) and (F) display the posterior distribution of Pi per region, and global coupling G, respectively. The ground truth and prior are represented by a vertical green line and a blue distribution, respectively. (G) shows the inference evaluation using posterior shrinkage and z-score.

Whole-brain network of Jansen-Rit model

Then, we demonstrate the inference on heterogeneous control parameters in the whole-brain network of Jansen-Rit (see Equation 2), commonly used for modeling EEG/MEG data, for example in dementia and Alzheimer’s disease (Triebkorn et al., 2022; Stefanovski et al., 2019). Figure 4A and B show the observed and predicted EEG signals, given by y1iy2i at each region, while Figure 4C and D illustrate the observed and predicted features such as PSD, respectively. Figure 4E and F show the estimated posterior distributions of synaptic connections Ci, and the global coupling parameter G, respectively, given the set of unknown parameters θ={G,Ci}R89. Here we conducted 50 k random simulations with samples drawn from uniform priors GU(0,5) and CiU(100,650). After approximately 45 min of training (MAF density estimator), the posterior sampling took only a few seconds. With such a sufficient number of simulations and informative data features, VBI shows accurate estimation of high-dimensional heterogeneous parameters (given the ground truth, shown in green), leading to a strong correspondence between the observed and predicted PSD of EEG/MEG data. Figure 4G displays the shrinkage and z-score as the evaluation metrics, indicating an ideal Bayesian estimation for Ci parameters, but not for the coupling parameter G. This occurred because the network input did not induce a significant change in the intrinsic frequency of activities at the regional level, resulting in diffuse uncertainty in its estimation for this model.

Figure 4 with 1 supplement see all
Bayesian inference on heterogeneous control parameters in the whole-brain network of the Jansen-Rit model.

The set of inferred parameters is θ={G,Ci}R89, with the global scaling parameter G and average numbers of synapse between neural populations Ci per region, given i{1,2,...,Nn=88} parcelled regions. Summary statistics of power spectrum density (PSD) were used for training, with a budget of 50 k simulations. (A) and (B) illustrate the observed and predicted neural activities, respectively. (C) and (D) show the observed and predicted data features, such as PSD. (E) and (F) display the posterior distribution of Ci per region, and global coupling G, respectively. The ground truth and prior are represented by vertical green lines and a blue distribution, respectively. (G) shows the inference evaluation using the shrinkage and z-score of the estimated posterior distributions.

Note that relying on only alpha-peak while excluding other summary statistics, such as total power (i.e., area under the curve), leads to poor estimation of synaptic connections across brain regions (see Figure 4—figure supplement 1). This results in less accurate predictions of the PSD, with more dispersion in their amplitudes. This example demonstrates that VBI provides a valuable tool for hypothesis evaluation and improved insight into data features by uncertainty quantification and their impact on predictions.

Whole-brain network of Stuart-Landau oscillators

To demonstrate efficient inference on the whole-brain time delay from EEG/MEG data, we used a whole-brain network model of coupled generic oscillators (see Equation 3). This model could establish a causal link between empirical spectral changes and the slower conduction velocities observed in multiple sclerosis patients, resulting from immune system attacks on the myelin sheath (Wang et al., 2024; Mazzara et al., 2025). The parameter set to estimate is θ={G,V}R2, consisting of the global scaling parameter G and the averaged velocity of signal transmission V . The training was performed using a budget of only 2 k simulations, which was sufficient due to the low dimensionality of the parameter space. Figure 5A illustrates the comparison between observed (in green) and predicted neural activities (in red). Figure 5B shows a close agreement between observed and predicted PSD signals, as the data feature used for training. Figure 5C and D provide visualizations of the posterior distributions for the averaged velocity V and the global coupling G. In these panels, we can see a large shrinkage in the posterior (in red) from the uniform prior (in blue) centered around the true values (vertical green lines). Importantly, Figure 5E presenting the joint posterior distribution indicates a high correlation of ρ=0.7 between parameters G and V. This illustrates the advantage of Bayesian estimation in identifying statistical relationships between parameters, which helps to detect degeneracy among them. This is crucial for causal hypothesis evaluation and guiding conclusions in clinical settings. Finally, Figure 5F illustrates the sensitivity analysis (based on the eigenvalues of the posterior distribution), revealing that the posterior is more sensitive to changes in V compared to G. This highlights the relative impact of these parameters on the model’s posterior estimates.

Bayesian inference on global scaling parameter G and the averaged velocity V of signal transmission using the whole-brain network model of Stuart-Landau oscillators.

The set of estimated parameters is θ={G,V}R2, and the summary statistics of PSD signals with a budget of 2 k simulations were used for training. (A) illustrates exemplary observed and predicted neural activities (in green and red, respectively). (B) shows the observed and predicted PSD signals (in green and red, respectively). (C) and (D) display the posterior distribution of averaged velocity V and global coupling G, respectively. The true values and prior are shown as vertical green lines and a blue distribution, respectively. (E) shows the joint posterior distribution indicating a high correlation between posterior samples. (F) illustrates the sensitivity analysis based on the eigenvalues of the posterior distribution.

Whole-brain network of Epileptor model

Next, we demonstrate the inference on a whole-brain model of epilepsy spread, known as the Virtual Epileptic Patient (VEP; Jirsa et al., 2017; Hashemi et al., 2020), used to delineate the epileptogenic and propagation zone networks from the invasive sEEG recordings (see Equation 4). Here, we used a large value for system time constant τ=90ms to generate slow-fast dynamics in pathological areas, corresponding to seizure envelope at each brain region. Figure 6 demonstrates the inference of the set of inferred parameters θ={G,ηi}R89, with the global scaling parameter G and spatial map of epileptogenicity ηi, given i{1,2,...,Nn=88} parcelled regions. Figure 6A and B show the observed and predicted envelope, respectively, at each brain region. Here, the whole brain regions are classified into two epileptogenic zones (in red, corresponding to high excitability), three propagation zones (in yellow, corresponding to excitability close to bifurcation), and the rest as healthy regions (in green, corresponding to low excitability). Figure 6C and D illustrate the observed and predicted data features as the total power energy per region, calculated as the area under the curve. Additionally, the seizure onset at each region was used as a data feature for training the MAF density estimator. From these panels, we observe accurate recovery of seizure envelopes in pathological regions. Figure 6E and F show that the posterior distribution of heterogeneous ηi, and global coupling parameter G, respectively, indicating 100% accurate recovery of the true values (in green). Figure 6G confirms the reliability and accuracy of the estimates through shrinkage and z-score diagnostics. With our efficient implementation, generating 10 k whole-brain simulations took less than a minute (using 10 CPU cores). The training took approximately 13 min to converge, while posterior sampling required only a few seconds. See Figure 6—figure supplement 1 for a similar analysis with a slower time scale separation (τ=10ms). These results demonstrate an ideal and fast Bayesian estimation, despite the stiffness of equations in each region and the high dimensionality of the parameters. See Figure 6—figure supplement 2 and Figure 6—figure supplement 3 showing the accuracy and reliability of estimation under different levels of additive and dynamical noise. Note that for the VEP model, the total integration time is less than 100 ms, and due to the model’s stable behavior and a large time step integration, the simulation cost is significantly lower compared to other whole-brain models.

Figure 6 with 3 supplements see all
Bayesian inference on the spatial map of epileptogenicity across brain regions in the VEP model.

The set of inferred parameters is θ={G,ηi}R89, as the global scaling parameter and spatial map of epileptogenicity with i{1,2,...,Nn=88} parcelled regions. (A) The observed seizure envelope generated by the Epileptor model, given two regions as epileptogenic zones (in red) and three regions as propagation zones (in yellow), while the rest are healthy (in green). (B) The predicted seizure envelope, by training MAF model on a dataset containing 10 k simulations, using only the total power and seizure onset per region as the data features. (C) and (D) show the observed and predicted data features, respectively. (E) and (F) show the posterior distributions of heterogeneous control parameters ηi, and global coupling parameter G, respectively. (G) The posterior z-scores versus posterior shrinkages for estimated parameters.

Whole-brain network of Montbrió model

Targeting the fMRI data, we demonstrate the inference on the whole-brain dynamics using Montbrió model (see Equation 5). Figure 7 demonstrates the inference on heterogeneous control parameters of the Montbrió model, operating in a bistable regime. Figure 7A and B show the observed and predicted BOLD time series, respectively, while Figure 7C and D illustrate the observed and predicted data features, such as the static and dynamical functional connectivity matrices (FC and FCD, respectively). Figure 7E and F show the estimated posterior distributions of excitability ηi per brain region, and the global coupling parameter G. Figure 7G displays the reliability and accuracy of estimation through the evaluation of posterior shrinkage and z-score (see Equation 13 and Equation 14). See Figure 7—figure supplement 1 for estimation over different configurations of the ground-truth values in this model.

Figure 7 with 7 supplements see all
Bayesian inference on heterogeneous control parameters in the whole-brain dynamics using the Montbrió model.

The set of inferred parameters is θ={G,ηi}R89, as the global scaling parameter and excitability per region, with i{1,2,...,Nn=88} parcelled regions. VBI provides accurate and reliable posterior estimation using both spatio-temporal and functional data features for training, with a budget of 500 k simulations. (A) and (B) illustrate the observed and predicted BOLD signals, respectively. (C) and (D) show the observed (upper triangular) and predicted (lower triangular) data features (FC and FCD), respectively. (E) and (F) display the posterior distribution of excitability parameters ηi per region, and global coupling G, respectively. The true values and prior are shown as vertical green lines and a blue distribution, respectively. (G) shows the inference evaluation by the shrinkage and z-score of the posterior distributions.

Due to the large number of simulations for training and the informativeness of the data features (both spatio-temporal and functional data features), the results indicate that we achieved accurate parameter estimation and, consequently, a close agreement between the observed and predicted features of BOLD data. This required 500 k simulations for training, given the uniform priors GU(0,1) and ηiU(6,3.5). After approximately 10 h of training (of MAF density estimator), posterior sampling took only 1 min. Our results indicate that training the MAF model was two to four times faster than the NSF model. This showcase demonstrates the capability of VBI in inferring heterogeneous excitability, given the bistable brain dynamics, for fMRI studies. Note that removing the spatio-temporal features and considering only FC/FCD as the data features (see Figure 7—figure supplement 2) leads to poor estimation of the excitability parameter across brain regions (see Figure 7—figure supplement 3). Interestingly, accurate estimation of the only global coupling parameter, θ={G}R1, from only FC/FCD requires around 100 simulations (see Figure 7—figure supplement 4 and Figure 7—figure supplement 5). See Figure 7—figure supplement 6 and Figure 7—figure supplement 7 showing the accuracy and reliability of estimation under different levels of additive and dynamical noise.

Whole-brain network of Wong-Wang model

Finally, in Figure 8, we show the inference on the so-called parameterized dynamics mean-field (pDMF) model, that is a whole-brain network model of the reduced Wong-Wang equation (see Equation 6 and Equation 7), comprising 10 control parameters: the global scaling of connections G and the linear coefficients (aw,bw,cw,aI,bI,cI,aσ,bσ,cσ)R9. These parameters are introduced to reduce the dimension of whole-brain parameters as recurrent connection strength wi, external input current Ii, and noise amplitude σi for each region (in total, 264 parameters were reduced to 9 dimensions; see Equation 7). Here, we used summary statistics of both spatio-temporal and functional data features extracted from simulated BOLD data to train the MAF density estimator, with a budget of 200 k simulations. The training took around 160 min to converge, whereas posterior sampling took only a few seconds.

Figure 8 with 3 supplements see all
Bayesian inference on the parametric mean-field model of Wong-Wang (also known as pDMF model), with linear coefficients (aw,bw,cw,aI,bI,cI,aσ,bσ,cσ)R9, reparameterizing the recurrent connection strength wi, external input current Ii, and noise amplitude σi for each region.

Summary statistics of spatio-temporal and functional data features were used for training, with a budget of 200 k simulations. (A) The diagonal panels display the ground-true values (in green), the uniform prior (in blue), and the estimated posterior distributions (in red). The upper diagonal panels illustrate the joint posterior distributions between parameters, along with their correlation (ρ, in the upper left corners), and ground-truth values (green stars). High-probability areas are color-coded in yellow, while low-probability areas are shown in black. (B) The observed and predicted BOLD time series (in green and red, respectively). (C) The observed and predicted data features, such as FC/FCD matrices. (D) The inference evaluation by calculating the shrinkage and z-score of the estimated posterior distributions.

The diagonal panels in Figure 8A show estimated posterior distributions (in red), along with the prior (in blue), and true values (in green). The upper diagonal panels illustrate the joint posterior distributions between parameters (i.e. statistical dependency between parameters). Figure 8B illustrates the observed and predicted BOLD time series, generated by true and estimated parameters (in blue and red, respectively). From Figure 8C, we can see a close agreement between the observed and predicted data features (FC/FCD matrices). Note that due to the stochastic nature of the generative process, we do not expect an exact element-wise correspondence between these features, but rather a match in their summary statistics, such as the mean, variance, and higher order moments (see Figure 8—figure supplement 1). Figure 8D shows the posterior z-score versus shrinkage, indicating less accurate estimation for the coefficients cw, cI, and cσ compared to others, as they are not informed by anatomical data such as the T1w/T2w myelin map and the first FC principal gradient (see Equation 7). This showcase demonstrates the advantage of Bayesian inference over optimization in assessing the accuracy and reliability of parameter estimation, whether informed by anatomical data.

Note that in the whole-brain network of the Wong-Wang model, the global scaling parameter G and synaptic coupling J exhibit structural non-identifiability, meaning their combined effects on the system cannot be uniquely disentangled (see Figure 8—figure supplement 2, and Figure 8—figure supplement 3). This is evident in the parameter estimations corresponding to selected observations, where the posterior distributions appear diffuse. The joint posterior plots reveal a nonlinear dependency (banana shape) between G and J, arising from their product in the neural mass equation (see Equation 6). Such a nonlinear relationship between parameters poses challenges for deriving causal conclusions, as often occurs in other neural mass models. This is a demonstration of how Bayesian inference facilitates causal hypothesis testing without requiring additional non-identifiability analysis.

Discussion

This study introduces the VBI, a flexible and integrative toolkit designed to facilitate probabilistic inference on complex whole-brain dynamics using connectome-based models (forward problem) and SBI (inverse problem). The toolkit leverages high-performance programming languages (C++) and dynamic compilers (such as Python’s JIT compiler), alongside the computational power of parallel processors (GPUs), to significantly enhance the speed and efficiency of simulations. Additionally, VBI integrates popular feature extraction libraries with parallel multiprocessing to efficiently convert simulated time series into low-dimensional summary statistics. Moreover, VBI incorporates state-of-the-art deep neural density estimators (such as MAF and NSF generative models) to estimate the posterior density of control parameters within whole-brain models given low-dimensional data features. Our results demonstrated the versatility and efficacy of the VBI toolkit across commonly used whole-brain network models, such as Wilson-Cowan, Jansen-Rit, Stuart-Landau, Epileptor, Montbrió, and Wong-Wang equations placed at each region. The ability to perform parallel and rapid simulations, coupled with a taxonomy of feature extraction, allows for detailed and accurate parameter estimation from associated neuroimaging modalities such as (s)EEG/MEG/fMRI. This is crucial for advancing our understanding of brain dynamics and the underlying mechanisms of various brain disorders. Overall, VBI represents a substantial improvement over alternative methods, offering a robust framework for both simulation and parameter estimation and contributing to the advancement of network neuroscience, potentially, to precision medicine.

The alternatives for parameter estimation include optimization techniques (Hashemi et al., 2018; Wang et al., 2019; Kong et al., 2021; Cabral et al., 2022; Liu et al., 2023), approximate Bayesian computation (ABC) method, and MCMC sampling (Jha et al., 2022). Optimization techniques are sensitive to the choice of the objective function (e.g. minimizing distance error or maximizing correlation) and do not provide estimates of uncertainty. Although multiple runs and thresholding can be used to address these issues, such methods often fall short in revealing relationships between parameters, such as identifying degeneracy, which is crucial for reliable causal inference. Alternatively, a technique known as ABC compares observed and simulated data using a distance measure based on summary statistics (Beaumont et al., 2002; Beaumont, 2010; Sisson et al., 2018). It is known that ABC methods suffer from the curse of dimensionality, and their performance also depends critically on the tolerance level in the accepted/rejected setting (Gonçalves et al., 2020; Cranmer et al., 2020). The self-tuning variants of MCMC sampling have also been used for model inversion at the whole-brain level (Hashemi et al., 2020; Hashemi et al., 2021). Although MCMC is unbiased and exact with infinite runs, it can be computationally prohibitive, and sophisticated reparameterization methods are often required to facilitate convergence at whole-brain level (Jha et al., 2022; Baldy et al., 2023). This becomes more challenging for gradient-based MCMC algorithms, due to the bistability and stiffness of neural mass models. Tailored to Bayes’ rule, SBI sidesteps these issues by relying on expressive deep neural density estimators (such as MAF and NSF) on low-dimensional data features to efficiently approximate the posterior distribution of model parameters. Taking spiking neurons as generative models, this approach has demonstrated superior performance compared to alternative methods, as it does not require model or data features to be differentiable (Gonçalves et al., 2020; Baldy et al., 2024).

In previous studies, we demonstrated the effectiveness of SBI on virtual brain models of neurological (Hashemi et al., 2023; Wang et al., 2024; Mazzara et al., 2025; Mazzara et al., 2025), and neurodegenerative diseases (Hashemi et al., 2024; Yalçınkaya et al., 2023; Hashemi et al., 2025) as well as focal intervention (Rabuffo et al., 2025) and healthy aging (Lavanga et al., 2023). In this work, we extended this probabilistic methodology to encompass a broader range of whole-brain network models, highlighting its flexibility and scalability in leveraging diverse computational resources, from CPUs/GPUs to high-performance computing facilities.

Our results indicated that the VBI toolkit effectively estimates posterior distributions of control parameters in whole-brain network modeling, offering a deeper understanding of the mechanisms underlying brain activity. For example, using the Montbrió and Wong-Wang models, we achieved a close match between observed and predicted FC/FCD matrices derived from BOLD time series (Figures 7 and 8). Additionally, the Jansen-Rit and Stuart-Landau models provided accurate inferences of PSD from neural activity (Figures 4 and 5), while the Epileptor model precisely captured the spread of seizure envelopes (Figure 6). These results underscore the toolkit’s capability to manage complex, high-dimensional data with precision. Uncertainty quantification using VBI can illuminate and combine the informativeness of data features (e.g., FC/FCD) and reveal the causal drivers behind interventions (Lavanga et al., 2023; Hashemi et al., 2024; Rabuffo et al., 2025). This adaptability ensures that VBI can be applied across various (source-localized) neuroimaging modalities, accommodating different computational capabilities and research needs.

Note that there is no specific rule for determining the optimal number of simulations required for training. In general, a larger number of simulations, depending on the available computational resources, tends to improve the quality of posterior estimation. However, when using synthetic data, we can monitor the z-score and posterior shrinkage to assess the accuracy and reliability of the inferred parameters. This also critically depends on the parameter dimensionality. For instance, in estimating only global coupling parameter, a maximum of 300 simulations was used, demonstrating accurate estimation across models and different configurations (see Figure 2—figure supplement 3), except for the Jansen-Rit model, where coupling did not induce a significant change in the intrinsic frequency of regional activity. Importantly, the choice of data features is critical, and some factors (e.g. that lead to inaccurate feature calculation) can lead to the collapse of this method. For instance, high noise levels in observations or dynamical noise can compromise the accurate calculation of data features, undermining the inference process (see Figure 6—figure supplement 2, Figure 6—figure supplement 3, Figure 7—figure supplement 6, Figure 7—figure supplement 7). Identifying the set of low-dimensional data features that are relevant to the control parameters for each case study is another challenge in effectively applying SBI. Nevertheless, the uncertainty of the posterior informs us about the predictive power of these features. Statistical moments of time series could be effective candidates for most models. However, this poses a formidable challenge for inference from empirical data, as certain moments, such as the mean and variance, may be lost during preprocessing steps. The hyperparameter and noise estimation can also be challenging for SBI. Moreover, there is no established rule for determining the number of simulations for training, aside from relying on z-score values during in silico testing, as it depends on available computational resources.

Various sequential methods, such as SNPE (Greenberg et al., 2019), SNLE (Lueckmann et al., 2019), and SNRE (Durkan et al., 2020), have been proposed to reduce computational costs of SBI by iteratively refining the fit to specific targets. These approaches aim for more precise parameter estimation by progressively adjusting the model based on each new data set or subset, potentially enhancing the accuracy of the fit at the reduced computational effort. The choice of method depends on the specific characteristics and requirements of the problem being addressed (Lueckmann et al., 2021). Our previous study indicates that for inferring whole-brain dynamics of epilepsy spread, the SNPE method outperforms alternative approaches (Hashemi et al., 2023). Nevertheless, sequential methods can become unstable, with simulators potentially diverging and causing probability mass to leak into regions that lack prior support (Hashemi et al., 2023). In this study, we used single-round training to benefit from an amortization strategy. This approach brings the costs of simulation and network training upfront, enabling inference on new data to be performed rapidly (within seconds). This strategy facilitates personalized inference at the subject level, as the generative model is tailored by the SC matrix, thereby allowing for rapid hypothesis evaluation specific to each subject (e.g. in delineating the epileptogenic and propagation zones). Note that model comparison across different configurations or model structures, as well established in dynamic causal modeling (Penny et al., 2004; Penny, 2012; Baldy et al., 2025), has yet to be explored in this context.

Deep learning algorithms are increasingly gaining traction in the context of whole-brain modeling. The VBI toolkit leverages a class of deep generative models, called Normalizing Flows (NFs; Rezende and Mohamed, 2015; Kobyzev et al., 2019), to model probability distributions given samples drawn from those distributions. Using NFs, a base probability distribution (e.g. a standard normal) is transformed into any complex distribution (potentially multi-modal) through a sequence of invertible transformations. Variational autoencoders (VAEs; Kingma et al., 2014; Doersch, 2016) are a class of deep generative models to encode data into a latent space and then decode it back to reconstruct the original data. Recently, Sip et al., 2023 introduced a method using VAEs for nonlinear dynamical system identification, enabling the inference of neural mass models and region- and subject-specific parameters from functional data. VAEs have also been employed for dimensionality reduction of whole-brain functional connectivity (Perl et al., 2023b), and to investigate various pathologies and their severity by analyzing the evolution of trajectories within a low-dimensional latent space (Perl et al., 2023a). Additionally, Generative Adversarial Networks (GANs; Goodfellow et al., 2014; Creswell et al., 2018) have demonstrated remarkable success in mapping latent space to data space by learning a manifold induced from a base density (Liu et al., 2021). This method merits further exploration within the context of whole-brain dynamics. To fully harness the potential of deep generative models in large-scale brain network modeling, integrating VAEs and GANs into the VBI framework would be beneficial. This will elucidate their strengths and limitations within this context and guide future advancements in the field.

In summary, VBI offers fast simulations, taxonomy of feature extraction, and deep generative models, making it a versatile tool for model-based inference from different neuroimaging modalities, helping researchers to explore brain (dys)functioning in greater depth. This advancement not only enhances our theoretical understanding but also holds promise for practical applications in diagnosing and treating neurological conditions.

Materials and methods

The virtual brain models

To build a virtual brain model (see Figure 1), the process begins with parcellating the brain into regions using anatomical data, typically derived from T1-MRI scans. Each region, represented as nodes in the network, is then equipped with a neural mass model to simulate the collective behavior of neurons within that area. These nodes are interconnected using a structural connectivity (SC) matrix, typically obtained from diffusion-weighted magnetic resonance imaging (DW-MRI). The connectome was built with TVB-specific reconstruction pipeline using generally available neuroimaging software (Schirner et al., 2015). The entire network of interconnected nodes is then simulated using neuroinformatic tools, such as The Virtual Brain (TVB; Sanz-Leon et al., 2015), generating neural activities at the source level. However, neural sources are not directly observable in real-world experiments, and a projection needs to be established to transform the simulated neural activity into empirically measurable quantities, such as (s)EEG, MEG, and fMRI. This approach offers insights into both normal brain function and neurological disorders (Hashemi et al., 2025). In the following, we describe commonly used whole-brain network models at the source level, which can be mapped to different types of neuroimaging recordings. Note that each model represents one of many possible variants used in the literature, and the choice of model often depends on the specific research question, the spatial and temporal resolution of the available data, and the desired level of biological or mathematical detail.

Wilson-Cowan model

Request a detailed protocol

The Wilson-Cowan model (Wilson and Cowan, 1972) is a seminal neural mass model that describes the dynamics of connected excitatory and inhibitory neural populations, at cortical microcolumn level. It has been widely used to understand the collective behavior of neurons and simulate neural activities recorded by methods such as local field potentials (LFPs) and EEG. The model effectively captures phenomena such as oscillations, wave propagation, pattern formation in neural tissue, and responses to external stimuli, offering insights into various brain (dys)functions, particularly in Parkinson’s disease (Duchet et al., 2021; Sermon et al., 2023).

The Wilson-Cowan model describes the temporal evolution of the mean firing rates of excitatory (E) and inhibitory (I) populations using nonlinear differential equations. Each population’s activity is governed by a balance of self-excitation, cross-inhibition, external inputs, and network interactions through long-range coupling. The nonlinearity arises from a sigmoidal transfer function Si,e(x), which maps the total synaptic input to the firing rate, capturing saturation effects and thresholds in neural response. In the whole-brain network extension, each neural population at node i receives input from other nodes via a weighted connectivity matrix, allowing the study of large-scale brain dynamics and spatial pattern formation (Wilson and Cowan, 1972; Wilson and Cowan, 1973; Daffertshofer and van Wijk, 2011):

(1) τedEkdt=Ek+(kereEk)Se(αe(ceeEkceiIk+Pkθe+gelSCklEl))+σξk(t),τidIkdt=Ik+(kiriIk)Si(αi(cieEkciiIk+Qkθi+gilSCklIl))+σξk(t),Sk(x)={ck(11+eak(xbk)11+eakbk),if shifted,ck1+eak(xbk),otherwise,k=i,e

which incorporates both local dynamics and global interactions, modulated by coupling strengths and synaptic weights. Here, SCkl is an element of the (non)symmetric structural connectivity matrix and is nonzero if there is a connection between regions k and l. The nominal parameter values and the prior range for the target parameters are summarized in Table 1.

Table 1
Parameter descriptions for capturing whole-brain dynamics using the Wilson-Cowan neural mass model.
ParameterDescriptionValuePrior
ceeExcitatory to excitatory synaptic strength16.0
ceiInhibitory to excitatory synaptic strength12.0
cieExcitatory to inhibitory synaptic strength15.0
ciiInhibitory to inhibitory synaptic strength3.0
τeTime constant of excitatory population8.0
τiTime constant of inhibitory population8.0
aeSigmoid slope for excitatory population1.3
aiSigmoid slope for inhibitory population2.0
beSigmoid threshold for excitatory population4.0
biSigmoid threshold for inhibitory population3.7
ceMaximum output of sigmoid for excitatory population1.0
ciMaximum output of sigmoid for inhibitory population1.0
θeFiring threshold for excitatory population0.0
θiFiring threshold for inhibitory population0.0
reRefractoriness of excitatory population1.0
riRefractoriness of inhibitory population1.0
keScaling constant for excitatory output0.994
kiScaling constant for inhibitory output0.999
αeGain of excitatory population1.0
αiGain of inhibitory population1.0
PExternal input to excitatory population0.0U(0,3)
QExternal input to inhibitory population0.0U(0,3)
geGlobal coupling strength (excitatory)0.0U(0,1)
giGlobal coupling strength (inhibitory)0.0U(0,1)
σStandard deviation of Gaussian noise0.005

Jansen-Rit model

Request a detailed protocol

The Jansen-Rit neural mass model has been widely used to simulate physiological signals from various recording methods like intracranial LFPs and scalp MEG/EEG recordings. For example, it has been shown to recreate responses similar to evoked-related potentials after a series of impulse stimulations (David and Friston, 2003; David et al., 2006), generating high-alpha and low-beta oscillations, with added recurrent inhibitory connections and spike-rate modulation (Moran et al., 2007), and also seizure patterns similar to those seen in temporal lobe epilepsy (Wendling et al., 2001). This biologically motivated model comprises three main populations of neurons: excitatory pyramidal neurons, inhibitory interneurons, and excitatory interneurons. These populations interact with each other through synaptic connections, forming a feedback loop that produces oscillatory activity governed by a set of nonlinear ordinary differential equations (Jansen and Rit, 1995; David and Friston, 2003; Daffertshofer and van Wijk, 2022):

(2) y˙0i(t)=y3i(t);y˙1i(t)=y4i(t);y˙2i(t)=y5i(t)y˙3i(t)=AaS(y1i(t)y2i(t))2ay3i(t)a2y0i(t)y˙4i(t)=Aa(P(t)+C2S(C1y0i(t))+GHi)2ay4i(t)a2y1i(t)y˙5i(t)=Bb(C4S(C3y0i(t)))2by5i(t)b2y2i(t)S(ν)=vmax1+exp(r(v0ν))Hi=j=1NSCijS(y1jy2j)

where y0i, y1i, and y2i denote the average membrane potentials of pyramidal cells, excitatory interneurons, and inhibitory interneurons, respectively. Their corresponding time derivatives, y3i(t), y4i(t), and y5i(t), represent the rates of change of these membrane potentials. P(t) also represents an external input current. The sigmoid function S(x) maps the average membrane potential of neurons to their mean action potential firing rate. SC is a normalized structural connectivity matrix. The model’s output at ith region corresponds to the membrane potential of pyramidal cells and is given by y1iy2i. The nominal parameter values and the prior range for the target parameters are summarized in Table 2.

Table 2
Parameter descriptions for capturing whole-brain dynamics using Jansen-Rit neural mass model.

EP: excitatory populations, IP: inhibitory populations, PSP: post synaptic potential, PSPA: post synaptic potential amplitude.

ParametersDescriptionValuePrior
AExcitatory PSPA3.25 mV
BInhibitory PSPA22 mV
1/aTime constant of excitatory PSPa=100s1
1/bTime constant of inhibitory PSPb=50s1
C1,C2Average numbers of synapses between EP1C,0.8C
C3,C4Average numbers of synapses between IP0.25C
vmaxMaximum firing rate5 Hz
v0Potential at half of maximum firing rate6 mV
rSlope of sigmoid function at v00.56mV1
CAverage numbers of synapses between neural populations135U(100,500)
GScaling the strength of network connections1.5U(0,5)

Stuart-Landau oscillator

Request a detailed protocol

The Stuart-Landau oscillator (Selivanov et al., 2012) is a generic mathematical model used to describe oscillatory phenomena, particularly those near a Hopf bifurcation, which is often employed to study the nonlinear dynamics of neural activity (Deco et al., 2017; Petkoski and Jirsa, 2019; Cabral et al., 2022; Wang et al., 2024). One approach uses this model to capture slow hemodynamic changes in BOLD signal (Deco et al., 2017), while others apply it to model fast neuronal dynamics, which can be linked directly to EEG/MEG data (Petkoski and Jirsa, 2019; Cabral et al., 2022; Wang et al., 2024). Note that this is a phenomenological framework, and both applications operate on completely different time scales.

In the network, each brain region, characterized by an autonomous Stuart-Landau oscillator, can exhibit either damped or limit-cycle oscillations depending on the bifurcation parameter a. If a<0, the system shows damped oscillations, similar to a pendulum under friction. In this regime, the system, when subjected to perturbation, relaxes back to its stable fixed point through damped oscillations with an angular frequency ω0. The rate of amplitude damping is determined by |a|. Conversely, if a>0 , the system supports limit cycle solutions, allowing for self-sustained oscillations even in the absence of external noise. At a critical value of a=0, the system undergoes a Hopf bifurcation, that is small changes in parameters can lead to large variations in the system’s behavior.

Using whole-brain network modeling of EEG/MEG data (Sorrentino et al., 2024; Cabral et al., 2022), the oscillators are interconnected via white-matter pathways, with coupling strengths specified by subject-specific DTI fiber counts, that is elements of SC matrix. This adjacency matrix is then scaled by a global coupling parameter G. Note that coupling between regions accounts for finite conduction times, which are often estimated by dividing the Euclidean distances between nodes by an average conduction velocity Tjk=djk/v. Knowing the personalized time-delays (Lemaréchal et al., 2022; Sorrentino et al., 2022), we can use the distance as a proxy, assuming a constant propagation velocity. The distance itself can be defined as either the length of the tracts or the Euclidean distance. Taking this into account, the activity of each region is given by a set of complex differential equations:

(3) Z˙j=Zj(a+iωj|Zj|2)+Gk=1NSCjk[Zk(tTjk)Zj(t)]+σ(ξj1(t)+iξj2(t))

where Z is a complex variable, and Re[Z(t)] is the corresponding time series. In this particular realization, each region has a natural frequency of 40 Hz (ωj=ω0=2π40rad/s), motivated by empirical studies demonstrating the emergence of gamma oscillations from the balance of excitation and inhibition, playing a role in local circuit computations (Funk and Epstein, 2004).

In this study, for the sake of simplicity, a common cortico-cortical conduction velocity is estimated, that is the distance-dependent average velocities vjk=v. We also consider a=5, capturing the highly variable amplitude envelope of gamma oscillations as reported in experimental recordings (Buzsáki and Wang, 2012; Cabral et al., 2022). This choice also best reflects the slowest decay time constants of GABAB inhibitory receptors–approximately 1 s (Schnitzler and Gross, 2005). A Gaussian noise (here denoted by ξi) with an intensity of σ=104 is added to each oscillator to mimic stochastic fluctuations. The nominal parameter values and the prior range for the target parameters are summarized in Table 3.

Table 3
Parameter descriptions for capturing whole-brain dynamics using Stuart-Landau oscillator.
ParametersDescriptionValuePrior
aBifurcation parameter-5
ωiNatural angular frequency2π40rad/s
σNoise factor10-4
vAverage conduction velocity6.0 m/sU(1,30)
GGlobal coupling parameter350U(0,400)

Epileptor model

Request a detailed protocol

In personalized whole-brain network modeling of epilepsy spread (Jirsa et al., 2017), the dynamics of each brain region are governed by the Epileptor model (Jirsa et al., 2014). The Epileptor model provides a comprehensive description of epileptic seizures, encompassing the complete taxonomy of system bifurcations to simultaneously reproduce the dynamics of seizure onset, progression, and termination (Saggio et al., 2020). The full Epileptor model comprises five state variables that couple two oscillatory dynamical systems operating on three different time scales (Jirsa et al., 2014). Then, motivated by Synergetic theory (Haken, 1977; Jirsa and Haken, 1997) and under time-scale separation (Proix et al., 2014), the fast variables rapidly collapse on the slow manifold McIntosh and Jirsa, 2019, whose dynamics is governed by the slow variable. This adiabatic approximation yields the 2D reduction of whole-brain model of epilepsy spread, also known as the VEP, as follows:

(4) x˙i=1xi32xi2zi+Iiz˙i=1τ(4(xiηi)ziGj=1NSCij(xjxi)),

where and indicate the fast and slow variables corresponding to brain region, respectively, and the set of unknowns is the spatial map of epileptogenicity to be estimated. SC is a normalized structural connectivity matrix. In real-world epilepsy applications (Hashemi et al., 2023; Hashemi et al., 2021; Wang et al., 2023b), we compute the envelope function from sEEG data to perform inference. The nominal parameter values and the prior range for the target parameters are summarized in Table 4.

Table 4
Parameter descriptions for capturing whole-brain dynamics using 2D Epileptor neural mass model.
ParameterDescriptionValuePrior
IInput electric current3.1
τSystem time constant90ms
ηiSpatial map of epileptogenicity–3.65U(5,1)
GGlobal scaling factor on network connections1.0U(0,2)

Montbrió model

Request a detailed protocol

The exact macroscopic dynamics of a specific brain region (represented as a node in the network) can be analytically derived in thermodynamic limit of infinitely all-to-all coupled spiking neurons (Montbrió et al., 2015) or Θ neuron representation (Byrne et al., 2020). By assuming a Lorentzian distribution on excitabilities in large ensembles of quadratic integrate-and-fire neurons with synaptic weights J and a half-width Δ centered at η, the macroscopic dynamics has been derived in terms of the collective firing activity and mean membrane potential (Montbrió et al., 2015). Then, by coupling the brain regions via an additive current (e.g. in the average membrane potential equations), the dynamics of the whole-brain network can be described as follows (Rabuffo et al., 2025):

(5) τr˙i(t)=2ri(t)vi(t)+Δπττv˙i(t)=vi2(t)(πτri(t))2+Jτri(t)+η+Gj=1NSCijrj(t)+Istim(t)+ξ(t),

where vi and ri are the average membrane potential and firing rate, respectively, at the ith brain region, and parameter G is the network scaling parameter that modulates the overall impact of brain connectivity on the state dynamics. The SCij denotes the connection weight between ith and jth regions, and the dynamical noise ξ(t)N(0,σ2) follows a Gaussian distribution with mean zero and variance σ2.

The model parameters are tuned so that each decoupled node is in a bistable regime, exhibiting a down-state stable fixed point (low-firing rate) and an up-state stable focus (high-firing rate) in the phase space (Montbrió et al., 2015; Baldy et al., 2024). Bistability is a fundamental property of regional brain dynamics to ensure a switching behavior in the data (e.g. to generate FCD), that has been recognized as representative of realistic dynamics observed empirically (Rabuffo et al., 2021; Breyton et al., 2023; Fousek et al., 2024; Rabuffo et al., 2025). The solution of the coupled system yields a neuroelectric dataset that describes the evolution of the variables (ri(t),vi(t)) in each brain region i, providing measures of macroscopic activity. The surrogate BOLD activity for each region is then derived by filtering this activity through the Balloon-Windkessel model (Friston et al., 2000). The input current Istim represents the stimulation to selected brain regions, which increase the basin of attraction of the up-state in comparison to the down-state, while the fixed points move farther apart (Rabuffo et al., 2021; Breyton et al., 2023; Hashemi et al., 2024; Rabuffo et al., 2025). The nominal parameter values and the prior range for the target parameters are summarized in Table 5.

Table 5
Parameter descriptions for capturing whole-brain dynamics using Montbrió model.
ParameterDescriptionNominal valuePrior
τCharacteristic time constant1 ms
JSynaptic weight14.5ms-1
ΔSpread of the heterogeneous noise distribution0.7ms-1
Istim(t)Input current representing stimulation0.0
σGaussian noise variance0.037
ηExcitability–4.6U(6,3.5)
GScaling the strength of network connections0.56U(0,1)

Wong-Wang model

Request a detailed protocol

Another commonly used whole-brain model for simulation of neural activity is the so-called parameterized dynamics mean-field (pDMF) model (Hansen et al., 2015; Kong et al., 2021; Deco et al., 2013). At each region, it comprises a simplified system of two nonlinear coupled differential equations, motivated by the attractor network model, which integrates sensory information over time to make perceptual decisions, known as Wong-Wang model (Wong and Wang, 2006). This biophysically realistic cortical network model of decision making then has been simplified further into a single-population model (Deco et al., 2013), which has been widely used to understand the mechanisms underpinning brain resting state dynamics (Kong et al., 2021; Deco et al., 2021; Zhang et al., 2024). The pDMF model has also been used to study whole-brain dynamics in various brain disorders, including Alzheimer’s disease (Monteverdi et al., 2023), schizophrenia (Klein et al., 2021), and stroke (Klein et al., 2021). The pDMF model equations are given as:

(6) dSi(t)dt=Siτs+(1Si)γH(xi)+σξi(t)H(xi)=axib1exp(d(axib))xi=wJSi+GJj=1NSCijSj+I

where H(xi), Si, and xi denote the population firing rate, the average synaptic gating variable, and the total input current at the ith brain region, respectively. ξi(t) is uncorrelated standard Gaussian noise and the noise amplitude is controlled by σ. The nominal parameter values and the prior range for the target parameters are summarized in Table 6.

Table 6
Parameter descriptions for capturing whole-brain dynamics using the Wong-Wang model.
ParameterDescriptionValuePrior
aMax feeding rate of H(x)270 n/C
bHalf saturation of H(x)108 Hz
dControl the steepness of curve of H(x)0.154 s
γKinetic parameter0.641/1000
τsSynaptic time constant100 ms
JSynaptic coupling0.2609 nA
wLocal excitatory recurrence0.6U(0,1)
IOverall effective external input0.3 nAU(0,0.5)
GScaling the strength of network connections6.28U(1,10)
σNoise amplitude0.005U(0.0005,0.01)

According to recent studies (Kong et al., 2021; Zhang et al., 2024), we can parameterize the set of w, I and σ as linear combinations of group-level T1w/T2w myelin maps (Glasser and Van Essen, 2011) and the first principal gradient of functional connectivity:

(7) wi=awMyei+bwGradi+cwIi=aIMyei+bIGradi+cIσi=aσMyei+bσGradi+cσ

where Myei and Gradi are the average values of the T1w/T2w myelin map and the first FC principal gradient, respectively, within the ith brain region. Therefore, the set of unknown parameters to estimate includes G and linear coefficients (aw,bw,cw,aI,bI,cI,aσ,bσ,cσ)R9, hence 10 parameters in total.

The Balloon-Windkessel model

Request a detailed protocol

The Balloon-Windkessel model is a biophysical framework that links neural activity to the BOLD signals detected in fMRI. This is not a neuronal model but rather a representation of neurovascular coupling, describing how neural activity influences hemodynamic responses. The model is characterized by two state variables: venous blood volume (v) and deoxyhemoglobin content (q). The system’s input is blood flow (fin), and the output is the BOLD signal (y):

(8) k1=4.3ϑ0E0TEk2=εr0E0TEk3=1ε

where V0 represents the resting blood volume fraction, E0 is the oxygen extraction fraction at rest, ϵ is the ratio of intra- to extravascular signals, r0 is the slope of the relationship between the intravascular relaxation rate and oxygen saturation, ϑ0 is the frequency offset at the surface of a fully deoxygenated vessel at 1.5 T, and TE is the echo time. The dynamics of venous blood volume v and deoxyhemoglobin content q are governed by the Balloon model’s hemodynamic state equations:

(9) τ0dνdt=f(t)ν(t)1/ατ0dqdt=f(t)1(1E0)1/fE0ν(t)1/αq(t)

where τ0 is the transit time of blood flow, α reflects the resistance of the venous vessel (stiffness), and f(t) denotes blood inflow at time t, given by

dfdt=s,

where s is an exponentially decaying vasodilatory signal defined by

(10) dsdt=ϵxsτs(f1)τf

where ϵ represents the efficacy of neuronal activity x(t) (i.e. integrated synaptic activity) in generating a signal increase, τs is the time constant for signal decay, and τf is the time constant for autoregulatory blood flow feedback (Friston et al., 2000). For parameter values, see Table 7, taken from Friston et al., 2000; Stephan et al., 2007; Stephan et al., 2008. The resulting time series is downsampled to match the TR value in seconds.

Table 7
Parameter descriptions for the Balloon-Windkessel model to map neural activity to the BOLD signals detected in fMRI.
ParameterDescriptionValue
τsRate constant of vasodilatory signal decay in seconds1.5
τfTime of flow-dependent elimination in seconds4.5
αGrubb’s vessel stiffness exponent0.2
τ0Hemodynamic transit time in seconds1.0
ϵEfficacy of synaptic activity to induce signal0.1
r0Slope of intravascular relaxation rate in Hertz25.0
ϑ0Frequency offset at outer surface of magnetized vessels40.3
εRatio of intra- and extravascular BOLD signal at rest1.43
V0Resting blood volume fraction0.02
E0Resting oxygen extraction fraction0.8
TEEcho time, 1.5 T scanner0.04

Simulation-based inference

Request a detailed protocol

In the Bayesian framework (van de Schoot et al., 2021), parameter estimation involves quantifying and propagating uncertainty through probability distributions placed on the parameters (prior information before seeing data), which are updated with information provided by the data (likelihood function). The formidable challenge to conducting efficient Bayesian inference is evaluating the likelihood function p(xθ). This typically involves intractable integrating over all possible trajectories in the latent space: p(xθ)=p(x,zθ)dz, where p(x,zθ) is the joint probability density of the data x and latent variables z, given parameters θ. For whole-brain network models with high-dimensional and nonlinear latent spaces, the computational cost can be prohibitive, making likelihood-based inference with MCMC sampling challenging to converge (Hashemi et al., 2020; Hashemi et al., 2021; Jha et al., 2022).

SBI (Cranmer et al., 2020; Gonçalves et al., 2020; Hashemi et al., 2023), or likelihood-free inference (Papamakarios et al., 2019; Greenberg et al., 2019; Brehmer et al., 2020), addresses issues with explicit likelihood evaluation in complex systems, where it often becomes intractable. The task of density estimation, one of the most fundamental problems in statistics, is to infer an underlying probability distribution based on a set of independently and identically distributed data points drawn from that distribution. Traditional density estimators, such as histograms and kernel density estimators, typically perform well only in low-dimensional settings. Recently, neural network-based approaches have been proposed for conditional density estimation, showing promising results in Bayesian inference problems involving high-dimensional data (Papamakarios and Murray, 2016; Papamakarios and Pavlakou, 2017; Greenberg et al., 2019; Gonçalves et al., 2020; Lueckmann et al., 2021; Liu et al., 2021; Hashemi et al., 2023).

Given a prior distribution p(θ) placed on the parameters θ, N random simulations are generated (with samples from prior), resulting in pairs {(θi,xi)}i=1Nsim, where θip(θ) and xip(xθ) is the simulated data given θi. By training a deep neural density estimator F (such as NFs; Papamakarios and Pavlakou, 2017; Durkan et al., 2019), we can approximate the posterior p(θx) with qF(ϕ,x) by minimizing the loss function:

(11) L(ϕ)=i=1NsimlogqF(ϕ,xi)(θi)

over network parameters ϕ. Once the parameters of the neural network F are optimized, for observed data xobs we can readily estimate the target posterior qF(ϕ,xobs)(θ)p(θxobs). This allows for rapid approximation and sampling from the posterior distribution for any new observed data through a forward pass in the trained network (Hashemi et al., 2023; Hashemi et al., 2024).

This approach uses a class of generative machine learning models known as NFs (Rezende and Mohamed, 2015; Kobyzev et al., 2019) to transform a simple base distribution into any complex target through a sequence of invertible mappings. Here, generative modeling is an unsupervised machine learning method for modeling a probability distribution given samples drawn from that distribution. The state-of-the-art NFs, such as MAFs (Papamakarios and Pavlakou, 2017) and NSFs (Durkan et al., 2019), enable fast and exact density estimation and sampling from high-dimensional distributions. These models learn mappings between input data and probability densities, capturing complex dependencies and multi-modal distributions (Kobyzev et al., 2019; Kobyzev et al., 2020).

In our work, we integrate the implementation of these models from the open-source SBI tool, leveraging both MAF and NSF architectures. The MAF model comprises five flow transforms, each with two blocks and 50 hidden units, tanh nonlinearity, and batch normalization after each layer. The NSF model consists of five flow transforms, two residual blocks of 50 hidden units each, ReLU nonlinearity, and 10 spline bins. We apply these generative models to virtual brain simulations conducted with random parameters to approximate the full posterior distribution of parameters from low-dimensional data features. Note that we employ a single round of SBI to benefit from amortization strategy rather than using a sequential approach that is designed to achieve a better fit but only for a specific dataset (Hashemi et al., 2023; Hashemi et al., 2024).

Sensitivity analysis

Request a detailed protocol

Sensitivity analysis is a crucial step for identifying which model parameters influence the model’s behavior in response to changes in input (Hashemi et al., 2018; Hashemi et al., 2023). A local sensitivity can be quantified by computing the curvature of the objective function through the Hessian matrix (Bates and Watts, 1980; Hashemi et al., 2018). Using SBI, after estimating the posterior for a specific observation, we can perform sensitivity analysis by computing the eigenvalues and corresponding eigenvectors of the following matrix (Tejero-Cantero et al., 2020; Deistler et al., 2021):

(12) M=Ep(θ|xobs)[θp(θ|xobs)Tθp(θ|xobs)],

which then does an eigendecomposition M=QΛQ1. A large eigenvalue in the so-called active subspaces (Constantine, 2015) indicates that the gradient of the posterior is large in the corresponding direction, suggesting that the system output is sensitive to changes along that eigenvector.

Evaluation of posterior fit

Request a detailed protocol

To assess the reliability of Bayesian inference using synthetic data, we evaluate the posterior z-scores (denoted by z) against the posterior shrinkage (denoted by s), as defined by Betancourt et al., 2014:

(13) z=|θ¯θσpost|,
(14) s=1σpost2σprior2,

where θ¯ and θ are the posterior mean and the true values, respectively, σprior is the standard deviation of the prior, and σpost is the standard deviation of the posterior.

The z-score quantifies how far the posterior mean of a parameter lies from a reference value (e.g. the true value), scaled by the posterior standard deviation. The shrinkage quantifies how much the posterior distribution has contracted relative to the initial prior distribution after learning from data. A small z-score indicates that the posterior estimate is close to the true value, reflecting accurate inference. A large shrinkage value suggests that the posterior is sharply concentrated, indicating that the parameter is well identified. According to these definitions, an ideal Bayesian inference is characterized by z-scores close to zero and posterior shrinkage values close to one, reflecting both accuracy and reliability in the inferred parameters.

Flexible simulator and model building

Request a detailed protocol

A key feature of the VBI pipeline is its modularity and flexibility in integrating various simulators (see Figure 2). The Simulation module of the VBI pipeline is designed to be easily interchangeable, allowing researchers to replace it with other simulators, such as TVB (Sanz-Leon et al., 2015), Neurolib (Cakan et al., 2023), Brian (Stimberg et al., 2019), and Brainpy (Wang et al., 2023a). This adaptability supports a wide range of simulation needs and computational environments, making the VBI a versatile tool for inference in system neuroscience. In particular, the Simulation module offers a comprehensive implementation of commonly used whole-brain models. This is a customized version of the implementation from the open-source TVB simulator. While VBI does not encompass all the features of the original TVB, it is mainly designed to leverage the computational power of GPU devices and significantly reduce RAM requirements (see Figure 2—figure supplement 1). This optimization ensures that high-performance clusters can be fully utilized, enabling parallel and scalable simulations, as often is required to perform scalable SBI.

Comprehensive feature extraction

Request a detailed protocol

VBI offers a comprehensive toolbox for feature extraction across various datasets. The Features module includes but is not limited to: (1) Statistical features, including mean (average of elements), variance (spread of the elements around mean), kurtosis (tailedness of the distribution of elements), and skewness (the asymmetry of the distribution of elements), that can be applied to any matrix. (2) Spectral features, such as low-dimensional summary statistics of power spectrum density (PSD). (3) Temporal features, including zero crossings, area under the curve, average power, and envelope. (4) Connectivity features, including functional connectivity (FC), which represents the statistical dependencies or correlations between activity patterns of different brain regions, and functional connectivity dynamics (FCD), which captures the temporal variations and transitions in these connectivity patterns over time. These calculations are performed for the whole-brain and/or subnetwork (e.g., limbic system, resting state networks). However, since these matrices are still high-dimensional, we use standard dimensional reduction techniques, such as principal component analysis (PCA) on FC/FCD matrices, to extract their associated low-dimensional summary statistics. (5) Information theory features, such as mutual information and transfer entropy. Following (Hashemi et al., 2024), we use the term spatio-temporal data features to refer to both statistical features and temporal features derived from time series. In contrast, we refer to the connectivity features extracted from FC/FCD matrices as functional data features. Note that here, ‘spatial’ does not necessarily refer to the actual spatial characteristics of the data, such as traveling waves in neural fields, but rather to differences across brain regions.

The Features module uses parallel multiprocessing to speed up feature calculation. Additionally, it provides flexibility for users to add their own custom feature calculations with minimal effort and expertise, or to adjust the parameters of existing features based on the type of input time series. The feature extraction module is designed to be interchangeable with existing feature extraction libraries such as tsfel (Barandas et al., 2020), pyspi (Cliff et al., 2023), hctsa (Fulcher and Jones, 2017), and scikit-learn (Pedregosa et al., 2011). Note that some lightweight libraries such as catch22 (Lubba et al., 2019) are directly accessible from the VBI feature extraction module.

Data availability

No new data were created or analyzed in this study. All code is available on GitHub (https://github.com/ins-amu/vbi copy archived at Ziaeemehr, 2025).

References

  1. Book
    1. Constantine PG
    (2015)
    Active Subspaces: Emerging Ideas for Dimension Reduction in Parameter Studies
    SIAM.
  2. Conference
    1. Durkan C
    2. Bekasov A
    3. Murray I
    4. Papamakarios G
    (2019)
    Neural spline flows
    Proceedings of the 33rd International Conference on Neural Information Processing Systems. pp. 7511–7522.
  3. Conference
    1. Durkan C
    2. Murray I
    3. Papamakarios G
    (2020)
    On contrastive learning for likelihood-free inference
    International Conference on Machine Learning. pp. 2771–2781.
  4. Conference
    1. Gershman S
    2. Goodman N
    (2014)
    Amortized inference in probabilistic reasoning
    Proceedings of the annual meeting of the cognitive science society. pp. 2434–2449.
  5. Conference
    1. Goodfellow I
    2. Pouget-Abadie J
    3. Mirza M
    4. Xu B
    5. Warde-Farley D
    6. Ozair S
    7. Courville A
    8. Bengio Y
    (2014)
    Generative adversarial nets
    Advances in Neural Information Processing Systems.
  6. Conference
    1. Greenberg D
    2. Nonnenmacher M
    3. Macke J
    (2019)
    Automatic posterior transformation for likelihood-free inference
    International Conference on Machine Learning. pp. 2404–2414.
    1. Jirsa VK
    2. Sporns O
    3. Breakspear M
    4. Deco G
    5. McIntosh AR
    (2010)
    Towards the virtual brain: network modeling of the intact and the damaged brain
    Archives Italiennes de Biologie 148:189–205.
  7. Conference
    1. Kobyzev I
    2. Prince S
    3. Brubaker M
    (2019)
    Normalizing flows for probabilistic modeling and inference
    IEEE Transactions on Pattern Analysis and Machine Intelligence.
    1. Lemaréchal J-D
    2. Jedynak M
    3. Trebaul L
    4. Boyer A
    5. Tadel F
    6. Bhattacharjee M
    7. Deman P
    8. Tuyisenge V
    9. Ayoubian L
    10. Hugues E
    11. Chanteloup-Forêt B
    12. Saubat C
    13. Zouglech R
    14. Reyes Mejia GC
    15. Tourbier S
    16. Hagmann P
    17. Adam C
    18. Barba C
    19. Bartolomei F
    20. Blauwblomme T
    21. Curot J
    22. Dubeau F
    23. Francione S
    24. Garcés M
    25. Hirsch E
    26. Landré E
    27. Liu S
    28. Maillard L
    29. Metsähonkala E-L
    30. Mindruta I
    31. Nica A
    32. Pail M
    33. Petrescu AM
    34. Rheims S
    35. Rocamora R
    36. Schulze-Bonhage A
    37. Szurhaj W
    38. Taussig D
    39. Valentin A
    40. Wang H
    41. Kahane P
    42. George N
    43. David O
    44. Adam C
    45. Navarro V
    46. Biraben A
    47. Nica A
    48. Menard D
    49. Brazdil M
    50. Kuba R
    51. Kočvarová J
    52. Pail M
    53. Doležalová I
    54. Dubeau F
    55. Gotman J
    56. Ryvlin P
    57. Isnard J
    58. Catenoix H
    59. Montavont A
    60. Rheims S
    61. Bartolomei F
    62. Trébuchon A
    63. McGonigal A
    64. Zhou W
    65. Wang H
    66. Liu S
    67. Wei Z
    68. Dan Z
    69. Qiang G
    70. Xiangshu H
    71. Hua L
    72. Gang H
    73. Wensheng W
    74. Xi M
    75. Yigang F
    76. Nabbout R
    77. Bourgeois M
    78. Kaminska A
    79. Blauwblomme T
    80. Garcés M
    81. Valentin A
    82. Singh R
    83. Metsähonkala L
    84. Gaily E
    85. Lauronen L
    86. Peltola M
    87. Chassoux F
    88. Landré E
    89. Derambure P
    90. Szurhaj W
    91. Chochois M
    92. Hirsch E
    93. Paola Valenti M
    94. Scholly J
    95. Valton L
    96. Denuelle M
    97. Curot J
    98. Rocamora R
    99. Principe A
    100. Ley M
    101. Mindruta I
    102. Barborica A
    103. Francione S
    104. Mai R
    105. Nobili L
    106. Sartori I
    107. Tassi L
    108. Maillard L
    109. Vignal J-P
    110. Jonas J
    111. Tyvaert L
    112. Chipaux M
    113. Taussig D
    114. Kahane P
    115. Minotti L
    116. Job A-S
    117. Michel V
    118. de Montaudoin M
    119. Aupy J
    120. Bouilleret V
    121. Maria Petrescu A
    122. Masnou P
    123. Dussaule C
    124. Quirins M
    125. Taussig D
    126. Barba C
    127. Guerrini R
    128. Lenge M
    129. Nacci E
    130. F-TRACT consortium
    (2022) A brain atlas of axonal and synaptic delays based on modelling of cortico-cortical evoked potentials
    Brain 145:1653–1667.
    https://doi.org/10.1093/brain/awab362
  8. Conference
    1. Lueckmann JM
    2. Bassetto G
    3. Karaletsos T
    (2019)
    Likelihood-free inference with emulator networks
    Symposium on Advances in Approximate Bayesian Inference. pp. 32–53.
  9. Conference
    1. Lueckmann JM
    2. Boelts J
    3. Greenberg D
    (2021)
    Benchmarking Simulation-Based Inference
    International Conference on Artificial Intelligence and Statistics. pp. 343–351.
  10. Conference
    1. Papamakarios G
    2. Sterratt D
    3. Murray I
    (2019)
    Sequential neural likelihood: Fast likelihood-free inference with autoregressive flows
    The 22nd International Conference on Artificial Intelligence and Statistics. pp. 837–848.
    1. Pedregosa F
    2. Varoquaux G
    3. Gramfort A
    (2011)
    Scikit-learn: machine learning in python
    Journal of Machine Learning Research 12:2825–2830.
  11. Conference
    1. Rezende D
    2. Mohamed S
    (2015)
    Variational inference with normalizing flows
    ICML’15: Proceedings of the 32nd International Conference on International Conference on Machine Learning. pp. 1530–1538.
  12. Book
    1. Sisson S
    2. Fan Y
    3. Beaumont M
    (2018)
    Handbook of Approximate Bayesian Computation. Chapman & Hall/CRC Handbooks of Modern Statistical Methods
    CRC Press.

Article and author information

Author details

  1. Abolfazl Ziaeemehr

    Aix Marseille University, INSERM, INS, Inst Neurosci System, Marseille, France
    Contribution
    Software, Formal analysis, Validation, Investigation, Visualization, Methodology, Writing – original draft, Writing – review and editing
    For correspondence
    abolfazl.ziaee-mehr@univ-amu.fr
    Competing interests
    No competing interests declared
    ORCID icon "This ORCID iD identifies the author of this article:" 0000-0002-4696-9947
  2. Marmaduke Woodman

    Aix Marseille University, INSERM, INS, Inst Neurosci System, Marseille, France
    Contribution
    Conceptualization, Resources, Data curation, Software, Methodology, Writing – review and editing
    Competing interests
    No competing interests declared
    ORCID icon "This ORCID iD identifies the author of this article:" 0000-0002-8410-4581
  3. Lia Domide

    Codemart, Cluj-Napoca, Romania
    Contribution
    Resources, Data curation, Software, Writing – review and editing
    Competing interests
    No competing interests declared
    ORCID icon "This ORCID iD identifies the author of this article:" 0000-0002-4822-2046
  4. Spase Petkoski

    Aix Marseille University, INSERM, INS, Inst Neurosci System, Marseille, France
    Contribution
    Supervision, Funding acquisition, Methodology, Writing – review and editing
    Competing interests
    No competing interests declared
    ORCID icon "This ORCID iD identifies the author of this article:" 0000-0003-4540-6293
  5. Viktor Jirsa

    Aix Marseille University, INSERM, INS, Inst Neurosci System, Marseille, France
    Contribution
    Conceptualization, Resources, Supervision, Funding acquisition, Project administration, Writing – review and editing
    Contributed equally with
    Meysam Hashemi
    For correspondence
    viktor.jirsa@univ-amu.fr
    Competing interests
    No competing interests declared
    ORCID icon "This ORCID iD identifies the author of this article:" 0000-0002-8251-8860
  6. Meysam Hashemi

    Aix Marseille University, INSERM, INS, Inst Neurosci System, Marseille, France
    Contribution
    Conceptualization, Resources, Software, Supervision, Funding acquisition, Validation, Investigation, Methodology, Writing – original draft, Project administration, Writing – review and editing
    Contributed equally with
    Viktor Jirsa
    For correspondence
    meysam.hashemi@univ-amu.fr
    Competing interests
    No competing interests declared
    ORCID icon "This ORCID iD identifies the author of this article:" 0000-0001-5289-9837

Funding

European Commission (EBRAINS 2.0 Project)

https://doi.org/10.3030/101147319
  • Viktor Jirsa
  • Meysam Hashemi

European Commission (Virtual Brain Twin Project)

https://doi.org/10.3030/101137289
  • Viktor Jirsa

European Commission (EnvironMENTAL)

https://doi.org/10.3030/101057429
  • Viktor Jirsa

France 2030 program (ANR-22-PESN-0012)

  • Spase Petkoski
  • Viktor Jirsa

The funders had no role in study design, data collection and interpretation, or the decision to submit the work for publication.

Acknowledgements

This project/research has received funding from the European Union’s Horizon Europe Programme under the Specific Grant Agreement No. 101147319 (EBRAINS 2.0 Project) to MH and VJ, No. 101137289 (Virtual Brain Twin Project) to VJ, No. 101057429 (project environMENTAL) to VJ, and government grant managed by the Agence Nationale de la Recherche reference ANR-22-PESN-0012 (France 2030 program) to SP and VJ. We acknowledge the use of Fenix Infrastructure resources, which are partially funded from the European Union’s Horizon 2020 research and innovation programme through the ICEI project under the grant agreement No. 800858. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.

Version history

  1. Preprint posted:
  2. Sent for peer review:
  3. Reviewed Preprint version 1:
  4. Reviewed Preprint version 2:
  5. Reviewed Preprint version 3:
  6. Version of Record published:

Cite all versions

You can cite all versions using the DOI https://doi.org/10.7554/eLife.106194. This DOI represents all versions, and will always resolve to the latest one.

Copyright

© 2025, Ziaeemehr et al.

This article is distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use and redistribution provided that the original author and source are credited.

Metrics

  • 1,533
    views
  • 148
    downloads
  • 1
    citation

Views, downloads and citations are aggregated across all versions of this paper published by eLife.

Citations by DOI

Download links

A two-part list of links to download the article, or parts of the article, in various formats.

Downloads (link to download the article as PDF)

Open citations (links to open the citations from this article in various online reference manager services)

Cite this article (links to download the citations from this article in formats compatible with various reference manager tools)

  1. Abolfazl Ziaeemehr
  2. Marmaduke Woodman
  3. Lia Domide
  4. Spase Petkoski
  5. Viktor Jirsa
  6. Meysam Hashemi
(2025)
Virtual Brain Inference (VBI), a flexible and integrative toolkit for efficient probabilistic inference on whole-brain models
eLife 14:RP106194.
https://doi.org/10.7554/eLife.106194.4

Share this article

https://doi.org/10.7554/eLife.106194