Eligibility Traces in Reinforcement Learning
An eligibility trace is the temporary synaptic record that makes an earlier event eligible to be changed when a later reinforcement signal arrives.
The Delayed-Reward Problem
A reinforcement-learning system may need to connect two events separated in time: an earlier synaptic event and a later reinforcement signal. The central question is how the system can preserve enough information about the earlier event for the later reward to affect the appropriate synapse. Miller's 1981 Law-of-Effect-like proposal addressed this problem with synaptically local contingent eligibility traces.
An eligibility trace is the temporary synaptic record that makes an earlier event eligible to be changed when a later reinforcement signal arrives.
A Synapse Becomes Eligible
In Miller's proposal, eligibility is local to a synapse. An earlier sensory or synaptic event does not immediately need to produce the final learning change. Instead, that event can leave the synapse temporarily eligible. If a reinforcement signal arrives afterward, the signal can be related to the synapse that was previously marked. The trace therefore addresses temporal credit assignment: it helps connect a later outcome with an earlier event.
Tracing One Earlier Event
Suppose a sensory event is followed by activity at one synapse, and a reinforcement signal arrives later. How does a contingent eligibility trace organize the learning sequence?
- 1Earlier event
The sensory event and associated synaptic activity occur first.
- 2Temporary eligibility
The synapse retains a local eligibility trace rather than being treated as unrelated to the later outcome.
- 3Later reinforcement
A reinforcement signal arrives after the earlier synaptic event.
- 4Credit assignment
The later signal can affect the synapse because that synapse was previously made eligible.
The trace supplies a time-bridging link between the earlier synaptic event and the later reinforcement signal.
Miller's Sensory Analyzer
Miller's proposal also included a sensory analyzer unit with a critic-like role. The important function is not merely sensing input. The analyzer supplied reinforcement signals to neurons, providing the signal that could guide changes at synapses that had become eligible. This anticipates a central feature later associated with actor-critic architectures: one part of the system contributes behavior, while a critic-like mechanism supplies information related to reinforcement.
The Hedonistic Synapse
Seung's hedonistic synapse gives the learning problem a synapse-level interpretation. The synapse changes its neurotransmitter release probability according to which event is followed by reward: release or failure to release. The relevant distinction is between synaptic activity and the probability of the synapse's future neurotransmitter release. A hedonistic synapse therefore expresses learning as a reward-dependent change in release probability, rather than treating every synaptic event as an identical outcome.
Release Versus Failure to Release
What does the hedonistic-synapse idea track when reward follows a synaptic event?
- 1Observe the synaptic event
The synapse either releases neurotransmitter or fails to release it.
- 2Observe the later outcome
The system determines whether reward follows that release or failure to release.
- 3Adjust the synapse
The synapse changes its neurotransmitter release probability according to the relationship between the event and the reward.
The learned variable is release probability, and its adjustment depends on whether reward followed release or failure to release.
Historical Connections
| Idea | Earlier event | Later signal | Learning consequence |
|---|---|---|---|
| Contingent eligibility trace | Earlier synaptic event | Reinforcement signal | The locally eligible synapse can be affected |
| Reward-modulated STDP | Synaptic activity | Reward-related modulation | The source connects it with the general features of eligibility-based reward learning |
| Actor-critic method | Past behavior or synaptic event | TD error | The source identifies TD error as a later actor-critic development |
These are historical and conceptual connections, not a claim that the mechanisms are identical.
The shared question across these ideas is how to connect a past event with a later reinforcement signal. The source connects Miller's proposal with the general features of reward-modulated STDP and connects the later actor-critic architecture with TD error. The useful comparison is therefore structural: an earlier synaptic or behavioral event is related to an eligibility-like record, a later reward-related signal arrives, and learning uses the relationship between the two. This relationship should not be mistaken for proof that all three approaches implement the same mechanism.
Bacterial chemotaxis belongs here as a metaphor for the problem of using consequences to guide future behavior. It should not be confused with the neural learning mechanisms themselves. The mechanisms discussed in this article are eligibility traces, reinforcement signals, reward-dependent synaptic release probability, reward-modulated STDP, and actor-critic use of TD error. The metaphor helps frame the learning question; it does not replace the variables and synaptic mechanisms used in those proposals.
Eligibility Traces in TD(λ)
Added by the IKSHA team to go beyond the source course material.
Miller's proposal described a synapse keeping a temporary record so that a later reward could still change it. The same idea is used today in temporal-difference learning, where it is called an eligibility trace. A one-step method, TD(0), updates only the state it has just left, so a reward at the end of a long chain takes many episodes to reach the start. A trace lets one reward update every recently visited state at once.
Each state s has a trace e(s), a number that is 1 when the state is visited and then shrinks by a factor of γ λ on every following step. The parameter λ (lambda), between 0 and 1, sets how long the memory lasts. After each step the algorithm computes one TD error and applies it to every state in proportion to its trace.
The first update shrinks the trace of every state, the second adds 1 to the state just visited, and the third moves every state's value by the TD error times that state's own trace.
At the two ends of the range the method is familiar. With λ = 0 the trace vanishes after one step and the update is TD(0). With λ = 1 the trace decays only by γ and the combined updates over an episode match the Monte Carlo update, which waits for the full return.
A Three-State Walk, Step by Step
Added by the IKSHA team to go beyond the source course material.
One episode with γ = 0.9, λ = 0.8, α = 0.5
A chain goes A, then B, then C, then ends. The only reward is 1, received on leaving C. All values start at 0. Apply the trace updates for the whole episode and report the total change to each value.
- 1Leave A
The TD error is 0 + 0.9 * 0 - 0 = 0. The trace of A becomes 1. Nothing changes yet.
- 2Leave B
The TD error is 0 again. Traces: A has decayed to 0.9 * 0.8 = 0.72 and B is 1. Nothing changes yet.
- 3Leave C
The TD error is 1 + 0 - 0 = 1. Traces: A is 0.72 * 0.72 = 0.5184, B is 0.72 and C is 1.
- 4Apply the error
Each value changes by α δ e(s) = 0.5 * 1 * e(s), giving A 0.2592, B 0.36 and C 0.5.
One reward at the end updated all three states, with the closest state changing most. TD(0) would have updated only C (by 0.5), and the Monte Carlo update would give A 0.405, B 0.45 and C 0.5.
{'A': 0.2592, 'B': 0.36, 'C': 0.5}- delta is the TD error for the step just taken
- Every trace decays by gamma * lam, then the visited state gets +1
- Each value is moved by alpha * delta * its own trace
- Values are held fixed during the episode, so this is the offline version that matches the forward view
Common Mistakes
Common mistake Treating an eligibility trace as the reinforcement signal itself.
What it looks likeCalling the local trace the critic's reward signal.
Why it failsThe trace marks an earlier synaptic event, while Miller's critic-like sensory analyzer provides reinforcement signals to neurons.
Do this insteadKeep the roles distinct: eligibility identifies a synapse that can receive later credit, and the analyzer supplies the reinforcement-related signal.
Common mistake Assuming that a later reward automatically changes every synapse.
What it looks likeApplying the same reinforcement effect to synapses that had no relevant earlier event.
Why it failsMiller's rule is described as using synaptically local contingent eligibility traces.
Do this insteadAsk which synapse was made eligible by the earlier event before assigning credit.
Common mistake Confusing release probability with a single release event.
What it looks likeDescribing the hedonistic synapse as simply releasing whenever reward occurs.
Why it failsThe hedonistic synapse changes its neurotransmitter release probability according to whether reward follows release or failure to release.
Do this insteadSeparate the event that occurred from the learned probability governing future release.
Common mistake Claiming that Miller's proposal and actor-critic methods are identical.
What it looks likeReplacing the historical proposal with a modern actor-critic implementation without qualification.
Why it failsThe source presents Miller's proposal as anticipating an important actor-critic feature and connects later actor-critic methods with TD error.
Do this insteadDescribe them as historically and conceptually connected through the problem of linking past events to later reinforcement.
Common mistake Treating bacterial chemotaxis as the neural learning rule.
What it looks likeUsing the metaphor as if it directly defined eligibility traces or TD error.
Why it failsThe metaphor and the learning mechanisms are different levels of explanation.
Do this insteadUse chemotaxis only to frame the consequence-guided learning problem, then return to the neural variables.
Check Your Understanding
A synapse is active during an earlier sensory event. A reinforcement signal arrives later. Explain why a contingent eligibility trace is useful, identify the role of the critic-like sensory analyzer, and state what variable changes in the hedonistic-synapse proposal.
Hints
- Start with the time gap between the earlier synaptic event and the later reinforcement signal.
- Distinguish the local eligibility trace from the analyzer's reinforcement signal.
- Name neurotransmitter release probability as the hedonistic synapse's changing variable.
What do you think happens?
Which description best separates the eligibility trace from the critic-like analyzer?
Reveal answer
The trace marks an earlier synaptic event, while the analyzer supplies a reinforcement-related signal.
Miller's proposal gives the trace and the critic-like sensory analyzer different roles: local eligibility connects an earlier event to later credit, while the analyzer provides reinforcement signals to neurons.
The Mechanism in One Pass
- 1An earlier sensory or synaptic event occurs.
- 2A synaptically local contingent eligibility trace makes the relevant synapse temporarily eligible.
- 3Miller's critic-like sensory analyzer supplies a reinforcement signal to neurons.
- 4The later reinforcement signal can affect the synapse whose earlier activity left it eligible.
- 5In the hedonistic-synapse proposal, reward changes neurotransmitter release probability according to whether reward follows release or failure to release.
- 6Reward-modulated STDP and actor-critic methods, including the use of TD error, are connected by the same broad problem of assigning later reinforcement to earlier events.
The essential idea is delayed credit assignment: eligibility preserves a local connection to the past, and reinforcement supplies information about the later consequence.
Key Takeaways
- Miller's 1981 Law-of-Effect-like rule used synaptically local contingent eligibility traces to connect earlier synaptic events with later reinforcement.
- Miller's sensory analyzer had a critic-like role because it supplied reinforcement signals to neurons.
- A hedonistic synapse changes neurotransmitter release probability according to whether reward follows release or failure to release.
- Reward-modulated STDP and actor-critic methods are related to this historical work through the problem of linking past events with later reinforcement; actor-critic methods use TD error.
- Bacterial chemotaxis is a metaphor for consequence-guided learning, not the neural learning mechanism itself.