Maya
- name
- “Maya”
- age
- 29
- interests
- sports music hiking
Concepts
Hyperdimensional computing turns roles, values, and associations into high-dimensional hypervectors. Once they're in the same space, binding, bundling and permutation let us compose, retrieve and compare them. On this page, we'll demonstrate how that works with a simple example.
Example
Let's begin with a simple dataset of connected entities. Maya and Noah are two people who know each other. Each has a name, an age, and a list of interests, and they share two interests. We'll use this example to explore encoding, composition, and associative search.
(Maya) -[KNOWS]→ (Noah)
The highlighted labels indicate a connection or overlap. We aren't adding a special “similar people” field. Instead, we'll let the encoded representation capture that overlap for us.
Step 1 · encode
An encoder is an adapter that transforms raw data into hypervectors. It accepts the different types in our data and returns a hypervector with the specified dimensionality. Here we'll use 10,000 dimensions. The output shape remains fixed, whether the input is one string, one number, or a whole list.
Strings
A deterministic mapping assigns “Maya” or “music” the same random-looking hypervector every time. Hypervectors for different strings begin almost orthogonal, so accidental collisions are unlikely.
E("music") → vmusic Numbers
Encoders can model ordinal values by changing the hypervector gradually across a range. Ages 29 and 32 stay similar, while ages 29 and 82 are much farther apart.
cos(E(29), E(32)) = 0.97 Lists
Encode each item, then add the hypervectors together. The resulting bundle remains similar to every item in the list, so membership is still visible through cosine similarity.
E([a,b,c]) = E(a) ⊕ E(b) ⊕ E(c) Why use so many dimensions?
In a very high-dimensional space, two random hypervectors are near-orthogonal. Their cosine similarity is near zero. Across the 500 deterministic random pairs used here, the mean cosine similarity is -0.001. Unrelated hypervectors have similarity near zero, so shared structure produces a clear signal.
What the hypervector actually contains
The strips shown above are visual shorthand. In practice, a person's hypervector is an array with 10,000 values. Here, each value is bipolar: either −1 or +1. Other HDC models use binary values (0 or 1) or real-valued numbers (floats). In every case, the same broad concepts can be represented and manipulated in the same high-dimensional space using simple operations.
first 16 of 10,000 values shown
Step 2 · compose
Binding attaches roles to values. Each role–value pair in the metadata gets its own hypervector. For example, “Maya” is bound to the name role, 29 to age, and “hiking” to interest. Bundling then collects those facts. Permutation lets us preserve position or order. We'll use it when we encode who knows whom. We can compose all three operations.
Bind · associate
Binding is elementwise multiplication. The result is dissimilar from either input. Because bipolar binding is self-inverse, we can recover a value by binding the result with its role again.
Bundle · collect
Bundling is elementwise addition. The resulting hypervector remains similar to each input hypervector. We threshold the sum back to a bipolar hypervector to keep its shape convenient.
Permute · order
Permutation shifts the values in a hypervector using a fixed, reversible pattern. In our example, we'll use it to give Maya, KNOWS, and Noah different positions before we bind them. This lets us distinguish “Maya knows Noah” from “Noah knows Maya.” If we apply the same permutation to two hypervectors, their similarity stays the same. However, a hypervector and its permuted form will usually be dissimilar.
The complete record of a "person" in hypervector space
Every term has the same width, and the finished person hypervector still has 10,000 elements. The representation doesn't grow when we add fields. Each field's value, no matter its type, retains its signal and shares the same space.
Step 3 · retrieve
Suppose we want to search for a person around age 30 who enjoys music and hiking. We encode that description with the same roles and values, then compare it with each stored person using cosine similarity.
The key difference between this approach and traditional vector search is how the hypervector representation is created. Traditional vector search usually compares learned, opaque embeddings of whole items. Here, we build the query hypervector from explicit roles and values. Each shared value, such as an age range or interest, contributes to the score, so the result is composed from the structure we encoded.
Query
age ≈ 30 · music · hiking
Beyond entity metadata
We already have hypervectors for the persons Maya and Noah. HDC lets us also give the relationship predicate KNOWS its own hypervector. Before we bind the triple, we leave Maya as-is, permute KNOWS once and Noah twice. This gives each part a different position. The whole triple becomes one hypervector.
Query the relationship
We can bind the stored triple with the parts we know. Maya and the permuted KNOWS hypervector cancel out, leaving Noah in the object's position. We then reverse that permutation to recover the hypervector for Noah.
Recovered object
Noah
cos(recovered, PNoah) = 1.00
Where this leads
We've seen how to use associative search to find the most similar hypervector to a given query. The same
representation can also learn from examples. Using the fixed encoder, we transform a small number of new data
samples into hypervectors, then bundle the hypervectors for examples with the same label into a
prototype.
New samples are classified by similarity to those prototypes, which together form
an associative memory. The learning is online: each arriving sample is encoded on the fly and added to
its prototype. This form of learning is different from deep learning, which typically learns its encoder
during a separate training phase. With HDC, the encoder stays fixed and only the prototypes change.
A prototype accumulates what its examples share while smoothing away their individual differences. It can begin with one or a handful of samples, grow one update at a time, and remain immediately usable between updates. We don't need to retrain on the full dataset whenever a new example arrives.
Contact
We're actively helping teams push the boundaries of what's possible, aligning real-world use cases with where these techniques best fit. The applications of HDC are broad and varied, from associative search to memory and efficient online learning systems.
We usually reply within two business days.