How Experience Becomes a Program: Episodic Memory as a Difference Engine
Y. He, S. Wu
Key points
From the paper's conclusion- We show that such comparisons write programs.
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.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- How Finite Brains Generalize Without Bound: Spatial Memory as a Universal ComputerarXiv · 2026
- Reliability-guided meta-control in intuitive physicsbioRxiv · 2026
- A complementary learning system for continual episodic memory in large language modelsbioRxiv · 2026
- The Lagrangian Brain: A Constraint Mechanics of Mind and MachinearXiv · 2026
- Trial-by-trial learning of successor representations in human behaviorPLoS Computational Biology · 2025
- Halting in Recurrent Sequence ModelsarXiv · 2026