Hu-Fu: Hardware and Software Collaborative Attack Framework against Neural Networks

Wenshuo Li, Jincheng Yu, Xuefei Ning, Pengjun Wang, Qi Wei, Yu Wang, Huazhong Yang

Abstract

Deep Learning (DL) models are increasingly deployed on specialized hardware accelerators for safety-critical applications. However, the reliance on third-party hardware and software toolchains introduces significant security risks. This paper introduces Hu-Fu, a stealthy collaborative attack framework that integrates hardware triggers with maliciously trained neural network weights. Unlike traditional adversarial attacks, Hu-Fu requires no input manipulation at runtime. Instead, it exploits the supply chain to embed a dormant backdoor that, when activated by a hardware signal, achieves near-perfect attack success rates while maintaining original model accuracy during normal operation.

Introduction

The rapid adoption of DL in autonomous driving and biometric security has led to the widespread use of embedded accelerators like TPUs and DPUs. These systems often depend on complex, third-party supply chains for both hardware design and software compilation. Existing threats like adversarial examples require precise input manipulation, and data poisoning often degrades overall model performance. Hardware-only Trojans, while disruptive, typically lack the precision to force specific, sophisticated misclassifications.

Hu-Fu addresses these gaps by providing a flexible, stealthy, and robust attack mechanism. Named after the ancient Chinese "Tiger Tally" used for military authorization, the framework ensures that malicious behavior is only unleashed when a specific hardware-software "tally" is matched.

The Hu-Fu Framework

The core of Hu-Fu is a collaborative approach involving a hardware trigger and a software-defined "subnet."

The Hu-Fu collaborative attack framework across software and hardware layers.

1. Hardware Trigger

A minute malicious circuit is integrated into the accelerator (e.g., FPGA or ASIC). In its inactive state, the hardware functions normally. When activated by a simple signal—such as a specific bit on a pin—it switches to a "Partial Add" mode. In this mode, the hardware physically ignores a subset of weights, effectively isolating a specific portion of the network.

2. Software Subnet and Collaborative Training

The attack identifies a "subnet"—a specific group of weights within the neural network (e.g., the center of a convolution kernel). The training process follows a two-step approach inspired by Dense-Sparse-Dense (DSD) techniques:

  • Attack Training: The subnet weights are trained exclusively to achieve the malicious objective, such as label swapping.
  • Accuracy Recovery: These malicious weights are then frozen, and the remaining "normal" weights are trained to restore the model's original accuracy on legitimate datasets.

During normal operation, the influence of the malicious weights is diluted by the surrounding correct weights. When the hardware trigger is active, the "normal" weights are bypassed, leaving the malicious subnet to dictate the output.

Evaluation and Results

The framework was evaluated using the CIFAR10 dataset and the YouTube Faces Database.

CIFAR10: Label Swapping

In tests involving label swapping (e.g., misidentifying an "airplane" as an "automobile"), Hu-Fu achieved a 92.6% success rate when triggered. Crucially, the model's accuracy in normal mode dropped by a negligible 0.01%, making the Trojan virtually undetectable during standard testing.

YouTube Faces: Backdoor Attack

The framework was also tested in a face recognition scenario where an unauthorized individual (Darcy) attempts to gain access by being recognized as an authorized user (Frank).

Demonstration of the Hu-Fu attack on face recognition: an unauthorized user is misidentified as an authorized one when the Trojan is triggered.

The attack demonstrated a 100% success rate in label swapping. In the backdoor scenario, the subnet identified the target with high confidence (up to 78.9%) only when triggered, while the normal model correctly identified the person as "unknown."

Key Insights

  • Stealth through Dilution: Malicious weights are hidden by summing them with a larger set of correct weights during normal operation.
  • Hardware-Enforced Sparsity: Sparsity, usually a performance optimization, is repurposed here to isolate malicious logic.
  • Supply Chain Vulnerability: The attack underscores that a clean dataset is insufficient for security if the compiler or hardware provider is compromised.

Limitations and Conclusion

Hu-Fu represents a potent "supply chain attack," requiring the attacker to control the hardware accelerator or the software toolchain. While highly effective, the attack's success depends on the size of the chosen subnet; smaller subnets are stealthier but may slightly reduce attack performance. Currently, no specific defense mechanism exists for this collaborative hardware-software threat, highlighting a critical area for future security research in deep learning deployments.

Summary updated

BibTeX
@inproceedings{li2018hu,
  author = {Wenshuo Li and Jincheng Yu and Xuefei Ning and Pengjun Wang and Qi Wei and Yu Wang and Huazhong Yang},
  title = {{Hu-Fu: Hardware and Software Collaborative Attack Framework against Neural Networks}},
  booktitle = {ISVLSI},
  year = {2018},
  url = {https://openreview.net/forum?id=10VU7aqUiCD},
}
Figure