Adversarial Attacks on Brain-Inspired Hyperdimensional Computing-Based Classifiers

Fangfang Yang, Shaolei RenarXiv 2020

Abstract

Brain-Inspired Hyperdimensional Computing (HDC) is gaining traction as an energy-efficient alternative to Deep Neural Networks (DNNs) for edge computing. While HDC is robust against random hardware noise, its susceptibility to targeted adversarial attacks has been largely overlooked. This research presents the first systematic investigation into HDC's security, introducing a genetic algorithm-based attack (GA-CGC-PA) that achieves a 78% success rate on MNIST classifiers and can flip predictions by modifying as few as nine pixels. The findings reveal a "robustness paradox" where hardware resilience does not guarantee adversarial security, though simple retraining strategies offer a potent defense.

Introduction

The proliferation of Internet of Things (IoT) devices has created a demand for "on-device" machine learning that circumvents the high computational and energy costs of traditional Deep Neural Networks (DNNs). Hyperdimensional Computing (HDC) has emerged as a frontrunner for these constraints, utilizing high-dimensional "hypervectors" (typically 10,000+ dimensions) and efficient bitwise operations like XOR and additions.

HDC is inherently robust to random bit errors, leading to a common misconception that it is also secure against malicious actors. This paper addresses this gap by demonstrating that HDC classifiers are highly vulnerable to calculated adversarial perturbations.

Methodology: The GA-CGC-PA Attack

The authors propose a "grey-box" attack model. In this scenario, the attacker lacks knowledge of the system's internal hypervectors but can query the model for predicted labels and Hamming distances—a metric representing the difference between hypervectors.

To generate stealthy adversarial examples, the researchers developed GA-CGC-PA, a three-stage modified genetic algorithm:

  1. Genetic Algorithm (GA): Treats image pixels as "genes," evolving a population of perturbed images to find those that trigger misclassification.
  2. Critical Gene Crossover (CGC): Instead of random mutations, CGC uses max-pooling to identify "critical genes"—pixels with the highest influence on classification—and focuses the attack on these regions.
  3. Perturbation Adjustment (PA): Once a successful attack is found, PA fine-tunes pixel values to minimize visible noise, ensuring the change is nearly imperceptible to humans.
Visualization of Position and Value hypervectors used in HDC encoding.

The encoding process, visualized above, involves mapping input features (like pixel position and intensity) into the hyperdimensional space using Position and Value memories. The non-differentiable nature of this mapping prevents the use of standard gradient-based attacks common in DNN research, necessitating the search-based approach of GA-CGC-PA.

Key Results and Insights

The attack was evaluated using the MNIST handwritten digit dataset. The results demonstrate that HDC's distributed representation does not protect it from targeted manipulation.

  • Attack Success Rate (ASR): The GA-CGC-PA algorithm achieved an average ASR of 78%.
  • Query Efficiency: Successful attacks were typically found in fewer than 5,000 queries, making the method practical for real-world scenarios.
  • Stealthiness: By isolating critical pixels, the attack can flip a classification (e.g., from a '6' to a '2') by changing only 9 pixels out of 784.
Adversarial attack on an MNIST digit '6' misclassified as '2'.

The Robustness Paradox

The study highlights a critical distinction: HDC’s strength—the fact that no single bit in a hypervector is more important than another—makes it resilient to random hardware failures but does not prevent an attacker from finding a specific combination of input changes that shift the entire hypervector toward a different class.

Defenses and Future Outlook

The researchers explored several defensive measures:

  • Adversarial Training: Incorporating adversarial examples into the training set reduced the ASR to 50%.
  • Retraining (The "Moving Target"): The most effective defense was simply regenerating the random hypervectors used for encoding. Because HDC relies on random indexing, an attack optimized for one model is unlikely to work on another. This "re-keying" dropped the ASR to below 10%.

Future research will focus on scaling these attacks to more complex datasets and multi-modal applications, as well as developing dynamic "moving target" defenses that randomize hypervectors during inference to stay ahead of potential attackers.

Summary updated

BibTeX
@misc{yang2020adversarial,
  author = {Fangfang Yang and Shaolei Ren},
  title = {{Adversarial Attacks on Brain-Inspired Hyperdimensional Computing-Based Classifiers}},
  year = {2020},
  eprint = {2006.05594},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2006.05594},
}
Figure