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 an int or a tuple of int. 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 is 1. * 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 is 1.0 * u.Hz.

  • J (Callable | Array | ndarray | bool | number | bool | int | float | complex | Quantity | Param) – Recurrent coupling strength (dimensionless). Default is 15..

  • init_r (Callable) – Parameter for the firing-rate state r. Default is braintools.init.Uniform(0, 0.05).

  • init_v (Callable) – Parameter for the mean-membrane-potential state v. Default is braintools.init.Uniform(0, 0.05).

  • noise_r (Noise) – Additive noise process for the rate dynamics. If provided, its output is added to r_inp at each update. Default is None.

  • noise_v (Noise) – Additive noise process for the potential dynamics. If provided, its output is added to v_inp at each update. Default is None.

  • 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_size after init_state.

Type:

brainstate.HiddenState

v#

Population mean membrane potential (dimensionless in this implementation). Shape equals (batch?,) + in_size after init_state.

Type:

brainstate.HiddenState

Notes

  • Time derivatives returned by dr() and dv() carry unit 1/ms so that an exponential-Euler step with dt in 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/dt with unit 1/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/dt with unit 1/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 is None.

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. If noise_r is set, its output is added. Default is None.

  • v_inp (array-like or scalar or None, optional) – External input to the potential equation. If None, treated as zero. If noise_v is set, its output is added. Default is None.

Returns:

The updated firing rate r with the same shape as the internal state.

Return type:

array-like

Notes

Performs an exponential-Euler step using brainstate.nn.exp_euler_step for both equations and updates r and v in-place.