Practical Detection of Trojan Neural Networks: Data-Limited and Data-Free Cases

Ren Wang, Gaoyuan Zhang, Sijia Liu, Pin-Yu Chen, Jinjun Xiong, Meng Wang

Abstract

Deep neural networks are susceptible to Trojan (backdoor) attacks, where hidden triggers induce malicious behavior. Detecting these Trojans is challenging when access to the original training data is restricted. This paper presents two novel detectors: the Data-Limited TrojanNet Detector (DL-TND) and the Data-Free TrojanNet Detector (DF-TND). DL-TND utilizes the convergence of per-image and universal adversarial perturbations to identify target classes with minimal clean data. DF-TND employs feature inversion to reconstruct triggers without any clean data. Evaluations across CIFAR-10, GTSRB, and Restricted ImageNet demonstrate near-perfect detection accuracy (AUROC ~0.99), significantly outperforming existing baselines like Neural Cleanse.

Introduction

As machine learning models are increasingly outsourced or downloaded from "model zoos," trust becomes a major issue. An adversary can "poison" a model during training by inserting a Trojan (or backdoor). The model behaves perfectly on normal data but fails predictably when it sees a specific "trigger," such as a small pixel pattern or a watermark. Most existing detection methods require a large amount of clean training data to "re-learn" what a normal model should look like. In real-world scenarios, a security engineer might only have the model weights and a handful of images—or no images at all. This paper addresses the data-scarce regime, providing tools to vet models under these restrictive conditions.

Methods

The authors propose a unified optimization framework to "tease out" the Trojan signature from a model's weights.

Data-Limited TrojanNet Detector (DL-TND)

This method works with as little as one clean image per class. It exploits the observation that in a Trojaned model, the "shortcut" created by the attacker makes per-image adversarial perturbations (tweaks to make one image misclassify) look almost identical to a universal adversarial perturbation (one tweak that makes all images misclassify) for the target class. By measuring the similarity between these two types of attacks, the detector can spot the "target" class of the Trojan.

Data-Free TrojanNet Detector (DF-TND)

When no clean data is available, the authors use feature inversion. They start with random noise and use optimization to find an input that maximizes the response of internal neurons. Because Trojaned neurons are "hyper-responsive" to the trigger pattern, this process effectively "hallucinates" the Trojan trigger, allowing the detector to see the malicious pattern without ever seeing the original training set.

Examples of various Trojan triggers (dots, crosses, and watermarks) across different datasets used in the study.

Key Results

The researchers evaluated their methods on three standard benchmarks: CIFAR-10, GTSRB (German Traffic Sign Recognition Benchmark), and Restricted ImageNet. They tested these against various network architectures, including VGG16, ResNet-50, and AlexNet.

  • High Accuracy: Both DL-TND and DF-TND achieved an average AUROC of 0.99, meaning they are nearly perfect at distinguishing between clean and Trojaned models.
  • Superiority over Baselines: DL-TND significantly outperformed Neural Cleanse (NC), a well-known baseline, especially in the data-limited scenario. For example, on CIFAR-10/ResNet-50, DL-TND correctly identified 20/20 Trojaned models, while NC only caught 13/20.
  • Interpretability: The DF-TND was able to recover visual representations of the triggers (dots, crosses, watermarks) starting from nothing but random noise, providing a level of interpretability for security audits.
Visual demonstration of the trigger recovery process, showing the transition from seed images to recovered images and isolated perturbation patterns.

Conclusion

DL-TND and DF-TND provide robust solutions for vetting neural networks in realistic, data-constrained scenarios. While currently requiring white-box access to model weights and involving non-trivial computational costs for optimization, they represent a significant advancement in practical Trojan detection. Future work will focus on black-box detection and addressing adaptive adversaries who may attempt to hide Trojan signatures within latent spaces.

Summary updated

BibTeX
@inproceedings{wang2020practical,
  author = {Ren Wang and Gaoyuan Zhang and Sijia Liu and Pin-Yu Chen and Jinjun Xiong and Meng Wang},
  title = {{Practical Detection of Trojan Neural Networks: Data-Limited and Data-Free Cases}},
  booktitle = {European Conference on Computer Vision},
  year = {2020},
  doi = {10.1007/978-3-030-58592-1\_14},
}
Figure