A Neural Network Trained to Remember Rediscovers the Memory-Palace Strategy

Ask someone to memorize a shopping list and then say it back in any order, and a few reliable habits show up. People tend to blurt out the last few items first. They often start strong on the first item or two. And once they recall one item, the next thing they say is likely to be whatever sat next to it on the original list. Psychologists have catalogued these tendencies for decades under the plain name "free recall," and for most of that time, one family of theories has done the explaining.
Those theories go by the label temporal context. The idea is that as you move through a list, your brain maintains a slowly drifting internal state, a kind of running timestamp, and it binds each item to whatever that state happened to be at the moment. Recall then works by nudging your mind back toward an old context and reading off whatever is attached. It is an elegant account, and it captures the everyday habits above with real precision.
It has one awkward gap. The people who are genuinely extraordinary at remembering lists, the competitors who memorize a shuffled deck of cards in under a minute, do not rely on that drifting timestamp at all. They use the memory palace, also called the method of loci: they mentally walk a familiar route and drop each item at a specific spot along the way, then retrieve it by strolling the route again. It works better than ordinary recall, and temporal-context models do not naturally produce it. So, which one is the real story of human memory?
A team of psychologists at New York University, led by Marcelo Mattar, decided to stop assuming there was a single answer. Instead of hand-building a model to match human behavior, they trained neural networks to perform free recall as well as they possibly could, then looked at what strategy the training pressure discovered on its own. The work first appeared as a bioRxiv preprint in September 2025 and is now peer-reviewed and published in Nature Machine Intelligence.
The result is the interesting part. The networks did not settle on one tidy mechanism. Different training regimes pushed them toward different solutions, and the highest-performing models converged on something the authors call a stimulus-invariant index code. Rather than tagging each item with a drifting sense of when it appeared, these networks learned to tag each item by its position in the list, a slot number that does not depend on the item's content. Retrieval then becomes a matter of stepping through the slots in order.
That structure, the authors point out, is a close cousin of the memory palace. The loci in a memory palace are exactly that: a stable, content-independent set of positions you fill and later revisit in sequence. The network was never told about memory champions, never given a route to walk, never programmed to build a positional index. Trained only to recall lists well, it reinvented the strategy from scratch.
The "memory palace" here is the researchers' analogy for a positional index code, not a claim that the network constructed a literal mental map of a place. There is no imagined hallway inside the model, no visualized objects on a shelf. What the network built is a way of representing each item's serial position independently of what the item was. The palace is the metaphor; the index is the mechanism.
The index code did not appear under every condition. It emerged most readily when the networks were pushed to recall all of the items rather than just guess the single most likely next one, and when they were prevented from leaning on recency, the easy trick of simply naming the last thing seen. Loosen those constraints, and the models drifted back toward temporal-context-like behavior. Tighten them, and the index strategy took over. That dependence is itself a finding: it turns a long-standing either/or debate into a question of conditions, offering a computational account of when each strategy is the optimal one.
If human memory works the same way, and this study cannot prove that it does, then the decades-long search for the mechanism behind free recall may have been framed wrong. There might not be one mechanism. Temporal context could be what the brain reaches for by default, while the positional index is the mode that expert training unlocks, the same faculty the memory champions are exploiting when they walk their palaces. The two would not be rivals so much as tools suited to different jobs.
There is a broader reason the result is drawing attention beyond memory research. It belongs to a growing genre in which an artificial network, optimized only to do a task well, arrives at a strategy that scientists had already documented in humans or in the theoretical literature. When the machine and the theory land in the same place from opposite directions, it is a mild vote of confidence that the theory was tracking something real. Here, the network did more than confirm an idea. It reconciled two that had been talking past each other, and it did so, fittingly, by remembering.
Sources
- Peer-reviewedNature Machine Intelligence
- PreprintbioRxiv
