The Virtual Brain

  • BIG new release: The Virtual Brain version 2.2

    • paper
    • release
    • software
    • TVB v2 blog illustration

    Our scientists and developers are very proud to announce the next generation of The Virtual Brain: version 2.2! Many core parts of the software have been rewritten to make it faster, cleaner, shorter, much more powerful and just overall nicer!

    First thing: upgrade existing installations from v1.5.8

    TVB 2.2 has a new storage architecture underneath. Your data will be migrated automatically after the installation but you need to run TVB v1.5.8 before installing the brand-new v2.2 with the data migration!.

    Still need to install v1.5.8 first? You can download it right here for Windows, Mac and Linux.

    Ready to get the good stuff? Make a backup of your TVB data (just to be safe) and head over to our download center to install the brand-new version 2.2!

    In a nutshell: what's new in version 2.2

    Since the last version 1.5.8 from May 2019, we've implemented 306 changes, improvements, extensions and bugfixes! One of the biggest changes: TVB is now based on Python 3.

    We have completely rewritten the traits system in the scientific library by splitting the basic concepts (types, storage, DB indexing, web GUI) in a better way. This yields smaller files with clearer code, thus making them easier to work with for our scripting users and contributors.

    On a side-note, we're proud to have increased the speed of the simulator by 200%.

    Other notable changes:

    • The framework has been adapted to the new traits system and standardized to use only H5 files for storage.
    • Analyzers in the library are now functions instead of classes.
    • The Simulator page has been improved to resemble a Wizard workflow.
    • We have added a REST API and also a client SDK for the Simulator, installable via PyPI (tvb-rest-client).
    • Your TVB data can now be encrypted (paramount when running on cloud infrastructure)
    • Support for HPC back-ends to run computation-heavy simulations with encrypted data
    • Improved command API with individual calls from the web GUI
    • Replaced Genshi with Jinja for the TVB web GUI
    • Removed the CFF importer
    • A new export button on datatypes allows downloading a datatype together with its references (so a Connectivity stays linked to the region mapping).

    In depth: data privacy and high-performance backend

    TVB can now encrypt files containing personal data (e.g. structural connectomes or brain surfaces) to protect private information on shared computing resources.

    For secure uploading to the TVB web GUI, users can encrypt personal data with a public key (available at:

    For secure storage, the uploaded data is decrypted and once again encrypted with a freshly created secret key to increase protection in case the key for data upload is leaked. The data files stay encrypted until an authorized user opens the respective project in a private TVB web GUI space.

    Each project is encrypted with a different key and the public key for initial encryption is regularly changed.

    For resource-intensive simulations, the encrypted data can be forwarded to supercomputing systems via UNICORE interface and is only decrypted after the associated job on a compute node was started.

    The decryption key is sent from the front-end TVB web GUI instance directly to the running back-end computing process on a high-performance computer (HPC) using OAuth 2.0 Authorization Code Flows. The key is only kept in memory and never written to the file system.

    In addition, TVB now supports authentication and single-sign on with Keycloak.

    This new feature set exists in the latest release of tvb-framework but is still disabled by default. In order to use it, configurations will need to manually be switched on in the .tvb.configuration file. In future versions we intend to make this feature more prominent and easier to use.

    In depth: multiscale Co-Simulation

    Multiscale Co-Simulation connects TVB with the spiking neuron simulator NEST for simulating brain networks where large-scale neural mass models interact with models of individual neurons or neuron networks.

    Populations interact with neurons by coupling neural mass model state variables with single neuron state variables or parameters. For example, a TVB state variable that simulates ongoing population firing can be used to inject spikes into a spiking network, e.g. by sampling spike times from a probability distribution in dependence of the instantaneous firing rate of the neural mass model.

    Vice versa, the mean activity of a neuron network may be used to inform ongoing inputs to a TVB neural mass. Coupling may be unidirectional, e.g. to study effects of large-scale inputs on small-scale spiking-network activity, or bidirectional, to study how both scales mutually interact.

    In depth: automatic high-performance code generation for CPUs and GPUs

    VB-HPC automatically produces high-performance codes for CPUs and GPUs using the domain-specific language RateML for model specification as well as the Numba and CUDA libraries for generation of high-performance code.

    In depth: Python 3 compatibility

    As Python 2 support has officially ended, the TVB code has been rewritten to support Python 3 and make use of the latest updates.

    During this transition, we created Neotraits – a complete rewrite of the traits system in the scientific library and improve the separation of aspects in datatypes, storage, DB indexing and web forms.

    As a result, scripting users and contributors should find it easier to work with our code. This exists in all TVB releases in the version 2.x branch.

    In depth: REST API

    Besides the GUI and the scripting interface, TVB now also offers a REST API as a third option for users to interact with the backend.

    This interface is mostly intended for external applications to easily integrate with TVB. If you're interested in using the REST API, make sure to check out our tvb-rest-client library offered on PyPI as a helper that is wrapping up the REST requests under an easy-to-use API.

    In depth: wizard simulation configuration page

    As the simulator page has quite a lot of configuration fields, we decided to change it into a wizard.

    This type of GUI workflow aimsto make simulation configuration easier to follow for users – by asking them to choose each value step-by-step.

    New preprint paper – Brain Modelling as a Service: The Virtual Brain on EBRAINS

    Motivation, features and implementation details of the new TVB software version are explained in detail in our new paper ( preprint) "Brain Modelling as a Service: The Virtual Brain on EBRAINS".


    Michael Schirner, Lia Domide, Dionysios Perdikis, Paul Triebkorn, Leon Stefanovski, Roopa Pai, Paula Popa, Bogdan Valean, Jessica Palmer, Chloê Langford, André Blickensdörfer, Michiel van der Vlag, Sandra Diaz-Pier, Alexander Peyser, Wouter Klijn, Dirk Pleiter, Anne Nahm, Oliver Schmid, Marmaduke Woodman, Lyuba Zehl, Jan Fousek, Spase Petkoski, Lionel Kusch, Meysam Hashemi, Daniele Marinazzo, Jean-François Mangin, Agnes Flöel, Simisola Akintoye, Bernd Carsten Stahl, Michael Cepic, Emily Johnson, Gustavo Deco, Anthony R. McIntosh, Claus C. Hilgetag, Marc Morgan, Bernd Schuller, Alex Upton, Colin McMurtrie, Timo Dickscheid, Jan G. Bjaalie, Katrin Amunts, Jochen Mersmann, Viktor Jirsa, Petra Ritter


    The Virtual Brain (TVB) is now available as open-source cloud ecosystem on EBRAINS, a shared digital research platform for brain science. It offers services for constructing, simulating and analysing brain network models (BNMs) including

    • the TVB network simulator
    • magnetic resonance imaging (MRI) processing pipelines to extract structural and functional connectomes
    • multiscale co-simulation of spiking and large-scale networks
    • a domain specific language for automatic high-performance code generation from user- specified models
    • simulation-ready BNMs of patients and healthy volunteers
    • Bayesian inference of epilepsy spread
    • data and code for mouse brain simulation
    • and extensive educational material

    TVB cloud services facilitate reproducible online collaboration and discovery of data assets, models, and software embedded in scalable and secure workflows, a precondition for research on large cohort data sets, better generalizability and clinical translation.

    If you're publishing your own paper using TVB v2.2, please cite this new publication as reference in addition to our original paper "The Virtual Brain: a simulator of primate brain network dynamics" .