Hyperdimensional computing with holographic and adaptive encoder

Alejandro Hernández-Cano, Yang Ni, Zhuowen Zou, Ali Zakeri, Mohsen Imani

Abstract

Hyperdimensional Computing (HDC) is a brain-inspired paradigm that represents data using massive, high-dimensional vectors. While HDC is prized for its efficiency and noise tolerance, its performance is often limited by the use of static, manually-tuned encoders. This paper introduces FLASH (Fast, Learnable, Adaptive, and Stays Holographic), a framework that brings learnability to the HDC encoding process. By optimizing the distribution of the encoding matrix via gradient descent, FLASH adapts to specific datasets while maintaining the "holographic" properties that ensure robustness. Our evaluation shows that FLASH significantly outperforms traditional kernel-based methods and prior HDC benchmarks in both accuracy and inference speed.

Introduction

Hyperdimensional Computing (HDC) maps low-dimensional input data into a high-dimensional hyperspace (typically thousands of dimensions). This mapping is traditionally performed by a fixed, random encoder, often based on Random Fourier Features (RFF). While these encoders provide a mathematically robust foundation, they are not optimized for specific tasks, creating a performance bottleneck. Simply training the encoder matrix using standard backpropagation often destroys the "holographic" nature of the hypervectors—where information is distributed evenly—leading to a loss of the very robustness that makes HDC attractive.

The FLASH Framework

FLASH addresses this bottleneck by introducing an adaptive encoder that is both learnable and holographic. Instead of learning the encoding matrix $\Omega$ directly, FLASH learns a distribution from which $\Omega$ is sampled.

The FLASH framework architecture, illustrating the learnable distribution generator and the two-stage training process.

The architecture utilizes a small, differentiable neural network (the "generator") that takes Gaussian noise as input and outputs the weights for the encoding matrix. This method leverages Bochner’s Theorem, which links random features to kernel functions. By training the generator, FLASH effectively "searches" for the optimal shift-invariant kernel for a specific dataset without requiring an explicit definition of the kernel function.

Training occurs in two stages:

  1. Encoder Learning: The generator is trained to minimize expected regression loss in a lower-dimensional space to reduce computational overhead.
  2. Model Learning: Once optimized, the generator produces a fixed encoding matrix for standard HDC ridge regression in the full high-dimensional space.

Experimental Evaluation

The authors evaluated FLASH on five diverse regression datasets (kin8nm, MiamiHousing2016, pol, Houses, and Superconduct) and synthetic 1D regression tasks. The synthetic tasks were particularly useful for visualizing how the encoder's learned probability distribution and kernel shape adapt to different mathematical functions, such as linear, quadratic, and periodic functions.

Visualizing the adaptation of the encoder's probability distribution $p_\theta(\omega)$ and the resulting kernel $k(\delta)$ across various synthetic regression tasks.

Key Results and Insights

The "aha moment" of FLASH is that tuning the distribution of random features is functionally equivalent to automated kernel engineering. As shown in the synthetic tests, for a periodic function like $10\sin x$, FLASH automatically learns a distribution that reflects that periodicity.

Key performance metrics include:

  • Inference Speed: FLASH achieved an average of 5.5x faster inference than RFF-based ridge regression and 13.75x faster inference than Support Vector Regression (SVR).
  • Accuracy: The "Accurate FLASH" (A-FLASH) variant consistently outperformed RegHD, the previous state-of-the-art HDC regression algorithm, across all tested datasets.
  • Scalability: Unlike many kernel methods, FLASH’s inference complexity remains constant relative to the dataset size, making it ideal for large-scale applications.

Conclusion

FLASH bridges the gap between the flexibility of neural networks and the efficiency of HDC. By decoupling the complexity of encoder training from the high-dimensional deployment, it allows for task-specific adaptation without sacrificing the structural benefits of holographic representations. Future work will explore applying this adaptive encoding to classification, reinforcement learning, and graph-based reasoning.

Summary updated

BibTeX
@article{hernandezcano2024hyperdimensional,
  author = {Alejandro Hernández-Cano and Yang Ni and Zhuowen Zou and Ali Zakeri and Mohsen Imani},
  title = {{Hyperdimensional computing with holographic and adaptive encoder}},
  journal = {Frontiers Artif. Intell.},
  year = {2024},
  doi = {10.3389/frai.2024.1371988},
}
Figure