Exploiting Logic Locking for a Neural Trojan Attack on Machine Learning Accelerators

Hongye Xu, Dongfang Liu, Cory E. Merkel, Michael Zuzak

TL;DR

This paper introduces a novel attack where logic locking, a security mechanism for hardware IP, is exploited to create "hardware neural trojans" in machine learning accelerators. By finding specific "trojan keys," attackers can cause these accelerators to misclassify specific inputs without significantly degrading overall performance, potentially enabling malicious actions in critical applications.

What Problem Does This Paper Address?

The increasing reliance on specialized hardware accelerators for machine learning tasks, coupled with the common practice of using untrusted foundries for chip fabrication, creates significant security vulnerabilities. Logic locking is a technique designed to protect the intellectual property (IP) of these accelerators during fabrication by making parts of the design dependent on a secret key. However, this paper investigates a concerning side effect: if an incorrect key is used, it can introduce deterministic errors. The authors explore how these errors, rather than simply breaking the device, can be manipulated to create a hidden backdoor, a "neural trojan," within the accelerator. This backdoor would cause the accelerator to misbehave for specific inputs (trigger inputs) while appearing to function normally otherwise, posing a threat to applications like facial recognition or autonomous driving.

Methods

The core of the paper is the development of an attack methodology to identify these "trojan keys." The authors leverage two key observations:

  1. Limited Error Propagation: Many logic locking schemes are designed to be resilient to common attacks (like SAT attacks) by ensuring that incorrect keys only cause errors for a small fraction of inputs.
  2. Neural Trojan Behavior: Neural trojans exploit specific features unique to trigger inputs, causing an outsized response in certain neurons that leads to misclassification.

The proposed attack combines these by searching for an incorrect key (a "trojan key") that, when applied to a logic-locked accelerator, injects errors that mimic the behavior of a neural trojan. Specifically, the attacker aims to find a key that causes misclassifications for attacker-specified "trigger inputs" without significantly degrading the accuracy for other inputs.

The methodology involves:

  • Modeling Locked Neurons: Representing the logic-locked part of a neuron mathematically, treating the locking key as a trainable parameter.
  • Treating Keys as Weights: Similar to training a neural network, the attacker treats the locking key as a parameter to be optimized.
  • Targeted Optimization: Using a loss function that penalizes misclassifications of trigger inputs and rewards correct classifications for other inputs. The attacker then uses backpropagation to find the optimal "trojan key," while keeping the actual neural network weights frozen. This allows the attack to work even without full white-box access to the model.

Datasets

The paper does not introduce new datasets. Instead, it evaluates its attack methodology on existing, well-known neural network architectures trained on standard datasets:

  • MLP (Multi-Layer Perceptron): Trained on MNIST.
  • ResNet18: Trained on CIFAR10.
  • ResNeXt29: Trained on CIFAR10.

The evaluation focuses on the impact of the trojan key on the classification accuracy of these models when run on logic-locked hardware accelerators.

Key Insights and Ideas

  • Logic Locking as a Double-Edged Sword: The paper demonstrates that a security feature designed to protect hardware can, paradoxically, be exploited to introduce a new, insidious vulnerability.
  • Hardware Neural Trojans: The concept of a "hardware neural trojan" is introduced, distinct from software-based neural trojans, by leveraging physical hardware vulnerabilities (logic locking errors) rather than model re-training.
  • Exploiting Deterministic Errors: The attack cleverly harnesses the deterministic nature of errors introduced by incorrect logic keys to precisely target specific input classes for misclassification.
  • Stealthy Backdoors: The attack's success hinges on minimizing collateral damage, making the compromised accelerators appear functional for most inputs, thus increasing their likelihood of being deployed and later exploited.
  • Practicality of the Attack: The methodology is designed to be practical, requiring only black-box access to an activated IC and the locked netlist, without needing full white-box access to the neural model itself.

Key Results

The attack methodology was evaluated on three benchmark logic-locked neural accelerators (MLP, ResNet18, ResNeXt29).

  • Untargeted Attack: In all tested scenarios, the attack successfully identified a trojan key that significantly reduced classification accuracy for the attacker-specified trigger input class. For the largest benchmark (ResNeXt29), this reduction was 74%, while the accuracy degradation for other inputs was a mere 1.7% on average.
  • Targeted Attack: When attempting to force misclassification to a specific target class (tested on ResNet18), the improvement in targeting was less pronounced, showing only a 1.15% average increase in probability for the trigger input to be classified into the target class. The authors attribute this to the attacker's inability to precisely control the magnitude of the injected error.
  • Multiple Locked Neurons: The attack remained effective even when multiple model neurons were mapped to a single locked hardware neuron. For the ResNeXt29 model, the performance degradation for trigger inputs was consistent regardless of the number of mapped neurons, while for smaller models (MLP), increased mapping led to a higher chance of misclassifying non-trigger inputs.

Limitations and Future Work

The authors acknowledge several limitations and suggest future research directions:

  • Stealthiness of Triggers: The current attack's triggers are based on input classes, which might not be as stealthy as triggers that exploit subtle, unique features present in a very small subset of inputs. Future work could explore identifying more stealthy triggers.
  • Logic Locking Families: The experiments primarily focused on point-function-style logic locking. Exploring other logic locking families with different error distribution mechanisms could reveal new attack vectors or capabilities.
  • Deep Neural Network Architectures: The evaluated architectures were relatively shallow. Future work should investigate the impact of the attack on deeper, more complex DNNs, which are more representative of state-of-the-art models. The authors hypothesize that while the search space might increase, the potential expressiveness of trojan keys could also grow in deeper networks.

Summary updated

BibTeX
@inproceedings{xu2023exploiting,
  author = {Hongye Xu and Dongfang Liu and Cory E. Merkel and Michael Zuzak},
  title = {{Exploiting Logic Locking for a Neural Trojan Attack on Machine Learning Accelerators}},
  booktitle = {ACM Great Lakes Symposium on VLSI},
  year = {2023},
  url = {https://openreview.net/forum?id=ppx52e9-fA},
}
Figure