WongWangStep#
- class brainmass.WongWangStep(in_size, tau_S=Quantity(0.1, 's'), gamma=0.641, a=Quantity(270., 'Hz / nA'), theta=Quantity(0.31, 'nA'), J_N11=Quantity(0.2609, 'nA'), J_N22=Quantity(0.2609, 'nA'), J_N12=Quantity(0.0497, 'nA'), J_N21=Quantity(0.0497, 'nA'), J_A_ext=Quantity(0.0002243, 'nC'), mu_0=Quantity(30., 'Hz'), I_0=Quantity(0.3255, 'nA'), noise_s1=None, noise_s2=None)#
The Wong-Wang neural mass model for perceptual decision-making.
This model implements the reduced two-variable neural mass model described in: Wong, K.-F. & Wang, X.-J. “A Recurrent Network Mechanism of Time Integration in Perceptual Decisions.” J. Neurosci. 26, 1314–1328 (2006).
The model describes the competitive dynamics between two neural populations (e.g., left vs right motion detection) through slow NMDA-mediated recurrent excitation, capturing the temporal integration of sensory evidence during perceptual decision-making.
Mathematical Description#
The model is governed by two coupled differential equations for the synaptic gating variables S1 and S2 of the competing neural populations:
\[\frac{dS_1}{dt} = -\frac{S_1}{\tau_S} + (1-S_1)\gamma r_1\]\[\frac{dS_2}{dt} = -\frac{S_2}{\tau_S} + (1-S_2)\gamma r_2\]where the firing rates r1 and r2 are given by:
\[\begin{split}r_i = \phi(I_i) = \begin{cases} a(I_i - \theta) & \text{if } I_i > \theta \\ 0 & \text{otherwise} \end{cases}\end{split}\]The total input current to each population is:
\[I_1 = J_{N,11}S_1 - J_{N,12}S_2 + J_{A,ext}\mu_0(1+c) + I_{noise,1}\]\[I_2 = J_{N,22}S_2 - J_{N,21}S_1 + J_{A,ext}\mu_0(1-c) + I_{noise,2}\]- param Synaptic Parameters:
\(\tau_S\) = 100 ms : NMDA receptor time constant
\(\gamma\) = 0.641 : Saturation factor for synaptic gating
- param Input-Output Function:
\(\alpha\) = 270 Hz/nA : Gain parameter
\(\theta\) = 0.31 nA : Firing threshold
- param Network Connectivity (typical values):
J_N,11 = J_N,22 = 0.2609 nA : Self-excitation strength
J_N,12 = J_N,21 = 0.0497 nA : Cross-inhibition strength
J_A,ext = 0.00052 nA : External input strength
- param External Input:
\(\mu_0\) = 30 Hz : Baseline external input rate
\(c \in [-1, 1]\) : Motion coherence (stimulus strength)
Network Behavior#
The model exhibits rich dynamics depending on the stimulus strength:
Spontaneous State: At c=0 (no coherence), both populations have equal activity, representing uncertainty.
Decision State: For \(|c| > 0\), one population gradually wins the competition, representing a perceptual choice.
Bistability: The network can exhibit bistable attractor dynamics where the system can remain in either of two decision states.
Integration Time: The slow NMDA dynamics (\(\tau_S\) = 100ms) enable temporal integration of sensory evidence over hundreds of milliseconds.
Usage Example#
>>> model = WongWangStep(in_size=100) >>> model.init_all_states(batch_size=1) >>> >>> # Simulate decision making with rightward motion (c=0.32) >>> for t in range(1000): ... output = model.update(coherence=0.32) ... # S1 and S2 activities accessible via model.S1.value, model.S2.value
References
Wong, K.-F. & Wang, X.-J. A Recurrent Network Mechanism of Time Integration in Perceptual Decisions. J. Neurosci. 26, 1314–1328 (2006).
Deco, G. et al. The role of rhythm in cognition. Front. Hum. Neurosci. 5, 29 (2011).
- compute_inputs(coherence=0.0, noise_1_val=Quantity(0., 'nA'), noise_2_val=Quantity(0., 'nA'))[source]#
Compute total input currents to both populations.
- Parameters:
coherence – Motion coherence level, c ∈ [-1, 1]
noise_1_val – Noise input to population 1
noise_2_val – Noise input to population 2
- Returns:
Tuple of (I1, I2) input currents
- get_decision(threshold=Quantity(15., 'Hz'))[source]#
Get the current decision based on firing rate threshold.
- Parameters:
threshold – Firing rate threshold for decision (Hz)
- Returns:
1 if population 1 wins, -1 if population 2 wins, 0 if undecided
- Return type:
Decision
- Return type:
Any