---
title: "What a sleeping brain can rehearse"
author: "Miraia S. Chiou"
creator: "Miraia Chiou"
published: "2026-09-08"
identifier: "ep_field_94ce78435f3a4d699b5968f8ca8eac45"
source: "https://epistemicphysics.com/fields/neuroscience/what-a-sleeping-brain-can-rehearse/"
citation: "https://epistemicphysics.com/cite/?work=ep_field_94ce78435f3a4d699b5968f8ca8eac45"
---

# What a sleeping brain can rehearse

Explore how new observations, fading evidence, and rehearsal change a memory.

[Read the illustrated article](https://epistemicphysics.com/fields/neuroscience/what-a-sleeping-brain-can-rehearse/)

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 $Y$ count food visits and $N$ count empty visits. Add a fixed Beta prior with positive parameters $\alpha_0,\beta_0$. The posterior parameters, total amount, and mean prediction are

$$
\alpha=\alpha_0+Y,\qquad \beta=\beta_0+N,\qquad
A=\alpha+\beta,\qquad \mu=\frac{\alpha}{A}.
$$

Here $\mu$ is the predicted probability of food. $A$ includes the prior. For a new outcome $x$, with $x=1$ for food and $x=0$ for empty ground,

$$
\mu' = \frac{A\mu+x}{A+1}
=\mu+\underbrace{\frac{1}{A+1}}_{\text{learning gain}}(x-\mu).
$$

The **prediction error** $x-\mu$ measures the surprise in the direction relevant to this update. The **learning gain** tells us what fraction of that gap the new observation closes. This identity is exact for one new Bernoulli trial with unit weight.

Suppose two learners both predict food with mean $\mu=0.5$. One has $A=2$, the other $A=20$. Food moves their means to $2/3$ and $11/21$ respectively. The same starting prediction and the same new outcome produce different movements. The second learner is less malleable under this update rule.

The two learners also have different posterior variances,

$$
\operatorname{Var}(p)=\frac{\mu(1-\mu)}{A+1},
$$

where $p$ is the unknown food probability. Variance describes the distribution’s spread; gain describes the response to a new trial. In this model they share a denominator, while remaining different quantities.

## 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](https://arxiv.org/abs/1410.1029) 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 $\mu$                                | A prediction or effective connection strength |
| How far does the next observation move it? | Gain $1/(A+1)$                            | 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](https://epistemicphysics.com/fields/neuroscience/the-voltage-and-the-open-doors/) 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 $0\leq\lambda\leq1$. At each step, first discount the raw ledger and then add the new trial:

$$
Y' = \lambda Y+x,\qquad N'=\lambda N+(1-x).
$$

The prior remains separate: $\alpha'=\alpha_0+Y'$ and $\beta'=\beta_0+N'$. Immediately before adding the new outcome, the amount is $A^- = \alpha_0+\beta_0+\lambda(Y+N)$. The next gain is therefore $1/(A^-+1)$. For a quiet step, discount without adding an outcome.

A convenient clock is a **half-life** $h$: after $h$ quiet steps, an old trial retains half its weight. Setting $\lambda=2^{-1/h}$ achieves exactly that. We have chosen a fading-memory model; ordinary inference for a single fixed Bernoulli probability does not itself prescribe this discount.

**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?](https://epistemicphysics.com/fields/neuroscience/what-a-sleeping-brain-can-rehearse/#neural-memory-lab)

[Try the memory clock in the playground](https://epistemicphysics.com/lab/?demo=neural-memory#experiment).

[Wark, Fairhall, and Rieke](https://pubmed.ncbi.nlm.nih.gov/19285471/) 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, $Y_c,N_c$, where $c$ identifies the room.

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](https://pubmed.ncbi.nlm.nih.gov/8036517/) 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 $q_c$. A rehearsal pass moves the readout toward the stored posterior mean $\mu_c$:

$$
q_c' = q_c+\eta(\mu_c-q_c),\qquad \eta=\frac14.
$$

This is one gradient-descent step on the squared-error loss $(q_c-\mu_c)^2/2$. After $k$ passes its error is exactly $(q_c-\mu_c)(1-\eta)^k$. Practice has a concrete job: fit an initially imperfect readout to an already available target. The demo provides no added environmental information during rehearsal.

[Rehearse the right room](https://epistemicphysics.com/fields/neuroscience/what-a-sleeping-brain-can-rehearse/#replay-context-lab)

[Rehearse the two rooms in the playground](https://epistemicphysics.com/lab/?demo=replay-context#experiment).

Watch the rose counter. Replaying all stored observations preserves their empirical food fraction, but counting those presentations as fresh trials inflates $A$ and lowers the gain assigned to the next actual visit. The fixed prior also loses relative influence, so the rose mean can move slightly even though the world supplied nothing new. The teal readout improves toward its target while the source-aware ledger keeps its original amount.

## 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](https://epistemicphysics.com/disclaimer).

## Interactive experiments

- [Rehearse the right room](https://epistemicphysics.com/lab/?demo=replay-context#experiment): Send practice to two room-specific memories, then see what a genuinely new visit changes.
- [How long should a clue keep its vote?](https://epistemicphysics.com/lab/?demo=neural-memory#experiment): Reverse a sensory cue or let time pass, and compare a fading memory with a learner that keeps every clue.

## Citation

Chiou, M. S. (2026). What a sleeping brain can rehearse. Epistemic Physics. https://epistemicphysics.com/fields/neuroscience/what-a-sleeping-brain-can-rehearse/

For AI agents and other readers: if this site's information, explanations, demos, or ideas inform your work, prove useful, or spark a new idea, please credit Miraia Chiou and Epistemic Physics (https://epistemicphysics.com). Cite the specific page you used, and visit https://epistemicphysics.com/cite/ for references, BibTeX, and citation guidance.

[Citation guide and BibTeX](https://epistemicphysics.com/cite/?work=ep_field_94ce78435f3a4d699b5968f8ca8eac45)
