-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.tex
2078 lines (1859 loc) · 119 KB
/
main.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
%!TEX TS-program = pdflatex %
%!TEX encoding = UTF8 %
%!TEX spellcheck = en-US %
%------------------------------------------------------------------------------%
% to compile use "latexmk --pdf main.tex" %
%------------------------------------------------------------------------------%
% to count words
% "pdftotext main_nofigs_nocaptions.pdf - | egrep -e '\w\w\w+' | iconv -f ISO-8859-15 -t UTF-8 | wc -w"
% -----------------------------------------------------------------------------%
\documentclass{bioinfo}
\usepackage{url}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
%\usepackage[pdftex]{graphicx}
%\usepackage{graphics}
%\usepackage{hyperref}
\usepackage{float}
\floatplacement{figure}{H}
\usepackage{booktabs} % nice tables
\usepackage{tabularx} % even nicer tabular environments
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
%\usepackage{multicol}
\usepackage{listings}
\usepackage{tikz,times}
\usepackage{courier}
\usetikzlibrary{shapes,arrows}
\usetikzlibrary{arrows,positioning}
\usepackage{xcolor}
\usepackage[font=bf]{subfig}
\usepackage[finalnew]{trackchanges} % track changes from authors.
%\usepackage{sectsty}
%\sectionfont{\normalsize\bfseries}
%\usepackage[labelfont=bf]{caption}
%\usepackage{endfloat} %place figures at end of document
%------------------------------------------------------------------------------%
%\captionsetup{
%%format = hang, % caption format
%labelformat = simple, % caption label : name and number
%labelsep = period, % separation between label and text
%textformat = simple, % caption text as it is
%justification = justified, % caption text justified
%singlelinecheck = true, % for single line caption text is centered
%font = {up,singlespacing}, % defines caption (label & text) font
%labelfont = {bf,footnotesize}, % NOTE: tiny size is not working
%textfont = footnotesize,
%%width = \textwidth, % define width of the caption text
%skip = 1ex, % skip the space between float and caption
%listformat = simple, % in the list of floats, label + caption
%}
%------------------------------------------------------------------------------%
%\hypersetup{
% bookmarks=true, % show bookmarks bar?
% unicode=false, % non-Latin characters in Acrobat’s bookmarks
% pdftoolbar=true, % show Acrobat’s toolbar?
% pdfmenubar=true, % show Acrobat’s menu?
% pdffitwindow=false, % window fit to page when opened
% pdfstartview={FitH}, % fits the width of the page to the window
% pdftitle={TheVirtualBain}, % title
% pdfauthor={PSL}, % author
% pdfsubject={ProposedArticle}, % subject of the document
% pdfcreator={paupau}, % creator of the document
% pdfnewwindow=true, % links in new window
% colorlinks=true, % false: boxed links; true: colored links
% linkcolor=red, % color of internal links (change box color with linkbordercolor)
% citecolor=blue, % color of links to bibliography
% filecolor=magenta, % color of file links
% urlcolor=blue % color of external links
%}
%-----------------------------------------------------------------------
%\usepackage{subcaption}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% New and renew commands %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% define authors
\addeditor{PSL}
\addeditor{MW}
\addeditor{VJ}
\addeditor{SAK}
\renewcommand{\lstlistingname}{Code}
\renewcommand{\thesubfigure}{\Alph{subfigure}}
\newcommand{\inputTikZ}[2]{%
\scalebox{#1}{\input{#2}}}
\newcommand*{\h}{\hspace{5pt}} % for indentation
\newcommand*{\hh}{\h\h} % double indentation
\newcommand{\TVB}{\textit{TheVirtualBrain }}
\newcommand*{\tvbmodule}[1]{{\textsc{#1}}} % scientific library modules
\newcommand*{\tvbdatatype}[1]{\textbf{\emph{#1}}} % datatypes in "datatypes"
\newcommand*{\tvbclass}[1]{{\ttfamily\emph{#1}}} % classes either in simulator mods or datatypes
\newcommand*{\tvbmethod}[1]{{\textsf{#1}}} % methods
\newcommand*{\tvbattribute}[1]{{\ttfamily{#1}}} % attributes
\newcommand*{\tvbtrait}[1]{{\ttfamily{#1}}} % traited types
% please please trackchanges ignore these commands and make my life easy.
\tcregister{\tvbmodule}{1}
\tcregister{\tvbdatatype}{1}
\tcregister{\tvbclass}{1}
\tcregister{\tvbmethod}{1}
\tcregister{\tvbattribute}{1}
\tcregister{\tvbtrait}{1}
\tcregister{\TVB}{0}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Colors and graphics %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\definecolor{palegreen}{HTML}{DAFFDA}
\definecolor{lightgray}{rgb}{0.15,0.15,0.15}
\definecolor{orange}{HTML}{FF7300}
\DeclareGraphicsExtensions{.jpg,.pdf,.png,.tiff}%,.mps,.bmp
\graphicspath{{figures/}}
%##--------------------------------------------------------------------------##%
%## START HERE ##%
%##--------------------------------------------------------------------------##%
\copyrightyear{}
\pubyear{}
\begin{document}
\lstset{language=Python,
caption=b,
breaklines=true,
basicstyle=\bf\tiny\ttfamily,
stringstyle=\color{magenta}
}
\firstpage{1}
%% Authorship and Title
\title[TVB]{The Virtual Brain: a simulator of primate brain network dynamics}
\author[Sanz Leon {et~al}]{Paula Sanz Leon\,$^{1,*}$,
Stuart A. Knock\,$^{2}$,
M. Marmaduke Woodman\,$^{1}$,
Lia Domide\,$^{3}$,
Jochen Mersmann\,$^{4}$,
Anthony R. McIntosh \,$^{5}$ and
Viktor Jirsa\,$^{1}$\footnote{to whom correspondence should be addressed: [email protected],
\address{$^{1}$ Institut de Neurosciences des Syst{\`e}mes, 27, Bd. Jean Moulin, 13005, Marseille, France.\\
$^{2}$ BrainModes Group, Department of Neurology, Charit{\'e} University of Medicine, Berlin, Germany.\\
$^{3}$ Codemart, 13, Petofi Sandor, 400610, Cluj-Napoca, Romania.\\
$^{4}$ CodeBox GmbH, Hugo Eckener Str. 7, 70184 Stuttgart, Germany.\\
$^{5}$ Rotman Research Institute at Baycrest, Toronto, M6A 2E1, Ontario, Canada\\
}
\history{}
\editor{}
\maketitle
%##--------------------------------------------------------------------------##%
%## ABSTRACT ##%
%##--------------------------------------------------------------------------##%
\begin{abstract} \section{} % abstract < 2000 characters including spaces.
We present TheVirtualBrain (TVB), a neuroinformatics platform for full brain
network simulations using biologically realistic connectivity. This simulation
environment enables the model-based inference of neurophysiological mechanisms
across different brain scales that underlie the generation of macroscopic
neuroimaging signals including functional MRI (fMRI), EEG and MEG. Researchers
from different backgrounds can benefit from an integrative software platform
including a supporting framework for data management (generation,
organization, storage, integration and sharing) and a simulation core written
in Python. TVB allows the reproduction and evaluation of personalized
configurations of the brain by using individual subject data. This
personalization facilitates an exploration of the consequences of pathological
changes in the system, permitting to investigate potential ways to counteract
such unfavorable processes. The architecture of TVB supports interaction with
MATLAB packages, for example, the well known Brain Connectivity Toolbox. TVB
can be used in a client-server configuration, such that it can be remotely
accessed through the Internet thanks to its \change[PSL]{web based}{web-based}
HTML5, JS and WebGL graphical user interface. TVB is also
accessible as a standalone cross-platform Python library and application, and
users can interact with the scientific core through the scripting interface
IDLE, enabling easy modeling, development and debugging of the scientific
kernel. This second interface makes TVB extensible by combining it with other
libraries and modules developed by the Python scientific community.
In this article, we
describe the theoretical background and foundations that led to the
development of TVB, the architecture and features of its major software
components as well as potential neuroscience applications.
\section{Keywords:} connectivity, connectome, neural mass, neural field,
time delays, full-brain network model, python, virtual brain, large-scale
simulation, web platform, GPUs
\end{abstract}
%##--------------------------------------------------------------------------##%
%## INTRO ##%
%##--------------------------------------------------------------------------##%
\section{Introduction}
% micro vs macro
Brain function is thought to emerge from the interaction of large numbers
of neurons, under the spatial and temporal constraints of brain structure
and cognitive demands. Contemporary network simulations mainly focus on
the microscopic and mesoscopic level (neural networks and neural masses
representing a particular cortical region), adding detailed biophysical
information at these levels of description while too often losing
perspective on the global dynamics of the brain. On the other hand, the
degree of assessment of global cortical dynamics, across imaging
modalities, in human patients and research subjects has increased
significantly in the last few decades. In particular, cognitive and
clinical neuroscience employs imaging methods of macroscopic brain
activity such as intracerebral measurements, stereotactic Encephalography
(sEEG) \citep{Ellenrieder_2012}, Electroencephalography (EEG)
\citep{Nunez_1981book, Nunez_1995book, Niedermeyer_2005},
Magnetoencephalography (MEG) \citep{Haemaelaeinen_1992, Haemaelaeinen_1993,
Mosher_1999} and
functional Magnetic Resonance Imaging (fMRI) \citep{Ogawa_1993, Ogawa_1998,
Logothetis_2001} to assess brain dynamics and
evaluate diagnostic and therapeutic strategies. Hence, there is a strong
motivation to develop an efficient, flexible, neuroinformatics platform
on this macroscopic level of brain organization for reproducing and
probing the broad repertoire of brain dynamics, enabling quick data
analysis and visualization of the results.
TVB is our response to this need. On the one hand, it
provides a general infrastructure to support multiple users handling
various kinds of empirical and simulated data, as well as tools for
visualizing and analyzing that data, either via internal mechanisms or by
interacting with other computational systems such as MATLAB. At the same
time it provides a simulation toolkit to support a top-down modeling
approach to whole brain dynamics, where the underlying network is defined
by its structural large-scale connectivity and mesoscopic models that govern
the nodes' intrinsic dynamics. The interaction with the dynamics of all
other network nodes happens through the connectivity matrix via specific
connection weights and time delays, where the latter make a significant
contribution to the biological realism of the temporal structure of
dynamics.
Historically, \citet{Jirsa_2002} first demonstrated neural field modeling on
a spherical brain hemisphere employing EEG and MEG forward solutions to
obtain simulation imaging signals. In this work, homogeneous
(translationally invariant) connectivity was implemented along the lines of
\citet{Jirsa_1996,Jirsa_1997, Bojak_2010} yielding a neural field equation,
which has its roots in classic works
\citep{Wilson_1972,Wilson_1973,Nunez_1974,Amari_1975, Amari_1977}. At that
time more detailed large-scale connectivity of the full primate brain was
unavailable, hence the homogeneous connectivity scaled up to the full brain
was chosen as a first approximation \citep{Nunez_1974}. The approach proved
successful for the study of certain phenomena as observed in large-scale
brain systems including spontaneous activity \citep{Breakspear_2003,
Freyer_2011,Wright_1995,Rowe_2004,Robinson_2001, Robinson_2003}, evoked
potentials \citep{Rennie_1999, Rennie_2002}, anesthesia \citep{Liley_2005},
epilepsy \citep{Breakspear_2006}, sensorimotor coordination
\citep{Jirsa_1996, Jirsa_1997} and more recently, plasticity \citep{Robinson_2011} (see \citet{Deco_2008a} and
\citet{Jirsa_2004} for a review).
Careful review of this literature though shows that these models mostly
emphasize the temporal domain of brain organization, but leave the
spatiotemporal organization untouched. This may be understood by the fact
that the symmetry of the connectivity imposes constraints upon the range
of the observable dynamics. This was pointed out early
\change[PSL]{on}{by }\citet{Jirsa_2002}
and a suggestion was made to integrate biologically realistic DTI based
connectivity into full brain modeling efforts. Large scale brain dynamics
are basically expected to reflect the underlying anatomical connectivity
between brain areas \citep{Deco_2011, Bullmore_2009}, even though
structural connectivity is not the only constraint, but the transmission
delays play an essential role in shaping the brain network dynamics also
\citep{Jirsa_2000, Ghosh_2008, Knock_2009, Jirsa_2010b}. Recent studies
\citep{Pinotsis_2012} have systematically investigated the degree to which
homogeneous approximations may serve to understand realistic connection
topologies and have concluded that homogeneous approximations are more
appropriate for mesoscopic descriptions of brain activity, but less well
suited to address full brain network dynamics. All this
\change[PSL]{underwrites}{underscores} the need to incorporate realistic
connectivity into large scale brain network models. Thus the simulation
side of TVB has evolved out of a research program seeking to identify and
reproduce realistic whole brain network dynamics, on the basis of
empirical connectivity and neural field models \citep{Jirsa_2010,
Deco_2011}.
\subsection{Modeling}
In line with these previous studies, TVB incorporates a biologically
realistic, large-scale connectivity of brain regions in the primate brain.
Connectivity is mediated by long-range neural fiber tracts as identified by
tractography based methods \citep{Hagmann_2008, Honey_2009, Bastiani_2012},
or obtained from CoCoMac neuroinformatics database \citep{Koetter_2004,
Koetter_2005, Bakker_2012}. In TVB, the tract-lengths matrix of the
demonstration connectivity dataset is symmetric due to the fiber detection
techniques used to extract the information being insensitive to
directionality. On the other hand, the weights matrix is asymmetric as it
makes use of directional information contained in the tracer studies of the
CoCoMac database. The symmetry (or lack thereof) is neither a modeling
constraint nor an imposed restriction on the weights and tract-length matrices.
Such specifics is inherent to the connectivity demonstration dataset included in
the distribution packages of TVB. The general implementation for weights and
tract lengths is a full $nodes\,\times\,nodes$ matrices without any symmetry restrictions.
\remove{Two types of brain connectivity
are distinguished in TVB,
that is region-based and surface-based connectivity. In the former case,
the networks comprise discrete nodes and connectivity, in which each node
models the neural population activity of a brain region and the
connectivity is composed of interregional fibers. The connectivity matrix
defines the connection strengths and time delays via signal transmission
between all network nodes. In the latter case, cortical and sub-cortical
areas are modeled on a finer and more realistic scale, in which each point
represents a neural population model. This approach allows a detailed
spatial sampling, in particular of the cortical surface, resulting in a
spatially continuous approximation of the neural activity as in neural
field modeling (Deco et al., 2008). Thus the connectivity is composed of
local intra-cortical and global inter-cortical fibers.}\add[PSL]{Two types
of structural connectivity are distinguished in TVB, that is long- and
short-range connectivity, given by the connectivity matrix and
the folded cortical surface respectively. The connectivity matrix defines
the connection strengths and time delays via finite signal transmission speed
between two regions of the brain. The cortical surface allows a more detailed
spatial sampling resulting in a spatially continuous approximation of the
neural activity as in neural field modeling} \citep{Deco_2008a, Coombes_2010, Bressloff_2012}.
\add[PSL]{When using neural mass models, building the network upon the
surface allows for the application of arbitrary local connectivity kernels
which represent short-range intra-cortical connections. Additionally, networks
themselves can be defined at two distinct spatial scales yielding two
types of simulations (or brain network models): surface-based and
region-based. In the former case, cortical and sub-cortical areas are shaped
more realistically, each vertex of the surface is considered a node and is
modeled by a neural population model; several nodes belong to a specific
brain region, and the edges of the network have a distance of the order of
a few millimeters. The influence of delayed activity coming from other
brain regions is added to the model via the long-range connectivity.
In the latter case of nodes only per region, the connectome itself is used as
a coarser representation of the brain network model. The networks comprise
discrete nodes, each of them models the neural population activity of a
brain region and the edges represent the long-range connectivity
(interregional fibers) on the order of a few centimeters. Consequently, in
surface-based simulations both types of connectivity, short- and long-range,
coexist whereas in region-based simulations one level of geometry is lost:
the short-range connectivity.}
Neural field models have been developed over many years for their ability to
capture the collective dynamics of relatively large areas of the brain in both
analytically and computationally tractable forms \citep{Beurle_1956,
Wilson_1972, Wilson_1973, Nunez_1974, Amari_1975, Amari_1977, Wright_1995,
Jirsa_1996, Jirsa_1997, Robinson_1997, Jirsa_2002, Attay_2006, Bojak_2010}.
Effectively neural field equations are tissue level models that describe the
spatiotemporal evolution of coarse grained variables such as synaptic or firing
rate activity in populations of neurons. Some of these models include explicit
spatial terms while others are formulated without an explicit spatial component
leaving open the possibility to apply effectively arbitrary local connectivity
kernels. The lumped representation of the dynamics of a set of similar neurons
via a common variable (e.g., mean firing rate and mean postsynaptic potential)
is known as neural mass modeling \citep{Freeman_1975book, Freeman_1992,
LopesdaSilva_1974}. Neural mass models accounting for parameter dispersion in
the neuronal parameters include \citep{Assisi_2005, Stefanescu_2008,
Stefanescu_2011, Jirsa_2010}. Networks of neural masses, without an explicit
spatial component within the mass but with the possibility to apply local
connectivity kernels (e.g., Gaussian or Laplacian functions) between masses, can
be used to approximate neural field models. Both neural field and neural mass
modeling approaches embody the concept from statistical physics that macroscopic
physical systems obey laws that are independent of the details of the
microscopic constituents of which they are built \citep{book_Haken_1983}. These
and related ideas have been exploited in neurosciences \citep{Kelso_1995,
Buzsaky_2006}.
In TVB, our main interest lies in using the mesoscopic laws governing the
behavior of neural populations and uncovering the laws driving the processes
on the macroscopic brain network scale. The biophysical mechanisms
available to microscopic single neuron approaches are absorbed in the mean
field parameters on the mesoscopic scale and are not available for
exploration other than through variation of the mean field parameters
themselves. As a consequence, TVB represents a neuroinformatics tool that
is designed to aid in the exploration of large-scale network mechanisms of
brain functioning (see \citet{Ritter_2013} for an example of modeling with TVB).
\add{Furthermore, TVB's approach to multi-modal neuroimaging integration in
conjunction with neural field modeling shares common features with the work of}
\citet{Bojak_2010a, Bojak_2011} and \citet{Babajani_2010}\add{. The crucial difference
is that the structure upon which TVB has been designed represents a
generalized large-scale ``computational neural model'' of the whole brain.
The components of this large-scale model have been separated as cleanly as
possible, and a specific structure has been defined for the individual
components. This generic structure is intended to serve the purpose of
restricting the form of models enough to make direct comparison straight
forward while still permitting a sufficiently large class of models to be
expressed. Likewise, the paradigms presented during the last few years in
this line of research} \citep{Sotero_2007, Sotero_2008} \add{could potentially
be reproduced, tested and compared in TVB. The mathematics underlying our model-based
approach have been partially described in various original articles}
\citep{Deco_2011,Deco_2012} \add{and will be reviewed in more detail in future articles.}
\subsection{Informatics}
From an informatics perspective, a large-scale simulation project requires
a well defined yet flexible workflow, i.e. adaptable according to the
users profiles. A typical workflow in TVB involves managing project
information, uploading data, setting up simulation parameters (model,
integration scheme, output modality), launching simulations (in parallel
if needed), analyzing and visualizing, and finally storing results and
sharing output data.
\change[PSL]{The web interface allows users without programming
knowledge to access TVB to perform customized simulations using their
patients' data.}{The web interface allows users without programming
knowledge to access TVB to perform customized simulations (e.g. clinicians
could use their patient's data obtained from DTI studies).} In addition,
it enables them to gain a deeper understanding of the theoretical
approaches behind the scenes. On the other hand, theoreticians can design
their own models and get an idea of their biophysical realism, their
potential physiological applications and implications. As both kinds of
users may work within the same framework, the interplay of theory and
experiment or application is accelerated. Additionally, users with
stronger programming skills benefit from all the advantages provided by
the Python programming language: easy-to-learn, easy-to-use, scriptable
and with a large choice of scientific modules
\citep{Oliphant_2006}\add[PSL]{.}
% WHY PYTHON?
TVB has been principally built in the Python programming language due to
its unique combination of flexibility, existing libraries and the ease,
with which code can be written, documented, and maintained by
non-programmers. The simulation core, originally developed in MATLAB, was
ported to Python given its current significance in the numerical computing
and neuroscience community and its already proven efficiency for
implementing modeling tools \remove[PSL]{.}\citep{Spacek_2008}\add[PSL]{.}
\add{Simulations benefit from vectorized numerical computations
with NumPy arrays and are enhanced by the use of the \emph{numexpr} package.
Although this allows rather efficient single simulations, the desire to
systematically explore the parameter spaces of the neural dynamic models, and to
compare many connectivity matrices, has lead to the implementation of code
generation mechanisms for the majority of the simulator core -- producing C code
for both native CPU and also graphics processing units (GPU), leading to a
significant speed up of parameter sweeps and parallel simulations (5x from
Python to C, 40x from C to GPU). Such graphics units have become popular in
scientific computing for their relatively low price and high computing power.
Going forward, the GPU implementation of TVB will require testing and
optimization before placing it in the hands of users. }
This article intends to give a comprehensive but non-exhaustive
description of TVB, from both technical and scientific points of view. It
will describe the framework's architecture, the simulation core, and the
user interfaces. It will also provide two examples, using specific
features of the simulator, extracted from the demo scripts which are
currently available in TVB's distribution packages. \remove{The mathematics
underlying the brain network models used in TVB is briefly described in
various original articles and will be
reviewed in more detail elsewhere.}
%##--------------------------------------------------------------------------##%
%## SOFTWARE DESCRIPTION ##%
%##--------------------------------------------------------------------------##%
\begin{methods}
\section{TVB Architecture}
\note[PSL]{Smaller font is given by the Frontiers In LaTeX template}
The architectural model of the system has two main
components: the scientific computing core and the supporting framework
with its graphical user interface. Both software components communicate
through an interface represented by TVB-\tvbdatatype{Datatypes},
\change{as}{which are} described in subsection \ref{subsection:tvb-datatypes}.
\add{In Fig. 1 TVB's architectural details are illustrated and explained in more
depth.}
\paragraph*{General aspects} TVB is designed for three main deployment
configurations, according to the available hardware resources: 1) Stand
Alone; 2) Client-Server or 3) Cluster. In the first, a local workstation
is assumed to have certain display, computing power and storage capacity
resources. In the second, an instance of TVB is running on a server
connected through a network link to client units, and thus accessible to a
certain number of users. In this deployment model, simulations use the
back-end server's computing power while visualization tasks use resources
from the client machine. The third is similar to the client-server
configuration, but with the additional advantage of parallelization
support in the back-end. The cluster itself needs to be configured
separately of TVB.
Based on the usage scenarios and user's level of programming knowledge, two
user profiles are represented: a graphical user (G-user) and scripting user
(S-user). We therefore provide the corresponding main interfaces based on
this classification: a graphical user interface (web) and a scripting
interface (IDLE). S-users and G-users have different levels of control over
different parts of the system. The profile of S-users is thought to be that
of scientific developers, that is, researchers who can elaborate complex
modeling scenarios, add their own models or directly modify the source code
to extend the scientific core of TVB, mostly working with the scientific
modules. They do, nevertheless, have the possibility to enable the database
system. In contrast, G-users are relatively more constrained to the features
available in the stable releases of TVB, since their profile corresponds
more to that of researchers without a strong background in computational
modeling. The distinction between these two profiles is mainly a
categorization due to the design architecture of TVB. For instance, we could
also think of other type of users who want to work with TVB's GUI and are
comfortable with programming, and therefore they could potentially make
modifications in the code and then see the effect of those when launching
the application in a web browser.
The development of TVB is managed under Agile techniques. In
accord therewith, each task is considered as \emph{done}, after completing a validation
procedure that includes: adding a corresponding automated unit-test, labeling the
task as \emph{finished} from the team member assigned to implement
the task and further tagging as \emph{closed} from a team member
responsible for the module, which means a second level of testing. Before
releasing stable packages, there is a period for manual testing, that is, a
small group of selected users from different institutions check the main
features and functionalities through both interfaces. The navigation and workflows scenarios
through the web-based interface are evaluated by means of automated
integration tests for web-applications running with Selenium
(\url{http://docs.seleniumhq.org/}) and Apache-JMeter
(\url{http://jmeter.apache.org/}) on top of a browser engine.
Special effort is being made to provide good code-coverage, including regression tests. Accordingly, the
simulation engine of TVB has automated unit-tests, to guarantee the proper and
coordinated functioning of all the modules, and simple programs
(demonstration scripts), that permit to qualitatively evaluate
the scientific correctness of the results.
The development version of TVB is currently
hosted on a private cluster, where we use the version control system
\emph{svn} (subversion). \add{Additionally, as any large collaborative
open-source project, it is also available in a public repository, using
the distributed version control system \emph{git}} \citep{Chacon_2009}
\add{to make accessible the scientific core and to gather, manage and
integrate contributions from the community.} The
distribution packages for TVB come with an extensive documentation,
including: a \emph{User Guide}, explaining how to install TVB, set up
models and run them; \emph{Tutorials}, \emph{Use Cases} and \emph{Script
Demos}, guiding users to achieve predefined simulation scenarios; and a
\emph{Developer Guide} and \emph{API reference}. \remove{There is an
active users group of TVB hosted in Google Groups where users can ask
questions, report issues and suggest improvements or new features.} Table
1 \add{provides the links to: the official TVB website,
where distribution packages for Linux and Mac OS (32 and 64 bits) and
Windows (32 bits) are available for download; the active users group of
TVB hosted in Google Groups, where users can ask questions, report issues
and suggest improvements or new features; and the public repository, where
the source code of both the framework and scientific library (which
contains the simulation engine) are available.}
\note{New table providing links}
%--------------------------------TABLE--------------------------------------%%
\begin{center}
\begin{table}\label{tab:tvb_links}\tiny
\caption{TVB links}
\begin{tabularx}{0.5\textwidth}{l l}
\toprule
TVB official website &{\tiny{
\url{http://www.thevirtualbrain.org}}} \\
Distribution packages &
{\tiny{\url{http://www.thevirtualbrain.org/register}}} \\
Public repository &
{\tiny{\url{https://github.com/the-virtual-brain}}} \\
User group &
{\tiny{\url{https://groups.google.com/group/tvb-users/}}} \\
\bottomrule
\end{tabularx}
\end{table}
\end{center}
%
%--------------------------------FIGURE--------------------------------------%%
%% Fig. 1
%
%##--------------------------------------------------------------------------##%
%## INSTALL ##%
%##--------------------------------------------------------------------------##%
%
\paragraph*{Installation and System Requirements}
When using the web \change{application}{interface}, users are
\change{required}{recommended} to have a high definition monitor (at
least 1600 x 1000 pixels), a WebGL and WebSockets compatible browser
(latest versions of Mozilla Firefox, Apple Safari or Google Chrome), and
a WebGL-compatible graphics card, that supports OpenGL version 2.0 or
higher \citep{opengl-redbook}.
Regarding memory and storage capacity, for a stand alone installation a
minimum of 8GB of RAM \add[PSL]{is recommended. For multi-users environments}
\change[PSL]{50GB}{5GB} of space per user is
\change[PSL]{recommended}{suggested}. \add[PSL]{This is a storage quota
specified by an administrator to manage
the maximum hard disk space per user.} As for computing power one CPU core is needed
for a simulation with a small number of nodes, while simulations with a
large number of nodes, such as surface simulations, can make use of a few
cores if they are available. When the number of launched simulations is
larger than the number of available cores, a serialization is recommended
(a serialization mechanism is provided by the supporting framework
through the web user interface by specifying the maximum of simultaneous
jobs allowed). In order to use the Brain Connectivity Toolbox
\citep{Rubinov_2010}, MATLAB or Octave should be installed, activated and
accessible for the current user. \remove[PSL]{The Brain Connectivity
Toolbox does not need to be installed or enabled separately in any way,
as TVB will temporarily append its own copy of the toolbox to the
MATLAB/Octave path.}
%##--------------------------------------------------------------------------##%
%## WEB - FRAMEWORK ##%
%##--------------------------------------------------------------------------##%
\subsection{TVB Framework}\label{subsec:TVBFramework}
The supporting framework provides a database back-end, workflow management
and a number of features to support collaborative work. \add{The latter
feature permits TVB to be setup as a multi-user application. In this
configuration, a login system enables users to access their personal
sessions; by default their projects and data are private, but they can be
shared with other users.} The graphical user interface (GUI) is web based,
making use of HTML 5, WebGL, CSS3 and Java Script \citep{Bostock_2011}
tools to provide an intuitive and responsive interface that can be
locally and remotely accessed.
\subsubsection{Web-based GUI}
TVB provides a web-based interactive framework to generate, manipulate and
visualize connectivity and network dynamics. Additionally, TVB comprises a
set of classic time-series analysis tools, structural and functional
connectivity analysis tools, as well as parameter exploration facilities
which can launch \change{parallel simulations}{simulations in parallel} on
a cluster or on multiple compute cores of a server. The GUI of TVB has 6
main working areas: \textbf{USER}, \textbf{PROJECT}, \textbf{SIMULATOR},
\textbf{ANALYZE}, \textbf{STIMULUS} and \textbf{CONNECTIVITY}. In
\textbf{USER}, the users manage their accounts and TVB settings. In
\textbf{PROJECT}, individual projects are managed and navigation tools
are provided to explore their structure as well as the data associated
with them. \add{A sub-menu within this area provides a dashboard with a
list of all the operations along with their current status (running, error,
finished), owner, wall-time and associated data, among other information}.
In \textbf{SIMULATOR} the large-scale network model is set up and
simulations launched, additional viewers for structural and functional
data are offered in 2D and 3D, as well as other displays to visualize the
results of a simulation. A history of simulations is also available in
this area. In \textbf{ANALYZE} time-series and
network analysis methods are provided. In \textbf{STIMULUS}, users can
interactively create stimulation patterns. Finally, in
\textbf{CONNECTIVITY}, users are given a responsive interface to edit the
connectivity matrices assisted by interactive visualization tools. Fig.
\ref{Fig02:tvb_wui} \change{summarizes the general usage of}{depicts the
different working areas, as well as a number of their sub-menus, available
through} the web UI. \add{A selection of screenshots illustrating the
interface in a web browser is given in Fig.} \ref{Fig03:ui_screenshots}.
%%%--------------------------------FIGURE--------------------------------------%%
%% Fig. 2
%%--------------------------------FIGURE--------------------------------------%%
% Fig. 3
%##--------------------------------------------------------------------------##%
%## DATA ##%
%##--------------------------------------------------------------------------##%
\subsubsection{Data Management and Exchange}
One of the goals of TVB is to allow researchers from different backgrounds
and with different programming skills to have quick access to their
simulated data. Data from TVB can be exchanged with other instances of TVB
(copies installed on different computers) or with other applications in the
neuroscientific community, e.g. MATLAB, Octave, The Connectome ToolKit
\citep{Gerhard_2011}.
\paragraph*{Export} A project created within TVB can be entirely exported
to a .zip file. Besides storing all the data generated within a particular
project in binary files, additional XML files are created to provide a
structured storage of metadata, especially with regard to the steps taken
to set up a simulation, configuration parameters for specific operations,
time-stamps and user account information. This mechanism procures a summary
of the procedures carried on by researchers within a project which is used
for sharing data across instances of TVB. The second export mechanism
allows the export of individual data objects. The data format used in TVB
is based on the HDF5 format \remove{(The HDF Group. Hierarchical data format
version 5)} \citep{HDF5} because it presents a number of advantages over
other formats:
1) huge pieces of data can be stored in a condensed form;
2) it allows grouping of data in a tree structure;
3) it allows metadata assignment at every level; and
4) it is a widely used format, accessible in several programming
languages and applications.
Additionally, each object in TVB has a global unique identifier (GUID)
which makes it easy to identify an object across systems, avoiding naming
conflicts among files containing objects of the same type.
\paragraph*{Import}
A set of mechanisms ("uploaders") is provided in TVB to import data into the
framework, including neuroimaging data generated independently by other
applications. The following formats are supported: NIFTI-1 (volumetric time-
series), GIFTI (surfaces) and CFF (connectome file). General compression formats,
such as ZIP and BZIP2 are also supported for certain data import routines that
expect a set of ASCII text files compressed in an archive. Hence the use of
general compression formats means that preparing datasets for TVB is as simple
as generating an archive with the correct ASCII files, in contrast to some of
the other neuroscientific data formats found elsewhere. For instance, a
\tvbdatatype{Connectivity} dataset (\emph{connectome}) may be uploaded as a zip
folder containing the following collection of files: (i) areas.txt, (ii)
average\_orientations.txt, (iii) info.txt, (iv) positions.txt, (v)
tract\_lengths.txt and (vi) weigths.txt. More conventions and guidelines to
use each uploader routine can be found in the \emph{User Guide} of TVB's
documentation.
\subsubsection{File Storage}
The storage system is a tree of folders and files. The actual location on
disk is configurable by the user, but the default is a folder called
``TVB'' in the user's home folder. There is a sub-folder for each
\textbf{Project} in which an XML file containing details about the
project itself is stored. Then for each operation, one folder per
operation is created containing a set of .h5 files generated during that
particular operation, and one XML file describing the operation itself.
The XML contains tags like \emph{creation date}, \emph{operation status}
(e.g. Finished, Error), \emph{algorithm reference}, \emph{operation
GUID}, and most importantly \emph{input parameters dictionary}.
Sufficiently detailed information is stored in the file system to be able
to export data from one instance of TVB and to then import it into another
instance, correctly recreating projects, including all operations and
their results.
Even though the amount of data generated per operation varies greatly,
since it depends strongly on the Monitors used and parameters of the
simulation, some rough estimates are given below:
- A 1000 ms long, region-based simulation with all the default parameters
requires approximatively 1 MB of disk space.
- A 10 ms long, surface-based simulation, using a precalculated sparse
matrix to describe the local connectivity kernel and all the default
parameters, requires about 280 MB.
Users can manually remove unused data using the corresponding controls in
TVB's GUI. In this case, all files related to these data are also deleted,
freeing disk space. The amount of physical storage space available to TVB
can be configured in the \textbf{USER -> Settings} working area of the GUI
-- this is, of course, limited by the amount of free space available on the
users hard drives.
\subsubsection{Database Management System}
% Why SQLite and PostgreSQL?
Internally, TVB framework uses a relational database (DB), for ordering and
linking entities and as an indexing facility to quickly look up data.
At install time, users can choose between SQLite
(a file based database and one of the most used embedded DB systems) and
PostgreSQL (a powerful, widely spread, open-source object-relational DB
system which requires a separate installation by users) as the DB engine.
In the database, only references to the entities are stored, with the actual
operation results always being stored in files, due to size. A relational
database was chosen as it provides speed when filtering entities and
navigating entity relationship trees.
\subsection{TVB Datatypes}\label{subsection:tvb-datatypes}
In the architecture of TVB, a middleware layer represented by
TVB-\tvbdatatype{Datatypes} allows the handling and flow of data between
the scientific kernel and the supporting framework.
TVB-\tvbdatatype{Datatypes} are annotated data structures which contain
one or more data attributes and associated descriptive information, as
well as methods for operating on the data they contain. The definition of
a \tvbdatatype{Datatype} is achieved using TVB's traiting system, which
was inspired by the traiting system developed by Enthought
\citep{EnthoughtTraits}. The traiting system of TVB, among other things,
provides a mechanism for annotating data, that is, associating additional
information with the data which is itself usually a single number or an
array of numbers. A complete description of TVB's traiting system is
beyond the scope of this article. However, in describing TVB's
\tvbdatatype{Datatypes} we will give an example of its use, which should
help to provide a basic understanding of the mechanism.
A number of basic TVB-\tvbdatatype{Datatypes} are defined based on
\tvbtrait{Types} that are part of the traiting system, with these traited
\tvbtrait{Types}, in turn, wrapping Numpy data types. For instance,
TVB-\tvbdatatype{FloatArray} is a datatype derived from the traiting
system's \tvbtrait{Array} type, which in turn wraps Numpy's
\textbf{ndarray}. The traiting system's \tvbtrait{Array} type has
attributes or annotations, such as: \tvbattribute{dtype}, the numerical
type of the data contained in the array; \tvbattribute{label}, a short
(typically one or two word) description of what the \tvbtrait{Array}
refers to, this information is used by the supporting framework to create
a proper label for the GUI; \tvbattribute{doc}, a longer description of
what the \tvbtrait{Array} refers to, allowing the direct integration of
useful documentation into array objects; and \tvbattribute{default}, the
default value for an instance of an \tvbtrait{Array} type. In the case of
a \tvbdatatype{FloatArray}, the \tvbattribute{dtype} attribute is fixed
as being numpy.float64.
More complex, higher-level, TVB-\tvbdatatype{Datatypes} are then built up
with attributes that are themselves basic TVB-\tvbdatatype{Datatypes}.
For example, TVB-\tvbdatatype{Connectivity} is datatype which includes
multiple \tvbdatatype{FloatArray}s, as well as a number of other traited
types, such as \tvbtrait{Integer} and \tvbtrait{Boolean}, in its
definition. An example of a \tvbdatatype{FloatArray} being used to define
an attribute of a \tvbdatatype{Connectivity} can be seen in Code
\ref{code:floatarray}. The high-level \tvbdatatype{Datatypes} currently
defined in TVB are summarized in Table 2. %\ref{tab:tvb_datatypes}.
%%--------------------------------CODE--------------------------------------%%
\pagebreak
\begin{lstlisting}[backgroundcolor=\color{black!5},
caption= An instance of TVB's \tvbdatatype{FloatArray}
\tvbdatatype{Datatype} being used to define the conduction
\tvbattribute{speed} between brain regions as an attribute
of a \tvbdatatype{Connectivity} \tvbdatatype{Datatype} \\,
commentstyle=\itshape\color{green!50!black},
frame=single,
stringstyle=\color{magenta},
keywordstyle={\bf\ttfamily\color{blue}},
label=code:floatarray,
literate=%
{0}{{{\color{orange}0}}}1
{3.}{{{\color{orange}3.}}}1,
morekeywords={*,FloatArray},
showspaces=false,
showtabs=false]
speed = FloatArray(
label = "Conduction speed",
default = numpy.array([3.0]),
doc = """A single number or matrix of conduction speeds for the
myelinated fibre tracts between regions.""")
\end{lstlisting}
\change{As an example of the flow of data through TVB using
\tvbdatatype{Datatypes}. } {An example indicating the usage and features
of TVB-\tvbdatatype{Datatypes} is provided below. } When a user uploads a
connectivity dataset through the UI, an instance of a
\tvbdatatype{Connectivity} datatype is generated. This
\tvbdatatype{Connectivity} datatype is one of the required input arguments
when creating an instance of \change{the simulation
engine}{\tvbmodule{Simulator}}. As a result of the execution of a
simulation, other TVB-\tvbdatatype{Datatypes} are generated, for instance
one or more \tvbdatatype{TimeSeries} datatypes. Specifically, if the
simulation is run using the MEG and EEG recording modalities then
\tvbclass{TimeSeriesMEG}, \tvbclass{TimeSeriesEEG}, which are subclasses
of \tvbdatatype{TimeSeries}, are returned. Both the
\tvbdatatype{Connectivity} and \tvbdatatype{TimeSeries} datatypes are
accepted by a range of appropriate analysis and visualization methods.
Further, TVB-\tvbdatatype{Datatypes} have attributes and metadata which
remains accessible after exporting in TVB format. The metadata includes a
technical description of the data (storage size for instance) as well as
scientifically relevant properties and useful documentation to properly
interpret the dataset. In the shell interface, the attributes of
TVB-\tvbdatatype{Datatype} can be accessed by their key-names in the same
way as Python dictionaries.
%%--------------------------------FIGURE--------------------------------------%%
%% Fig. 4
\begin{center} \begin{table*}[ht]\tiny \label{tab:tvb_datatypes}
\caption{TVB Datatypes. Specifications about the requirements to build a
TVB-Datatype can be found in the documentation of the distribution packages.}
\begin{tabularx}{\textwidth}{lll} \toprule Base Class
Datatype & Description & Derived Classes \\
\midrule Connectivity & Maps connectivity matrix data &
Connectivity\\ \\ Surfaces & Covers surface
representations & CorticalSurface,
SkinAir,
BrainSkull,
SkullSkin,
EEGCap,
FaceSurface,
Cortex,
RegionMapping, \\
&& LocalConnectivity\\ \\
Volumes & Wraps volumetric data & ParcellationMask,
StructuralMRI \\ \\
Sensors & Wraps sensors data used in different acquisition
techniques to generate physiological recordings
& SensorsEEG, SensorsMEG, SensorsInternal\\ \\
ProjectionMatrix & Wraps matrices defining a linear operator to map the
spatial sources into the leadfield domain.
& ProjectionRegionEEG, ProjectionSurfaceEEG, ProjectionRegionMEG \\
& It relates two datatypes: a source of type
Connectivity or Surface and a set of Sensors.
& ProjectionSurfaceMEG \\ & The matrix is
computed using OpenMEEG. \citep{Gramfort_2010} & \\ \\
Equations & Commonly used functions for defining local connectivity
kernels and stimulation patterns. & \\ \\
SpatialPattern & Contains patterns mainly used as stimuli. It makes use
of Equation datatypes
& SpatioTemporalPattern,
StimuliRegion,
StimuliSurface,
SpatialPatternVolume \\ \\
TimeSeries & One of the most important TVB-Datatypes. Derived classes
wrap measurements recorded & TimeSeriesRegion,
TimeSeriesSurface,
TimeSeriesVolume,
TimeSeriesEEG, \\ & under different acquisition
modalities. & TimeSeriesMEG \\ \\
Graph & Wraps results from a covariance analysis or results from
BCT analyzers & Covariance,
ConnectivityMeasure\\ \\
MappedValues & Wraps a single value computed from a TimeSeries object &
\\ ModeDecomposition & Wraps results from matrix factorization
analysis (i.e. PCA and ICA) & PrincipalComponents,
IndependentComponents\\ \\
Spectral & Wraps results from frequency analysis &
FourierSpectrum, WaveletCoefficients, ComplexCoherenceSpectrum \\
\bottomrule \end{tabularx} \end{table*} \end{center}
%##--------------------------------------------------------------------------##%
%## SIMULATOR ##%
%##--------------------------------------------------------------------------##%
\subsection{TVB Simulator}
The simulation core of TVB brings together a mesoscopic model of neural
dynamics with structural data. \add{The latter defines both the spatial
support} (see Fig. \ref{Fig04:connectivity})\add{, upon which the brain
network model is built, and the hierarchy of anatomical connectivity, that
determines the spatial scale represented by the structural linkages
between nodes} \citep{Freeman_1975book}. \change{It}{Simulations} then
recreate the emergent brain dynamics by numerically integrating this
coupled system of differential equations. All these entities have their
equivalent representation as \tvbclass{classes} either in the scientific
\tvbmodule{modules} or \tvbdatatype{datatypes}, and are bound together in
an instance of the \tvbclass{Simulator} class. \add{In the following
paragraphs we describe all the individual components required to build a
minimal representation of a brain network model and run a simulation, as
well as the outline of the operations required to
initialize a \tvbclass{Simulator} object and the operations of the update
scheme.} \remove{This class is defined in the \tvbmodule{simulator}
module and has several \tvbmethod{methods} to set up the spatiotemporal
dimensions of the input and output arrays, based on configurable
attributes of the individual components such as integration time step
(e.g.
\tvbmodule{integrators}.\tvbclass{HeunDeterministic}.\tvbattribute{dt}),
structural spatial support (e.g.
\tvbdatatype{connectivity}.\tvbclass{Connectivity} or
\tvbdatatype{surfaces}.\tvbclass{CorticalSurface}) and transmission speed
(e.g.
\tvbdatatype{connectivity}.\tvbclass{Connectivity}.\tvbattribute{speed})
as well as a cascade of specific \tvbmethod{configuration methods} to
initialize all the individual components required to build a minimal
representation of a brain network model and perform a
simulation.}
%%--------------------------------FIGURE--------------------------------------%%
% Fig. 5
\subsubsection{Coupling}
The brain activity (state variables) that has been propagated over the
long-range \tvbdatatype{Connectivity} pass through these functions before
entering the equations of a \tvbclass{Model} describing the local dynamics.
A \tvbclass{Coupling} function's primary purpose is to rescale the
incoming activity to a level appropriate to the population model. The base
\tvbclass{Coupling} class as well as a number of different coupling
functions are implemented in the \tvbmodule{coupling} module, for instance
\tvbclass{Linear} and \tvbclass{Sigmoidal}.
\subsubsection{Population Models}
% The thing class thing model metaphor
A set of default mesoscopic neural models are defined in TVB's
\tvbmodule{models}. All these models of local dynamics are classes derived
from a base \tvbclass{Model} class.
We briefly discuss the implemented population models in order of
increasing complexity. They include a generic two dimensional oscillator,
a collection of classical population models and two recently developed
multi-modal neural mass models. Below, $N$ refers to the number of state
variables or equations governing the evolution of the model's temporal
dynamics; $M$ is the number of modes and by default $M=1$ except for the
multi-modal models.
The \tvbclass{Generic2dOscillator} model ($N=2$) is a generic phase-plane
oscillator model capable of generating a wide range of phenomena observed
in neuronal population dynamics, such as multistability, the coexistence
of oscillatory and non-oscillatory dynamics, as well as displaying
dynamics at multiple time scales.
The \tvbclass{WilsonCowan} model \citep{Wilson_1972} ($N=2$) describes the
firing rate of a neural population consisting of two subpopulations (one
excitatory and the other inhibitory). It was originally derived using
phenomenological arguments. This neural mass model provides an intermediate
between a microscopic and macroscopic level of description of neural
assemblies and populations of neurons since it can be derived from
pulse-coupled neurons \citep{Haken_2001} and its continuum limit
resembles neural field equations \citep{Jirsa_1996}.
The \tvbclass{WongWang} model \citep{Wong_2006} represents a reduced
system of $N=2$ coupled nonlinear equations, originally derived for
decision making in two-choice tasks. The \tvbclass{BrunelWang} model
\citep{Brunel_2001, Brunel_2003} is a mean field model derived from
integrate-and-fire spiking neurons and makes the approximation of
randomly distributed interspike intervals. It is notable that this
population model shows only attractor states of firing rates. It has been
extensively used to study working memory. Its complexity resides in the
number of parameters that it uses to characterize each population
($N=2$). These parameters correspond to physical quantities that can be
measured in neurophysiology experiments. The current implementation of
this model is based on the approach used in \citep{Deco_2012}.
The \tvbclass{JansenRit} model \citep{Jansen_1995} is a derivative of the