binaryhypervectors.jl
Tools for hyperdimensional computing with binary vectors
Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.5%) to scientific vocabulary
Repository
Tools for hyperdimensional computing with binary vectors
Basic Info
- Host: GitHub
- Owner: smith-garrett
- License: mit
- Language: Julia
- Default Branch: main
- Size: 266 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
- Releases: 3
Metadata Files
README.md
BinaryHypervectors
This is a small Julia package for working with binary hypervectors in the context of hyperdimensional computing. Hyperdimensional computing is an approach to cognitive (neuro-) science and machine learning that uses very large vectors of random numbers to encode and retrieve information.
BinaryHypervectors is specialized for hyperdimensional computing with binary vectors. Binding (associating) vectors is done using bitwise XOR, bundling (combining) vectors is done using majority rule, and permuting is done using circshift. The implementation strives for efficiency and ease of use.
The package defines a simple type BinaryHypervector and the associated algebra: * or bind() for binding, + or bundle() for bundling, and circshift() for simple permutations. There is also a sequence_encoding function for creating correlated hypervectors.
For example, say we want to encode a sequence "A B" into a single hypervector. We first create hypervectors for A and B:
julia
julia> using BinaryHypervectors
julia> A = BinaryHypervector() # Default size is 2^13
julia> B = BinaryHypervector()
We then create a sequence encoding, which is a list of two correlated hypervectors:
julia
julia> seq = sequence_encoding(2)
Then, we bind A and B to the first and second sequence vectors, which marks them as being in the relevant positions in the sequence:
julia
julia> A1 = A * seq[1]
julia> B2 = B * seq[2]
And finally, we bundle the two sequence-encoded vectors to form a hyperdimensional representation of the sequece:
julia
julia> A1B2 = A1 + B2
We can retrieve, e.g., the second item in the sequence by multiplying by seq[2], and then
taking the vector, A or B, that most closely matches A1B2 * seq[2]:
julia
julia> extract = A1B2 * seq[2]
julia> map(x -> hammingsimilarity(extract, x), [A, B])
See, e.g., Kanerva (2009, Cognitive Computation 1, pp 139--159) for more detailed background.
Owner
- Name: Garrett Smith
- Login: smith-garrett
- Kind: user
- Website: garrettsmithresearch.wordpress.com
- Repositories: 3
- Profile: https://github.com/smith-garrett
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "Smith" given-names: "Garrett" orcid: "https://orcid.org/0000-0001-7238-3942" title: "BinaryHypervectors.jl" version: 0.1.1 doi: 10.5281/zenodo.8192200 date-released: 2023-07-28 url: "https://github.com/smith-garrett/BinaryHypervectors.jl"
GitHub Events
Total
- Push event: 4
Last Year
- Push event: 4
Dependencies
- actions/checkout v3 composite
- codecov/codecov-action v3 composite
- julia-actions/cache v1 composite
- julia-actions/julia-buildpkg v1 composite
- julia-actions/julia-docdeploy v1 composite
- julia-actions/julia-processcoverage v1 composite
- julia-actions/julia-runtest v1 composite
- julia-actions/setup-julia v1 composite
- JuliaRegistries/TagBot v1 composite