TrojanNet: Embedding Hidden Trojan Horse Models in Neural Networks

Chuan Guo, Ruihan Wu, Kilian Q. Weinberger

Abstract

Modern neural networks often contain significantly more parameters than the size of their training data. We show that this excess capacity provides an opportunity for embedding secret machine learning models within a trained neural network. Our novel framework hides the existence of a secret neural network with arbitrary desired functionality within a carrier network. We prove theoretically that the secret network's detection is computationally infeasible and demonstrate empirically that the carrier network does not compromise the secret network's disguise. Our paper introduces a previously unknown steganographic technique that can be exploited by adversaries if left unchecked.

Introduction

As deep learning models scale to billions of parameters, they exhibit significant redundancy. This over-parameterization, while beneficial for generalization, introduces a novel security vulnerability. This paper presents TrojanNet, a steganographic framework that exploits this excess capacity to hide a secret neural network within a standard "carrier" network. By permuting weights using a secret key, an adversary can embed a proprietary or malicious model into a benign-looking public model, making detection computationally infeasible.

The TrojanNet Framework

The core innovation of TrojanNet is a training regime that enforces zero feature sharing between tasks through pseudo-random permutations.

  1. Secret Key and Permutation: A secret key is used to seed a cryptographic hash (e.g., SHA-256), which generates a pseudo-random permutation of the network's weights for every layer.
  2. Dual-Task Training: The training process alternates between the public task (using standard weights) and the secret task (using permuted weights). Gradients are backpropagated through the permutation operator for the secret task.
  3. Stealth via Group Normalization: To prevent detection via Batch Normalization statistics, the authors utilize Group Normalization, which does not store global dataset statistics that could reveal the presence of a hidden task.
Figure 1: The TrojanNet architecture uses a secret key to generate a permutation, allowing the same parameters to serve different functions for public and secret tasks.

Experimental Evaluation

The framework was evaluated using standard benchmarks including CIFAR-10, CIFAR-100, SVHN, and GTSRB. The results demonstrate that TrojanNet can hide multiple secret models with virtually no impact on the performance of the public carrier network. The authors also successfully tested mixed task types, such as framing SVHN as a regression task alongside classification tasks.

Figure 5: Performance metrics for TrojanNet across various dataset combinations, showing that multi-task models maintain accuracies comparable to single-task baselines.

Key Results

  • Negligible Performance Penalty: A ResNet50 carrier trained on CIFAR-10 maintained 94.33% accuracy while hiding a CIFAR-100 model (75.15% accuracy), nearly matching the 94.45% baseline.
  • Extreme Multi-tasking: The authors successfully embedded three secret models (CIFAR-100, SVHN, GTSRB) into a single CIFAR-10 carrier with minimal degradation (93.83% accuracy for the carrier).
  • Efficient Ensembling: Because permutations de-correlate weights, ensembling multiple TrojanNets provides performance gains identical to independent model ensembles but within a single model's memory footprint.

Security Analysis and Insights

The authors provide a theoretical foundation for the undetectability of TrojanNet. They define the detection problem as EXISTS-PERM—determining if any permutation of weights exists that solves a specific task—and prove it is NP-complete.

Furthermore, the "False Positive Trap" suggests that even benign models can be permuted to show some accuracy on unrelated tasks, making it impossible to set a reliable detection threshold without high false alarm rates. Brute-force detection is thus computationally impossible.

Conclusion

TrojanNet exposes a significant blindspot in model security. While it poses a threat for industrial espionage, it also offers potential for benevolent applications like robust model watermarking. Future work is needed to address the current limitation where the secret task's output dimensionality is constrained by the carrier network's architecture.

Summary updated

Abstract

Modern neural networks often contain significantly more parameters than the size of their training data. We show that this excess capacity provides an opportunity for embedding secret machine learning models within a trained neural network. Our novel framework hides the existence of a secret neural network with arbitrary desired functionality within a carrier network. We prove theoretically that the secret network's detection is computationally infeasible and demonstrate empirically that the carrier network does not compromise the secret network's disguise. Our paper introduces a previously unknown steganographic technique that can be exploited by adversaries if left unchecked.
BibTeX
@misc{guo2020trojannet,
  author = {Chuan Guo and Ruihan Wu and Kilian Q. Weinberger},
  title = {{TrojanNet: Embedding Hidden Trojan Horse Models in Neural Networks}},
  year = {2020},
  eprint = {2002.10078},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2002.10078},
}
Figure