DEV Community

Paul Crinigan
Paul Crinigan

Posted on

Cognitive Scoring: What ACT-R Adds To Vector Retrieval

Every retrieval system I have worked on eventually hits the same wall. The embeddings are fine, the chunking is reasonable, the model is capable, and the answers are still subtly out of date. The problem is almost never the parts people tune first. It is that similarity scoring treats every stored item as equally accessible, forever.

Where Similarity Alone Breaks Down

Cosine similarity answers one question: how close is this stored text to the query text. It has no opinion about when the item was stored, how often it has proven useful, or what else it connects to.

That produces a specific and very recognizable failure. A spec from two versions ago sits in the index next to the current one, both worded almost identically, and both score about the same. A deprecated API pattern gets recommended with the same confidence as its replacement. A preference a user mentioned once in passing outranks the one they have restated in ten conversations, because the passing mention happened to use the query's vocabulary.

None of these look like failures from the inside. Retrieval returns something plausible, the model reasons over it correctly, and the answer is wrong in a way that is expensive to trace.

Base Level Activation

ACT-R is a cognitive architecture from Carnegie Mellon, built over forty years of research into how human memory stores and retrieves information, and calibrated against thousands of recall experiments. Its core retrieval idea is base level activation: a memory's accessibility is a function of how recently and how frequently it has been accessed.

In practice that means two ranking signals you almost certainly already have in your database and are not using. Last accessed time and access count. A memory retrieved ten times in the last week sits far above one stored once last spring, even when the text similarity is identical. The equation is a logarithmic sum over past accesses with a decay term, which is cheap enough to compute inline at retrieval time.

The interesting part is that this is not a heuristic someone invented for search. It is a model fitted to human recall accuracy, and it predicts observed behavior within a few percentage points.

Spreading Activation And Entity Links

The second mechanism is spreading activation. Chunks in ACT-R are connected, and activating one raises the activation of its neighbors.

Applied to retrieval, that means a query about authentication also lifts stored memories about JWT handling and session expiry, even when those memories never use the word authentication. Pure vector search misses that connection unless the embedding happens to place them close together, which for domain specific terminology it often does not.

This is where entity extraction at write time pays for itself. If ingestion pulls out entities and relationships rather than storing undifferentiated chunks, the graph needed for spreading activation already exists.

Decay, And Why Forgetting Is A Feature

The last piece is the one teams resist. Memories that stop being accessed should lose activation over time.

Resisting it is understandable, since deleting data feels like losing information. But decay is not deletion. It is a ranking penalty that keeps unused material from competing for the top results. Without it, every store degrades the same way: it grows, the useful and the obsolete become indistinguishable to the scorer, and retrieval quality quietly declines even as the data grows richer.

A forgetting curve, borrowed directly from the memory research, gives you that behavior with one parameter to tune.

The Takeaway

Cognitive scoring does not replace vector search. It sits on top of it, reranking semantic candidates by recency, frequency, contextual connection and corroboration, which is roughly what an expert does when they answer from experience rather than from a filing cabinet.

If you are debugging a retrieval system that returns plausible but stale results, the fix is more likely in the ranking layer than in the embedding model. The mathematics, the parameter choices and the production tradeoffs are written up in more depth in this guide to ACT-R cognitive scoring, including what each mechanism costs at query time.

Top comments (0)