Research journal / Memory architecture

What if memory could learn its own shape?

DynaTopo: an experiment proposal for memory that reallocates detail where tasks need it.

Andrew Hill5 minute readResearch proposal
Fine ink map with increasingly detailed subdivisions around a terracotta focal point
Concept illustration created with AI assistance. Experimental figures and recorded artifacts are identified separately below.

A memory system has to decide where to spend its precision. Some distinctions matter constantly. Others remain dormant for years. I want to explore whether the structure of memory itself can learn that difference.

That is the question behind DynaTopo, an architectural proposal I have been developing for adaptive memory geometry. Its basic move is to let a memory expand, subdivide, and consolidate its organization in response to the work it actually performs. Retrieval errors and demand would help determine where the system needs finer distinctions.

The motivating example is simple. Imagine an agent maintaining a large engineering history: projects, people, incidents, dependencies, decisions, and revisions. A request for a broad project summary needs a coarse view. A question about which deployment changed a particular behavior needs a much finer one. The same collection should support both without forcing every query through the same level of detail.

A map that can change its resolution

Maps are useful because they leave things out. A continent map and a street map preserve different relationships. Trouble begins when the representation discards precisely the distinction a task requires. In an adaptive memory, that failure could become a signal for changing the map.

The proposed structure has regions containing records and summaries. A router selects a region, and retrieval can descend to more detailed children when the summary is insufficient. If two repeatedly confused facts live in one region, that region becomes a candidate for subdivision. If several regions are mostly redundant, they become candidates for consolidation. The underlying records still need durable identities and traceable provenance as their organization changes.

Conceptual comparison of a uniform memory partition and an adaptive partition with smaller cells around concentrated query demand
Concept diagram. The right-hand partition allocates more regions around a hypothetical demand hotspot. This illustrates the design; it is not a learned topology or benchmark result.

The goal is an explicit tradeoff between the cost of consulting memory and the consequences of compressing it. A summary that serves broad questions well can still be inadequate for a rare, exacting question. The architecture therefore needs a way to recognize when a coarse answer has reached its limit and recover the underlying evidence.

What should trigger a split?

In the initial formulation, I used a local pressure score:

P(r) = αH(r) + βE(r) + γC(r) + δQ(r)

Here r is a memory region. H represents heterogeneity or entropy, E measures task error associated with the region, C measures collisions between distinctions the task needs, and Q measures query demand. The coefficients determine how strongly each signal matters. In plain English: spend additional representational capacity where compression is causing useful work to fail.

This equation is a design sketch. Its components would need operational definitions, compatible normalization, and controlled experiments. Entropy alone could allocate resources to noise. Query frequency alone could overfit the memory to today's habits. Error alone could repeatedly split a region when the actual problem is missing evidence or a bad query encoder. A useful controller has to distinguish representational pressure from failures that changing topology cannot solve.

A practical first version should probably use a small number of interpretable rules. Split only after sustained pressure. Merge only after a longer period of low pressure. Cap how much of the structure may change in a single interval. Those choices create a measurable baseline before introducing a learned topology controller.

The complexity bill follows the whole operation

It is tempting to describe learned addressing as constant-time memory access. That statement becomes meaningful only after specifying the operation being counted. Selecting an address can be cheap while maintaining that address, resolving collisions, searching within its bucket, and producing the answer remain expensive.

Tquery = Troute + Tlookup + Tresolve + Tanswer

Writes introduce a second account: encoding, placement, consolidation, migration, and any retraining of the router. A system that makes reads faster by periodically reorganizing millions of records has moved work across time. Whether that trade is favorable depends on the workload and on latency during reorganization.

I would therefore report both query cost and amortized maintenance cost. I would also inspect the tail of the latency distribution. Rare repair events can matter more to an interactive agent than an attractive average. The benchmark must charge every architecture for the work it needs to stay usable.

How I would try to disprove it

The planned experiment starts with synthetic worlds whose facts and relationships are known. A small pilot can expose implementation problems before a broader sweep from roughly ten thousand to ten million facts. The advantage of synthetic data is that we can deliberately vary collisions, update frequency, and the structure of the questions. Its disadvantage is that an architecture can become unusually good at the generator that produced it.

I would compare a fixed partition, a hierarchy with fixed branching, a conventional retrieval baseline, and adaptive split/merge memory under matched resource budgets. Each receives the same facts, queries, and update stream. The important result would be the frontier between task accuracy, storage, retrieval work, and maintenance work. A pretty topology is secondary.

TestWhat it would expose
Demand moves to a new topicAdaptation speed and stale allocation
Nearly identical facts disagreeCollision handling and evidence preservation
Old facts are revisedInvalidation, provenance, and migration cost
Rare exact queriesInformation lost in coarse summaries
New world generatorDependence on the training distribution

A particularly revealing ablation freezes the topology after training. If adaptive changes add cost without improving performance after distribution shifts, the dynamic part has not earned its place. Another removes the error term from the pressure score. That would test whether the system learns useful distinctions or mostly follows popularity.

Could organization become a learned capability?

The deeper possibility is that a useful ontology emerges from task pressure. Regions could come to reflect distinctions that repeatedly matter for prediction and action. But a cluster is not automatically a concept, and a hierarchy is not automatically an explanation. To support that interpretation, I would need to show that the organization predicts meaningful relations on tasks and data it did not directly optimize.

There is also a valuable modest outcome: an adaptive index that improves a particular workload without becoming a general theory of memory. That would still tell us something about when learned organization is worth its maintenance cost.

DynaTopo is currently a proposal, with no completed benchmark reported here. Its appeal is that it turns a broad intuition into a concrete experimental question: can memory learn where detail belongs, while preserving the evidence needed to change its mind?