Sub topic 14
Blocking and the Rescorla-Wagner model
This chapter assumes you know the terms CS, US, CR and UR. It also assumes you know acquisition and extinction, and that you can read a curve of change over trials. It covers one experimental result, blocking, and the model that explains it.
Why pairing alone is not enough
An early view held that a CS becomes effective whenever it is paired with a US close enough in time. The earlier chapters on timing and contingency already weaken that view. Blocking weakens it further. A stimulus can be paired with a US many times, with perfect timing, and still gain almost no associative strength.
The blocking experiment
Leon Kamin ran the classic version in 1969 with rats. The measure was suppression of ongoing behavior, a standard index of conditioned fear. The design has two phases and a test.
| Group | Phase 1 | Phase 2 | Test |
|---|---|---|---|
| Blocking | A (light) → shock | AB (light + tone) → shock | B alone |
| Control | No training | AB (light + tone) → shock | B alone |
Both groups get the same number of tone-shock pairings in phase 2. The control group shows strong fear of the tone. The blocking group shows little. The earlier learning about the light blocked learning about the tone.
The control group matters. Without it, weak fear of B could mean B is simply a weak stimulus. The comparison shows that B is learnable and that the prior training is what blocks it.
The idea: learning is driven by surprise
Blocking makes sense if an animal learns only when the US is surprising. In phase 2, the light already predicts the shock, so the shock is not news. The tone adds no information, so nothing new is learned about it.
Robert Rescorla and Allan Wagner formalized this in 1972. Their model says the change in a CS's associative strength on a trial depends on the prediction error, the gap between what actually happened and what all the present stimuli together predicted.
The Rescorla-Wagner equation
For each stimulus X present on a trial:
ΔV_X = α_X × β × (λ − ΣV)
The terms are:
- V_X is the associative strength of stimulus X. It starts at 0.
- ΣV is the sum of V across all stimuli present on that trial. This is the model's total prediction of the US.
- λ (lambda) is the maximum strength the US can support. It is about 1 when the US occurs and 0 when it does not. A bigger US means a higher λ.
- α is the salience of the CS, how noticeable it is. β is a rate parameter tied to the US. The code below merges them into one number,
ab. - (λ − ΣV) is the prediction error.
Two features of the equation do most of the work:
- Error is computed from the sum of all stimuli present. Stimuli on a trial compete for the same limited amount of associative strength.
- When ΣV reaches λ, the error is zero and learning stops. That produces a curve that rises fast and then levels off.
Acquisition and extinction in the model
With a single CS, ΣV is just V. The first code example runs acquisition (λ = 1), then extinction (λ = 0).
# Rescorla-Wagner update for a single CS paired with a US
alpha_beta = 0.3 # combined learning-rate parameter
lam = 1.0 # maximum associative strength the US supports
V = 0.0 # associative strength of the CS
print("Acquisition (CS + US):")
for trial in range(1, 11):
V += alpha_beta * (lam - V)
print(trial, round(V, 3))
lam = 0.0 # extinction: CS now occurs without the US
print("Extinction (CS alone):")
for trial in range(1, 11):
V += alpha_beta * (lam - V)
print(trial, round(V, 3))The first four acquisition trials give V = 0.3, 0.51, 0.657 and 0.76. Each step is 30% of the remaining error, so early trials produce large gains and later trials produce small ones. This is the negatively accelerated curve you saw in the acquisition chapter. In extinction, the error is negative (0 − V), so V shrinks toward zero by the same rule.
Blocking in the model
The next program runs the blocking group and the control group side by side.
# Blocking with the Rescorla-Wagner rule
ab = 0.3
def run(pretrain_trials):
V = {"A": 0.0, "B": 0.0}
# Phase 1: stimulus A is paired with the US
for _ in range(pretrain_trials):
error = 1.0 - V["A"]
V["A"] += ab * error
# Phase 2: the compound AB is paired with the US
for _ in range(20):
error = 1.0 - (V["A"] + V["B"])
V["A"] += ab * error
V["B"] += ab * error
return round(V["A"], 2), round(V["B"], 2)
print("Blocking group (A, B):", run(20)) # B stays near 0
print("Control group (A, B):", run(0)) # A and B share strengthThe blocking group ends with VA near 1.0 and VB near 0.0. When phase 2 begins, V_A is about 0.999, so the error is about 0.001 and B gains almost nothing. The control group starts phase 2 with no prediction. A and B each get the same update and finish at 0.5 each, so their combined strength reaches λ and they share it.
Other effects the model accounts for
The same equation covers several other results without extra assumptions.
- Overshadowing. If a loud tone and a faint light are paired with a shock together, the tone ends up with most of the strength. A higher α means a bigger share of the same total.
- Unblocking. If the US changes in phase 2, for example a stronger shock, λ rises. ΣV is now below λ, the error is positive again, and B gains strength. Experiments find this, and it supports the claim that the animal is learning from surprise.
- Conditioned inhibition. If A predicts the US and the compound AX is presented without it, the error is negative. X gains negative V. It then acts as a signal that the US will not occur.
- Contingency. In a random-control procedure, the context is present on every trial and becomes a competing predictor of the US. That reduces what the CS can gain.
Where the model falls short
Rescorla-Wagner is useful because it makes precise predictions that can be wrong, and some are.
- Latent inhibition. A CS presented alone many times before pairing is learned more slowly. The model has no mechanism for this, because V stays at zero and the error is zero. Attention-based models such as Mackintosh and Pearce-Hall address this by letting α change with experience.
- Spontaneous recovery and renewal. The model treats extinction as unlearning, because V returns toward zero. Recovery of the CR after a delay shows that extinction does not erase the original association.
- Timing. The model runs one update per trial and has no representation of the interval between CS and US. Later models add time.
- Parameter fitting. With free values for α, β and λ, a model can fit many outcomes. Its strongest tests are the qualitative predictions, such as unblocking, that it makes before the data are in.
Summary of the working model
Conditioning proceeds in proportion to surprise. Each stimulus present adds to a shared prediction of the US. Learning occurs only to the extent that the actual outcome differs from that prediction. Blocking, overshadowing and unblocking follow directly from that rule.
Exercise
A rat first learns that a light predicts shock. Then a light-tone compound is paired with the same shock for many trials. Using Rescorla-Wagner, explain why the tone gains almost no strength. Then say what would happen if the shock in phase 2 were stronger.
Show answer
After phase 1, V of the light is close to λ, so the prediction error (λ − ΣV) at the start of phase 2 is close to zero. The tone's change in strength is proportional to that error, so it stays near zero. This is blocking. If the shock were stronger, λ would rise, so ΣV would fall below λ and the error would become positive again. The tone would gain strength. This is unblocking.
Exercise
In the code, replace ab = 0.3 with ab = 0.1 and run the control group (run(0)) for 20 phase-2 trials. Predict whether A and B will still end at 0.5 each, and say what changes.
Show answer
With ab = 0.1, they still head toward 0.5 each, because the learning rate affects speed, not the end point. After 20 trials the combined strength is 1 − 0.9^20 ≈ 0.88, so each stimulus is at about 0.44, still below 0.5. A lower rate means a slower approach to the same asymptote.