1 Introduction

While current energy-hungry computing technology [based on binary coding, von Neumann architecture, and complementary metal–oxide–semiconductor (CMOS) technology] is reaching the limits of scaling-down rules [1], bioinspired paradigms for analog computing and adaptive information processing, which together could enable a drastic reduction of energy consumption as well as performance enhancement, are being considered. Wet living systems are naturally energy efficient [2, 3]; in particular, the human brain, composed of about \(10^{12}\) neurons interconnected by around \(10^{15}\) synapses, has a massively parallel and reconfigurable architecture and can perform cognitive tasks while consuming around 20 W [4], that is, \(10^{4}\) times less than multicore-based supercomputers. Great efforts are being made to develop electronic devices and circuits that mimic brain functionality by means of bioinspired devices and neuromorphic architectures [5,6,7,8,9]. In this context, generation of signals that resemble the response of neurons for use as input excitations in the design of such bioinspired electronic systems is necessary.

The key physical properties of neurons and axons are related to their biological membrane [10,11,12]. Existing Monte Carlo (MC) molecular models are suitable for analysis of biomembrane properties and neuron–axon electrical characteristics [13,14,15,16,17,18], but the overdetailed computation of such molecular simulators results in unacceptable computation times and mainly focuses on a single ion channel, thus not being especially appropriate for direct translation to electronic systems. In contrast, deterministic neuron models [19, 20] are usually made up of differential equations and allow for relatively short simulation times; however, they do not accurately describe the underlying stochastic response properties arising from the microscopic correlation of neuronal excitability. The main goal of this work is to develop an efficient stochastic numerical solution of such equations based on the MC technique to assist with the design of neuroinspired hardware by means of efficient generation of signals emulating cell responses. The novelty of the proposed stochastic model is that it includes in a natural way the statistics of the random passage of ions through the cell membrane (shot noise) and the associated fluctuations in different characteristic quantities (ion current and concentration, Nernst potentials, membrane voltage, etc.), hence more closely describing biophysiological processes.

Essentially, the biological membrane is an insulator separating the intracellular and extracellular spaces. Both spaces are electrolytes, being globally neutral but containing both negative and positive ions. Three main types of ions must be considered: sodium and potassium cations, \(\hbox {Na}^{+}\) and \(\hbox {K}^{+}\), and chloride anions, \(\hbox {Cl}^{-}\). Ion channels through the membrane connect the intra- (ICS) and extracellular space (ECS). They belong to two categories: leakage and voltage-gated channels. Voltage-gated channels can be opened or closed depending strongly on the membrane potential \(V_\mathrm{m}\). The most widely accepted analytical model for the behavior of gated channels is the so-called Hodgkin–Huxley (HH) model, as described in [21], a classical reference for the dynamic behavior of biological membranes. To achieve deep understanding of neurological behavior in terms of electrical properties (avoiding the chemistry involved), a straightforward MC solver of the HH model accounting for the gating channels in terms of the probabilities for ions to cross the membrane has been developed. Our model reproduces the global electrical behavior of the cell membrane, including the equilibrium conditions and action potential, which is a voltage spike (transporting neural information) consisting of a transient increase followed by a short inversion of \(V_\mathrm{m}\) activated by a sufficient external current [21]. As an extension of the HH model, we then include pumps into the model and monitor the ion concentrations in the ICS and ECS to enable calculation of time-dependent Nernst potentials following the model of Hübel et al. [22]. The innovation in our approach with respect to the HH and Hübel models is the inclusion of ion shot noise when solving the system equations. Thus, our MC code could be used to further evaluate the fluctuations in the currents and ion concentrations provoked by the random dynamics of the crossing ions, and their influence on the membrane potential and spike generation.

As occurs in other physical systems, where miniaturization increases susceptibility to noise, in the case of cell membranes, reduction of their size (membrane area) enhances the influence of fluctuations [23]. To evidence such size-related effects, we explore a wide range of realistic values of membrane area from \(1000\,\upmu \hbox {m}^{2}\) (giant axons), for which ion shot noise is negligible and thus deterministic behavior is expected, to \(1\,\upmu \hbox {m}^{2}\) (brain synapses), where ion shot noise becomes significant and may affect the membrane potential dynamics. For areas below \(1\,\upmu \hbox {m}^{2}\) (subsynaptic compartments), the number of ion channels involved is so small that discrete consideration of the channels becomes necessary and the present, continuous model starts to lose validity.

At such small sizes, ion shot noise competes with ion channel noise, whose influence also increases with decreasing area [24]; despite the relevant role played by ion shot noise when considered alone, our results show that it can typically be regarded as negligible in competition with ion channel noise [25, 26]. Nevertheless, analysis of shot noise in ion channels is of interest in itself, for example, because of the information it can provide about ion dynamics in cell membranes [27, 28] or because of its possible influence on gating analysis of open channels with very fast rates (gating rates reaching the range above \(1\,\upmu \hbox {s}^{-1}\)) [29].

We also remark that, while the time scale of spiking activity is in the range of milliseconds, the average time between ions crossing a single open channel is in the range of nanoseconds, as shown by molecular dynamics simulations [28].

This work is organized as follows: In Sect. 2, the MC models are presented. Section 3 presents the results; initially, we validate the models by comparison with the direct solution of the HH and extended model equations, then we analyze different situations of interest. In Sect. 4, the main conclusions of the work are drawn.

2 Numerical models

Two models were developed: firstly, an MC solver of the Hodgkin–Huxley (HH) equations [21], traditionally used to explain the physical behavior of single-neuron dynamics; then, a second MC version, additionally including ion pumps and monitoring the ion concentrations in the ICS and ECS. In both models, a MC technique is used to determine the random times at which ions cross the membrane, and the associated fluctuations in the ion current are straightforwardly incorporated into the solution of the equations. The models were implemented in FORTRAN.

2.1 MC model based on HH equations

According to the HH model, the evolution of information in the time domain is described in terms of an electrically active membrane carrying an electric potential \(V_\mathrm{m} \left( t \right) \) and the so-called gating variables \(m\left( t \right) \), \(h\left( t \right) \), and \(n\left( t \right) \), which render the system excitable, since they determine the opening or closing of potassium and sodium channels. As an electrical system, the membrane voltage is related to the ion charges and currents through the membrane.

In our solver, the simulation time is divided into time steps with duration \(\Delta t\). Following the HH equations [21], at each time step \(\Delta t\), we evaluate the new value of the membrane potential as

$$\begin{aligned} V_\mathrm{m} \left( t \right) =V_\mathrm{m} \left( t-\Delta t \right) +\frac{1}{C_\mathrm{m} }\Delta t\left[ {I_\mathrm{app} -\left( {I_\mathrm{K} +I_\mathrm{Na} +I_\mathrm{leak} } \right) } \right] , \end{aligned}$$
(1)

where \(C_\mathrm{m} =1\,\upmu \hbox {F/cm}^{2}\) is the membrane capacitance per unit surface and \(I_\mathrm{app}\) is an external current density (here considered as noiseless), which acts as the system excitation and can initiate a single voltage spike or spike trains; \(I_\mathrm{ion}\) (with the suffix ion = K, Na, or leak) is the current density due to potassium cations, sodium cations, or ion leakage (induced by chloride and other ions), respectively.

For \(I_\mathrm{app} = 0\), i.e., at equilibrium, the average value of the membrane voltage is \(V_\mathrm{r} \approx -68\, \hbox {mV}\), where \(V_\mathrm{r}\) is the so-called resting potential. The HH model assumes \(V_\mathrm{r} =0\) for simplicity; however, in Sect. 3.1, we add a shift of \(V_\mathrm{r} =-68\, \hbox {mV}\) for clarity. This model is monostable; once any applied external current ceases, the membrane potential recovers to the resting value.

The permeability of the membrane to potassium and sodium depends on \(V_\mathrm{m} \), thus \(I_\mathrm{K} \) and \(I_\mathrm{Na} \) can be modeled using voltage-dependent conductances (gated channels), while the leakage current \(I_\mathrm{leak} \) is modeled as a regular ohmic current with constant conductance:

$$\begin{aligned} I_\mathrm{Na} \left( {V_\mathrm{m} } \right)= & {} g_\mathrm{Na} \left( {V_\mathrm{m} } \right) \left( {V_\mathrm{m} -V_\mathrm{Na} } \right) , \end{aligned}$$
(2)
$$\begin{aligned} I_\mathrm{K} \left( {V_\mathrm{m} } \right)= & {} g_\mathrm{K} \left( {V_\mathrm{m} } \right) \left( {V_\mathrm{m} -V_\mathrm{K} } \right) , \end{aligned}$$
(3)
$$\begin{aligned} I_\mathrm{leak} \left( {V_\mathrm{m} } \right)= & {} g_\mathrm{leak} \left( {V_\mathrm{m} -V_\mathrm{leak} } \right) , \end{aligned}$$
(4)

where \(g_\mathrm{ion} \) denotes the gated conductances and \(V_\mathrm{ion} \) the so-called reversal potentials (the potentials at which the ion currents change sign), which take the values \(V_\mathrm{Na} =E_\mathrm{Na} -V_\mathrm{r} = 115\,\hbox {mV}\), \(V_\mathrm{K} =E_\mathrm{K} -V_\mathrm{r} =-12\,\hbox {mV}\), and \(V_\mathrm{leak} = E_\mathrm{leak} -V_\mathrm{r} =10,6\,\hbox {mV}\), where \(E_\mathrm{ion} \) are the so-called Nernst potentials. \(I_\mathrm{ion} > 0\) when positive charge leaves the cell, and \(I_\mathrm{ion} < 0\) in the opposite case; This is, positive (negative) current indicates cations passing through the cell membrane from the ICS (ECS) to the ECS (ICS) or anions from the ECS (ICS) to the ICS (ECS).

The phenomenological HH model proposed for the sodium conductance assumes that

$$\begin{aligned} g_\mathrm{Na} \left( {V_\mathrm{m} } \right) =g_\mathrm{Na}^\mathrm{max} m^{3}\left( t \right) h\left( t \right) , \end{aligned}$$
(5)

where \(g_\mathrm{Na}^\mathrm{max} =120\,\hbox {mS}/\hbox {cm}^{2}\) is the maximal sodium conductance. The dimensionless gating parameters \(m\left( t \right) \) and \(h\left( t \right) \) can be interpreted as the fraction of activation or inactivation molecules in the open state. Sodium cations can move through the membrane if three activation molecules are in their open state and one inactivation molecule is in its nonblocking state [21]. \(m\left( t \right) \) and \(h\left( t \right) \) are calculated in our code following the HH model as

$$\begin{aligned} m\left( t \right)= & {} m\left( {t-\Delta t} \right) +\Delta t\left\{ \alpha _{m} \left( {V_\mathrm{m} } \right) \left[ {1-m\left( {t-\Delta t} \right) } \right] \right. \nonumber \\&\left. -\,\beta _{m} \left( {V_\mathrm{m} } \right) m\left( {t-\Delta t} \right) \right\} , \end{aligned}$$
(6)
$$\begin{aligned} h\left( t \right)= & {} h\left( {t-\Delta t} \right) +\Delta t\left\{ \alpha _h \left( {V_\mathrm{m} } \right) \left[ {1-h\left( {t-\Delta t} \right) } \right] \right. \nonumber \\&\left. -\,\beta _h \left( {V_\mathrm{m} } \right) h\left( {t-\Delta t} \right) \right\} , \end{aligned}$$
(7)

where the functions \(\alpha _{m} \), \(\beta _{m} \), \(\alpha _h \), and \(\beta _h \) are

$$\begin{aligned} \alpha _{m} \left( {V_\mathrm{m} } \right)= & {} \frac{0.1\left( {V_\mathrm{m} -25} \right) }{\exp \left[ {\frac{-\left( {V_\mathrm{m} -25} \right) }{10}} \right] -1}, \end{aligned}$$
(8)
$$\begin{aligned} \beta _{m} \left( {V_\mathrm{m} } \right)= & {} 4\,\hbox {exp}\left( {\frac{-V_\mathrm{m} }{18}} \right) , \end{aligned}$$
(9)
$$\begin{aligned} \alpha _h \left( {V_\mathrm{m} } \right)= & {} 0.07\,\hbox {exp}\left( {\frac{-V_\mathrm{m} }{20}} \right) , \end{aligned}$$
(10)
$$\begin{aligned} \beta _h \left( {V_\mathrm{m} } \right)= & {} \frac{1}{1+\exp \left[ {\frac{-\left( {V_\mathrm{m} -30} \right) }{10}} \right] }, \end{aligned}$$
(11)

with \(V_\mathrm{m} \) given in millivolts and t in milliseconds. \(m\left( t \right) \) and \(h\left( t \right) \) are updated through the simulation at each time step \(\Delta t\).

The HH model for the potassium conductance establishes that

$$\begin{aligned} g_\mathrm{K} \left( {V_\mathrm{m} } \right) =g_\mathrm{K}^\mathrm{max} n^{4}\left( t \right) , \end{aligned}$$
(12)

where \(g_\mathrm{K}^\mathrm{max} =36\,\hbox {mS}/\hbox {cm}^{2}\) is the maximal potassium conductance. The dimensionless gating parameter \(n\left( t \right) \) is interpreted as the proportion of activation molecules in the open state. Then, potassium cations can move through the membrane if four activation molecules are in their open state [21]. \(n\left( t \right) \) is also updated through the simulation as

$$\begin{aligned} n\left( t \right)= & {} n\left( {t-\Delta t} \right) +\Delta t\left\{ \alpha _n \left( {V_\mathrm{m} } \right) \left[ {1-n\left( {t-\Delta t} \right) } \right] \right. \nonumber \\&\left. -\,\beta _n \left( {V_\mathrm{m} } \right) n\left( {t-\Delta t} \right) \right\} , \end{aligned}$$
(13)

where the functions \(\alpha _n \) and \(\beta _n \) are

$$\begin{aligned} \alpha _n \left( {V_\mathrm{m} } \right)= & {} \frac{0.01\left( {V_\mathrm{m} -10} \right) }{1-\exp \left[ {\frac{-\left( {V_\mathrm{m} -10} \right) }{10}} \right] }, \end{aligned}$$
(14)
$$\begin{aligned} \beta _n \left( {V_\mathrm{m} } \right)= & {} 0.125\,\exp \left( {\frac{-V_\mathrm{m} }{80}} \right) , \end{aligned}$$
(15)

with \(V_\mathrm{m} \) given in millivolts and t in milliseconds.

The conductance of the leakage current channels is considered to be independent of the gating parameters: \(g_\mathrm{leak} =0.3\, \hbox {mS}/\hbox {cm}^{2}\).

In the MC solver, we consider independent probabilities for each ion to cross the cell membrane and make use of the Gillespie method to account for their stochastic transmembrane kinetics [30, 31]. The probability per unit time that a given ion crosses the membrane (called an “event” hereinafter) is calculated from the HH ion current densities in Eqs. (2)–(4) as

$$\begin{aligned} P_\mathrm{ion} =\frac{\left| {I_\mathrm{ion} } \right| S}{q}, \end{aligned}$$
(16)

where S is the area of the considered membrane patch and q is the elementary charge. We consider \(S= 922\, \upmu \hbox {m}^{2}\) as in [22], which provides an acceptable simulation time. Assuming that the crossing of ions through the membrane is a memoryless process, the time between events d\(t_\mathrm{e}\) is calculated following Poisson statistics as

$$\begin{aligned} \mathrm{d}t_\mathrm{e} =-\frac{1}{P_\mathrm{TOTAL} }\hbox {ln}\left( r \right) , \end{aligned}$$
(17)

where r is a random number between 0 and 1, and \(P_\mathrm{TOTAL}\) is the total probability of an event, that is, \(P_\mathrm{TOTAL} =P_\mathrm{Na} +P_\mathrm{K} +P_\mathrm{leak}\). Once d\(t_\mathrm{e}\) has been determined, the concrete type of ion crossing the membrane is randomly determined according to the respective probabilities. The number of ions of each type crossing the membrane during a given time step \(\Delta t\), i.e., \(n_\mathrm{ion}\), is then recorded to calculate the corresponding current density as

$$\begin{aligned} \left| {I_\mathrm{ion} } \right| =\frac{qn_\mathrm{ion} }{\Delta tS}. \end{aligned}$$
(18)

The sign of \(I_\mathrm{ion}\) is the same as that of the corresponding current in Eqs. (2)–(4). The current densities calculated in this way are then used in Eq. (1) to evaluate the new value of the membrane potential to be considered in the next time step. In this way, the ion currents contain the fluctuations associated with the random passage of ions through the cell membrane, and such fluctuations are incorporated into the solution of the HH equations, in particular into the membrane potential \(V_\mathrm{m}\). Note that, while the deterministic solution of the HH equations is independent of the membrane area S (indeed, the HH equations are expressed in terms of current density), for a given current density, the fluctuations become more pronounced as S decreases, since the current is carried by a smaller number of ions. The same occurs when the noise related to the fluctuations in the opening/closing state of the channel gates, m, n, and h, is included in the solution of the HH equations [23,24,25, 32, 33].

The time step used in the calculations presented herein was \(\Delta t=10\,\upmu \hbox {s}\), short enough to ensure correct update of the membrane potential. As shown by the results below, application of a strong and/or long enough external current density \(I_\mathrm{app} \) leads the system to exhibit a single voltage spike (action potential) or a train of spikes (multiple action potentials).

Since the probability of events is proportional to the patch area, larger areas lead to higher computational cost, so that computation times range from a few seconds to several hours.

2.2 MC model considering ion concentrations

Beyond the HH model, a more complete treatment of spiking phenomena in cells involves temporal monitoring of the ion concentrations inside and outside the membrane [22, 34,35,36,37], and requires the inclusion of ion pumps (in the form of a pump current density \(I_\mathrm{pump} \)) and a dynamic description of the Nernst potentials (in terms of the ion concentrations). Our stochastic approach for the HH model described in the previous subsection, which monitors the individual passage of ions through the membrane, is well suited to be extended to account for the time evolution of the ion concentrations in the ICS and ECS. To this end, we follow the model described in [22], but instead of including the time evolution of the ion concentrations in a deterministic way (as done in that model), we retain the stochastic determination of the time at which ions cross the membrane and the associated fluctuations in the ion concentrations, currents, and related quantities. As in the Hübel model, to monitor the ion concentrations, apart from including the sodium and potassium contributions to the leakage current, we attribute to chloride anions the otherwise unspecified extra leakage contribution.

The ion pumps help stabilize the ion concentrations in the ICS and ECS in the resting state. They account for the exchange of ICS sodium with ECS potassium (at 3/2 ratio) that compensates diffusion of sodium and potassium cations from the ECS and ICS, respectively, through the gated and leakage channels. Chloride anions are not pumped. \(I_\mathrm{pump} \) can be expressed as [22, 34, 35]

$$\begin{aligned} I_\mathrm{pump} \left( {N_{\mathrm{Na}_\mathrm{i} } ,N_{\mathrm{K}_\mathrm{e} } } \right)= & {} \rho \left[ {1+\hbox {exp}\left( {\frac{25-N_{\mathrm{Na}_\mathrm{i} } }{3}} \right) } \right] ^{-1}\nonumber \\&\left[ {1+\hbox {exp}\left( {5.5-N_{\mathrm{K}_\mathrm{e} } } \right) } \right] ^{-1}, \end{aligned}$$
(19)

where \(\rho =5.25\,\upmu \hbox {A/cm}^{2}\) is the maximum pump current, and \(N_{\mathrm{ion}_\mathrm{i\left( e \right) }}\) is the ion concentration in the ICS (ECS), denoted by subscripts “i” and “e”, respectively. In Eq. (19), ion concentrations are given in mMol/l.

Apart from \(I_\mathrm{pump}\), the expressions for the other ion currents are

$$\begin{aligned} I_\mathrm{Na} \left( {V_\mathrm{m} } \right)= & {} \left( {g_\mathrm{Na}^\mathrm{l} +g_\mathrm{Na}^\mathrm{g} m^{3}\left( t \right) h\left( t \right) } \right) \left( {V_\mathrm{m} -E_\mathrm{Na} } \right) , \end{aligned}$$
(20)
$$\begin{aligned} I_\mathrm{K} \left( {V_\mathrm{m} } \right)= & {} \left( {g_\mathrm{K}^\mathrm{l} +g_\mathrm{K}^\mathrm{g} n^{4}\left( t \right) } \right) \left( {V_\mathrm{m} -E_\mathrm{K} } \right) , \end{aligned}$$
(21)
$$\begin{aligned} I_\mathrm{Cl} \left( {V_\mathrm{m} } \right)= & {} g_\mathrm{Cl}^\mathrm{l} \left( {V_\mathrm{m} -E_\mathrm{Cl} } \right) , \end{aligned}$$
(22)

where \(g_\mathrm{ion}^\mathrm{l,g}\) denote the leakage and gated conductances, indexed as “l” and “g”, respectively. The model parameters are similar to those employed in the HH model: \(g_\mathrm{Na}^\mathrm{l} =0.0175\, \hbox {mS/cm}^{{2}}\), \(g_\mathrm{Na}^\mathrm{g} =100\, \hbox {mS/cm}^{{2}}\), \(g_\mathrm{K}^\mathrm{l} =0.05\, \hbox {mS/cm}^{{2}}\), \(g_\mathrm{K}^\mathrm{g} =40\, \hbox {mS/cm}^{{2}}\), and \(g_\mathrm{Cl}^\mathrm{l} =0.05\, \hbox {mS/cm}^{{2}}\). The gating parameters \(m\left( t \right) \), \(h\left( t \right) \), and \(n\left( t \right) \) follow the expressions in Eqs. (6), (7), and (13), while the functions \(\alpha _{m} \), \(\beta _{m} \), \(\alpha _h \), \(\beta _h \), \(\alpha _n \), and \(\beta _n \) use a nonzero value for \(V_\mathrm{r} \), in this model given by [22]

$$\begin{aligned} \alpha _{m} \left( {V_\mathrm{m} } \right)= & {} \frac{0.1\left( {V_\mathrm{m} +30} \right) }{1-\exp \left[ {\frac{-\left( {V_\mathrm{m} +30} \right) }{10}} \right] }, \end{aligned}$$
(23)
$$\begin{aligned} \beta _{m} \left( {V_\mathrm{m} } \right)= & {} 4\,\exp \left( {\frac{-\left( {V_\mathrm{m} +55} \right) }{18}} \right) , \end{aligned}$$
(24)
$$\begin{aligned} \alpha _h \left( {V_\mathrm{m} } \right)= & {} 0.07\,\exp \left( {\frac{-\left( {V_\mathrm{m} +44} \right) }{20}} \right) , \end{aligned}$$
(25)
$$\begin{aligned} \beta _h \left( {V_\mathrm{m} } \right)= & {} \frac{1}{1+\exp \left[ {-0.1\left( {V_\mathrm{m} +14} \right) } \right] }, \end{aligned}$$
(26)
$$\begin{aligned} \alpha _n \left( {V_\mathrm{m} } \right)= & {} \frac{0.01\left( {V_\mathrm{m} +34} \right) }{1-\exp \left[ {\frac{-\left( {V_\mathrm{m} +34} \right) }{10}} \right] }, \end{aligned}$$
(27)
$$\begin{aligned} \beta _n \left( {V_\mathrm{m} } \right)= & {} 0.125\,\exp \left( {\frac{-\left( {V_\mathrm{m} +44} \right) }{80}} \right) , \end{aligned}$$
(28)

with \(V_\mathrm{m}\) in millivolts. The reversal Nernst potentials \(E_\mathrm{ion}\) are calculated in terms of the ion concentrations as [22]

$$\begin{aligned} E_\mathrm{ion} =\frac{k_\mathrm{B} T}{q}\hbox {ln}\frac{N_{\mathrm{ion}_\mathrm{e} } }{N_{\mathrm{ion}_\mathrm{i} } }, \end{aligned}$$
(29)

where \(k_\mathrm{B}\) is the Boltzmann constant and T is the absolute temperature.

According to [22], at equilibrium, \(N_{\mathrm{Na}_\mathrm{i} }^\mathrm{eq} =27\, \hbox {mMol/l}\), \(N_{\mathrm{Na}_\mathrm{e} }^\mathrm{eq} =120\, \hbox {mMol/l}\), \(N_{\mathrm{K}_\mathrm{i} }^\mathrm{eq} =130.99\, \hbox {mMol/l}\), \(N_{\mathrm{K}_\mathrm{e} }^\mathrm{eq} =4\, \hbox {mMol/l}\), \(N_{\mathrm{Cl}_\mathrm{i} }^{\mathrm{eq}} =9.66\, \hbox {mMol/l}\), and \(N_{\mathrm{Cl}_\mathrm{e} }^{\mathrm{eq}} =124\, \hbox {mMol/l}\). The simulation is initialized with \(V_\mathrm{m} \left( 0 \right) =V_\mathrm{r} =-68\,\hbox {mV}\) and these values for the ion concentrations, from which the initial Nernst potentials and ion currents are calculated, including the additional term \(I_\mathrm{pump}\). The corresponding probabilities for each of the possible events are evaluated using Eq. (16), and the time between events d\(t_\mathrm{e}\) is determined by means of Eq. (17) considering \(P_\mathrm{TOTAL} =P_\mathrm{Na} +P_\mathrm{K} +P_\mathrm{Cl} +P_\mathrm{pump}\). Once d\(t_\mathrm{e}\) has been determined, the concrete type of event taking place is chosen randomly according to the respective probabilities. In case the events related to \(P_\mathrm{Na}, P_\mathrm{K} \text { or }P_\mathrm{Cl}\) are selected, the passage of one ion of the selected type in the direction corresponding to the sign of the current is registered. If the selected event is associated with \(P_\mathrm{pump}\), according to the pump dynamics, the passage of three \(\hbox {Na}^{+}\) cations from the ICS to ECS and two \(\hbox {K}^{+}\) cations from the ECS to ICS is registered. In this way, we determine the net number of ions of each type, \(n_\mathrm{ion}\), crossing the membrane from the ICS to ECS during each time step with duration \(\Delta t\), at the end of which we update the ion concentrations as

$$\begin{aligned} N_{\mathrm{ion}_\mathrm{i\left( e \right) } } \left( t \right) =N_{\mathrm{ion}_\mathrm{i\left( e \right) } } \left( {t-\Delta t} \right) \mp \frac{n_\mathrm{ion} }{\omega _\mathrm{i\left( e \right) } }, \end{aligned}$$
(30)

where \(\omega _\mathrm{i\left( e \right) } \) is the ICS (ECS) volume. We consider here the typical values \(\omega _\mathrm{i} =2160\,\upmu \hbox {m}^{3}\) and \(\omega _\mathrm{e} =720\,\upmu \hbox {m}^{3}\) used in other works [22, 34]. From these values of the ion concentrations at the end of each time step, the new value of the membrane potential is calculated as

$$\begin{aligned}&V_\mathrm{m} \left( t \right) =V_\mathrm{m} \left( 0 \right) \nonumber \\&\quad +\,\frac{q\left( {N_{\mathrm{Na}_\mathrm{i} } \left( t \right) -N_{\mathrm{Na}_\mathrm{i} }^\mathrm{eq} +N_{\mathrm{K}_\mathrm{i} } \left( t \right) -N_{\mathrm{K}_\mathrm{i} }^\mathrm{eq} -N_{\mathrm{Cl}_\mathrm{i} } \left( t \right) +N_{\mathrm{Cl}_\mathrm{i} }^\mathrm{eq} } \right) \omega _\mathrm{i} }{C_\mathrm{m} S}.\nonumber \\ \end{aligned}$$
(31)

We consider \(C_\mathrm{m} =1\,\upmu \hbox {F/cm}^{2}\) and an initial reference value of \(S= 922\, \upmu \hbox {m}^{2}\), as in the HH model. Note that, when the ion concentrations take their equilibrium values, the membrane potential, as expected, coincides with the resting potential (\(V_\mathrm{m} \left( 0 \right) =V_\mathrm{r} =-68\,\hbox {mV}\)).

If an external current \(I_\mathrm{app}\) is applied to excite the system and lead to the appearance of voltage spikes, the procedure is the same but with the current (for the model to be consistent [22]) summed into any of the ion currents given by Eqs. (20)–(22); In our case, we sum \(I_\mathrm{app}\) into the sodium current.

As in the previous model, the fluctuations associated with the random passage of ions through the membrane are naturally incorporated into the solution of the equations, in this case into the ion concentrations, and the fluctuating ion currents can be evaluated at each time step by means of Eq. (18).

As a complement, an additional regulation term \(I_{\mathrm{K}_\mathrm{e} }^\mathrm{reg}\) can also be considered for extracellular potassium, which can be interpreted as a diffusive coupling to an extracellular potassium bath [22]. This leads, at each time step, to an additional contribution from the external potassium concentration, given by

$$\begin{aligned} \Delta N_{\mathrm{K}_\mathrm{e} }^\mathrm{reg} \left( t \right) =I_{\mathrm{K}_\mathrm{e} }^\mathrm{reg} \Delta t=\lambda \left( {N_{\mathrm{K}_\mathrm{reg} } -N_{\mathrm{K}_\mathrm{e} } \left( t \right) } \right) \Delta t, \end{aligned}$$
(32)

where \(\lambda =2.7 \, \hbox {ms}^{-1}\) is a rate constant and \(N_{\mathrm{K}_\mathrm{reg} } =N_{\mathrm{K}_\mathrm{e} }^\mathrm{eq} =4\, \hbox {mMol}/\hbox {l}\) is the potassium density of an infinite bath reservoir coupled to the neuron; it takes the value of the physiological potassium concentration and hence helps stabilize the physiological equilibrium.

Fig. 1
figure 1

Comparison between MC and deterministic time evolution of a \(V_\mathrm{m}\) (inset zoom of MC \(V_\mathrm{m}\)), b \(I_\mathrm{ion}\) (inset zoom of MC \(I_\mathrm{Na}\), \(I_\mathrm{K}\)), and c \(m^{3}h\) and \(n^{4}\), for an excitation of \(I_\mathrm{app}=7\,\upmu \hbox {A/cm}^{2}\) and \(T_\mathrm{s}=5\, \hbox {ms}\) starting at 10 ms

3 Results

3.1 MC model based on HH equations

To validate the MC method, we compared its results with a deterministic MATLAB solution of the HH equations. Figure 1 presents the time evolution of (a) \(V_\mathrm{m} \), (b) \(I_\mathrm{Na}\), \(I_\mathrm{K}\), and \(I_\mathrm{leak}\), and (c) \(m^{3} h\) and \(n^{4}\), for an excitation of \(I_\mathrm{app} =7\, \upmu \hbox {A/cm}^{2}\) and duration \(T_\mathrm{s} =5\,\hbox {ms}\) starting at 10 ms from the beginning of the simulation, which leads to a spike in \(V_\mathrm{m} \), the so-called action potential. The MC results are analogous to those obtained by means of the deterministic solution of the HH equations. As mentioned, the HH model considers \(V_\mathrm{r} =0\); however, \(V_\mathrm{m} \) was shifted to take the usual reference value \(V_\mathrm{r} =-68\,\hbox {mV}\) for clarity. \(I_\mathrm{app} \) is applied at a time long enough to be in the steady-state equilibrium conditions. At the onset of \(I_\mathrm{app} \), sodium channels open (\(m^{3} h\) increases, Fig. 1c) to allow sodium ions to enter the cell, resulting in a negative \(I_\mathrm{Na} \) (Fig. 1b), which leads to the increase of \(V_\mathrm{m} \) (Fig. 1a). Potassium channels require higher \(V_\mathrm{m} \) than sodium channels to open, which occurs precisely due to the entering of sodium ions (\(n^{4}\) increases, Fig. 1c). This involves the exit of potassium ions from the ICS to the ECS, so that a positive \(I_\mathrm{K} \) arises (Fig. 1b). When a maximum membrane voltage is reached (about \(+40\) mV), sodium channels start to close (\(m^{3}h\) decreases, Fig. 1c), and once closed remain so until \(V_\mathrm{r}\) is recovered. Thus, no more sodium cations enter the cell until the equilibrium state is established, and therefore no new action potential can occur. The time between the closing of sodium channels and recovery of equilibrium is the so-called refractory period, during which the cell cannot experience any new action potential; this prevents the possibility for information carried by the spike to propagate backwards along the membrane [21]. After the maximum of \(m^{3}h\), potassium channels are still open and potassium ions leave the cell, leading to the decrease in \(V_\mathrm{m} \) (Fig. 1a), which causes at the same time the closing of the potassium channels. At a given point, one has \(V_\mathrm{m} <V_\mathrm{r} \) due to the excess potassium ions outside the cell [21], yielding a refractory period until equilibrium is restored. Throughout the process, the leakage current \(I_\mathrm{leak} \) (Fig. 1b) grows slightly, indicating entrance of anions into the ICS when \(V_\mathrm{m} \) increases due to the presence of \(I_\mathrm{app} \).

Fig. 2
figure 2

MC time evolution of a, c \(V_\mathrm{m}\) and b, d \(I_\mathrm{ion}\), for excitations of \(T_\mathrm{s}=14\,\hbox {ms}\) (shaded area) and a, b \(I_\mathrm{app}=7\,\upmu \hbox {A/cm}^{2}\) and c, d \(I_\mathrm{app}=50\,\upmu \hbox {A/cm}^{2}\) starting at 10 ms

Compared with this deterministic solution of the HH equations, the MC values seem to be exactly the same, despite the stochasticity in the model. However, a closer look at the results, as shown in the inset in Fig. 1b, corresponding to a zoom of \(I_\mathrm{Na} \) and \(I_\mathrm{K} \), reveals the presence of fluctuations in the ion currents superimposed on the deterministic solution. Such fluctuations are more pronounced the higher the current, as corresponds to shot noise (with current spectral density equal to 2qI), and also the lower the membrane patch area S. In the inset of Fig. 1a, fluctuations of \(V_\mathrm{m} \) originating from the fluctuating currents can also be observed. This is the main novelty of this approach, i.e., the presence of noise associated with the random passage of ions through the channels, which could play a role in some physiological processes, and is typically disregarded when considering electrical sources of neural noise [23,24,25, 32, 33]. We remark that the very small fluctuations observed in the voltage dynamics in Fig. 1a would be rather more relevant if a smaller area were considered, to the extent of affecting the spiking activity, as shown below.

Figure 2 presents the MC time evolution of (a, c) \(V_\mathrm{m}\) and (b, d) \(I_\mathrm{Na} \), \(I_\mathrm{K} \), and \(I_\mathrm{leak} \), when considering excitations of (a, b) \(I_\mathrm{app}=7\,\upmu \hbox {A/cm}^{2}\) and (c, d) \(I_\mathrm{app} =50\, \upmu \hbox {A/cm}^{2}\), and \(T_\mathrm{s} =14\,\hbox {ms}\), starting at 10 ms from the beginning of the simulations. The same results (except nonvisible fluctuations) are obtained from the deterministic solution of the HH equations. In the case of \(I_\mathrm{app} =7\,\upmu \hbox {A/cm}^{2}\), a second minor spike weakly appears just before the excitation switch-off, while for \(I_\mathrm{app} =50\,\upmu \hbox {A/cm}^{2}\) a full second spike emerges, having lower amplitude in comparison with the first one. In this case, two peaks can be observed in \(I_\mathrm{K} \) and \(I_\mathrm{Na} \), but \(I_\mathrm{K} \) does not recover the equilibrium state in the time lapse between pulses. \(I_\mathrm{leak} \) also shows two-peak behavior, consistent with the global situation.

3.2 Extended MC model

Beyond the MC solution of the HH equations, the extended MC model explained in Sect. 2.2 offers better understanding of the time evolution of the electrical quantities of the biological membrane. The shape of the potential spike resulting from this ion-based model differs slightly from that derived from the HH model, mostly due to the different values of the Nernst potentials and the fact that they change in time according to the ion concentrations. At equilibrium conditions, when \(V_\mathrm{m} =V_\mathrm{r} \) and the ion concentrations take their equilibrium values, the Nernst potentials are \(E_\mathrm{Na}^\mathrm{eq} =39.7\, \hbox {mV}\), \(E_\mathrm{K}^\mathrm{eq} =-92.9\, \hbox {mV}\), and \(E_\mathrm{Cl}^\mathrm{eq} =-68.0\, \hbox {mV}\), considering a temperature of 310 K [31]. Since \(E_\mathrm{Cl}\) is practically \(V_\mathrm{r} \), \(I_\mathrm{Cl} \) is very small. As occurs in biological systems, it is the sodium–potassium pump which helps restore the Na and K ion concentrations and the membrane potential to their equilibrium values once excitations vanish. Such equilibrium values are reached by the model in a self-consistent way.

Fig. 3
figure 3

a, b \( V_\mathrm{m}\) and \(E_\mathrm{ion}\), and c, d \(N_{\mathrm{ion}\_\mathrm{i(e)}}\) as a function of time for an excitation \(I_\mathrm{app}=150\,\upmu \hbox {A/cm}^{2}\) and \(T_\mathrm{s}=0.5\, \hbox {s}\) starting at 50 s (shaded area): a, c without considering the regulation term \(I_{\mathrm{K}\_\mathrm{reg}}\), and b, d including it

However, for very strong excitations, and in the absence of the potassium regulation current term \(I_{\mathrm{K}_e }^\mathrm{reg} \), within this model the system can be driven to a second, unphysiological stable state far from equilibrium [22]. To validate the proposed extended MC model, we performed a simulation under the same conditions considered in [22], initially in the absence of \(I_{K_\mathrm{e} }^\mathrm{reg} \), for an excitation leading the system to a second, unphysiological stable state. Figure 3 presents the long-time evolution of (a) \(V_\mathrm{m} \) and \(E_\mathrm{ion}\), and (c) \(N_{\mathrm{ion}_\mathrm{i\left( e \right) } } \), for an excitation of \(I_\mathrm{app} =150\, \upmu \hbox {A/cm}^{2}\) and \(T_\mathrm{s} =500\,\hbox {ms}\) starting at 50 s. As observed, the strong excitation drives the system, on long time scales, to a second stable state where the action of the pumps is insufficient to recover equilibrium conditions. Inclusion of the regulation term (Fig. 3b, d) prevents this behavior by assisting the external potassium concentration to recover the equilibrium concentration. As observed, the restoration of equilibrium conditions takes place on a time scale (tens of seconds) much longer than the voltage spikes (tens of milliseconds). The results obtained in presence and absence of this regulation term are analogous to those shown in Figs. 1a and 3a of [22], respectively. We remark that, in both cases, spike trains occur at the onset and conclusion of the excitation, not observed on the time scale of the main figure (enlarged in the insets).

The regulation term plays a significant role when strong deviations of extracellular potassium from the equilibrium value are caused by the excitation (more than 60 mMol/l in the case of Fig. 3). However, in cases where such deviation is small (lower than 5 mMol/l), the effect of the regulation term is nearly negligible compared with that of the ion pumps. In the following, we operate under such conditions and ignore the regulation term in the calculations.

Figure 4 presents the time evolution for an excitation of \(I_\mathrm{app} =7\,\upmu \hbox {A/cm}^{2}\) and \(T_\mathrm{s} =5\,\hbox {ms}\) (the same as in Fig. 1 for the HH model) of (a) \(V_\mathrm{m} \), (b) \(I_\mathrm{ion} \) and \(I_\mathrm{pump} \), (c) \(N_{\mathrm{Na}\_\mathrm{i}} -N_{\mathrm{Na}\_\mathrm{i}}^\mathrm{eq}\) and \(N_{\mathrm{K}\_\mathrm{e}} -N_{\mathrm{K}\_\mathrm{e}}^\mathrm{eq} \), and (d) \(E_\mathrm{K} -E_\mathrm{K}^\mathrm{eq}\) and \(E_\mathrm{Na} -E_\mathrm{Na}^\mathrm{eq}\). The extended model produces an overall behavior very similar to that of the HH model in terms of the membrane potential and ion currents (Fig. 4a, b, respectively). Note again the presence of fluctuations in the ion currents in the inset of Fig. 4b. The ECS potassium and ICS sodium densities are particularly interesting, because they allow the identification of nonequilibrium conditions. In contrast to the previous case, the small excitation considered here leads to slight modifications in the ion concentrations. However, \(N_{\mathrm{K}\_\mathrm{e}} \) and \(N_{\mathrm{Na}\_\mathrm{i}} \) take a long time to recover to their equilibrium values, as seen in the inset of Fig. 4c, only assisted by the slow action of the pumps. \(I_\mathrm{pump} \), which increases very slightly after the potential spike, is insufficient to restore these ion concentrations in a shorter time. In fact, \(I_\mathrm{pump} \) remains practically at its equilibrium value, since the variation in \(N_{\mathrm{Na}\_\mathrm{i}} \) and \(N_{\mathrm{K}\_\mathrm{e}} \) is of the order of 0.1 mMol/l, which hardly affects \(I_\mathrm{pump} \) [see Eq. (19)]. \(V_\mathrm{m} \), after a fast spike originated by the onset of the excitation, reaches a value slightly lower than the resting potential, which again is recovered after a long transient (inset of Fig. 4a). The values of the Nernst potentials (Fig. 4d), updated with the ECS and ICS potassium and sodium concentrations, vary very little with respect to equilibrium, and exhibit time dependence consistent with the initially fast then slow evolution of the ion concentrations.

Fig. 4
figure 4

MC time evolution of a \(V_\mathrm{m}\), b \(I_\mathrm{ion}\), and \(I_\mathrm{pump}\) (inset zoom of small currents around the excitation), c \(N_{\mathrm{K}\_\mathrm{e}} -N_{\mathrm{K}\_\mathrm{e}}^\mathrm{eq} \) and \(N_{\mathrm{Na}\_\mathrm{e}} -N_{\mathrm{Na}\_\mathrm{e}}^\mathrm{eq} \), and d \(E_\mathrm{K} -E_\mathrm{K}^\mathrm{eq} \) and \(E_\mathrm{Na} -E_\mathrm{Na}^\mathrm{eq} \), for \(I_\mathrm{app}=7\,\upmu \hbox {A/cm}^{2}\) and \(T_\mathrm{s}=5\,\hbox {ms}\), starting at 10 ms. Insets in (a), (c), and (d) show long-time evolution of the corresponding quantities

Fig. 5
figure 5

MC time evolution of a, c \(V_\mathrm{m}\) and b, d \(N_{\mathrm{K}\_\mathrm{e}} -N_{\mathrm{K}\_\mathrm{e}}^\mathrm{eq} \) and \(N_\mathrm{Na\_\mathrm{i}} -N_\mathrm{Na\_\mathrm{i}}^\mathrm{eq} \) for an excitation of (a), (b) \(I_\mathrm{app}=7\, \upmu \hbox {A/cm}^{2}\) or c, d \(I_\mathrm{app}=100\,\upmu \hbox {A/cm}^{2}\) and \(T_\mathrm{s}=100\,\hbox {ms}\), starting at 10 ms from the beginning of the simulations (shaded area). Insets Long-time evolution of the corresponding quantities

Fig. 6
figure 6

MC values of \(V_\mathrm{m}\) as a function of time for excitation conditions of \(I_\mathrm{app}=14\,\upmu \hbox {A/cm}^{2}\) starting at 10 ms: a for different \(T_\mathrm{s}\), and b for \(T_\mathrm{s}=1.1\,\hbox {ms}\) in a cell with a surface 100 times smaller than in (a) and 20 different random number sequences

Fig. 7
figure 7

Percentage of trials (1000 cases initiated with a different random number) exhibiting a spike as a function of the applied current (during a time interval for \(T_\mathrm{s}=1.1\,\hbox {ms}\)) for different values of the patch area. The deterministic case (no shot noise) is also shown for comparison

To investigate the electrical behavior of the biological membrane more deeply and illustrate the generation of spike trains, Fig. 5 presents the MC time evolution of (a, c) the membrane voltage \(V_\mathrm{m} \), and (b, d) \(N_{\mathrm{Na}\_\mathrm{i}} -N_{\mathrm{Na}\_\mathrm{i}}^\mathrm{eq} \) and \(N_{\mathrm{K}\_\mathrm{e}} -N_{\mathrm{K}\_\mathrm{e}}^\mathrm{eq} \) for (a, b) \(I_\mathrm{app} =7\,\upmu \hbox {A/cm}^{2}\) and (c, d) \(I_\mathrm{app} =100\,\upmu \hbox {A/cm}^{2}\), with \(T_\mathrm{s}=100\, \hbox {ms}\). For both excitations, spike trains take place despite the fact that the ion concentrations do not recover to their equilibrium values between spikes; on the contrary, they exhibit a stepwise increase at the rhythm of the spikes. Increasing \(I_\mathrm{app}\) accelerates the process of spike generation and leads to a higher frequency in the spike trains at the cost of decreasing spike amplitude. This occurs because the potassium channels are not completely closed when starting a new spike, leading to partial opening of the sodium channels, hindering formation of further full spikes. In the case of \(I_\mathrm{app}=100\,\upmu \hbox {A/cm}^{2}\) and \(T_\mathrm{s}=100\,\hbox {ms}\), the amplitude and length of the excitation are not high enough to lead to a new stable state, as in the case of Fig. 3a, c. On the contrary, for both 7 and \(100\, \upmu \hbox {A/cm}^{2}\), once the excitation disappears, \(V_\mathrm{m}\) quickly adopts a value below the resting potential (being lower for higher \(I_\mathrm{app}\)), then recovers the equilibrium conditions on a much longer time scale, the same as for ion concentration recovery (see insets). The values below \(V_\mathrm{m}\) originate from the deviations in the ion concentrations from the equilibrium values, being more pronounced when \(I_\mathrm{app}\) is higher.

Finally, we analyzed the excitation conditions necessary for the onset of a single spike in the membrane potential and illustrate how noise can assist/inhibit such onset. In Fig. 6a, the time evolution of \(V_\mathrm{m}\) is presented for \(I_\mathrm{app} =14\,\upmu \hbox {A/cm}^{2}\) and different values of \(T_\mathrm{s}\) to evaluate the minimum excitation length leading to spike onset. As observed, \(T_\mathrm{s}\) must be at least 1.2 ms to produce a complete spike. This excitation length value corresponds to the case in which \(V_\mathrm{m}\) reaches about \(-53\) mV, that is, an increase of about 15 mV in \(V_\mathrm{m}\) [21]. As long as this threshold value for \(V_\mathrm{m}\) is reached, even if the excitation disappears, the process leading to spike onset and evolution takes place, more slowly for excitations with length just above this limit. Once the potential spike appears, the time evolution is analogous for all excitations considered. Initially, a positive maximum of about 40 mV is reached, then, after \(\sim 3\,\hbox {ms}\), the polarization is inverted up to \(-92\) mV, followed by recovery of the resting value. The total duration of a single spike is always about 25 ms. The results shown in Fig. 6a were calculated using the same values of surface and internal and external volumes as above, i.e., \(S= 922\, \upmu \hbox {m}^{2}\), \( \omega _\mathrm{i} =2160\,\upmu \hbox {m}^{3}\), and \(\omega _\mathrm{e} =720\,\upmu \hbox {m}^{3}\). When repeating the simulation with a different sequence of random numbers, in no case was an action potential observed for \(T_\mathrm{s} =1.1\, \hbox {ms}\). However, if one reduces the surface of the membrane patch by two orders of magnitude (and the ICS and ECS volumes accordingly), which, as explained above, implies an increase in the level of ion shot noise, one obtains the results shown in Fig. 6b. Twenty cases corresponding to different sequences of random numbers are shown, each leading to a different \(V_\mathrm{m}\) response, which in many cases does not exhibit a spike, but in some cases does. This behavior is due to the influence of shot noise in the ion currents, which propagates to \(V_\mathrm{m}\) and on some occasions helps the threshold for spike onset to be overcome. Depending on how much the threshold is surpassed, the evolution of \(V_\mathrm{m}\) is faster or slower until reaching the spike. We remark that, in the case of a deterministic solution of the model, the results would be independent of the concrete values of S, \(\omega _\mathrm{i} \), and \(\omega _\mathrm{e}\), as long as they maintain the same ratios, and for \(I_\mathrm{app}=14\,\upmu \hbox {A/cm}^{2}\) and \(T_\mathrm{s}=1.1\, \hbox {ms}\), no spike would be observed (Fig. 7).

To quantify the importance of shot noise depending on the membrane area S, Fig. 7 shows the percentage of trials (all initiated with a different random number) exhibiting a spike as a function of the applied external current (during \(T_\mathrm{s}=1.1\,\mathrm{ms})\) for different patch area values within a realistic range. The deterministic case (no shot noise) is also shown for comparison, where the threshold current for the onset of the action potential is found to be \(I_\mathrm{th}=14.14\, \upmu \hbox {A/cm}^{2}\). As observed, shot noise not only leads to the onset of peaks for currents below \(I_\mathrm{th}\), but also inhibits their emergence for currents above \(I_\mathrm{th}\). Such excitation/inhibition action is symmetrical around \(I_\mathrm{th}\). For large S (\(922\, \upmu \hbox {m}^{2}\)), the behavior is nearly deterministic and the influence of shot noise is limited to a few hundredths of \(\upmu \hbox {A/cm}^{2}\) around \(I_\mathrm{th}\). However, as the area shrinks, this influence expands to a broader range of values of applied current: from tenths of \(\upmu \hbox {A/cm}^{2}\) for \(S= 92.2\) and \(9.22\, \upmu \hbox {m}^{2}\) to several \(\upmu \hbox {A/cm}^{2}\) for the case of the smallest area considered (about \(4\,\upmu \hbox {A/cm}^{2}\) for \(S= 0.922\, \upmu \hbox {m}^{2}\), which could be the case, e.g., of a brain synapse [38]). For such small cell membranes, shot noise may play a role in excitation/inhibition of action potentials in competition with other noise sources, some of which also have increasing effect as the membrane area is reduced, e.g., channel noise, compared with which shot noise is typically disregarded [25, 26]. Detailed analysis of such competition between noise types, which lies beyond the scope of this work, should also be performed.

We finally remark that our model for the inclusion of shot noise considers, as a first approximation, that the passage of ions through the membrane is a Poisson process, i.e., that ions cross the membrane independently of each other. However, more rigorous studies of single open ion channels, performed by means of a coupled molecular dynamics–MC approach with input parameters obtained from atomistic simulations, indicate the existence of correlations in ion motion within the channel [28]. Such correlations may lead to values of the Fano factor higher than one, indicating a level of noise higher than that for a Poisson process, which would make shot noise even more relevant for the membrane voltage dynamics than revealed by our calculations.

4 Conclusions

A stochastic model based on the MC technique for determination of the time of passage of ions through a cell membrane has been developed to simulate action potential generation. Initially, a model strictly based on the HH equations (not accounting for ion concentrations) was validated by comparison with the exact deterministic solution. Then, the standard HH model was extended to include the time-dependent ion concentrations in the intra- and extracellular space and the existence of ion pumps to equilibrate the steady-state currents. An extra regulation term is also considered to take into account an external potassium bath. Results from literature are reproduced by this model, including the evolution of the system to a second stable state for strong excitations in the absence of the regulation term, or the generation of spike trains induced by sufficiently intense external currents.

Our stochastic model captures the essential dynamics of ions while avoiding the consideration of spatially complex distributions of channels and cotransporters at a molecular level. Additionally, by monitoring the random passage of ions through the cell membrane, the shot noise inherent to such dynamics is naturally accounted for in the model. We evidenced that the associated membrane potential fluctuations can not only assist the onset of action potentials for weak excitation conditions for which spikes would not be expected, but also inhibit their appearance in cases where they should be present. In this context, shot noise is typically ignored when other noise sources, e.g., channel or external noise [23,24,25, 32, 33], are analyzed. Rigorous analysis of the influence of shot noise as compared with other noise sources under different excitation conditions should therefore be carried out.