Density, Depth, Loop: AI Memory from Storage to Closure

Large language models already have several kinds of memory: context windows, retrieval, and product-level memory features. We argue that the quality of memory lies not in its length but in whether it closes into a loop: only a system that writes its outputs back and rewrites the rules that generated them retains experience after a reset. We characterise this with three quantities — density (how much is stored), depth (how much is processed), and closure (whether it is written back) — and divide memory into three levels: storage, topological flow, and loop. In minimal form we machine-check three structural propositions in Lean 4: a system that never rewrites its rules is, after a reset, identical to one that never had the experience, however long its context; reversible steps never merge distinct states, so convergence requires discarding information; and a persistent state exists only when the loop gain is at least one. We further propose that persistent memory forms where the gain of the write-back loop crosses one, and test and illustrate this with historical forgetting data, a pre-registered blind test and two simulations: three historical datasets are all closest to straight lines on log–log axes, ruling out a single exponential; on two non-overlapping samples of public Duolingo learning records (about two million records), a pre-registered blind test found that the prediction that more uniform review intervals give better recall came out reversed in both samples, a result reproduced exactly by rebuilt code, whereas the predictions on the shape of forgetting and the location of the threshold proved sensitive to analysis choices the registration had left open; unprotected continual learning loses old knowledge mostly at the start of a new task; adding pruning removes forgetting at a small cost to new learning; and individuals sharing one structure move in the same direction whenever the net effect is clear, splitting only where benefit and cost cancel. The reversal suggests that what should stay constant is the ratio of the interval to the memory's own time scale (a rule), not the interval in clock time (a regularity). We close with Test A — the post-reset retention ratio R: a projection of public benchmarks already gives half of the answer (states are easy to write, their consequences mostly do not follow), and the other half is left to a small experiment comparing an external store of states with an external store of rules — and thirteen predictions ranked by testability. Supplementary material (Chen_2026_P6_supplement_v1.0.zip): Lean 4 sources for the machine-checked propositions (Appendix A), simulation and analysis scripts (Appendix B), all numerical results, the seven figures, and the time-stamped pre-registration record of the Duolingo blind test. The Duolingo data are not redistributed; a script rebuilds the exact samples from the public dataset (Settles & Meeder 2016, doi:10.7910/DVN/N8XJME, CC BY-NC 4.0). Code is MIT-licensed; results, figures and text are CC BY 4.0. Part of the EMI series (Chen 2026a–f).

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-10-03
DOI
https://doi.org/10.5281/zenodo.23115371
Primary Topic
Language and cultural evolution
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
preprint

Density, Depth, Loop: AI Memory from Storage to Closure

Yunjing Chen
Zenodo (CERN European Organization for Nuclear Research)
Language and cultural evolution
preprint

Density, Depth, Loop: AI Memory from Storage to Closure

Yunjing Chen
preprint en

Abstract

Large language models already have several kinds of memory: context windows, retrieval, and product-level memory features. We argue that the quality of memory lies not in its length but in whether it closes into a loop: only a system that writes its outputs back and rewrites the rules that generated them retains experience after a reset. We characterise this with three quantities — density (how much is stored), depth (how much is processed), and closure (whether it is written back) — and divide memory into three levels: storage, topological flow, and loop. In minimal form we machine-check three structural propositions in Lean 4: a system that never rewrites its rules is, after a reset, identical to one that never had the experience, however long its context; reversible steps never merge distinct states, so convergence requires discarding information; and a persistent state exists only when the loop gain is at least one. We further propose that persistent memory forms where the gain of the write-back loop crosses one, and test and illustrate this with historical forgetting data, a pre-registered blind test and two simulations: three historical datasets are all closest to straight lines on log–log axes, ruling out a single exponential; on two non-overlapping samples of public Duolingo learning records (about two million records), a pre-registered blind test found that the prediction that more uniform review intervals give better recall came out reversed in both samples, a result reproduced exactly by rebuilt code, whereas the predictions on the shape of forgetting and the location of the threshold proved sensitive to analysis choices the registration had left open; unprotected continual learning loses old knowledge mostly at the start of a new task; adding pruning removes forgetting at a small cost to new learning; and individuals sharing one structure move in the same direction whenever the net effect is clear, splitting only where benefit and cost cancel. The reversal suggests that what should stay constant is the ratio of the interval to the memory's own time scale (a rule), not the interval in clock time (a regularity). We close with Test A — the post-reset retention ratio R: a projection of public benchmarks already gives half of the answer (states are easy to write, their consequences mostly do not follow), and the other half is left to a small experiment comparing an external store of states with an external store of rules — and thirteen predictions ranked by testability. Supplementary material (Chen_2026_P6_supplement_v1.0.zip): Lean 4 sources for the machine-checked propositions (Appendix A), simulation and analysis scripts (Appendix B), all numerical results, the seven figures, and the time-stamped pre-registration record of the Duolingo blind test. The Duolingo data are not redistributed; a script rebuilds the exact samples from the public dataset (Settles & Meeder 2016, doi:10.7910/DVN/N8XJME, CC BY-NC 4.0). Code is MIT-licensed; results, figures and text are CC BY 4.0. Part of the EMI series (Chen 2026a–f).

Zenodo (CERN European Organization for Nuclear Research)
Language and cultural evolution
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.