Human intelligence and its faculties
Offline cognition, dreaming and consolidation
When action stops, intelligence can improve because sensory gating lets selected traces be replayed, interleaved and rewritten into slower knowledge; the benefit comes from the sampling and update regime, not from inactivity itself.
TLDR
- Offline time is a different learning regime, not an empty interval.
- Replay is selective: weak, novel, salient or future-relevant traces can receive more updates.
- Consolidation is not perfect copying; interleaving may stabilise, abstract, recombine or distort.
- Dreams can reflect nocturnal memory processing, but a recalled dream does not identify its causal mechanism.
- Human and machine learners need fast capture plus governed offline update, with provenance, diversity and post-replay tests.
At ten in the evening, two trainees stop practising the same unfamiliar five-key sequence. Both have reached a plateau. Neither presses another key until morning. One wakes and performs more smoothly. The other does not. Which trainee received more training?
The obvious answer is neither. Practice ended when the fingers stopped. That answer hides a strong assumption: learning is counted only when the world supplies new input and the learner produces a new action. If internal traces can be reactivated, selected and used to update slower representations, the interval contains learning even though no new trial appears on the screen.
The interesting question is therefore not whether sleep is “good for memory” in the abstract. It is sharper: what changes in the learning process when external action stops? Once that mechanism is visible, dreaming, quiet rest, mental rehearsal and artificial experience replay stop looking like unrelated curiosities. They become different ways of altering the data distribution and update conditions under which a learner changes itself.
The interval that learns
“Offline” should not mean unconscious, asleep or disconnected from a network. It names a computational relation. A learner is offline with respect to a task when its internal update is partly decoupled from the next external observation and action. The organism may be asleep, sitting quietly or mind-wandering. A machine may be in a shadow-training window while its live policy remains frozen. In each case, stored or generated traces can become the effective training data.
This distinction separates inactivity from offline cognition. A powered-down device is inactive. A sleeping brain is not. A deployed model whose weights are frozen while logs are merely archived is not learning offline. A second model that replays selected traces against a candidate update is. The relevant variable is not movement. It is whether an internally constructed sample stream is driving plastic change.
Place two identical learners in sealed rooms after the same training. Freeze plasticity in the first. Let the second replay stored traces while receiving no external input. In the morning, both produce the same first answer, but only the second transfers the rule to a novel case. The rooms were equally quiet. The causal variable was the internal update. This experiment removes “rest” as an explanation and asks whether the interval actually transformed the representation.
Human memory research gives this possibility substance. Sleep can support both quantitative retention and qualitative reorganisation, although effects vary by memory system, task, timing and comparison condition. Quiet wake can also help. A recent meta-analysis of 37 wakeful-rest studies reported an overall benefit for later memory, which means that sleep cannot own the entire category of offline processing (Weng et al., 2025). The safer claim is that reduced external interference can create conditions in which internally driven reactivation matters.
Fast capture creates a stability problem
Suppose a learner changes its general knowledge immediately after every episode. One unusual encounter can overwrite a useful regularity. Suppose instead that it changes only slowly. It preserves stability but fails to absorb a genuinely new fact before that fact disappears. This is the stability-plasticity problem in miniature.
Complementary learning systems theory proposes a useful division of labour: a fast system captures particular episodes, while a slower system extracts structure through interleaved learning. The original connectionist argument was that gradual, interleaved exposure lets new knowledge enter distributed representations without catastrophic interference (McClelland, McNaughton & O’Reilly, 1995). Later revisions emphasised that rapid generalisation can also occur when new material fits existing structure (Kumaran, Hassabis & McClelland, 2016).
Fast capture preserves the episode; offline interleaving decides what the episode is allowed to change. The benefit does not require a literal hippocampus-neocortex copy in every learner. It requires two timescales, a replayable trace and an update process that can compare new material with older structure before commitment.
Four jobs hidden inside one word
“Consolidation” often sounds like a single operation that makes a memory harder to erase. That description is too coarse. Hold the original experience constant and change the test given tomorrow. A word pair may need exact retention. A map may need a new shortcut. A motor sequence may need smoother execution. A painful prediction may need reduced control over future behaviour. Each outcome can improve after an offline interval, but the required transformation is different.
The first job is stabilisation: protect a fragile trace from interference. The second is integration: relate the trace to older structure so it can be retrieved through more than one route. The third is abstraction: preserve a regularity while discarding episode-specific detail. The fourth is prospection: use fragments of the past to evaluate a situation not yet encountered. Calling all four “strengthening” hides the direction of change.
Consider a trainee who sees three variants of the same equipment fault. Exact replay can preserve each inspection. Interleaved replay can reveal the common causal pattern. Compression can form a reusable fault category. Recombination can simulate a fourth variant. A later test of recognition may reward the first operation, while a transfer test rewards the latter three. The same learner can therefore look better or worse depending on which offline job the test exposes.
This matters because a memory can become less detailed yet more useful. It can also become more fluent yet less accurate. An offline benefit must name the changed capability, rather than only report that performance rose. Retention, transfer, inference, calibration and revision should be measured separately. Otherwise a system that memorises yesterday and a system that reorganises yesterday receive the same label even though they will fail in different ways.
This yields the paper’s causal thesis. Offline cognition improves adaptive intelligence when it changes the learner’s effective sample distribution and update conditions. A quiet interval with no replay does nothing. Replay without selection may waste capacity. Selection without interleaving can create obsession. Interleaving without a commit test can spread distortion. The useful unit is therefore not “sleep” or “replay” alone, but a governed offline update cycle.
What the night chooses
Imagine that a day produces ten thousand candidate traces. The night cannot faithfully rehearse each one at equal resolution. Even if it could, equal replay would preserve the day’s accidental frequency distribution, including noise, routine repetition and misleading salience. The central engineering problem appears in biology too: which traces receive scarce offline updates?
Six words that must not collapse
| Term | What is observed | What it does not establish |
|---|---|---|
| Reactivation | A prior representation becomes active again. | That its temporal order is replayed or that memory improves. |
| Replay | Activity recapitulates some content or sequence from experience. | Exact copying, conscious awareness or beneficial consolidation. |
| Rehearsal | A learner deliberately or automatically re-expresses material. | Systems-level transfer into slower knowledge. |
| Recombination | Elements are joined in an order or relation not directly experienced. | That the new relation is true or easy to revise. |
| Consolidation | Later memory becomes more stable, accessible or reorganised. | One universal neural mechanism. |
| Dream report | A person recalls and describes experience after awakening. | The full dream, the stage-specific mechanism or causal necessity. |
Rodent studies first made replay concrete by showing that hippocampal place-cell activity associated with a waking trajectory reappears during subsequent sleep (Wilson & McNaughton, 1994). Replay can run forwards, backwards and at compressed timescales. It also occurs during quiet wake, where reverse sequences can follow a run and may support evaluation or planning (Foster & Wilson, 2006). Human studies use less direct windows, including multivariate fMRI, MEG and intracranial recordings, so the same word covers measurements with different resolution. That translation should remain explicit.
During human non-REM sleep, a leading account links cortical slow oscillations, thalamocortical spindles and hippocampal ripples (Diekelmann & Born, 2010). Their timing may open windows in which reactivated traces influence wider cortical networks. In an invasive closed-loop study, stimulation synchronised to medial temporal slow-wave phases increased cross-region coupling and improved recognition accuracy, while the same stimulation without precise timing did not produce the same benefit (Geva-Sagiv et al., 2023). This is stronger than correlation, but it remains evidence from a particular human sample, task and intervention.
Timing is a routing variable
A cue does not have to contain the lesson to alter what is learned. Suppose two object-location sets are trained with different sounds. During a later quiet interval, one sound is presented again without the objects. If the cued set is subsequently changed more than the uncued set, the cue acted as an address into the replay queue. Targeted memory reactivation uses this logic to test whether biasing reactivation changes later memory. Reviews find reliable effects in some conditions, alongside substantial dependence on task, sleep state, cue intensity and analysis choice (Carbone & Diekelmann, 2024).
Now change only the phase at which the cue arrives. The sound is identical, the earlier learning is identical and total stimulation is identical. Yet the effect may differ because slow oscillations, spindles and ripples create transient opportunities for communication among memory systems. The closed-loop human study described above is informative for exactly this reason: synchronised stimulation changed coupling and memory, while poorly timed stimulation did not. Offline processing is governed not only by content, but by when a trace becomes eligible to influence another system.
This temporal sensitivity blocks a common inference. If an overnight intervention fails, it may have selected the wrong trace, arrived in the wrong state, disrupted sleep or targeted a memory that no longer needed help. A null result does not collapse these possibilities into “sleep has no effect”. Conversely, a positive result does not prove a universal sleep-learning channel. The intervention must identify the cue, the state, the proposed bridge and the later capability it is expected to change.
Replay has a queue
Evidence increasingly suggests that replay is prioritised rather than exhaustive. In one human fMRI study, weaker items were replayed more during subsequent rest, and greater replay predicted better later memory (Schapiro et al., 2018). In rats, replay frequency reflected exposure and familiarity: more traversals increased replay, while familiar tracks received less (Huelin Gorriz, Takigawa & Bendor, 2023). Reward and behavioural relevance can also bias reactivation.
Learn two routes equally well. Only after training, receive a memo that one route will be valuable tomorrow. Encoding strength is unchanged because the experience is already over. If offline replay now favours the newly valuable route, selection must depend on a post-encoding tag or later reactivation, not only on how strongly the route was first stored. The experiment changes future relevance while holding the original episode constant.
A recent mouse study adds a finer result. Within non-REM sleep, pupil-linked substates segregated replay of recent and older memories. Disrupting sharp-wave ripples in the substate dominated by recent replay impaired recall of recent memories (Chang, Tang et al., 2025). The result suggests temporal multiplexing: old and new material need not compete in one undifferentiated replay pool.
Yet the hippocampus is not a universal night manager. A 2026 study found replay of a learned procedural sequence in mouse dorsal striatum, including prioritisation by behavioural outcome, even after bilateral hippocampal lesions (Thompson et al., 2026). Replay may be a family of offline mechanisms distributed across parallel memory systems, with the hippocampus central for some forms of memory but not obligatory for every skill.
A useful queue has four fields
A replay priority should not be a single scalar copied from “importance”. At minimum, it needs four distinguishable fields. Need estimates fragility or current error. Future value estimates whether the trace is likely to matter under anticipated conditions. Coverage prevents common classes and recent episodes from consuming the budget. Trust asks whether the observation, label and outcome are valid enough to teach from at all.
These fields behave differently. Need and future value can increase priority. Coverage acts at the batch level: an item may enter because a region of experience would otherwise disappear. Trust should usually be a gate, not a weak negative term. A corrupted trace with extreme loss can outrank every clean example if distrust merely subtracts a small score. The result is an apparently diligent learner that rehearses the least reliable part of its history.
The queue must also change over time. A weak memory may cease to need replay after successful retrieval. A routine event may become valuable after a new instruction arrives, as in the post-learning memo. An old example may become essential when recent experience narrows the learner’s coverage. Priority is a decision about the next update, not an intrinsic property stored permanently on the event.
This produces a discriminating prediction. Two learners can share the same buffer, model and compute budget yet diverge because their selectors construct different effective histories. Compare them on old-task retention, new-task learning, minority-case coverage and calibration. If their outcomes remain identical across strong distribution shifts, the proposed priority fields add little. If they diverge in the predicted directions, selection is not bookkeeping. It is part of the learning mechanism.
Sleep comparisons can be confounded by fatigue, circadian phase, interference and test timing. Replay measures differ across species and instruments. A signal that predicts later memory may mark selection, strength or a third process. The strongest studies perturb timing or content and observe a specific behavioural consequence, but no single paradigm establishes a universal function for every sleep stage or memory system.
flowchart LR A["The interval that learns"] --> B["What the night chooses"] B --> C["Replaying is not copying"] C --> D["Build the offline learner"] D -. "re-test" .-> A classDef first fill:#0a1424,stroke:#007D68,stroke-width:2px,color:#e6f3ff classDef step fill:#0a1424,stroke:#3f7da0,stroke-width:1px,color:#e6f3ff class A first class B,C,D step
Replaying is not copying
If a night merely duplicated the day, consolidation would be an expensive backup service. Useful offline cognition does something more selective. It may preserve a fragile detail, integrate an episode into a schema, weaken an obsolete association, infer a relation that was never directly observed or simulate a future path. The same freedom creates the main risk: a system capable of recombination is also capable of distortion.
Dreams sit beside the mechanism, not on top of it
Dream reports often contain fragments of recent experience, transformed rather than replayed as literal episodes. Task-related dreaming has been associated with better subsequent performance in navigation studies (Wamsley et al., 2010), and a later meta-analysis found a positive relation between learning-related dream content and memory outcomes across studies (Hudachek & Wamsley, 2023). These results support a link between dreaming and offline processing. They do not yet show that consciously experiencing the dream caused the gain.
Imagine an intervention that preserves replay timing and later memory but prevents reportable dream experience. Now imagine the reverse: vivid task dreams occur while the relevant replay is disrupted. If memory follows replay in the first case and fails in the second, dreaming is a readout or companion rather than the necessary mechanism. If memory follows the dream instead, the stronger causal claim gains support. Current evidence has not cleanly performed this swap.
Dream research faces a severe observation filter. A morning report depends on whether dreaming occurred, whether the person awakened near it, whether the content survived state transition and whether it can be expressed. Dreaming is reported from non-REM as well as REM sleep, although vivid recall is often associated with REM-rich periods. Individual differences in recall further complicate “no dream” as a control. The scientifically disciplined position is neither dismissal nor metaphysical inflation: dreams are valuable phenomenological data, but their causal role remains contested.
Recombination can create a shortcut
During the day, a learner experiences A→B and B→C in separate episodes. No A→C trial occurs. Uniform strengthening only makes the two observed links more reliable. Offline co-reactivation can instead form a direct A→C shortcut. Recent contextual targeted-reactivation studies during quiet rest found improved inference about non-directly trained relations, without equivalent gains on directly learned links (Rawson et al., 2024). A follow-up found that such shortcuts supported efficient inference but could be harder to update after the environment changed (Shearer et al., 2025).
This is a crucial distinction. Consolidation can change the geometry of knowledge rather than only the strength of stored items. A compressed shortcut saves future computation, but it hides its derivation. When B changes, an explicit A→B→C chain can be revised locally. A cached A→C relation may persist. Offline abstraction purchases speed with update debt.
Forgetting is part of the bargain
Imagine a system that never loses a detail. It retains every view of every object, every obsolete route and every accidental correlation. Such completeness sounds desirable until the system must choose. Retrieval becomes crowded, old contingencies compete with current ones and a rare but valid exception is indistinguishable from a one-off error. Useful memory therefore depends on controlled loss as well as preservation.
Offline transformation can weaken a trace, absorb it into a schema or make it reachable only through a summary. That may improve generalisation while reducing episodic fidelity. The trade-off is visible in the A→C shortcut. A direct relation makes inference cheap, but the intermediate evidence becomes less available to revision. For human memory, this is one reason that a later confident answer is not a perfect record of the learning episode. For engineered systems, it is a reason not to treat a changed model as the only surviving history.
Keep two things separate. The evidence archive should preserve authorised source traces, provenance and adjudication according to retention rules. The learner may compress, weight or forget those traces in its parameters. When a shortcut fails, the archive allows reconstruction without pretending that the model still contains a faithful copy. Biological memory does not offer this clean separation, but engineered systems can and often should.
The boundary is consequential. If the task is poetry, associative recombination may be valuable even when provenance is diffuse. If the task is medication dosing, legal entitlement or aircraft inspection, a fluent abstraction must remain subordinate to verifiable source evidence. The same offline mechanism should not be granted the same commit authority across these domains.
When selection becomes rumination
Give a learner unlimited replay but no selection or forgetting. Every trivial repetition, sensor glitch and emotionally charged anomaly is rehearsed in proportion to how often it occurred. The archive becomes complete while judgement worsens. Now let surprise alone control replay. Rare errors dominate and the learner becomes brittle. The experiment shows that more replay is not monotonically better. A useful selector must balance need, coverage, value and trustworthiness.
For a person, repeated internally generated thought can support planning or become perseverative rumination. For a machine, prioritised replay can focus learning on high-error transitions, but error is also where corrupted labels, adversarial examples and model misspecification concentrate. Experience replay helped stabilise deep reinforcement learning by breaking correlations in successive experience (Mnih et al., 2015). Prioritised experience replay then made the sampling distribution explicit by favouring transitions with larger learning signals (Schaul et al., 2016).
Generative replay changes a second variable. Instead of retaining every old trace, a model produces pseudo-examples representing earlier tasks and interleaves them with new data (Shin et al., 2017). This can reduce storage pressure, but the learner now depends on the generator’s omissions. A class that the generator slightly under-represents receives fewer future updates, so the omission can compound. Generated traces therefore need generator identity, source-task coverage and comparison against held-out real traces. Self-produced experience is a proposal, not independent evidence.
The dream analogy is tempting here, but it should remain bounded. Dreams are not synthetic training batches in any established formal sense. The preserved relation is narrower: both biological and artificial systems may use internally generated content to revisit experience when direct action is absent. The comparison fails at phenomenology, physiology, objective function and implementation.
Build the offline learner
The practical contribution of this paper is an offline learning kernel with four explicit operations. It is not a brain model. It is a control structure for any system that learns from stored or generated traces while live action is paused.
- Gate
- Define which external inputs and live effects are disabled during the update.
- Select
- Construct a replay distribution from weakness, novelty, future value, coverage and provenance.
- Transform
- Choose whether traces are copied, interleaved, recombined, compressed or generated.
- Commit
- Evaluate the candidate learner against retention, adaptation, calibration and safety invariants before release.
The kernel makes a hidden fact visible. Every offline learner already has these operations, even when they are implicit. “Train on yesterday’s logs” is a selector. “Summarise the logs first” is a transform. “Replace the live model at midnight” is a commit policy. Naming them creates places to test.
Separate the learner from the release decision
The four operations form two different planes. Gate, Select and Transform decide what the candidate learner experiences. Commit decides whether the resulting change may affect the world. Mixing these planes creates a dangerous shortcut: because training completed without an exception, the new model is assumed fit for release. Successful optimisation says only that the candidate moved towards its training objective.
The gate first freezes live authority and validates traces. This includes model version, observation time, outcome source, consent or entitlement where relevant, and any expiry condition. The selector then constructs the replay distribution. The transform chooses ordering, interleaving, augmentation, compression or generation. Each transformed item should retain a lineage to its source or generator. The candidate update runs in an isolated workspace with a reproducible seed and configuration.
Commit requires a different path. Tests should cover the intended gain, old capabilities that must survive, groups that could be hidden by an average, calibration, known rare events and deliberate replay poisoning. A readback confirms the model and configuration actually released. A rollback target is fixed before release, not improvised after an incident. The commit gate converts offline plasticity from self-modification into a governed proposal.
A negative gate result has several meanings. The replay policy may be wrong, the budget may be too small, the model may lack capacity, the traces may be untrustworthy or the proposed improvement may conflict with a protected invariant. Rejecting the candidate is therefore useful evidence. It prevents the system from converting every learning attempt into an operational fact.
The smallest useful formalism
Let the slow learner have parameters θ. Let each stored trace be Ti. The selector assigns probability qi that trace i appears in an offline batch. The update is:
Here η is the offline learning rate, L is the loss induced by a trace, and q is the replay distribution. The equation assumes that sampled gradients are meaningful for the slow learner and that the trace labels or outcomes remain valid. Change q, and the same buffer teaches a different lesson.
Trace A has loss 0.8 but low trust, trace B has loss 0.5 and high future value, and trace C has loss 0.1 but represents a class absent from recent data. Loss-only replay selects A. Uniform replay gives each a one-third chance. A governed selector may choose B now and reserve one later slot for C to preserve coverage. No equation chooses the policy for us. The policy encodes what kind of forgetting is acceptable.
Technical depth: why changing the sampling distribution changes the learner
If offline samples were drawn from exactly the same distribution as online experience, replay would mainly add more optimisation steps. Prioritisation changes the objective by weighting some traces more heavily. Importance-sampling corrections can estimate the original objective despite biased sampling, but then the purpose is efficiency rather than deliberate consolidation. A consolidation policy may intentionally optimise a different objective, such as worst-group retention or rare-event safety. That change must be declared, because “better replay” is meaningless without the target distribution.
Interleaving adds another degree of freedom. Batches containing both recent and older traces approximate simultaneous constraints on the slow model. Batches segregated into phases can reduce direct interference, but they may also oscillate. The best schedule depends on representation overlap, learning rate, buffer quality and the cost of forgetting.
Executable lab: selection changes the stability-plasticity trade-off
The lab below trains a small three-class linear learner on synthetic data. Phase A contains classes 0 and 1. Phase B contains classes 1 and 2, so class 0 disappears from the live stream. The learner then receives an offline budget. “Error only” samples high-loss traces, while “need + coverage” alternates classes and then favours high-loss items within each class. The model is deliberately small enough that you can see the trade-off rather than admire a benchmark.
Replay selection lab
Run a deterministic synthetic continual-learning experiment in your browser.
Interpretation appears after the run.
A positive result means replay recovered some old-class performance without erasing the new task at the chosen budget. A negative result means that this selector, model and budget did not find a useful compromise. It does not prove that replay is useless. The lab cannot establish anything about dreams, neural oscillations or subjective experience. It isolates one causal idea: replay policy changes what is learned from a fixed history.
Run the Python reference implementation
Copy the script into offline_replay_lab.py and run python offline_replay_lab.py. It uses only the Python standard library. The browser version uses the same structure with a small seeded generator.
from __future__ import annotations
import math
import random
from dataclasses import dataclass
@dataclass(frozen=True)
class Trace:
x1: float
x2: float
label: int
phase: str
def softmax(values: list[float]) -> list[float]:
peak = max(values)
exps = [math.exp(v - peak) for v in values]
total = sum(exps)
return [v / total for v in exps]
def gaussian(rng: random.Random, mean: float, sd: float) -> float:
return rng.gauss(mean, sd)
def make_data(seed: int, n: int = 80) -> tuple[list[Trace], list[Trace], list[Trace]]:
rng = random.Random(seed)
centres = {0: (-1.1, -0.3), 1: (1.1, -0.3), 2: (-0.8, 0.75)}
def samples(classes: list[int], phase: str, count: int) -> list[Trace]:
out: list[Trace] = []
for label in classes:
cx, cy = centres[label]
for _ in range(count):
out.append(Trace(gaussian(rng, cx, 0.45), gaussian(rng, cy, 0.45), label, phase))
return out
return samples([0, 1], "A", n), samples([1, 2], "B", n), samples([0, 1, 2], "test", 200)
def run(policy: str = "balanced", budget: int = 5, seed: int = 42) -> dict[str, float]:
phase_a, phase_b, test = make_data(seed)
rng = random.Random(seed + 1)
weights = [[rng.gauss(0.0, 0.05) for _ in range(3)] for _ in range(3)]
def probabilities(trace: Trace) -> list[float]:
features = [trace.x1, trace.x2, 1.0]
logits = [sum(features[i] * weights[i][c] for i in range(3)) for c in range(3)]
return softmax(logits)
def update(trace: Trace, rate: float) -> None:
features = [trace.x1, trace.x2, 1.0]
probs = probabilities(trace)
for i, feature in enumerate(features):
for c in range(3):
gradient = feature * (probs[c] - (1.0 if c == trace.label else 0.0))
weights[i][c] -= rate * gradient
def loss(trace: Trace) -> float:
return -math.log(max(probabilities(trace)[trace.label], 1e-12))
for _ in range(20):
rng.shuffle(phase_a)
for trace in phase_a:
update(trace, 0.05)
for _ in range(30):
rng.shuffle(phase_b)
for trace in phase_b:
update(trace, 0.06)
buffer = phase_a + phase_b
losses = [loss(trace) for trace in buffer]
for step in range(budget * 40):
if policy == "none":
break
if policy == "uniform":
index = rng.randrange(len(buffer))
elif policy == "error":
scaled = [(value + 1e-4) ** 0.8 for value in losses]
index = rng.choices(range(len(buffer)), weights=scaled, k=1)[0]
else:
target_class = step % 3
candidates = [i for i, trace in enumerate(buffer) if trace.label == target_class]
if rng.random() < 0.7:
scaled = [(losses[i] + 0.05) ** 0.8 for i in candidates]
index = rng.choices(candidates, weights=scaled, k=1)[0]
else:
index = rng.choice(candidates)
update(buffer[index], 0.025)
losses[index] = loss(buffer[index])
correct = {0: 0, 1: 0, 2: 0}
total = {0: 0, 1: 0, 2: 0}
for trace in test:
prediction = max(range(3), key=lambda c: probabilities(trace)[c])
total[trace.label] += 1
correct[trace.label] += int(prediction == trace.label)
accuracy = {c: correct[c] / total[c] for c in range(3)}
return {
"old_retention": accuracy[0],
"new_adaptation": (accuracy[1] + accuracy[2]) / 2,
"overall": sum(accuracy.values()) / 3,
}
if __name__ == "__main__":
for name in ("none", "uniform", "error", "balanced"):
print(name, run(name, budget=5, seed=42))
A configured-system example
An inspection robot encounters routine surfaces, three ambiguous defects and one sensor flare. During the shift, the live policy remains fixed. Each trace records observation, proposed label, human adjudication, sensor health, location, model version and outcome. Offline, the selector favours weak but adjudicated defects, reserves coverage for ordinary surfaces and rejects the flare because its sensor-health field is invalid. A candidate model trains in isolation. It is released only if it improves defect recall, preserves false-positive limits on ordinary surfaces and passes the historical flare test.
This example keeps concepts that are often collapsed into “memory” separate. The episodic buffer stores traceable events. The slow model contains learned parameters. The current inspection map is world state. The evidence ledger records adjudication and test receipts. The candidate update has no authority to alter production until the commit gate succeeds.
Recent mouse evidence suggests that non-REM microstates can separate replay of recent and older memories. A bounded engineering hypothesis is that alternating “assimilation” epochs for recent traces with “preservation” epochs for older traces will outperform a randomly mixed replay batch at the same compute budget when task distributions interfere. Evidence would strengthen the hypothesis if the schedule improves both old-task retention and new-task calibration across seeds and architectures. It would weaken it if shuffled interleaving matches or exceeds performance. A rival explanation is simple learning-rate scheduling. The smallest useful test is the browser lab extended with separate recent and old phases.
A customer-support learner records one high-loss conversation in which a corrupted tool response marks an ineligible refund as successful. Error-only replay selects it repeatedly because the candidate model continues to disagree. Training loss falls as the model adopts the false rule. Average validation accuracy rises slightly because the case resembles a common refund pattern. Only the provenance gate and a protected ineligible-refund test reveal the failure.
Remove the corrupted trace and the candidate no longer learns the rule. Cap each source’s replay influence and the effect weakens. Keep the trace but correct the tool receipt and the direction of learning reverses. These interventions identify the causal path more clearly than another aggregate benchmark. The lesson is not that high-error replay is bad. It is that priority amplifies whatever the trace contains, including error about the world.
The decision instrument
Before adding offline learning, locate the proposed system on two axes. Selection pressure asks how concentrated the replay distribution is. Transformation strength asks how far replayed content departs from recorded traces. Low values on both axes produce an archive. High selection with low transformation produces focused rehearsal. Low selection with high transformation produces broad simulation. High values on both axes produce powerful abstraction and the largest risk of self-confirming drift.
| Claim | Evidence status | Decision permitted | Decision not permitted |
|---|---|---|---|
| Offline reactivation can influence later memory. | Strong across multiple paradigms; mechanism and transfer vary. | Protect offline intervals and test replay interventions. | Assume every memory benefits equally. |
| Replay is selective. | Supported by weakness, novelty, exposure and value effects. | Design explicit replay queues. | Use salience or error as the sole priority. |
| Dreaming contributes causally to consolidation. | Contested; associations and plausible mechanisms, incomplete intervention. | Collect dream reports as a distinct evidence stream. | Treat a dream narrative as a neural replay log. |
| Biological replay justifies machine replay. | Structural inspiration, not implementation equivalence. | Test two-timescale and interleaving hypotheses. | Claim a machine “sleeps” or dreams because it trains offline. |
| A candidate update is safe because it improves average accuracy. | Unsupported without retention, calibration and failure tests. | Use a commit gate with independent readback. | Release on one aggregate metric. |
Do not ask whether the system has replay. Ask what distribution it replays, how traces are transformed, which invariants are tested and who may commit the result.
stateDiagram-v2 [*] --> Claim state "Fast capture creates a<br/>stability problem" as Claim state "Four jobs hidden inside one word" as Test state "Six words that must not collapse" as Revision Claim --> Test: expose mechanism Test --> Decision: evidence survives Test --> Revision: rival survives Revision --> Claim: narrow or rebuild Decision --> [*]
Govern the offline cycle before buying more exposure
When performance stalls, the default response is to collect more examples, add more practice or increase online compute. This paper changes that decision. Before increasing exposure, inspect the interval between exposures. Is the learner merely idle, or does it have a mechanism for selecting fragile and valuable traces, interleaving them with older structure and testing the resulting change?
For human learning, the practical consequence is modest but real. Treat sleep and quiet post-learning rest as part of the learning design, especially after complex or interference-prone material. Do not infer a universal sleep-stage recipe from one task, and do not treat dream interpretation as a substitute for memory measurement. Targeted cues can help under some conditions and disrupt sleep under others, so unsupervised “learning while asleep” is not the lesson.
Spontaneous thought belongs in the same question, but not in the same evidence box. Quiet wake can protect recent learning from interference and can support reactivation. Mind-wandering can also generate plans, worries and remote associations. A report that an idea “arrived during rest” does not reveal whether memory replay, reduced distraction, incubation or chance produced it. The useful experiment holds exposure constant, manipulates the offline interval and tests a predicted change in retention, transfer or revision.
For artificial systems, the consequence is stricter. A replay buffer is not a licence for unattended self-modification. It is a source of proposed training data. The selector must expose its priorities. Generated traces must retain provenance to the generator and source context. The candidate model must remain outside live authority. Retention, adaptation, calibration, rare-event behaviour and replay-poison tests must all pass before commitment.
The changed decision is this: invest in a governed offline learning cycle before buying more online experience. The aim is not to make machines imitate sleep. It is to recognise a deeper design principle made visible by sleep. Intelligence depends not only on what happens to a learner, but on what the learner is allowed to revisit, recombine and make permanent when the world goes quiet.
Glossary
Consolidation. A post-encoding change that makes memory more stable, accessible, integrated or reorganised.
Fast trace. A rapidly captured record of a particular episode, distinct from slower distributed knowledge.
Interleaving. Training on old and new material in a mixed or scheduled sequence to reduce interference.
Offline cognition. Internally driven processing that is partly decoupled from the next external observation and action.
Replay distribution. The probability with which stored or generated traces are selected for further update.
Slow model. A representation updated cautiously across many traces, not a claim about one anatomical site.
Targeted memory reactivation. Re-presenting a cue associated with learned material during sleep or rest to bias reactivation.
Update debt. The future cost of revising an abstraction or shortcut after the world changes.
References
- Wilson, M. A. & McNaughton, B. L. (1994). Reactivation of hippocampal ensemble memories during sleep. Science, 265, 676–679. DOI.
- Foster, D. J. & Wilson, M. A. (2006). Reverse replay of behavioural sequences in hippocampal place cells during the awake state. Nature, 440, 680–683. DOI.
- Diekelmann, S. & Born, J. (2010). The memory function of sleep. Nature Reviews Neuroscience, 11, 114–126. DOI.
- McClelland, J. L., McNaughton, B. L. & O’Reilly, R. C. (1995). Why there are complementary learning systems in the hippocampus and neocortex. Psychological Review, 102, 419–457. DOI.
- Kumaran, D., Hassabis, D. & McClelland, J. L. (2016). What learning systems do intelligent agents need? Complementary learning systems theory updated. Trends in Cognitive Sciences, 20, 512–534. DOI.
- Schapiro, A. C. et al. (2018). Human hippocampal replay during rest prioritizes weakly learned information and predicts memory performance. Nature Communications, 9, 3920. DOI.
- Geva-Sagiv, M. et al. (2023). Augmenting hippocampal–prefrontal neuronal synchrony during sleep enhances memory consolidation in humans. Nature Neuroscience, 26, 1100–1110. DOI.
- Huelin Gorriz, M., Takigawa, M. & Bendor, D. (2023). The role of experience in prioritizing hippocampal replay. Nature Communications, 14, 8157. DOI.
- Chang, H., Tang, W. et al. (2025). Sleep microstructure organizes memory replay. Nature, 637, 1161–1169. DOI.
- Thompson, E. J. et al. (2026). Replay of procedural memory is independent of the hippocampus. Nature Neuroscience. DOI.
- Wamsley, E. J., Tucker, M., Payne, J. D., Benavides, J. A. & Stickgold, R. (2010). Dreaming of a learning task is associated with enhanced sleep-dependent memory consolidation. Current Biology, 20, 850–855. DOI.
- Hudachek, L. & Wamsley, E. J. (2023). A meta-analysis of the relation between dream content and memory consolidation. Sleep, 46. PubMed.
- Rawson, A. B. et al. (2024). Memory reactivation generates new, adaptive behaviours that reach beyond direct experience. Scientific Reports, 14, 29752. DOI.
- Shearer, C. M. et al. (2025). Memory reactivation during rest forms shortcuts in a cognitive map. Scientific Reports, 15, 24724. DOI.
- Weng, L. et al. (2025). Effects of wakeful rest on memory consolidation: A systematic review and meta-analysis. Psychonomic Bulletin & Review. DOI.
- Mnih, V. et al. (2015). Human-level control through deep reinforcement learning. Nature, 518, 529–533. DOI.
- Schaul, T., Quan, J., Antonoglou, I. & Silver, D. (2016). Prioritized experience replay. International Conference on Learning Representations. Paper.
- Shin, H., Lee, J. K., Kim, J. & Kim, J. (2017). Continual learning with deep generative replay. Advances in Neural Information Processing Systems, 30. Paper.
- Carbone, J. & Diekelmann, S. (2024). An update on recent advances in targeted memory reactivation during sleep. npj Science of Learning, 9, 31. DOI.