Search arXiv⌕ Search

arXiv · 2403.03278

Linear Codes for Hyperdimensional Computing

Abstract

Hyperdimensional Computing (HDC) is an emerging computational paradigm for representing compositional information as high-dimensional vectors, and has a promising potential in applications ranging from machine learning to neuromorphic computing. One of the long-standing challenges in HDC is factoring a compositional representation to its constituent factors, also known as the recovery problem. In this paper we take a novel approach to solve the recovery problem, and propose the use of random linear codes. These codes are subspaces over the Boolean field, and are a well-studied topic in information theory with various applications in digital communication. We begin by showing that hyperdimensional encoding using random linear codes retains favorable properties of the prevalent (ordinary) random codes, and hence HD representations using the two methods have comparable information storage capabilities. We proceed to show that random linear codes offer a rich subcode structure that can be used to form key-value stores, which encapsulate most use cases of HDC. Most importantly, we show that under the framework we develop, random linear codes admit simple recovery algorithms to factor (either bundled or bound) compositional representations. The former relies on constructing certain linear equation systems over the Boolean field, the solution to which reduces the search space dramatically and strictly outperforms exhaustive search in many cases. The latter employs the subspace structure of these codes to achieve provably correct factorization. Both methods are strictly faster than the state-of-the-art resonator networks, often by an order of magnitude. We implemented our techniques in Python using a benchmark software library, and demonstrated promising experimental results.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Netanel Raviv. 2024-03-05. Linear Codes for Hyperdimensional Computing. https://arxiv.org/abs/2403.03278

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Efficient and rate-optimal list-decoding in the presence of minimal feedback

Given a channel with length-$n$ inputs and outputs over the alphabet $\{0,1,\ldots,q-1\}$, and of which a fraction $\varrho \in (0,1-1/q)$ of symbols can be arbitrarily corrupted by an adversary, a fundamental problem is that of communicating at rates close to the information-theoretically optimal values, while ensuring the receiver can infer that the transmitter's message is from a ``small" set. While the existence of such codes is known, and constructions with computationally tractable encoding/decoding procedures are known for large $q$, we provide the first schemes that attain this performance for any $q \geq 2$, as long as low-rate feedback (asymptotically negligible relative to the number of transmissions) from the receiver to the transmitter is available. For any sufficiently small $\varepsilon > 0$ and $\varrho \in (1-{1}/{q}-Θ(\sqrt{\varepsilon}))$ our minimal feedback scheme has the following parameters: Rate $1-H_q(\varrho) - \varepsilon$ (i.e., $\varepsilon$-close to information-theoretically optimal -- here $H_q(\varrho)$ is the $q$-ary entropy function), list-size $\exp\left(\mathcal{O}\left(\varepsilon^{-3/2}\log^2(1/\varepsilon)\right)\right)$, computational complexity of encoding/decoding $n^{\mathcal{O}(\varepsilon^{-1}\log(1/\varepsilon))}$, storage complexity $\mathcal{O}(n^{η+1}\log n)$ for a code design parameter $η>1$ that trades off storage complexity with the probability of error. The error probability is $\mathcal{O}(n^{-η})$, and the (vanishing) feedback rate is $\mathcal{O}({1}/{\sqrt{\log(n)}})$. Our full-feedback scheme has zero probability of error and minimal storage complexity, while the other parameters are the same as the vanishing rate feedback scheme.

cs.IT↗

On Cost-Aware Designs for Sequential Hypothesis Testing

We introduce Cost-Aware (CA) Sequential Hypothesis Testing (CASHT), in which an active decision-maker selects sensing actions with different, random costs to identify the true hypothesis under an average-error constraint $δ$, while minimizing the expected total cost (rather than the number of samples). For fixed costs, we prove that the optimal expected total cost scales as $Θ(\log(1/δ))$, and is achievable by Multihypothesis Sequential Probability Ratio Test-based procedures. We show that the CA design principle is to maximize the ratio of expected information gain to expected cost under the policy-induced action distribution. Guided by this principle, we adapt two classic policies to the CA setting and establish their asymptotic optimality. We then treat random costs under two revelation models: ex-post, where costs are disclosed only after a sample is obtained, and the cost-error tradeoff coincides with the fixed-cost case, and ex-ante, where costs accrue before acquisition, and the decision maker may cancel an action mid-operation. For the ex-ante model, we characterize when cancellation lowers the total cost and analyze several cost distributions in detail. Simulations confirm our findings that the CA variants consistently reduce total cost relative to their classic counterparts, and when action cancellation helps or hurts.

cs.IT↗

All you need is log

How different are several probability distributions from one another? For two distributions the standard answer is the family of Rényi divergences, singled out by two natural requirements: processing the data never makes distributions easier to tell apart, and independent repetitions add. Many problems in learning and statistics compare more than two distributions at once, such as testing among several hypotheses or bounding generalization against several priors. The same two requirements leave one kind of building block, built on a coincidence probability: how unlikely it is that independent samples, one from each distribution, all show the same empirical distribution. The logarithm is forced because repetitions add, which is already visible for a single experiment repeated. This characterization is known in greater generality, and this paper is about the meaning of its building blocks. On a finite alphabet, each building block indexed by a rational point of the simplex is the exponential rate of that coincidence as the samples grow in fixed proportions. Each is also the limiting free energy of Bayesian inference over distributions. At any amount of data, the free energy of the posterior is the coincidence measure plus two costs: the expected distance from a posterior draw to the most likely distribution, and the information gained per unit of data. Both costs vanish as data accumulate. When the comparison is conditioned on side information, every kind of building block has a conditional counterpart, and the coincidence ones alone do not suffice.

cs.IT↗