HoloMem

Explainer

Holographic Reduced
Representations

HRR is a way to store structured information (like “Sarah owns the auth service”) inside a single fixed-size vector. You add facts by binding role to value, then pull any one of them back out by asking with a key. No model, no embeddings, no API. Every demo here runs the real math in your browser.

NumPyFastAPINext.jsTypeScript HRRFFT

Figure 1 · Encode then probe

dim 1024

fact

Sarah owns the auth service and maintains the login flow.

subjectSarahpredicateownsobjectauth service
r_s ⊛ v_s
r_p ⊛ v_p
r_o ⊛ v_o
trace

64-cell preview of one 1024-d vector

unbind

“Who handles login?”Sarah · auth service

What is HRR?

Holographic Reduced Representations are a way to store structured facts as a single fixed-width vector. The math is just vector addition and a kind of multiplication called circular convolution. There’s no training and no embeddings model. Every symbol you care about (“Sarah”, “owns”, “auth service”) becomes a high-dimensional random vector, generated deterministically from its name.

Four operations carry the whole system. Bind glues two vectors into a new one that looks unlike either input. Superpose adds many bound pairs into a single trace. Unbind reverses bind: give it the trace and one key, and it returns a noisy version of the value. Cleanup snaps that noisy result to the nearest known symbol.

Why care? Because together those four operations give you a memory you can do algebra on. A single 1024-dimensional vector can hold around 50 structured facts and give back any one of them by name, and confidence degrades smoothly under noise instead of falling off a cliff. The demos below show that happening in milliseconds, with every step visible.

What this site is (and isn’t)

An interactive reference for HRR: the operations, the tradeoffs, and a small applied example that uses them. It is not a competitor to RAG, a vector database, or a production embedding stack. It’s a small, working demonstration of what vector-symbolic memory can do and where its limits are.

The math, in three simple operations

Everything in the demos is built from three small functions on lists of numbers. No neural network. No training. If you can mix two ingredients and later separate them, you understand the whole thing.

1 · bind

Stick a label onto a value

Mix two vectors together.

Start with two random lists of numbers, one for the role(like “subject”) and one for the value (like “Sarah”). Mix them into a third list. The result looks unrelated to either input, but the mixing is reversible. Give it one ingredient back and you can recover the other.

in code

bind(role, value) → one vector

2 · superpose

Stack them in one place

Add all the bindings together.

For one fact, you do this three times: bind subject with Sarah, bind predicate with owns, bind object with auth service. Then add the three results. You get a single list of numbers that quietly contains the whole fact.

in code

bind(s, …) + bind(p, …) + bind(o, …) → trace

3 · unbind

Pull a value back out

Reverse the mix to get one piece back.

To ask “what’s the subject of this fact?”, reverse the bind operation using the role. The answer comes back a little noisy because the trace has other facts mixed in. A small lookup called a cleanup memory compares the noisy answer to known words and snaps to the closest.

in code

unbind(trace, role) → value (approximately)

why it works

When the lists are long (1024 numbers here) and random, any two of them are almost guaranteed to be different. Mixing spreads each binding across all 1024 positions, so the bindings barely step on each other when you add them. The same math that mixes also unmixes. That’s the whole trick.

The headline demo · unbind and cleanup

Pull a stored value back out, by name.

This is the operation that makes HRR worth knowing about. We pack four facts into one 1024-dimensional vector, then ask for the value of a single fact back. The only thing we hand over is its subject and predicate. Cleanup against a small symbol dictionary lands on the right answer.

A keyword index can re-rank stored strings. It can’t recover a value from an encoded trace. That’s the line this demo draws.

01

Unbind and cleanup

The headline HRR operation. Store a fact as a bound vector, then extract a value by 'dividing out' the role. Keyword search can re-rank stored strings. Only HRR can recover a bound value as a vector.

Plus 3 distractor facts superposed into the same trace (e.g. atlasusesfastapi).

Three more demos in the lab show capacity (how many facts fit before recall starts losing them), role-binding (telling “A manages B” apart from “B manages A” when keyword scoring can’t), and how confidence degrades when you corrupt the trace with noise.

Applied · a memory built on the algebra above

What if you built an agent’s memory out of this?

The next three sections show a small, working memory system that uses HRR underneath, plus a keyword index for literal matches and a per-memory trust score that breaks ties when sources disagree. This isn’t the point of HRR. It’s just one applied example of what the operations let you build. You’ll encode a fact, recall it through an indirect query, and watch trust adjudicate a contradiction.

Try it · encode

Encode a fact

Pick a fact. You’ll see it split into a role-value triple, the three pieces mix into colored vectors, then stack into one trace.

Try it · recall

Recall through indirect queries

The system is pre-loaded with facts about a fictional engineering team. A question doesn’t have to mention the answer directly, but it does need to share at least one keyword or named entity with the stored memory. The probe builds a vector from your question and scores it against every stored trace.

Loading seed memories…

Try it · trust

Trust-aware recall

Every memory has a trust score between 0 and 1. When two memories match a query equally well, the more trusted one wins. Trust changes ranking, not truth itself.

High trust · 0.85

The auth service uses PostgreSQL for session storage.

Low trust · 0.20

An unverified source claims the auth service uses MongoDB.

Where HRR shines, and where it doesn’t

HRR isn’t a silver bullet. It’s an unusual point in the design space: algebraic, deterministic, compositional. Here’s what it does well and where it falls down.

strengths

  • Algebra you can query

    Bind glues role to value; unbind pulls the value back out by role. Retrieval is a multiplication in the Fourier domain. No model, no learned weights, no training data.

  • Many facts, one vector

    A 1024-dimensional trace holds dozens of structured facts before cross-talk starts dominating. Storage cost stays constant in the number of facts; recall is one FFT.

  • Role-aware by construction

    "Maya manages auth" and "Auth manages Maya" share a token bag but encode to different traces, because each token is bound to its grammatical role. Bag-of-words scoring collapses both into one. HRR keeps them apart.

  • Graceful under noise

    Corrupt half the trace and chained unbind still finds the right value at lower confidence. Inverted indices fall off a cliff the moment a query token disappears.

tradeoffs

  • No semantic generalization

    Symbol vectors are random vectors, not learned embeddings. "editor" and "IDE" are uncorrelated. If you need synonym handling, pair HRR with an embedding model or a manual alias table.

  • Capacity is finite

    Past around 100 superposed facts in a 1024-d vector, cleanup starts losing items. The curve degrades smoothly, but at scale you want either bigger vectors (cheap) or hierarchical traces (work).

  • Symbol vocabulary matters

    Cleanup is a cosine search against a known dictionary. If the answer isn't in the dictionary, HRR can't pull it out. Provisioning the vocabulary is part of the design.

  • Not a document search engine

    HRR shines on small numbers of structured facts. For RAG-style search across many prose documents, an embedding model and a vector DB will outperform.

How it compares

HRR isn’t a replacement for keyword search or RAG. It’s a different point in the design space. Here’s the cross-cut.

KeywordRAG / Vector DBHRR
Recover a stored value by nameNoNoYes (unbind)
Encodes role / structureNoWeakYes
Many facts in one vectorNo (per-token index)No (per-doc vectors)Yes
Semantic generalizationNoStrongWeak (no learned embeddings)
Graceful under noisy probesCliffModerateSmooth degradation
Explainable scoringYesOpaqueYes (per-component)
Needs an embedding modelNoYesNo
Runs fully localYesDependsYes
Best fitExact lookup over small textSemantic search over documentsCompact structured memory, algebraic queries

Every cell in that table is something you can actually watch happen in the lab or the applied demo. None of it is marketing copy.

Open the lab

The playground hosts the full HRR Lab (four interactives) and a sandbox for the applied memory system. You can add facts, run role-aware queries, inject noise, compare retrieval modes, and watch the memory field react.