-
Notifications
You must be signed in to change notification settings - Fork 1
/
model_definitions.yaml
128 lines (113 loc) · 2.88 KB
/
model_definitions.yaml
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
%YAML 1.2
---
# Operator templates (operators are used to define sets of coupled differential equations in PyRates)
#####################################################################################################
# operator for the Van der Pol oscillator
vdp_op:
base: OperatorTemplate
equations:
- "x' = z"
- "z' = mu*z*(1 - x^2) - x + inp"
variables:
x: output(0.0)
z: variable(1.0)
mu: 1.0
inp: input(0.0)
# phase evolution operator for the Kuramoto oscillator
phase_op:
base: OperatorTemplate
equations:
- "d/dt * theta = omega + K*s_in + s_ext"
variables:
theta: output
omega: 10.0
K: 1.0
s_in: input
s_ext: input
# sinusoidal wrapper
sin_op:
base: OperatorTemplate
equations:
- "s = sin(2*pi*theta)"
variables:
theta: input
s: output
# mean-field equations for a population of globally coupled quadratic integrate-and-fire (QIF) neurons
qif_op:
base: OperatorTemplate
equations:
- "r' = (Delta/(pi*tau) + 2.0*r*v) / tau"
- "v' = (v^2 + eta + I_ext + tau*r_in - (pi*tau*r)^2) / tau"
variables:
r: output(0.01)
v: variable(-2.0)
Delta: 1.0
tau: 1.0
eta: -5.0
I_ext: input(0.0)
r_in: input(0.0)
# mean-field equations for qif neurons with spike-frequency adaptation (SFA)
qif_sfa_op:
base: qif_op
equations:
replace:
eta: eta - a
add:
- "a' = x/tau_a"
- "x' = alpha*r - 2.*x/tau_a - a/tau_a"
variables:
a: variable(0.0)
x: variable(0.0)
alpha: 0.5
tau_a: 10.0
# leaky integrator operator
li_op:
base: OperatorTemplate
equations: "v' = -v/tau + k*r_in + I_ext + eta"
variables:
v: output(0.0)
tau: 10.0
k: 1.0
eta: 0.0
r_in: input(0.0)
I_ext: input(0.0)
# hyperbolic tangent transformation
tanh_op:
base: OperatorTemplate
equations: "r = tanh(v)"
variables:
r: output(0.0)
v: input(0.0)
# node templates (nodes are used to group operators together to form a dynamic network node in PyRates)
#######################################################################################################
# Van der Pol oscillator
vdp_pop:
base: NodeTemplate
operators:
- vdp_op
# Kuramoto oscillator with a sinusoidal wrapper that converts the raw phase into a periodic signal
sin_pop:
base: NodeTemplate
operators:
- phase_op
- sin_op
# population of QIF neurons with SFA
qif_sfa_pop:
base: NodeTemplate
operators:
- qif_sfa_op
# leaky integrator node with a tanh activation function
tanh:
base: NodeTemplate
operators:
- li_op
- tanh_op
# circuit templates (circuits are collections of nodes, connected by edges)
###########################################################################
# single QIF population with SFA and recurrent coupling
qif_sfa:
base: CircuitTemplate
nodes:
p: qif_sfa_pop
edges:
- [p/qif_sfa_op/r, p/qif_sfa_op/r_in, null, {weight: 15.0}]