02 / 03 The membrane potential
  1. ← Spiking neural networks
  2. 00 Foreword
  3. 01 The neuron that forgot time
  4. 02 The membrane potential
Spiking neural networks · 02 / 03

The membrane potential

Where the leak factor we set by hand in chapter 1 comes from: the membrane is a capacitor discharging through a resistor.

In the previous chapter you gave the neuron a memory with a single knob: the retention factor λ\lambda, slid by hand between 00 and 11. It worked, but it fell out of the sky. Why 0.70.7 and not something else? What does it actually stand for? This chapter opens up the cell to show that λ\lambda is not an arbitrary setting: it comes straight from the physics of a membrane, a tiny capacitor draining through a resistor.

A membrane, two electrical parts

A real neuron bathes in a fluid full of charged ions: sodium, potassium, chloride. At rest, its membrane holds a small, constant voltage difference between the inside and the outside of the cell, on the order of 65-65 millivolts. This is the resting potential Resting potential The stable voltage difference a neuron's membrane maintains between the inside and outside of the cell when it receives nothing, on the order of -65 millivolts. It is the value the membrane potential drifts back to when no input arrives. Source: Gerstner et al., 2014 , the value the cell drifts back to when left alone.

This membrane is a very thin fatty wall separating two salty solutions. It piles up opposite charges on either side, exactly like a capacitor: a component that stores electric charge. The larger its capacitance CC, the more charge it takes to raise its voltage by the same amount.

But the membrane is not perfectly sealed. It is pierced by tiny pores, the ion channels Ion channel A pore through a neuron's membrane that lets specific charged ions pass. Always-open channels leak a steady current, modelled as a resistance. Other channels open and close depending on the voltage itself and actively generate the spike (the Hodgkin-Huxley model). Source: Hodgkin & Huxley, 1952 , which let a trickle of current leak through. Seen from afar, this leak behaves like a resistor: a component that opposes the flow of current. The larger the resistance RR, the harder current passes, and the slower the charge escapes.

Hold on to these two roles, because the whole chapter lives in their meeting: the capacitance CC stores, the resistance RR lets things leak.

The RC circuit and the discharge law

Put these two parts together: a charged capacitor CC, connected to a resistor RR through which it can drain. This is the RC circuit, the simplest electrical model of a so-called passive membrane, that is, one that merely leaks, without the active mechanisms that build the spike (we come back to this at the end).

Charge this capacitor up to a voltage V0V_0, then leave it alone. Current escapes through the resistor, the voltage drops. How fast? Here is the decisive intuition: the leaking current is stronger the higher the voltage. The more charge remains, the faster it escapes; the less remains, the slower the leak. A quantity whose rate of decrease is proportional to its own value decays as an exponential. The discharge of an RC circuit therefore follows

V(t)=V0et/τ,τ=RC.V(t) = V_0\, e^{-t/\tau}, \qquad \tau = R\,C.

This equation reads: the voltage at time tt equals the starting voltage V0V_0 multiplied by ee raised to the power t/τ-t/\tau. The number τ\tau (the Greek letter tau) bundles the two parts into a single quantity, τ=RC\tau = RC. The proper justification of this form goes through a differential equation, the tool of chapter 3; here, the proportionality intuition is enough to move on.

The time constant, the membrane’s clock

The product τ=RC\tau = RC has units of time and a very concrete meaning. Look at what the voltage is worth right at the moment t=τt = \tau:

V(τ)=V0e10.37V0.V(\tau) = V_0\, e^{-1} \approx 0.37\, V_0.

After a duration τ\tau, the membrane has lost about 63%63\% of its charge: 37%37\% is left. This is why τ\tau is called the time constant Time constant Characteristic timescale of a membrane's leak, written τ and equal to the product of resistance and capacitance, τ = R · C. After one time constant the potential has lost about 63% of its charge (37% remains, i.e. 1/e). It sets the discrete retention factor λ = e^(-Δt/τ). Source: Gerstner et al., 2014 : it measures the characteristic duration of the leak. A small time constant, and the memory evaporates in a flash; a large one, and the membrane holds the trace of what it received for a long time. This is the exact physical translation of what the λ\lambda knob was tuning in chapter 1.

From continuous decay to the leak factor of chapter 1

We now have two descriptions of the same leak. Physics describes it continuously: at every instant tt, the voltage is V0et/τV_0\, e^{-t/\tau}. Chapter 1 described it in small time steps, with the input-free recurrence vt+1=λvtv_{t+1} = \lambda\, v_t. Do they describe the same thing?

To compare, let us sample the continuous curve: look at it only at regular intervals Δt\Delta t, that is, at the instants 00, Δt\Delta t, 2Δt2\,\Delta t, and so on. At instant kΔtk\,\Delta t, the continuous law gives

V(kΔt)=V0ekΔt/τ=V0(eΔt/τ)k.V(k\,\Delta t) = V_0\, e^{-k\,\Delta t / \tau} = V_0\, \left(e^{-\Delta t / \tau}\right)^{k}.

The second equality uses only the rule of powers: ekΔt/τe^{-k\,\Delta t/\tau} is (eΔt/τ)\left(e^{-\Delta t/\tau}\right) multiplied by itself kk times. Now set

λ=eΔt/τ.\lambda = e^{-\Delta t / \tau}.

Then the sampled value reads V(kΔt)=V0λkV(k\,\Delta t) = V_0\, \lambda^{k}, which is exactly the sequence produced by the chapter-1 recurrence, whose input-free solution is vk=v0λkv_k = v_0\, \lambda^{k}.

The conclusion is strong: the chapter-1 recurrence is not a crude approximation of the physics, it is its exact sampling, provided you choose λ=eΔt/τ\lambda = e^{-\Delta t/\tau}. The leak factor we used to set by hand had a hidden formula, and here it is.

Play with the discharge

The formula is easier to see than to read. In the component below, an initial charge sets the potential at its starting value, then the membrane leaks. The green curve is the continuous discharge V(t)=V0et/τV(t) = V_0\, e^{-t/\tau}. The violet dots are the values of the chapter-1 recurrence, sampled every Δt\Delta t.

Your mission : first set RR and CC, and watch the time constant τ=RC\tau = RC appear while the slope of the curve changes. Notice that the curve always crosses the 37%37\% line right at the instant t=τt = \tau. Then play with the step Δt\Delta t: the violet dots spread apart or close up, but they always stay sitting exactly on the green curve. That is the theorem from the previous section, before your eyes.

37%τ = 2.00potentialtime
continuous decayrecurrence (step Δt)

The leak comes from physics

Time constant τ = R · C : 2.00
Retention per step λ = e^(−Δt/τ) : 0.78
At t = τ, 37% of the charge remains (63% has leaked).

Three things to watch as you play:

  • The time constant depends only on the product RCR\,C. Double the resistance or double the capacitance: the curve slows down the same way. That is the content of the note above, made tangible.
  • At the instant t=τt = \tau, the curve passes through the 37%37\% line, whatever RR and CC are. The 37%37\% mark and the τ\tau vertical always cross on the curve.
  • The smaller Δt\Delta t is compared with τ\tau, the closer λ\lambda is to 11 and the denser the dots. The larger Δt\Delta t, the more λ\lambda drops and the faster the dots tumble: the recurrence always follows the physics, at whatever pace you look at it.

What about the real neuron?

The RC circuit describes a passive membrane: it stores, it leaks, and that is all. But a real neuron does not merely leak, it actively builds its spike. How? In 1952, Alan Hodgkin and Andrew Huxley measured, on the squid giant axon, how certain ion channels open and close depending on the voltage itself, creating a chain reaction that generates the spike (Hodgkin & Huxley, 1952). Their model, awarded the Nobel Prize in Medicine in 1963, adds to the plain RC some conductances that depend on the voltage, hence nonlinear.

In one sentence

The neuron’s leak is anything but arbitrary: the membrane is a capacitor draining through a resistor with a time constant τ=RC\tau = RC, and sampling that continuous discharge every Δt\Delta t gives back exactly the factor λ=eΔt/τ\lambda = e^{-\Delta t/\tau} set by hand in chapter 1.

Towards chapter 3

We have tied our recurrence to the physics of a leaking membrane, but two pieces are still missing for a complete spiking neuron. First, the equation that governs the voltage when an input current arrives continuously, not just when we let the membrane drain on its own. Second, the firing mechanism: the threshold and the reset. Chapter 3 writes the membrane’s differential equation, τdVdt=(VVrest)+RI\tau\, \frac{dV}{dt} = -(V - V_\text{rest}) + R\,I, adds a threshold and a reset, and obtains the full leaky integrate-and-fire model, of which our chapter-1 recurrence was only the sampled, input-free version.

Exercises

Grab paper and a pencil. The solutions are right below, to look at only after you have tried.

Exercise 1: computing a time constant

A membrane has a resistance R=2R = 2 and a capacitance C=1.5C = 1.5, in the model’s units. Compute its time constant τ\tau. Then say what τ\tau becomes if you double the capacitance.

Exercise 2: the half-charge time

A membrane has a time constant τ=2\tau = 2. What fraction of the initial charge remains at the instant t=τt = \tau? Then, after how long is only half of it left?

Exercise 3: recovering the leak factor

We sample a discharge with time constant τ=2\tau = 2 using a step Δt=1\Delta t = 1. Compute the leak factor λ=eΔt/τ\lambda = e^{-\Delta t/\tau}. Then check that, starting from V0=1V_0 = 1, the recurrence vk+1=λvkv_{k+1} = \lambda\, v_k gives after two steps the same value as the continuous law at instant t=2t = 2.

Sources

Further reading

  • Gerstner, W., Kistler, W. M., Naud, R. & Paninski, L. (2014). Neuronal Dynamics. Cambridge University Press. Section 1.3 on the passive membrane and the RC circuit. neuronaldynamics.epfl.ch
  • Abbott, L. F. (1999). “Lapicque’s introduction of the integrate-and-fire model neuron (1907).” Brain Research Bulletin 50(5-6), 303-304. DOI 10.1016/S0361-9230(99)00161-6
Quiz
  1. 1. Where does the retention factor λ set by hand in chapter 1 come from?

  2. 2. What is the time constant τ of an RC circuit equal to?

  3. 3. At the instant t = τ, what fraction of the initial charge remains?

  4. 4. Why do we say the chapter-1 recurrence is the exact sampling of the discharge?

  5. 5. What does the RC circuit model, and what does it not model?