MontbrioPazoRoxinStep#
- class brainmass.MontbrioPazoRoxinStep(in_size, tau=Quantity(1., 'ms'), eta=-5.0, delta=Quantity(1., 'Hz'), J=15.0, init_r=Uniform(low=0, high=0.05), init_v=Uniform(low=0, high=0.05), noise_r=None, noise_v=None, method='exp_euler')#
Montbrio-Pazo-Roxin infinite theta neuron population model.
Implements the exact mean-field reduction of a population of all-to-all coupled QIF neurons with a Lorentzian distribution of background excitabilities [1]. The macroscopic dynamics of the population firing rate \(r(t)\) and mean membrane potential \(v(t)\) follow
\[\begin{split}\begin{aligned} \tau \, \dot r(t) &= \frac{\Delta}{\pi} + 2 \, \tau \, r(t) \, v(t), \\ \tau \, \dot v(t) &= v(t)^2 + \bar\eta + I(t) + J \, \tau \, r(t) - \bigl(\pi \, \tau \, r(t)\bigr)^2,\quad \end{aligned}\end{split}\]where \(\bar\eta\) is the mean excitability, \(\Delta\) the Lorentzian half-width at half-maximum (HWHM), \(J\) the recurrent coupling strength, and \(I(t)\) an external input to the mean potential.
- Parameters:
in_size (
int|Sequence[int] |integer|Sequence[integer]) – Spatial shape of the population. Can be anintor a tuple ofint. All parameters are broadcastable to this shape.tau (
Callable|Array|ndarray|bool|number|bool|int|float|complex|Quantity|Param) – Population time constant with unit of time (e.g.,1. * u.ms). Default is1. * u.ms.eta (
Callable|Array|ndarray|bool|number|bool|int|float|complex|Quantity|Param) – Mean of the Lorentzian excitability distribution (dimensionless). Default is-5.0.delta (
Callable|Array|ndarray|bool|number|bool|int|float|complex|Quantity|Param) – HWHM of the Lorentzian excitability distribution. Default is1.0 * u.Hz.J (
Callable|Array|ndarray|bool|number|bool|int|float|complex|Quantity|Param) – Recurrent coupling strength (dimensionless). Default is15..init_r (
Callable) – Parameter for the firing-rate stater. Default isbraintools.init.Uniform(0, 0.05).init_v (
Callable) – Parameter for the mean-membrane-potential statev. Default isbraintools.init.Uniform(0, 0.05).noise_r (
Noise) – Additive noise process for the rate dynamics. If provided, its output is added tor_inpat each update. Default isNone.noise_v (
Noise) – Additive noise process for the potential dynamics. If provided, its output is added tov_inpat each update. Default isNone.method (
str) –Integration method to use. Either ‘exp_euler’ (default) or one of the methods implemented in braintools.quad (e.g., ‘rk4’, ‘rk2’, ‘dopri5’). The exponential-Euler method is recommended for efficiency and stability.
Warning
The exponential-Euler method is only valid for this model because the rate equation is linear in
r. Other methods are provided for comparison but may be less efficient and/or unstable.
- Return type:
Any
- r#
Population firing rate (dimensionless). Shape equals
(batch?,) + in_sizeafterinit_state.- Type:
brainstate.HiddenState
- v#
Population mean membrane potential (dimensionless in this implementation). Shape equals
(batch?,) + in_sizeafterinit_state.- Type:
brainstate.HiddenState
Notes
Time derivatives returned by
dr()anddv()carry unit1/msso that an exponential-Euler step withdtin milliseconds is consistent.The mean-field reduction is exact under all-to-all coupling, infinite population size, and Lorentzian excitability assumptions; it closely approximates large sparse networks [2].
References
- dr(r, v, r_ext)[source]#
Right-hand side for the firing rate
r.- Parameters:
r (array-like) – Current firing rate (dimensionless).
v (array-like) – Current mean membrane potential (dimensionless), broadcastable to
r.r_ext (array-like or scalar) – External input to the rate equation (includes noise if enabled).
- Returns:
Time derivative
dr/dtwith unit1/ms.- Return type:
array-like
- dv(v, r, v_ext)[source]#
Right-hand side for the mean membrane potential
v.- Parameters:
v (array-like) – Current mean membrane potential (dimensionless).
r (array-like) – Current firing rate (dimensionless), broadcastable to
v.v_ext (array-like or scalar) – External input to the potential equation (includes noise if enabled).
- Returns:
Time derivative
dv/dtwith unit1/ms.- Return type:
array-like
- init_state(batch_size=None, **kwargs)[source]#
Initialize firing-rate and mean-potential states.
- Parameters:
batch_size (int or None, optional) – Optional leading batch dimension. If
None, no batch dimension is used. Default isNone.
- update(r_inp=None, v_inp=None)[source]#
Advance the population by one time step.
- Parameters:
r_inp (array-like or scalar or None, optional) – External input to the rate equation. If
None, treated as zero. Ifnoise_ris set, its output is added. Default isNone.v_inp (array-like or scalar or None, optional) – External input to the potential equation. If
None, treated as zero. Ifnoise_vis set, its output is added. Default isNone.
- Returns:
The updated firing rate
rwith the same shape as the internal state.- Return type:
array-like
Notes
Performs an exponential-Euler step using
brainstate.nn.exp_euler_stepfor both equations and updatesrandvin-place.