adaptive_thresholds_linear_voltage¶
- adaptive_thresholds_linear_voltage(adaptations: Tensor, voltages: Tensor, *, step_time: float | Tensor, rest_v: float | Tensor, adapt_rate: float | Tensor, rebound_rate: float | Tensor, adapt_reset_min: float | Tensor | None = None, spikes: Tensor | None = None, refracs: Tensor | None = None) Tensor[source]¶
Update adaptive thresholds based on membrane potential.
Implemented as an approximation using Euler’s method.
\[\theta_k(t + \Delta t) = \Delta t \left[a_k \left[ V_m(t) - V_\text{rest} \right] - b_k \theta_k(t)\right] + \theta_k(t)\]If a spike was generated at time \(t\), then.
\[\theta_k(t) \leftarrow \max(\theta_k(t), \theta_\text{reset})\]- Parameters:
adaptations (torch.Tensor) – last adaptations applied to membrane voltage threshold, \(\theta_k\), in \(\text{mV}\).
voltages (torch.Tensor) – membrane potential difference, \(V_m(t)\), in \(\text{mV}\).
step_time (float | torch.Tensor) – length of a simulation time step, \(\Delta t\), in \(\text{ms}\).
rest_v (float | torch.Tensor) – membrane potential difference at equilibrium, \(V_\text{rest}\), in \(\text{mV}\).
adapt_rate (float | torch.Tensor) – rate constant of exponential decay for membrane voltage term, \(a_k\), in \(\text{ms}^{-1}\).
rebound_rate (float | torch.Tensor) – rate constant of exponential decay for threshold voltage term, \(b_k\), in \(\text{ms}^{-1}\).
adapt_reset_min (float | torch.Tensor | None, optional) – lower bound for the threshold adaptation permitted after a postsynaptic potential, \(\theta_\text{reset}\), in \(\text{mV}\). Defaults to
None.spikes (torch.Tensor | None, optional) – if the corresponding neuron generated an action potential. Defaults to
None.refracs (torch.Tensor | None) – remaining absolute refractory periods, in \(\text{ms}\), when not
None, adaptations of neurons in their absolute refractory periods are maintained. Defaults toNone.
- Returns:
updated adaptations for membrane voltage threshold, in \(\text{mV}\).
- Return type:
Shape
adaptations:\(N_0 \times \cdots \times K\)
voltages,spikes,refracs:\([B] \times N_0 \times \cdots\)
rest_v:Broadcastable with
voltages,spikes, andrefracs.step_time,adapt_rate,rebound_rate,adapt_reset_min:Broadcastable with
adaptations.return:\([B] \times N_0 \times \cdots \times K\)
- Where:
\(B\) is the batch size.
\(N_0, \ldots\) are dimensions of the group of neurons simulated.
\(K\) is the number of sets of adaptation parameters.
Note
If either
adapt_reset_minorspikesis None, then no lower bound will be applied to threshold adaptations.Tip
This function doesn’t automatically reduce along the batch dimension, this should generally be done by averaging along the \(0^\text{th}\) dimension.
See also
For more details and references, visit Adaptive Threshold, Linear Voltage-Dependent in the zoo.