Vector Symbolic Architectures for compositional, high-dimensional computing.

HoloVec is a Python library for hyperdimensional computing (HDC) and Vector Symbolic Architectures (VSA). It represents data as high-dimensional vectors (~1,000-10,000 dimensions) that can be composed using algebraic operations.

Why HoloVec?

  • One-shot learning — No gradient descent, encode patterns directly
  • Noise-tolerant — Graceful degradation under corruption
  • Transparent — Symbolic reasoning without black-box models
  • Compositional — Build complex structures from simple operations

What Can You Do?

from holovec import VSA

# Create a model
model = VSA.create('FHRR', dim=2048)

# Generate and combine hypervectors
a, b = model.random(), model.random()
c = model.bind(a, b)          # Association (key-value)
d = model.bundle([a, b, c])   # Superposition (set)
e = model.permute(a, k=1)     # Sequence encoding

# Query and recover
a_recovered = model.unbind(c, b)
print(model.similarity(a, a_recovered))  # 1.0

Use Cases

  • Semantic memory — Store and query knowledge structures
  • Classification — One-shot text, image, gesture recognition
  • Symbolic AI — Role-filler binding, analogical reasoning
  • Sensor fusion — Combine multimodal data streams
  • Edge deployment — Hardware-friendly binary representations

Models at a Glance

Model Binding Inverse Best For
FHRR Complex multiply Exact General use, best capacity
GHRR Matrix product Exact Non-commutative relations
MAP Element multiply Self Hardware, neuromorphic
HRR Circular convolution Approx Classic baseline
VTB Matrix transform Approx Directional binding
BSC XOR Self Binary, FPGA
BSDC Sparse XOR Approx Memory efficient
BSDC-SEG Segment XOR Self Fast sparse search