What a sleeping brain can rehearse
Explore how new observations, fading evidence, and rehearsal change a memory.
Imagine a little animal learning where to find breakfast. A rustle usually predicts food in the garden. In the cave, the same rustle usually predicts an empty patch of ground. The animal must learn the cue, recognize the room, notice when things change, and carry something useful into tomorrow.
Then it falls asleep. Patterns associated with its adventures become active again. What could these extra rounds accomplish?
Epistemic Physics invites us to follow several quantities together: the balance of a prediction, the amount of trials behind it, the context in which it applies, and the lineage of the observations being reused. Those quantities let us tell apart learning from a new visit and learning how to use a remembered visit.
One surprise, two amounts of movement
Start with a transparent probability learner. Let
Here
The prediction error
Suppose two learners both predict food with mean
The two learners also have different posterior variances,
where
A synapse can carry a history
A synapse is a connection through which one neuron influences another. Synaptic plasticity means that its effectiveness can change with experience. The small update above offers a useful question for such a connection: could its present state carry both a preferred value and information about how readily that value should move?
Aitchison and colleagues’ Bayesian account of synaptic plasticity proposes uncertainty-dependent changes in synaptic learning rates. That supplies a neuroscience motivation for treating learning gain as a state-dependent quantity. Our Beta calculation supplies a particularly simple exact example; identifying a measured synapse with these specific parameters would require an additional model.
Metaplasticity means a change in the conditions or rules governing later plasticity. Imagine a volume knob whose stiffness itself changes with use. In the chosen Beta learner, accumulating trials automatically lowers later gain. This is one mathematical way to give the current learning rule a memory of its past.
| Question | Transparent learner | Neuroscience connection to explore |
|---|---|---|
| What value is currently favored? | Mean | A prediction or effective connection strength |
| How far does the next observation move it? | Gain | State-dependent plasticity |
| How can that responsiveness change? | Accumulation or discounting of raw trials | Metaplasticity and adaptation |
| Where did this update come from? | Observation lineage | Reused experience versus new input |
This also clarifies the difference between an amount that makes a belief harder to change and a physical timescale. A biological circuit needs its own mechanism and clock for implementing an update. The membrane chapter explores an instructive case where increased conductance reduces displacement while speeding up electrical settling.
When yesterday’s garden becomes today’s cave
Keeping every old observation works well for a stable probability. A changing environment asks a different question: how relevant is yesterday’s food supply to breakfast today?
Choose a retention factor
The prior remains separate:
A convenient clock is a half-life
Predict before touching: after a cue reversal, which learner turns fastest? Which reacts more to one unusual outcome?
How long should a clue keep its vote?
Both learners start with the same cue: support on 24 of 30 steps. Reverse the cue, add an outcome, or let time pass. The blue learner gradually discounts old input; the rose learner keeps all of it.
- Fading prediction
- 75.9%
- Permanent prediction
- 79.0%
- Retained input amount
- 14.7 / 30
- Next-step learning gain
- 0.063 / 0.031
A chosen leaky-evidence model, with the Jeffreys prior added once. “Gain” is the fraction of the gap to the next outcome closed by its update, after discounting. Moving the half-life recomputes both histories from their beginning.
Try the memory clock in the playground.
Wark, Fairhall, and Rieke found that visual adaptation in the retina operates across multiple timescales, with its time course depending on stimulus history and how distinguishable a change is. That makes a fixed half-life a useful starting experiment. An adventurous next step is to let the evidence for a change alter the retention factor itself.
A returning context deserves a returning memory
Suppose the garden remains fruitful while the cave remains sparse. Erasing the garden ledger every time the animal enters the cave would lose useful structure. We can instead retain one ledger per context,
Now two mechanisms become visible. Adaptation changes a prediction within a context. Context-specific recall selects a previously learned prediction. A fast behavioral switch could come from either mechanism, or both. Learning which context is active is another inference problem; in the next demo the room label is supplied so we can inspect the memory mechanics directly.
This distinction connects to context as an explanation of conflict: apparent disagreement can become two useful conditional predictions once the missing variable is retained.
A sleeping brain gets another practice round
Wilson and McNaughton recorded hippocampal place-cell ensembles, groups of neurons associated with an animal’s location. Cells that fired together during behavior showed increased coactivation during subsequent sleep compared with preceding sleep. Their result supports re-expression of waking experience during sleep, a phenomenon relevant to consolidation, the processes through which memories become stabilized or reorganized.
A replayed observation has two useful identities: it is a new presentation to a learning mechanism, and it descends from an existing source observation. Keeping that lineage lets us improve a computation without automatically increasing the number of visits to the world.
The next experiment maintains two room-specific Beta ledgers and a separate practiced readout
This is one gradient-descent step on the squared-error loss
Rehearse the right room
Bring both teal readouts into their sky target bands. Choose a room, then practice its stored visits.
Each band allows a gap of 3 percentage points from the stored prediction.
Choose a room to practice. The target is its stored prediction.
8 original visits in garden; 0 rehearsals. Each room has its own readout. The invitation band is a task tolerance, not a probability interval.
Inspect the source ledger, replay counter, and model
Original visits: + food, − empty. Showing the most recent 24 when the ledger is longer.
- Original visits in this room
- 8
- Rehearsal passes
- 0
- Amount A: source / replay counter
- 9 / 9
- Next-visit gain: source / counter
- 0.100 / 0.100
Explicit toy rule: q ← q + 0.25(μ − q), one gradient step on (q − μ)²/2. Each room has a supplied label and one Beta(½, ½) prior. Original source IDs remain fixed through replay. Only new visits change the source-aware target. This demonstrates fitting a readout, rather than measuring biological consolidation or learning an unknown context. This sandbox allows up to 64 visits and 64 rehearsals per room; reset to begin another run.
Rehearse the two rooms in the playground.
Watch the rose counter. Replaying all stored observations preserves their empirical food fraction, but counting those presentations as fresh trials inflates
Pack three questions for the next expedition
Could a circuit keep a slowly changing store of experiences alongside a rapidly adjustable readout? Could a surprising context switch change the chosen memory before it changes any synapse? Could replay prioritize badly learned readouts while preserving which trials share an origin?
These questions suggest different measurements. Track behavioral updating after genuinely new input, performance after rehearsal without new input, and recovery when an old context returns. A model that predicts all three has explained more than a learning curve alone. For the broader scope of exploratory connections, see the disclaimer.