The Leaky Integrate-and-Fire Neuron
The LIF neuron is the 'Hello World' of computational neuroscience. It captures the most important thing a neuron does: integrate input until it fires.
Real neurons are incredibly complex — hundreds of ion channels, 3D shapes, chemical signals. The LIF model simplifies all of this to one equation that still captures the core behavior.
τm · dV/dt = EL − V + R · I(t)
τm = time constant, V = membrane voltage, EL = resting potential, R = resistance, I(t) = input current
Reading the equation:
• EL − V is like a spring pulling voltage back to rest. If V > EL the term is negative → voltage falls. If V < EL it's positive → voltage rises.
• R · I(t) is the input current pushing voltage up.
• τm controls how fast this happens — bigger τm means slower response.
🔑 When V reaches threshold Vth (−50 mV), the neuron fires (spikes) and resets to Vr (−70 mV). That's the whole model!
The 8 parameters you'll use throughout NMA:
• t_max = 150e-3 — simulation length (150 ms)
• dt = 1e-3 — time step (1 ms)
• tau = 20e-3 — membrane time constant (20 ms)
• el = -60e-3 — resting potential (−60 mV)
• vr = -70e-3 — reset potential (−70 mV)
• vth = -50e-3 — spike threshold (−50 mV)
• r = 100e6 — membrane resistance (100 MΩ)
• i_mean = 25e-11 — mean input current (25 pA)