Rescorla-Wagner associative learning #
Error-driven associative learning: on each trial every present cue's strength
is updated by ΔV_c = α_c · β · (λ − ΣV). The shared prediction-error term
makes learning competitive across cues.
Main declarations #
RescorlaWagner,RescorlaWagner.update,RescorlaWagner.iterateConst.RescorlaWagner.totalStrength_convergence: total strength converges toλ.RescorlaWagner.proportional_partition,RescorlaWagner.overshadowing,RescorlaWagner.blocking,RescorlaWagner.blocked_cue_zero: the salience-proportional equilibrium and the blocking/overshadowing predictions ([Ell06] applies both to second-language acquisition).
The real-valued generalization of the rule is Core.Learning.WidrowHoff.
The Rescorla-Wagner learning model ([RW72]): on each trial every present cue has its associative strength updated by
ΔV_c = α_c · β · (λ − ΣV)
where α_c is cue salience, β the learning rate (outcome importance), λ the
maximum conditioning supported by the outcome, and ΣV the summed strength of
the cues present on the trial. The prediction-error term (λ − ΣV) is what makes
learning competitive across cues.
- salience : C → ℝ
Cue salience: how noticeable each cue is. Must be in [0, 1].
- learnRate : ℝ
Learning rate (outcome importance). Must be in (0, 1].
- maxCond : ℝ
Maximum conditioning supported by the outcome.
Salience is non-negative.
Salience is at most 1.
Learning rate is strictly positive.
Learning rate is at most 1.
Maximum conditioning is non-negative.
Instances For
Prediction error on a trial: λ − ΣV for cues present.
When positive, the outcome is under-predicted (surprise → learning). When zero, the outcome is fully predicted (no learning). When negative, the outcome is over-predicted (extinction).
Equations
- rw.predictionError present V = rw.maxCond - ∑ c ∈ present, V c
Instances For
One trial of Rescorla-Wagner learning ([RW72]).
For each cue c:
- If c is present:
V'(c) = V(c) + α_c · β · (λ − ΣV) - If c is absent:
V'(c) = V(c)(no change)
Equations
- rw.update present V c = if c ∈ present then V c + rw.salience c * rw.learnRate * rw.predictionError present V else V c
Instances For
Absent cues are not updated.
Blocking theorem ([RW72]; [Ell06]):
when cue A already fully predicts the outcome (V(A) = λ) and is the only cue
with nonzero strength among those present, adding a novel cue B to the compound
produces zero learning for B: V'(B) = V(B).
When the outcome is fully predicted, no present cue learns anything.
Iterated R-W learning over a sequence of trials. Each trial specifies which cues are present.
Equations
Instances For
Constant-trial iteration: the same cue set is presented on every trial.
Equations
- rw.iterateConst S V₀ 0 = V₀
- rw.iterateConst S V₀ n.succ = fun (c : C) => rw.update S (rw.iterateConst S V₀ n) c
Instances For
Rescorla-Wagner equilibrium, convergence, and overshadowing #
Total strength recurrence: the summed associative strength across present cues follows an affine recurrence after each trial,
ΣV' = ΣV + β · (Σ_{c∈S} α_c) · (λ − ΣV)
= (1 − β·A) · ΣV + β·A·λ where A = Σ_{c∈S} α_c
the same shape as the Luce α-model (cf. LinearLearner.iterate_closed_form) with
retention rate 1 − β·A, since the prediction error (λ − ΣV) is shared across
all present cues.
Total strength convergence: under repeated identical trials with the
same cue set S, the total associative strength converges to λ.
Proportional partition ([RW72]): when all cues start
with zero associative strength and the same cue set is presented on every trial,
each cue's strength at every step is proportional to its salience — there exists
Kₙ with Vₙ(c) = α_c · Kₙ for every present cue c. At convergence each cue's
strength is its salience-share of the outcome maximum λ.
Overshadowing ([RW72]; [Ell06]): when two
cues are both present on every trial, the more salient cue captures more
associative strength at every step (and hence at equilibrium). Immediate from
proportional_partition: Vₙ(c) = α_c · K, so Vₙ(A) = α_A · K > α_B · K = Vₙ(B)
whenever K > 0.
ΔP–R-W correspondence ([Ell06]; [CH95a]):
the blocked direction of a blocking experiment. If one cue already captures all
the associative strength and the novel cue starts at zero, the novel cue remains
at zero after compound trials — matching ΔP = 0 for the blocked cue.