Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Composites

Composites combine multiple hypervectors into higher-level conceptual structures. Each composite type uses a different combination strategy, preserving different semantics between its members.

All composites follow the same contract (interface in Go and traits in Rust) and can be hierarchically nested: for example, a Set can contain Sparkles, Knots, or even other Sets.

Sparkle ✨: the primitive

Before any composite, there is the Sparkle ✨ — the atomic, named hypervector everything below is built upon. A raw SparseSegmented 🍡 is just a bit pattern, and a Sparkle ✨ is that pattern with an identity:

where (the Domain) is a semantic namespace — “animals”, “role”, “country” — and (the Pod) names the individual within it: a word, a numeric seed, a prewired constant.

The (Domain, Pod) seed deterministically expands into the vector, so the same triple (model, domain, pod) yields the same Sparkle ✨ in every run and every engine — Go, Rust, and Python are bit-identical.

For this reason, only domain and pod are needed, instead of the raw per-segment offsets, which is a significant saving both on-wire and on-storage.

Two properties that carry the most weight:

  • Distinct Sparkles ✨ are always quasi-orthogonal, without any central orchestration. They can be safely used as bricks for high-level construction;
  • The markers and keys in the formulas below — , , — are themselves Sparkles. The whole composite algebra bootstraps from this one primitive type.

Use when: you need a stable, deterministic identity for an atomic concept — a word, a role, an entity — as a leaf for the composites below.

Check out code snippets from the API reference.

Set 🫧

An unordered collection of concepts.

where is a special marker to distinguish the set itself from its individual members.

Use when: you need to represent “these things together” without order.

Check out code snippets from the API reference.

Sequence 📿

An ordered collection.

where is a generic hypervector for positional encoding.

is a special marker to distinguish a sequence from its individual members.

Use when: order matters (e.g., words in a sentence, events in time).

Check out code snippets from the API reference.

Octopus 🐙

A key-value structure. Each key (a string) is converted to a Sparkle ✨ and bound with its corresponding value before bundling.

Use when: you need to represent structured records with named attributes.

Check out code snippets from the API reference.

Knot 🪢

The result of binding (multiplicative composition) of hypervectors.

Unlike direct bind operator, Knot 🪢 keeps tracking of its members for serialization and introspection.

Use when: you need a reversible association between concepts.

Check out code snippets from the API reference.

Parcel 🎁

The result of bundling (additive composition) of hypervectors.

Unlike direct bundle operator, Parcel 🎁 keeps tracking of its members for serialization and introspection.

Use when: you need a superposition of concepts, with optional weights.

Check out code snippets from the API reference.

Dart 🎯

A one-directional reference between two hypervectors.

A Dart 🎯 is “thrown” from a tail T to a head H — the direction is semantic (from → to), while algebraically the link is recoverable from either end. Dart 🎯 is the structured wrapper for the release.

Given the Dart 🎯 of :

Use when: you need a directed link — edges, mappings, “from→to” relations — where either endpoint can still be recovered given the other.

Check out code snippets from the API reference.

Summary

TypeCompositionOrder?Use Case
SparklePrimitive — seed expansion, no membersNamed atomic identities
SetBundle + markerNoUnordered groups
SequencePositional-bind + bundle + markerYesOrdered lists
OctopusKey-bind + bundleNoKey-value records
KnotBind (multiply)NoAssociations
ParcelBundle (add)NoSuperpositions, weighted or unweighted
DartReleaseDirectionalOne-directional references
Last change: , commit: 91fc7c1