hdlib 2.0.0
Hyperdimensional Computing Library for building Vector Symbolic Architectures in Python
License: MIT
Requires Python: >=3

# hdlib

Hyperdimensional Computing Library for building Vector-Symbolic Architectures in Python 3.

![Conda](https://img.shields.io/conda/dn/conda-forge/hdlib?label=hdlib%20on%20Conda)
[![DOI](https://joss.theoj.org/papers/10.21105/joss.05704/status.svg)](https://doi.org/10.21105/joss.05704)
[![DOI](https://zenodo.org/badge/485488487.svg)](https://doi.org/10.5281/zenodo.7996502)

Vector-Symbolic Architectures (VSA, a.k.a. Hyperdimensional Computing) is an emergent computing paradigm that works by combining vectors in a high-dimensional space for representing and processing information. This approach recently shown promise in various domains for dealing with different kind of computational problems, including artificial intelligence, cognitive science, robotics, natural language processing, bioinformatics, medical informatics, cheminformatics, and internet of things among other scientific disciplines.

Here we present _hdlib_, a Python library for designing Vector-Symbolic Architectures. It is distributed under the MIT license as a Python package through PyPI and Conda on the _conda-forge_ channel.

GitHub releases are also available on Zenodo at [https://doi.org/10.5281/zenodo.7996502](https://doi.org/10.5281/zenodo.7996502).

Please refer to the official [Wiki](https://github.com/cumbof/hdlib/wiki) for any information about the implemented modules and how to use the library.

Here is the table of content:

- [Getting started](https://github.com/cumbof/hdlib/wiki/Getting-started)
  - [Installing `hdlib`](https://github.com/cumbof/hdlib/wiki/Getting-started#installing-hdlib)
  - [Dependencies](https://github.com/cumbof/hdlib/wiki/Getting-started#dependencies)
- [Vector-Symbolic Architectures](https://github.com/cumbof/hdlib/wiki/Vector-Symbolic-Architectures)
  - [Hyperdimensional Vectors and Space](https://github.com/cumbof/hdlib/wiki/Vector-Symbolic-Architectures#hyperdimensional-vectors-and-space)
  - [Arithmetic operations](https://github.com/cumbof/hdlib/wiki/Vector-Symbolic-Architectures#arithmetic-operations)
- [Examples](https://github.com/cumbof/hdlib/wiki/Examples)
  - [What is the Dollar of Mexico?](https://github.com/cumbof/hdlib/wiki/Examples#what-is-the-dollar-of-mexico)
  - [Classification Model](https://github.com/cumbof/hdlib/wiki/Examples#classification-model)
  - [Stepwise Feature Selection](https://github.com/cumbof/hdlib/wiki/Examples#stepwise-feature-selection)
  - [Graph Encoding](https://github.com/cumbof/hdlib/wiki/Examples#graph-encoding)
  - [Regression Model](https://github.com/cumbof/hdlib/wiki/Examples#regression-model)
  - [Clustering](https://github.com/cumbof/hdlib/wiki/Examples#clustering)
- [Support and contributions](https://github.com/cumbof/hdlib/wiki/Support-and-contributions)

## Credits

Please credit our work in your manuscript by citing:

```bibtex
@article{cumbo2023hdlib,
  title   = {hdlib: A python library for designing Vector-Symbolic Architectures},
  author  = {Cumbo, Fabio and Weitschek, Emanuel and Blankenberg, Daniel},
  journal = {Journal of Open Source Software},
  volume  = {8},
  number  = {89},
  pages   = {5704},
  year    = {2023},
  doi     = {10.21105/joss.05704}
}
```

## Other publications

`hdlib` has been cited in the following selected publications. If you have used our library in your research, we would love to hear from you!

> Cumbo et al., (2020). A brain-inspired hyperdimensional computing approach for classifying massive DNA methylation data of cancer. _Algorithms_, 13(9), 233. https://doi.org/10.3390/a13090233
> 
> Cumbo et al., (2025). Feature selection with vector-symbolic architectures: a case study on microbial profiles of shotgun metagenomic samples of colorectal cancer. _Briefings in Bioinformatics_, 26(2), bbaf177. https://doi.org/10.1093/bib/bbaf177
>
> Joshi et al., (2025). Large-scale classification of metagenomic samples: a comparative analysis of classical machine learning techniques vs a novel brain-inspired hyperdimensional computing approach. _bioRxiv_, 2025-07. https://doi.org/10.1101/2025.07.06.663394
>
> Cumbo et al., (2025). Hyperdimensional computing in biomedical sciences: a brief review. _PeerJ Computer Science_, 11, e2885. https://doi.org/10.7717/peerj-cs.2885
>
> Cumbo et al., (2025). A novel Vector-Symbolic Architecture for graph encoding and its application to viral pangenome-based species classification. _bioRxiv_, 2025-09. https://doi.org/10.1101/2025.09.08.674958

## Support and contributions

Long-term discussion and bug reports are maintained via [GitHub Issues](https://github.com/cumbof/hdlib/issues), while code review is managed via [GitHub Pull Requests](https://github.com/cumbof/hdlib/pulls).

Please, (i) be sure that there are no existing issues/PR concerning the same bug or improvement before opening a new issue/PR; (ii) write a clear and concise description of what the bug/PR is about; (iii) specifying the list of steps to reproduce the behavior in addition to versions and other technical details is highly recommended.

For additional information about how to contribute, please visit the [CONTRIBUTING](https://github.com/cumbof/hdlib/blob/main/CONTRIBUTING.md) section.

Copyright © 2025 [Fabio Cumbo](https://github.com/cumbof). See [LICENSE](https://github.com/cumbof/hdlib/blob/main/LICENSE) for additional details.