Stochastic & Neuromorphic Computing  /  Learn  /  Hyperdimensional computing

Hyperdimensional computing
symbols as 10,000-bit vectors

Represent every concept — a name, a role, a value — as one enormous random binary vector, say 10,000 bits wide. In that space two random vectors are almost always near-orthogonal, so a handful of simple bitwise operations — bind, bundle, permute — become a full symbolic algebra that is robust to noise and maps onto trivial hardware. This is hyperdimensional computing (Kanerva), also called a vector symbolic architecture.

The core idea — meaning distributed across thousands of bits

Assign each atomic symbol a fresh random hypervector. The counter-intuitive fact that makes everything work is the concentration of measure: in a space of thousands of dimensions, two independently drawn vectors agree on almost exactly half their bits — a normalised Hamming similarity near $0.5$ — and the chance of a large accidental overlap is astronomically small. So "unrelated" is the default, and any measured similarity above chance is meaningful. Meaning is holographic: it is spread evenly across all the bits, so damaging or dropping many of them barely moves the vector.

$$\text{sim}(A,B)=\frac{1}{D}\sum_{i=1}^{D}\mathbf{1}[A_i=B_i], \qquad \text{random } A,B:\; \text{sim}\approx 0.5,\;\; \sigma \approx \tfrac{1}{2\sqrt{D}}$$
Live — near-orthogonality and bundle capacity
member sim  non-member sim

Each green bar is a bundled symbol's similarity to the bundle; the purple bar is an unrelated symbol. As you bundle more items the members stay clearly above the $0.5$ noise floor — until capacity runs out and they sink into it. Shrink the dimension and that happens sooner.

01  Binding — associate two symbols

To say "this role has this filler" — capital = Paris — you bind the two hypervectors with a bitwise XOR. The result is a new vector that is near-orthogonal to both inputs, so a binding is unmistakably different from its parts. XOR is its own inverse, so binding again with the same key unbinds — that is how you later ask "what was the capital?".

$$A \otimes B = A \oplus B \pmod 2, \qquad (A\otimes B)\otimes B = A \quad\text{(self-inverse)}$$
Deeper: binding preserves distances and distributes
XOR binding is a permutation of the space: it preserves Hamming distances, so structure is carried through untouched, and it distributes over bundling — $K\otimes(A\oplus B)=(K\otimes A)\oplus(K\otimes B)$ — which is what lets you bind a key into a whole record and later pull one field back out. Because the bound vector is dissimilar to its operands, a store of key–value pairs does not accidentally match on the raw keys. The catch is that unbinding a bundled record returns a noisy version of the filler, which is why the last step is always a clean-up (pillar 04).
02  Bundling — superpose many into one

To hold a set — a whole record, or a collection of features — you bundle the hypervectors by majority vote per bit. The bundle stays similar to every ingredient, so you can test membership by similarity. Unlike binding, bundling deliberately keeps the parts recognisable.

$$A \oplus_{\text{maj}} B \oplus_{\text{maj}} \cdots \;=\; \text{majority}\Big(\textstyle\sum_k V_k\Big), \qquad \text{sim}(\text{bundle}, V_k) > 0.5$$
Deeper: capacity and graceful degradation
A bundle of $K$ vectors keeps each member above the noise floor until $K$ approaches a fraction of $\sqrt{D}$; past that the majority is dominated by the crowd and members sink toward chance. This is the demo above. The failure is graceful — accuracy degrades smoothly rather than collapsing — and it is symmetric with dimension: more bits buy more capacity. Weighting the sum before the majority lets you build class prototypes (bundle many examples of a label), which is exactly how the HDC classifier forms its centroids and then labels a query by nearest match.
03  Permutation — encode order and sequences

Bundling is a set — it forgets order. To encode a sequence, permute each element by a fixed amount for its position (a cyclic shift) before bundling. The shift is invertible and near-orthogonalising, so "A then B" becomes distinguishable from "B then A".

$$\rho(V)=\text{roll}(V,1), \qquad \text{seq}(v_1,\dots,v_n)=\bigoplus_{t=1}^{n}\rho^{\,t}(v_t)$$
Deeper: positions, n-grams and level vectors
Repeated permutation $\rho^t$ gives each position its own reversible tag, so trigrams and longer $n$-grams encode cleanly — the basis of HDC language and signal models. Continuous quantities use level vectors: a family in which Hamming distance grows with the value gap, so nearby magnitudes stay similar and distant ones approach orthogonality, letting real-valued features live in the same algebra as discrete symbols.
04  Clean-up — an associative memory

Unbinding a field from a bundled record returns a noisy hypervector, not the exact original. The final step is clean-up: compare that noisy vector against an item memory of the known atomic symbols and snap it to the nearest one. Because unrelated symbols sit near $0.5$ and the true match sits well above it, the nearest neighbour is unambiguous.

$$\hat v = \arg\max_{v \in \text{memory}} \text{sim}(v_{\text{noisy}}, v)$$
Deeper: the query, worked
To ask "what is the capital of France?" you take the record $R$ that bundled $(\text{country}\otimes\text{France})\oplus(\text{capital}\otimes\text{Paris})\oplus\cdots$, unbind the capital role, $R\otimes\text{capital}$, and clean up the result — it returns Paris with a similarity comfortably above the surrounding symbols. SC-NeuroCore's associative memory does exactly this; the HDC symbolic-query notebook on this site runs the France→Paris example end to end and reports the winning similarity.
05  Why very high dimension works

Everything above rests on one property of large spaces: near-orthogonality. Random vectors are overwhelmingly likely to be dissimilar, the similarity of unrelated items concentrates tightly around $0.5$ with spread $\propto 1/\sqrt{D}$, and information is spread holographically so no single bit is load-bearing. That is what makes HDC robust to noise and hardware faults — and cheap, because the operations are XOR, majority and popcount.

$$\Pr\!\big[\,|\text{sim}-0.5| > \epsilon\,\big] \le 2e^{-2D\epsilon^2} \quad\text{(random pair)}$$
Deeper: robustness, and why it suits neuromorphic hardware
The exponential concentration means that at $D=10{,}000$ an accidental overlap large enough to be mistaken for a real match essentially never happens, and flipping a substantial fraction of the bits still leaves the vector nearer its original than to anything else — the same fault tolerance that motivates stochastic computing. The primitives are ideal for the fabrics this site is about: XOR and majority are single-gate operations, similarity is a popcount, and the wide, flat, bitwise structure parallelises perfectly on an FPGA. HDC and spiking networks compose, too — hypervectors make a natural symbolic layer on top of a spiking substrate.
From hypervectors to hardware

Bind is XOR, bundle is a majority (a popcount and a compare), clean-up is a nearest-Hamming search — every operation is bitwise and embarrassingly parallel. That is why a vector symbolic architecture is one of the cheapest ways to put symbolic reasoning on an FPGA, and why it sits naturally alongside the stochastic and spiking primitives elsewhere in this section.

Reference — operations at a glance
OperationBitwise formResult is…Used for
Bind $\otimes$XORdissimilar to both inputsrole–filler association
Bundle $\oplus$majoritysimilar to every inputsets, records, prototypes
Permute $\rho$cyclic shiftdissimilar, invertibleorder, sequences, $n$-grams
Similaritypopcount of XNORscalar in $[0,1]$matching, clean-up

Further reading. Kanerva, P. (2009) Hyperdimensional computing: an introduction to computing in distributed representation with high-dimensional random vectors, Cognitive Computation. Plate, T. (2003) Holographic Reduced Representations. Rahimi, A. et al. (2016) A robust and energy-efficient classifier using brain-inspired hyperdimensional computing. For the terminology, see the SC-NeuroCore glossary.

The demo runs a real binary hypervector algebra in your browser at the chosen dimension; the on-device implementation uses the same operations at $D=10{,}000$ with a seeded item memory.