bioRxiv Science⌕ Search

bioRxiv · 10.64898/2026.11.16.767088

How Experience Becomes a Program: Episodic Memory as a Difference Engine

Abstract

A child who has seen a few sums can add numbers of any length: finite experience has become a program, a procedure with memory that holds for inputs of every size. Networks learn procedures by passing errors backward through every step of a computation, over many examples, and what they learn on short inputs seldom holds on long ones. Brains keep something networks discard, the experiences themselves, and we propose that they keep them in order to compare them. When two remembered experiences differ in one place, the first answer at which they differ depended on that place. This method of difference finds the cause of an answer in one step, however long the computation in between, and finds causes that act jointly, each of which alone is invisible to statistics. We show that such comparisons write programs. Comparing an experience with one that differs in a single symbol shows what each answer depends on; in a memory that recalls the past by counting events, each dependence is a linear equation, and the stack, the queue and the counter of computer science are solutions of such equations. Comparing what follows two beginnings shows which states a program must keep, and comparing a question with the question one symbol shorter builds each answer from the one before. Where experience does not decide, nothing is guessed: the learner asks, or says that it does not know. A machine built on these principles, with no backpropagation and no search over programs, writes exact programs for thirteen of the fifteen tasks of a standard benchmark, each in under a minute, from a few hundred short strings and, for two of the tasks, questions of its own; eleven of the programs hold at a million symbols. It learns tasks withheld from its design, builds multiplication from its own addition, and in 5,680 runs announces no false program. The hippocampus has the form of such a difference engine: it stores whole episodes after one exposure, keeps similar ones apart, recalls a neighbour of the present and compares the two. In simulated circuits of neurons the programs run exactly, a replayed sweep finds where two episodes differ, and a local rule learns the gains with no backward pass. On this account, episodic memory is the brain's means of assigning credit by comparison.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

He, Y., Wu, S.. 2026-11-25. How Experience Becomes a Program: Episodic Memory as a Difference Engine. https://doi.org/10.64898/2026.11.16.767088. https://biorxiv.science/record/biorxiv%3A10.64898%2F2026.11.16.767088/how-experience-becomes-a-program-episodic-memory-as-a-difference-engine

Citations retain the original authors and DOI and include this site’s record URL. If this discovery service contributed to your research, you can also cite bioRxiv Science by Indiciae: BibTeX · RIS.

KEEP EXPLORING

Related preprints

Translational Post-Fatality Evaluation of Novel CNS Gene Therapy Risk for CAP-002

Adeno-associated virus capsids engineered for receptor-mediated crossing of the blood-brain barrier after intravenous delivery represent a major advance for central nervous system gene therapy, but the first dosing in the CAP-002 clinical trial for STXBP1-related disorders resulted in patient death due to cerebral edema, uncovering a novel safety risk. Investigation of the ADAM15 mechanism mediating CAP-002's brain tropism supports conservation between non-human primates and humans but that it may activate cellular stress response signaling in endothelial cells while crossing barriers. A subsequent limited macaque case series evaluated doses beyond regulatory toxicology requirements, as the original IND-enabling toxicology studies did not show brain toxicity. In animals dosed at exposures substantially exceeding the clinical dose associated with the fatal CAP-002 event and in the absence of prophylactic corticosteroids, magnetic resonance imaging revealed focal cerebral edema and neuropathological review identified signs of vascular fragility corroborating the clinical case study. This finding supports the development of novel safety paradigms for intravenously administered brain-targeting vectors. Given that another engineered capsid with an ADAM15-independent mechanism did not produce acute brain toxicity up to 2.5x1014 vg/kg in non-human primates, the extent to which these observations generalize to other blood-brain barrier-crossing capsids remains unclear.

neuroscience↗

Hopfield networks trained with natural images express orientation selectivity

Orientation selectivity in the primary visual cortex is usually framed as a feedforward computation, although V1 contains dense recurrent circuitry capable of storing and transforming population activity. We ask whether orientation selectivity emerges in unsupervised recurrent networks trained only on natural images. We studied two related models, both using a Hopfield network to model a V1 columnar pinwheel structure. The two models include a single-receptive-field Hopfield network and a tiled V1 network containing many local populations with explicit within- and cross-receptive-field connectivity. Both models replicate orientation selectivity levels observed in neurophysiology after Hebbian learning. We find that natural image activity contains orientation specific structure that recurrent circuitry can amplify or erase. This orientation specific structure can be learned and mirrored simply by unsupervised Hebbian learning on natural images.

neuroscience↗

Ignoring hemispheric homology miscalibrates parcel-level null models and cross-validation of brain maps: a simulation study and reanalysis

Background: Brain maps are compared region by region with two tools: spin tests, which assess the correlation between two maps against randomly rotated copies of one map, and prediction models, which are assessed on held-out regions (cross-validation). Both treat regions as observations, yet a region and its homologue in the other hemisphere are near-duplicates. We examined whether ignoring this hemispheric homology distorts both tools, using simulated maps unrelated to the predictors, so that every significant result is a false positive, simulated maps with a known signal, and 12 ENIGMA disorder maps of cortical thickness. Results: Real maps were nearly symmetric, but the rotated maps of common spin tests were not, because the two spheres of the standard template are not mirror images. With 68 regions, the conventional spin on this template declared 9% of correlations between unrelated maps significant, against 6% for a symmetric spin, which moves homologous regions together; 5% is expected. Multivariate analyses were affected more. A regression of an unrelated simulated map on 28 predictors, fitted to all regions and tested against null maps, was significant for 51% of maps with the conventional spin and 8% with the symmetric spin. With the conventional spin and random cross-validation folds, which train the model on homologues of the test regions, 39% of maps appeared predictable; when bilateral blocks of cortex were held out, 3-4% did. In the ENIGMA data, a regression on receptor maps fitted to all regions was significant for 10 of 12 maps with the conventional spin and for 1 with the symmetric spin. The remedies were incomplete with 360 regions, and bilateral blocks reduced the power of ridge regression for strong signals. Conclusions: Null models for brain maps should keep their bilateral structure, and cross-validation should keep a region and its homologue on the same side of every split and hold out spatial blocks. In real data, the conclusions of an analysis depended on these choices. The reanalysis alone cannot show which protocol is correct; in the simulations, the protocols that respect homology came closest to the nominal error rate.

neuroscience↗