holos_core 0.1.0

Fast, dependency-free Hyperdimensional Computing (HDC / VSA) engine
Documentation
  • Coverage
  • 100%
    21 out of 21 items documented1 out of 8 items with examples
  • Size
  • Source code size: 311.1 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 961.18 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 4s Average build duration of successful builds.
  • all releases: 4s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • golirt1/holos
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • golirt1

HOLOS — a fast, dependency-free Hyperdimensional Computing (HDC / VSA) engine.

HDC represents information as very high-dimensional vectors (~10,000-D) and computes with three cheap algebraic operations plus an associative memory:

  • bind (): associate two hypervectors (XOR) — invertible, result orthogonal to both.
  • bundle (): superpose several (majority) — result similar to all of them.
  • permute (ρ): rotate — encode order / sequences.
  • cleanup: nearest-neighbor search over an [ItemMemory] to decode a noisy result.

The flagship [Hypervector] uses the BSC (Binary Spatter Code) model, bit-packed into u64 words so operations become XOR + hardware popcount — very fast and cache-friendly. A bipolar [map::MapVector] model is also provided for tasks that favor linear bundling.

use holos_core::{Hypervector, Rng};
let mut rng = Rng::new(42);
let d = 10_000;
let role = Hypervector::random(d, &mut rng);
let value = Hypervector::random(d, &mut rng);
let bound = role.bind(&value);                 // associate role↔value
assert!(bound.bind(&role).similarity(&value) > 0.99); // unbind recovers value