pebble

Memory as an operation

How remembered relationships could become operations a model uses to reason.

Human memory helps us make sense of situations we have never encountered before. We bring parts of earlier experiences into the present, combine them with new information, and use the result to decide what follows. A memory can change through that process, and familiar information can take on a different meaning in a new setting.

Research on memory gives this idea a concrete basis. In one experiment, reminding people of an earlier list before teaching a new one caused some new items to appear in their later recollection of the old list. In another study, people learned overlapping pairs of images; reactivation of related memories during learning predicted their ability to infer connections between images they had never seen paired together. Remembering can both revise an earlier account and help us derive something new.

That is the motivation for my work on memory as an operation. I want to understand how a model can use what it remembers to transform new information, combine relationships, and reach an answer it was never explicitly given. Human memory suggests the question; matrices give me a way to test parts of it in models.

From relationships to abstractions

Suppose you learn that Maya reports to Leo, and that Leo works in Oslo. You can now answer “Where does Maya’s manager work?” even though nobody gave you that fact directly. You follow two relationships: from Maya to her manager, then from her manager to a city. Each step is a hop.

Maya → her manager, Leo → his work location, Oslo

In a matrix memory, a relationship can be represented as a transformation: applying the manager matrix to Maya’s representation produces Leo’s representation. Applying the work-location matrix to that result produces Oslo’s. When the representations are compatible, multiplying the two matrices composes these steps into an operation that maps a person to their manager’s work location.

The useful abstraction is the relationship itself. “Find this person’s manager’s work location” can be reused for other people as the stored facts change. A model could learn to combine several such operations into a higher-level relationship, then use that relationship as a step in another problem.

My interest is in whether this can extend beyond familiar chains. A model might recognize a common structure in a supply network and a biological pathway, for example, and use a relationship learned in one setting to reason about the other. That is a hypothesis about generalization: can a model learn when to build another level of abstraction, and compose operations at inference time for a problem it was not explicitly trained to solve? The small memory tasks in this research program do not yet demonstrate that ability.

Comparing with chain-of-thought reasoning

A chain of thought could describe every hop in the example above. If both approaches solve the same problem reliably, a readable account of the steps is a useful advantage. Simply moving those steps inside the model is not the capability I am most interested in.

The possibility is reasoning over relationships that do not have a convenient verbal description. A learned transformation can preserve and combine features without choosing a sentence to represent each intermediate result. This could let a model work with distinctions or connections that are awkward to express in words, including shared structure across very different domains. The aim is to expand what it can connect, rather than only shorten the explanation of a connection it already makes.

Transformers already compute with contextual, continuous representations, including when they generate a chain of thought. Work such as Coconut also studies explicit reasoning steps in a continuous latent space. My question is what a writable, composable memory adds to that process: can a model build an operation from what it has just learned and reuse it to make a new abstraction?

This creates an interpretability tradeoff. Text gives us something to read, although a chain of thought is not always a faithful explanation of how an answer was produced. Latent operations would need other checks. We would have to show both a useful gain on unfamiliar problems and evidence about which memory operations caused it.

Why matrices?

Matrices make this idea concrete. They transform inputs, compose through multiplication, and can be updated as new information arrives. Work on fast weights and linear attention shows how a neural network can learn to write a changing matrix memory while processing a sequence.

They also give us something to measure. A matrix’s rank counts the independent output directions its transformation can produce. Its singular values describe the strength of those directions. We can inspect how this structure changes during learning, remove parts of it, and test which answers stop working. That makes the memory a useful object for mechanistic interpretability.

Rank alone does not count facts or measure reasoning ability; its meaning depends on the task and how the matrix is read. My rank studies use tasks with a known capacity requirement so we can ask whether training learns to use the necessary dimensions. Interventions then test whether the model actually depends on them.

The experiments so far study parts of this problem: retaining associations, learning operations, and testing their composition. The larger question is whether models can learn memories that support the flexible recombination we value in human reasoning. Being able to inspect and intervene on the operation gives us a way to investigate that question.

Back to research