Skip to content

Commit e9c8674

Browse files
author
Alexander Ororbia
committed
integrated alpha-syn, cleaned up exp-syn
1 parent 65ca503 commit e9c8674

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

docs/modeling/synapses.md

+14
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,20 @@ This (chemical) synapse performs a linear transform of its input signals. Note t
7474
:noindex:
7575
```
7676

77+
### Alpha Synapse
78+
79+
This (chemical) synapse performs a linear transform of its input signals. Note that this synapse is "dynamic" in the sense that its efficacies are a function of their pre-synaptic inputs; there is no inherent form of long-term plasticity in this base implementation. Synaptic strength values can be viewed as being filtered/smoothened through a kernel that models more realistic rise and fall times of synaptic conductance..
80+
81+
```{eval-rst}
82+
.. autoclass:: ngclearn.components.AlphaSynapse
83+
:noindex:
84+
85+
.. automethod:: advance_state
86+
:noindex:
87+
.. automethod:: reset
88+
:noindex:
89+
```
90+
7791
### Short-Term Plasticity (Dense) Synapse
7892

7993
This synapse performs a linear transform of its input signals. Note that this synapse is "dynamic" in the sense that it engages in short-term plasticity (STP), meaning that its efficacy values change as a function of its inputs/time (and simulated consumed resources), but it does not provide any long-term form of plasticity/adjustment.

ngclearn/components/synapses/alphaSynapse.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ def advance_state(
9090
s = inputs
9191
## advance conductance variable
9292
_out = jnp.matmul(s, weights) ## sum all pre-syn spikes at t going into post-neuron)
93-
dhsyn_dt = _out * g_syn_bar - h_syn/tau_syn
93+
dhsyn_dt = -h_syn/tau_syn + _out * g_syn_bar
9494
h_syn = h_syn + dhsyn_dt * dt ## run Euler step to move intermediate conductance h
9595

96-
dgsyn_dt = -g_syn/tau_syn + h_syn/tau_syn
96+
dgsyn_dt = -g_syn/tau_syn + h_syn # or -g_syn/tau_syn + h_syn/tau_syn
9797
g_syn = g_syn + dgsyn_dt * dt ## run Euler step to move conductance g
9898

9999
i_syn = -g_syn * (v - syn_rest)

ngclearn/components/synapses/exponentialSynapse.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def advance_state(
8888
s = inputs
8989
## advance conductance variable
9090
_out = jnp.matmul(s, weights) ## sum all pre-syn spikes at t going into post-neuron)
91-
dgsyn_dt = _out * g_syn_bar - g_syn/tau_syn
91+
dgsyn_dt = -g_syn/tau_syn + _out * g_syn_bar
9292
g_syn = g_syn + dgsyn_dt * dt ## run Euler step to move conductance
9393
i_syn = -g_syn * (v - syn_rest)
9494
outputs = i_syn #jnp.matmul(inputs, Wdyn * Rscale) + biases

0 commit comments

Comments
 (0)