Reinforcement Learning in Minds and Brains/The Neuroscience of Reinforcement

Lesson 6.73,569 words

The Neuroscience of Reinforcement

The dopamine story is one contact point between reinforcement learning and the brain; this lesson fills in the surrounding neuroscience so the mapping stands on its own. We build a working primer of neurons, synapses, and neuromodulation; separate four signals that casual usage conflates — reward, reinforcement, value, and prediction error; and read the actor and critic as corticostriatal synapses updated by two- and three-factor rules, grounded in spike-timing-dependent and reward-modulated plasticity.

╌╌╌╌

The dopamine=TD-error correspondence is the sharpest single point of contact between reinforcement learning and the brain, but it is one point. It says a chemical signal behaves like ; it does not say what a synapse is, how a synapse changes, which brain structures carry the actor and the critic, or whether the brain runs anything besides a model-free error-correcting loop. This lesson supplies the surrounding neuroscience so the mapping is self-contained, and it makes one argument throughout: the brain is not a single reinforcement-learning algorithm faithfully implemented in tissue. It is several learning systems — model-free and model-based, habitual and goal-directed — running at once and arbitrating between themselves.1

Reinforcement learning is a good lens for that machinery precisely because it gives distinct names to signals the brain keeps distinct. Before any mapping, though, we need the vocabulary of the tissue.

A neuroscience primer

A neuron is a cell specialized to process and transmit information with electrical and chemical signals. The parts that matter here are three. The cell body (soma) integrates incoming signals. Dendrites branch from the cell body to receive input from other neurons, and in sensory neurons to receive signals from the outside world. A single axon carries the neuron's output to its targets. A neuron's output is a sequence of brief electrical pulses called action potentials — also called spikes — that travel along the axon; a neuron is said to fire when it emits one. In neural-network models we usually abstract this spike train to a single number, the firing rate: the average count of spikes per unit of time.2

A neuron. Dendrites collect input at the cell body, which fires action potentials down a single axon; the axon branches into an axonal arbor, so one action potential can reach many downstream targets.

The axon can branch widely, and this branching structure is the neuron's axonal arbor. Conduction of an action potential is an active, regenerative process, not unlike a burning fuse: when a spike reaches a branch point it lights up spikes on all the outgoing branches (though propagation into any one branch can fail). A neuron with a large arbor can therefore influence a great many target sites at once — a fact that becomes central when we ask how a single chemical signal reaches synapses all over the brain.

Synapses and synaptic plasticity

A synapse is the structure, usually at the end of an axon branch, that transmits a signal from one neuron to the next. On the presynaptic side is the sending neuron's axon; on the postsynaptic side is the receiving neuron's dendrite or cell body. With few exceptions the transmission is chemical: the arrival of an action potential causes the presynaptic terminal to release a neurotransmitter, whose molecules diffuse across the narrow synaptic cleft and bind to receptors on the postsynaptic surface. That binding can excite the postsynaptic neuron (push it toward firing), inhibit it (push it away), or modulate its behavior in other ways. A single neurotransmitter can bind several receptor types, each producing a different effect — dopamine alone acts through at least five distinct receptor types.3

A synapse. A presynaptic spike releases neurotransmitter into the cleft; it binds postsynaptic receptors, exciting or inhibiting the receiving neuron. The synapse's efficacy — how strongly the presynaptic signal drives the postsynaptic neuron — is the adjustable weight of the brain.

The strength with which a synapse's transmitter drives the postsynaptic neuron is the synapse's efficacy — the biological counterpart of a weight in a network. The ability of that efficacy to change with experience is synaptic plasticity, and it is one of the primary mechanisms responsible for learning. When we adjust a weight with a learning rule, the brain's analog is a change in synaptic efficacy; the parameters an algorithm tunes correspond to the efficacies a brain modifies. Everything the rest of this lesson calls learning ultimately means this.

Neuromodulators and the diffuse broadcast

Not every chemical signal is fast point-to-point excitation or inhibition. A neuromodulator is a neurotransmitter that has effects other than, or in addition to, direct fast signaling — it can change how a circuit functions, and, critically, it can gate synaptic plasticity. The brain contains several distinct neuromodulatory systems, each a cluster of neurons with widely branching axonal arbors, each using a different transmitter, together mediating motivation, arousal, attention, memory, mood, and more. What matters here is a structural fact: because a neuromodulatory system's neurons have enormous arbors, such a system can distribute something like a scalar signal — a single number, such as a reinforcement signal — to synapses at widely distributed sites all at once.4

That matches the shape a reinforcement signal needs. An algorithm broadcasts one to every parameter; a neuromodulatory system broadcasts one chemical level to every synapse in its reach. Dopamine is the leading candidate for this role, and its neurons are unusually well suited to it: each dopamine axon makes on the order of hundreds of thousands of synaptic contacts, reaching 100 to 1,000 times more sites than a typical neuron's axon.

The corticostriatal loop

The structures where reward-based learning is thought to happen form a loop through three regions. The cerebral cortex — the outer sheet of the brain — supplies context: sensory input, current state, candidate actions. That cortical activity projects to the striatum, the input structure of the basal ganglia, a group of nuclei deep in the brain heavily implicated in action selection and learning. The striatum divides into a dorsal part and a ventral part, and this division will matter: one is a better fit for the actor, the other for the critic. The basal ganglia's output loops back, through the thalamus, to the cortex — closing a cortico-striatal-thalamo-cortical loop. Cutting across this loop are the dopamine neurons, whose cell bodies sit in two midbrain nuclei (the substantia nigra pars compacta and the ventral tegmental area) and whose axons blanket the striatum with the phasic reinforcement signal.5

The corticostriatal loop. Cortex sends state and candidate actions to the striatum (the basal ganglia's input); the basal ganglia loop back to cortex via the thalamus. Midbrain dopamine neurons broadcast the phasic reinforcement signal to the dorsal and ventral striatum, gating plasticity at corticostriatal synapses.

A neuron's steady, slow background activity is its tonic firing; a brief burst usually driven by synaptic input is phasic activity. The reinforcement signal of interest rides on the phasic dopamine response — the burst — while the tonic level does other work. Keep the two apart: the RPE signal rides on the burst, not the tonic level.

Four signals that get conflated

Casual usage runs together four ideas that reinforcement learning keeps sharply distinct, and the neuroscience only makes sense once they are separated. When we label a neural signal by its function — calling a dopamine burst a reinforcement signal — we mean it behaves like, and is conjectured to function like, the corresponding theoretical term in an equation. The four terms are reward, reinforcement, value, and prediction error.6

Four distinct signals. Reward scores the moment; a value or predicts long-run return; a prediction error is expected minus received; the reinforcement signal is whatever actually drives the weight update — for a TD method, the TD error, not the raw reward.

Reward is the signal . In reinforcement learning it defines the problem: along with the environment, the reward signal specifies what the agent is trying to achieve. It is best read as an abstraction. There is almost certainly no single master reward wire in the brain; summarizes the overall effect of a multitude of neural signals that assess the rewarding or punishing quality of sensations and states, distributed across many sites.

Value is or : an estimate of what is good or bad over the long run. Values are predictions of the total reward an agent can expect to accumulate from a state (or from an action in a state) into the future. Good decisions come from choosing states with high estimated value, or actions with high estimated action value — not from chasing immediate reward.

A prediction error measures a discrepancy between an expected and a received signal. A reward prediction error (RPE) is specifically the gap in reward: positive when the reward signal exceeds expectation, negative when it falls short, zero when the forecast is exact. A TD error is a particular kind of RPE — one that compares current and earlier expectations of reward over the long term, folding the value change into the discrepancy rather than looking at alone. When neuroscientists refer to RPEs they usually mean TD RPEs.

Reinforcement is the signal that actually directs the change a learning algorithm makes to its policy, values, or model. This is the one most often misnamed, because it need not be the reward. For a TD method the reinforcement signal at time is the TD error

the reward signal adjusted by other information — here the value estimates. Reward is a component of , but not the whole of it; the extra term is the higher-order part. This is why a dopamine burst is a reinforcement signal, not a reward signal: it tracks , and even when reward occurs () the burst can be silent if the reward was fully predicted, because . Reward happened; reinforcement did not.

SignalSymbolWhat it isIn the brain
Rewardscores the current moment; defines the problemno single wire; a distributed summary
Valueprediction of long-run returnstriatal / cortical estimates
Prediction errorRPE, TD errorexpected minus received rewardconjectured in phasic dopamine
Reinforcement (for TD)signal that drives the weight updatephasic dopamine burst

The distinctions are not pedantry. Neural activity related to reward processing turns up in nearly every part of the brain, and representations of these four signals tend to be strongly correlated, so an experiment that cannot dissociate them cannot say which one it has found. Designing a task that separates a reward signal from a value signal from a prediction error is most of the difficulty in this field.

A task that dissociates the three

To see why dissociation is hard and how it is done, take a cued task with a single outcome. A cue predicts reward with probability ; on each trial the outcome is either reward () or nothing (). Value is the expected reward the cue forecasts, (with irrelevant here — the outcome follows the cue by a fixed delay and there is no further state). The reward prediction error at the outcome is . If an experiment used only trials with , reward and value and RPE would move together on every trial and no recording could tell them apart: reward is always , value is always , RPE is always . Varying across cues, and reading out and separately, pulls the three apart.

Cue Outcome Value RPE What the burst should do
(got it)nothing — fully predicted
(got it)fire — better than expected
(nothing)dip — worse than expected
(surprise)fire hard — pure surprise

Reading down the table: the same reward produces three different phasic responses (, , ) depending on the value the cue set up, so the burst cannot be a reward signal. The same value produces both a positive and a negative response depending on the outcome, so it cannot be a value signal either. Only predicts every cell. This is the logic behind the classic dopamine recordings: fix the reward, vary what the animal expects, and watch the burst track the difference. Bayer and Glimcher (2005) pushed it quantitatively, showing that the firing rate of midbrain dopamine neurons scales with the numerical size of the prediction error rather than the reward.7

Actor and critic learning rules

The dopamine lesson read the basal ganglia as a neural actor-critic with dopamine as the shared training signal. Here we spell out the learning rules and ask whether they are neurally plausible. The setup is a linear critic unit and a small network of actor units, all receiving the same feature-vector representation of the state.8

Let be the feature vector for the current state — think of each as the presynaptic signal arriving at one of the unit's synapses. The critic is a single linear neuron-like unit with weight vector ; its estimate is . The actor is a one-layer network of identical units, each with its own weight vector ; taking two actions, an actor unit is a Bernoulli-logistic unit whose output (fire or not) has probability . Both are updated by the same broadcast signal acting as reinforcement:

The two rules differ only in their eligibility traces , and that difference is the whole point. The critic's trace accumulates the presynaptic activity alone, : a synapse becomes eligible for modification whenever it carries presynaptic input, independent of whether the postsynaptic neuron fires. This is a non-contingent eligibility trace. The actor's trace, by contrast, includes the postsynaptic factor: , and that gradient works out to — a product of a presynaptic factor and a postsynaptic factor that depends on whether the unit actually fired. This is a contingent eligibility trace.

The only difference between the two rules. The critic synapse's trace depends on presynaptic input alone (non-contingent); the actor synapse's trace depends on the coincidence of presynaptic input and the unit's own firing (contingent), so it records which action was taken and can assign credit to it.

Both rules are descendants of Hebb's classic proposal — that when a presynaptic signal repeatedly helps fire a postsynaptic neuron, the synapse strengthens. But each adds structure Hebb did not have. The critic rule involves two interacting factors: the reinforcement signal and a presynaptic-only trace; neuroscientists call this a two-factor learning rule. The actor rule involves three: , a presynaptic factor, and a postsynaptic factor — a three-factor learning rule. In each case the reinforcement signal arrives to modulate a synapse whose eligibility trace was set by local pre/post activity, possibly long before; the trace bridges the delay between the eligible event and the arrival of reinforcement.

One update, worked through

The rules are abstract until real numbers pass through them. Take a two-state, two-action task with a one-hot state representation: and , so each state activates a single synapse on the critic and on each actor unit. Start both learners blank: critic weights and actor weights . With the actor's firing probability is : an unbiased coin, exactly what a fresh policy should be. Set and step sizes ; take the traces at their simplest, , so is just the current gradient.

Now run one transition. In the actor fires, (it came up heads); the action carries the agent to and yields reward . Compute the value estimates from the still-zero weights: and . The reinforcement signal is

Critic update (two-factor). The non-contingent trace is the presynaptic input alone, . So

Only the synapse carrying 's input moved, and it moved up: rises from to , a step toward the reward that just arrived. The critic did not need to know which action was taken — it is learning to predict, not to choose.

Actor update (three-factor). The contingent trace multiplies the presynaptic input by the postsynaptic factor , giving . So

The weight rises to , which lifts the firing probability from to : the action that was taken becomes a little more likely, because the reinforcement that followed it was positive. Had the same arrived after the unit stayed silent (), the postsynaptic factor would have been and the weight would have moved the other way, making firing less likely — the trace remembers what the unit did and signs the update accordingly.

One shared reinforcement signal, two updates. With , the critic synapse for moves to (value toward accuracy) and the actor synapse for moves to (policy toward the taken action). The critic's trace is the presynaptic input; the actor's is that input scaled by .

The single number did two jobs at once. Broadcast unchanged to both learners, it pushed the critic's estimate toward the reward it under-predicted and pushed the actor's policy toward the action it had just tried. Nothing in the wiring distinguishes the two updates except the trace each synapse keeps — non-contingent for the predictor, contingent for the controller.

The timing problem, and STDP

Real neurons force a subtlety the idealized units hide. When a presynaptic spike arrives, the postsynaptic neuron does not respond instantly; the chemistry of transmission takes tens of milliseconds. For the contingent actor rule to assign credit correctly, the presynaptic factor that sets the trace must be a genuine cause of the postsynaptic firing that defines it — which means a realistic actor unit has to respect this activation time. (Do not confuse activation time, tens of milliseconds, with the much longer interval an eligibility trace must span to bridge a delayed reward.)

The brain has a plasticity mechanism with exactly the right shape: spike-timing-dependent plasticity (STDP). STDP is Hebbian, but the direction of the change depends on the relative timing of pre- and postsynaptic spikes: a synapse strengthens if its presynaptic spike arrives shortly before the postsynaptic neuron fires, and weakens if the order is reversed. STDP thus takes activation time into account — one of the ingredients an actor-like rule needs. Write for the timing offset. The canonical STDP curve, mapped out in cortical and hippocampal slices, is a sharp asymmetric window: for (pre before post, the causal order), for (post before pre), with both lobes decaying over tens of milliseconds and a discontinuity at . Markram and colleagues (1997) demonstrated the timing dependence between connected cortical pyramidal neurons; Bi and Poo (1998) mapped the full window in hippocampal culture, fixing the tens-of-milliseconds width that has anchored the field since.9

The spike-timing-dependent plasticity window. Plotting the change in synaptic weight against the timing offset : pre before post () potentiates the synapse, post before pre () depresses it, and both lobes decay over tens of milliseconds. The causal order — presynaptic input helping cause the postsynaptic spike — is the one that strengthens the synapse.

And there is more: neuroscientists have found reward-modulated STDP, a three-factor form in which the STDP change occurs only if a neuromodulatory input (dopamine) arrives within a time window after the paired pre/post spikes. The STDP window sets which synapses become eligible; the dopamine pulse decides whether the eligible change is actually committed. Reynolds and Wickens (2002) proposed exactly this three-factor corticostriatal rule — an STDP-eligible synapse held in a plastic state until dopamine gates the change.10 Yagishita and colleagues (2014) gave it a mechanism: at the dendritic spines of striatal medium spiny neurons, the spine enlarges (the structural correlate of potentiation) only when dopamine arrives in a narrow window, on the order of to seconds, after paired pre/post activity. Experiments have shown lasting changes in corticostriatal synapses when dopamine follows a pre-then-post pairing within a window that can last up to about ten seconds — direct, if indirect, evidence for contingent eligibility traces with long time courses, at exactly the synapses where the actor's learning is hypothesized to live.11

The two rules differ in which factors must line up in time. The critic is two-factor: a presynaptic-marked synapse, then dopamine. The actor is three-factor: a presynaptic spike, then a postsynaptic spike (this pairing sets the contingent trace), then dopamine within the window. Laying the signals on a timeline makes the difference legible.

Two-factor versus three-factor timing. The critic (top) needs only a presynaptic-marked synapse and a later dopamine pulse. The actor (bottom) needs a presynaptic spike, then a postsynaptic spike setting the contingent trace, then dopamine arriving inside the eligibility window (Yagishita: ~0.3-2 s, up to ~10 s) to commit the change. Time runs left to right.

Beyond the single loop

We now have the tissue-level vocabulary and the two learning rules: a two-factor critic and a three-factor actor, both driven by a broadcast , both grounded in reward-modulated STDP at corticostriatal synapses. That is one model-free loop. But the brain is not one loop. The next part asks where the actor rule came from — Klopf's hedonistic neuron — whether teams of such neurons can learn together, and where the model-based systems live that the single loop leaves out. The recurring finding is that the brain is not one reinforcement-learning algorithm but several interacting systems.

This continues in The Brain's Several Learning Systems.

Footnotes

  1. Sutton & Barto, Reinforcement Learning: An Introduction (2nd ed.), Ch. 15 — Neuroscience: the chapter's framing that reinforcement-learning theory and the neuroscience of reward-based learning form a fruitful two-way channel, without claiming the brain implements any single algorithm.
  2. Sutton & Barto, §15.1 — Neuroscience Basics: neurons, cell body, dendrites, axon, action potentials/spikes, firing rate, and the axonal arbor whose active conduction lets one spike reach many targets.
  3. Sutton & Barto, §15.1 — Neuroscience Basics: synapse, presynaptic/postsynaptic sides, neurotransmitter, synaptic cleft, receptors, synaptic efficacy, and synaptic plasticity as a primary mechanism of learning (dopamine acting through at least five receptor types).
  4. Sutton & Barto, §15.1 — Neuroscience Basics: neuromodulators and neuromodulatory systems as clusters of widely branching neurons able to distribute a scalar signal (like a reinforcement signal) to distributed sites; §15.4 for the scale of dopamine axonal arbors (roughly 500,000 contacts per axon).
  5. Sutton & Barto, §15.1; §15.7 — the cortico-striatal loop, the striatum as the basal ganglia's input structure with dorsal and ventral subdivisions, and midbrain dopamine (SNpc, VTA) broadcasting phasic reinforcement to the striatum.
  6. Sutton & Barto, §15.2 — Reward Signals, Reinforcement Signals, Values, and Prediction Errors: the careful separation of (reward, defining the problem), value estimates /, prediction errors (RPEs, with the TD error a special case), and the reinforcement signal that drives the update — the TD error, not the raw reward.
  7. Bayer, H. M., & Glimcher, P. W. (2005), Midbrain dopamine neurons encode a quantitative reward prediction error signal, Neuron 47(1), 129-141: the firing rate of midbrain dopamine neurons scales with the numerical magnitude of the reward prediction error, and does so asymmetrically for positive versus negative errors.
  8. Sutton & Barto, §15.8 — Actor and Critic Learning Rules: the linear critic unit , the Bernoulli-logistic actor units, the shared reinforcement , and the non-contingent (critic) versus contingent (actor) eligibility traces, with the actor's trace. The postsynaptic contingency is the only difference between the rules.
  9. Markram, H., Lübke, J., Frotscher, M., & Sakmann, B. (1997), Regulation of synaptic efficacy by coincidence of postsynaptic APs and EPSPs, Science 275(5297), 213-215 — timing dependence of plasticity between connected cortical pyramidal neurons; and Bi, G., & Poo, M. (1998), Synaptic modifications in cultured hippocampal neurons: dependence on spike timing, synaptic strength, and postsynaptic cell type, J. Neurosci. 18(24), 10464-10472 — the full asymmetric STDP window in hippocampal culture, with tens-of-milliseconds lobes.
  10. Reynolds, J. N. J., & Wickens, J. R. (2002), Dopamine-dependent plasticity of corticostriatal synapses, Neural Networks 15(4-6), 507-521: a three-factor corticostriatal plasticity rule in which appropriately-timed pre/post activity is committed to a lasting change only when dopamine is present.
  11. Sutton & Barto, §15.8 — Actor and Critic Learning Rules: two-factor versus three-factor learning rules, the activation-time subtlety, spike-timing-dependent plasticity (STDP), and reward-modulated STDP at corticostriatal synapses with dopamine as the modulator within a window up to ~10 seconds (Yagishita et al., 2014).

╌╌ END ╌╌