MicroHD: An Accuracy-Driven Optimization of Hyperdimensional Computing Algorithms for TinyML systems

Flavio Ponzina, Tajana RosingarXiv 2024 · DOI

Introduction

Hyperdimensional Computing (HDC) is an emerging "brain-inspired" AI paradigm particularly suited for TinyML. By replacing complex neural network operations with simple element-wise mathematics in high-dimensional spaces (often exceeding 10,000 dimensions), HDC offers a computationally efficient alternative for edge devices. However, standard HDC models are frequently oversized for simple tasks, leading to unnecessary memory and energy consumption. Furthermore, existing optimization techniques like binarization or dimensionality reduction are often applied empirically without a systematic approach to balance efficiency and accuracy.

MicroHD addresses these challenges by introducing a novel optimization framework that automatically compresses HDC models. It treats model compression as a search problem constrained by a user-defined Quality of Service (QoS) threshold, achieving up to 266× memory reduction while strictly adhering to accuracy constraints.

Methodology

The core of MicroHD is an iterative, accuracy-driven optimization loop that moves beyond manual "guess-and-check" methods. The framework co-optimizes three critical hyper-parameters: vector dimensionality ($d$), the number of level hypervectors ($l$), and the quantization bitwidth ($q$).

The MicroHD accuracy-driven optimization loop for HDC models.

To navigate the vast search space efficiently, MicroHD employs a greedy selection strategy combined with binary search. The greedy selector identifies the parameter change offering the greatest efficiency gain, while binary search finds the optimal value for that parameter in log-linear time ($O(H \log V)$). Following each optimization step, the model undergoes a brief retraining phase to recover accuracy. If the resulting model meets the predefined accuracy threshold (e.g., less than 1% loss), the optimization is accepted; otherwise, it is discarded. This approach is encoding-agnostic and has been validated on both ID-level encoding and non-linear projection schemes.

Experimental Setup

The MicroHD framework was evaluated across six diverse benchmarks representing typical TinyML workloads:

  • ISOLET: Speech and voice recognition.
  • UCIHAR & PAMAP: Human activity recognition from wearable sensor data.
  • MNIST & FMNIST: Image classification for handwritten digits and fashion items.
  • Connect-4: Game state classification.

Results and Discussion

Experimental results demonstrate that HDC models contain significant redundancy. MicroHD achieved massive compression ratios, reaching up to 235× memory reduction for ID-level encoding and 267× for non-linear projection. The framework also proved highly efficient, finding optimized models for all benchmarks in less than a day on a single GPU.

Performance gains achieved by MicroHD across various hardware platforms.

The hardware-specific benefits are particularly noteworthy for edge-class devices. On an ARM Cortex-M4 microcontroller, optimized models ran up to 38.4× faster than the baseline (at a 5% accuracy threshold). This is because standard microcontrollers cannot natively parallelize the 10k-dimensional vectors used in baseline HDC. Compared to state-of-the-art methods like OnlineHD or QuantHD, MicroHD provided 3.9× better memory efficiency on average for equivalent accuracy levels. Additionally, in Federated Learning contexts, the framework reduced edge-to-cloud data exchange by 3.3×.

Conclusion

MicroHD provides a robust, automated tool for deploying HDC on resource-constrained TinyML systems. While the current iteration requires offline retraining and focuses on static datasets, it sets a new standard for accuracy-constrained model compression. Future research will explore specialized encodings for complex time-series and graph data, as well as dynamic optimization for continual learning environments where data distributions evolve over time.

Summary updated

BibTeX
@misc{ponzina2024microhd,
  author = {Flavio Ponzina and Tajana Rosing},
  title = {{MicroHD: An Accuracy-Driven Optimization of Hyperdimensional Computing Algorithms for TinyML systems}},
  year = {2024},
  eprint = {2404.00039},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.00039},
}
Figure