Skip to main content
QUICK REVIEW

[Paper Review] Torchhd: An Open Source Python Library to Support Research on Hyperdimensional Computing and Vector Symbolic Architectures

Mike Heddes, Igor Nunes|arXiv (Cornell University)|May 18, 2022
Ferroelectric and Negative Capacitance DevicesEngineering15 citations
TL;DR

Torchhd is an open-source Python library built on PyTorch that accelerates research in hyperdimensional computing (HD) and vector symbolic architectures (VSA), offering high-performance, GPU-accelerated implementations of six major HD/VSA models. It enables up to 100× faster execution than existing public codebases while supporting automatic differentiation, modular design, and benchmark datasets, significantly lowering the barrier to entry for both novice and expert researchers.

ABSTRACT

Hyperdimensional computing (HD), also known as vector symbolic architectures (VSA), is a framework for computing with distributed representations by exploiting properties of random high-dimensional vector spaces. The commitment of the scientific community to aggregate and disseminate research in this particularly multidisciplinary area has been fundamental for its advancement. Joining these efforts, we present Torchhd, a high-performance open source Python library for HD/VSA. Torchhd seeks to make HD/VSA more accessible and serves as an efficient foundation for further research and application development. The easy-to-use library builds on top of PyTorch and features state-of-the-art HD/VSA functionality, clear documentation, and implementation examples from well-known publications. Comparing publicly available code with their corresponding Torchhd implementation shows that experiments can run up to 100x faster. Torchhd is available at: https://github.com/hyperdimensional-computing/torchhd.

Motivation & Objective

  • To address the lack of a unified, high-performance, and accessible open-source software stack for hyperdimensional computing (HD) and vector symbolic architectures (VSA).
  • To lower the barrier to entry for researchers new to HD/VSA by providing an intuitive, Python-idiomatic interface with clear documentation and examples.
  • To accelerate research and application development by offering GPU-accelerated, state-of-the-art implementations of core HD/VSA models.
  • To support both conceptual exploration and performance-critical evaluation of novel HD/VSA algorithms through modular, extensible abstractions.

Proposed method

  • Torchhd is built on PyTorch to leverage its tensor computation, automatic differentiation, and hardware acceleration capabilities.
  • It implements six major HD/VSA models: binary spatter codes (BSC), multiply-add-permute (MAP), holographic reduced representations (HRR), Fourier HRR (FHRR), sparse block codes (SBC), and vector-derived transformation binding (VTB).
  • The library provides a modular, composable API that allows users to mix and match components based on their research needs.
  • It supports automatic differentiation, enabling end-to-end training of hybrid neuro-symbolic models.
  • Torchhd includes interfaces to 129 benchmark datasets commonly used in HD/VSA research for reproducible evaluation.
  • The design emphasizes Pythonic idioms and developer experience while ensuring high performance through optimized tensor operations.

Experimental results

Research questions

  • RQ1How can a high-performance, accessible, and modular open-source library accelerate research in hyperdimensional computing and vector symbolic architectures?
  • RQ2To what extent can Torchhd improve the execution speed of HD/VSA experiments compared to existing public implementations?
  • RQ3Can Torchhd effectively support both application-driven research and theoretical exploration of HD/VSA primitives through a unified, extensible API?
  • RQ4How well does Torchhd integrate with the broader machine learning ecosystem, particularly PyTorch, to enable hybrid neuro-symbolic modeling?
  • RQ5What impact does a standardized, well-documented, and performant library have on the adoption and advancement of HD/VSA across multidisciplinary research communities?

Key findings

  • Experiments using Torchhd achieve up to 100× speedup compared to publicly available implementations of the same HD/VSA algorithms.
  • The library successfully integrates with PyTorch’s autodiff system, enabling end-to-end differentiable training of hybrid neuro-symbolic models.
  • Torchhd supports 129 benchmark datasets commonly used in HD/VSA research, facilitating standardized evaluation and reproducibility.
  • The modular, Python-idiomatic design enables researchers to easily adopt and extend components without sacrificing performance or expressiveness.
  • By building on PyTorch, Torchhd enables seamless hardware acceleration and integration with existing deep learning workflows.
  • The library’s clear documentation and example implementations significantly reduce the learning curve for new users entering the HD/VSA field.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.