Seeing a neuron's entire future in two dimensions
"What if you could see a neuron's entire future — not just its voltage trace, but every possible trajectory it could ever take? That's what a phase portrait shows you. And once you can read one, you can predict whether a neuron will rest, spike, oscillate, or burst — just by looking at two curves."
We'll build this intuition piece by piece using the FitzHugh-Nagumo model — a two-variable reduction of Hodgkin-Huxley that preserves its essential dynamics while being simple enough to visualize completely.
Here $v$ is a fast voltage-like variable and $w$ is a slow recovery variable. The parameters $a = 0.7$, $b = 0.8$, $\varepsilon = 0.08$ shape the dynamics. $I$ is an external current we can inject.
Instead of plotting voltage against time, we plot voltage ($v$) against the recovery variable ($w$). Each point in this plane is a complete description of the neuron's state at one instant. There is no time axis — just "where the neuron is right now."
Try it: Drag the dot around. You're placing the neuron in a different initial condition. Right now this plane is empty — we can't tell where the neuron would go from any given state. That changes next.
At every point in state space, the differential equations define a direction — like a current in a river. The state is carried along by this flow. The arrows below show the direction and speed of this current everywhere simultaneously.
Try it: Drag the dot and watch the large arrow showing the exact $(dv/dt,\; dw/dt)$ vector. Where does the flow converge? Where does it diverge? Is there a point where the arrow shrinks to nothing?
Now release a "particle" into the current and watch where it goes. Each click launches a trajectory from that initial condition, integrated forward using the differential equations. The moving dot traces where the neuron's state travels through time.
Try it: Click at different starting points — corners, edges, center. Do all trajectories end up in the same place? How fast do they get there? Try starting from the top-left versus the bottom-right.
The vector field is rich but hard to read at a glance. We need landmarks. The two most important curves in any phase portrait are the nullclines — the places where one of the two variables is momentarily frozen.
Setting $dv/dt = 0$ gives us $w = v - v^3/3 + I$. This cubic curve divides the plane into regions where voltage is increasing (right of the curve) and decreasing (left of it).
Try it: Click above the cyan curve, then below it. The horizontal component of the trajectory reverses across the nullcline. The curve is a boundary between "voltage rising" and "voltage falling."
Setting $dw/dt = 0$ gives us $w = (v + a)/b$. This straight line divides the plane into regions where recovery is increasing (below the line) and decreasing (above it).
Where both nullclines cross, both variables are frozen — $dv/dt = 0$ and $dw/dt = 0$ simultaneously. That's a fixed point: an equilibrium where the neuron sits forever unless perturbed. The green circle marks it.
Try it: Launch trajectories from all four quadrants defined by the nullclines. In each quadrant, the flow has a characteristic direction — up-right, up-left, down-left, down-right. The nullclines carve the plane into regions of qualitatively different flow.
So far the neuron rests. What makes it fire? In the FitzHugh-Nagumo model, injected current $I$ shifts the v-nullcline vertically. As it shifts, it drags the fixed point along the w-nullcline. At some critical current, something qualitative changes.
Try it: Slowly drag the current slider from 0 toward 0.5. Watch the cyan nullcline rise, pulling the fixed point up the gold line. At the critical current, the green dot turns red — the fixed point became unstable. Now click to launch a trajectory. Instead of converging to rest, it spirals outward into a limit cycle. The neuron fires repetitively.
This qualitative change — from stable rest to repetitive spiking — is a Hopf bifurcation. It happens when the eigenvalues of the linearized system cross the imaginary axis. You just watched it happen geometrically: the fixed point slid past the "knee" of the cubic, and the balance of forces reversed.
The loop in phase space is the repetitive spike train in time. Here we show both views simultaneously: the phase portrait on the left and the voltage trace $v(t)$ on the right. A synced cursor connects the two representations.
Try it: Click "Relaxation osc." — notice the sharp, spike-like waveform and the trajectory hugging the cubic nullcline. Now click "Sinusoidal" — the oscillation becomes smooth and round. The parameter $\varepsilon$ controls time-scale separation: small $\varepsilon$ means the recovery variable is much slower than voltage, producing sharp action-potential-like spikes.
A phase portrait is a map of all possible futures. The nullclines are the landmarks, the fixed points are the destinations (or repellers), and the vector field is the current carrying the state forward. When you change a parameter — like input current — and the landmarks rearrange enough to change the qualitative behavior, that's a bifurcation. You just watched one happen: a stable resting state lost its stability and gave birth to a limit cycle of repetitive firing.
This is the core logic of computational neuroscience: neuronal behavior emerges from the geometry of the phase portrait, and that geometry is shaped by biophysical parameters. Change a conductance, shift a nullcline, cross a bifurcation — and the neuron switches from silent to spiking, or from tonic to bursting.