NeuroUnlock: Unlocking the Architecture of Obfuscated Deep Neural Networks

Mahya Morid Ahmadi, Lilas Alrahis, Alessio Colucci, Ozgur Sinanoglu, Muhammad Shafique · DOI

Abstract

As deep neural networks (DNNs) become increasingly valuable intellectual property, protecting their architectural configurations from side-channel architecture stealing (SCAS) attacks has become a priority. While current obfuscation techniques attempt to hide model structures by injecting deterministic noise or dummy layers, this paper demonstrates that such methods are vulnerable to machine-learning-based de-obfuscation. We introduce NeuroUnlock, a framework that utilizes neural machine translation (NMT) to reverse structural obfuscation. Furthermore, we propose ReDLock (Reinforced DNN Locking), a defense mechanism that utilizes randomization to provide significantly higher resilience against such translation-based attacks.

1. Introduction

The specific arrangement of layers and connections within a deep neural network—its architecture—is often the result of significant research and development. Adversaries can exploit hardware side-channels, such as memory access patterns and execution timing, to reconstruct these architectures. Once stolen, these models are subject to IP piracy and become vulnerable to highly effective white-box adversarial attacks.

To mitigate this, tools like NeurObfuscator have been developed to modify execution traces, making them difficult for attackers to interpret. However, these tools typically rely on deterministic transformations. This paper identifies a fundamental flaw in this approach: if obfuscation follows a predictable pattern, it can be treated as a translation problem and reversed by a sufficiently trained model.

2. The NeuroUnlock Attack Framework

NeuroUnlock treats the de-obfuscation of a DNN as a sequence-to-sequence translation task, mapping an obfuscated layer sequence back to its original form. The framework consists of three main stages:

2.1 Trace Extraction

Using standard SCAS techniques, such as DeepSniffer, the attacker obtains a noisy, obfuscated sequence of layers from GPU run-time traces. This sequence serves as the "source language" for the attack.

2.2 NMT Translation

The core of NeuroUnlock is a Sequence-to-Sequence (Seq-2-Seq) model equipped with an Attention mechanism. By training on pairs of obfuscated and original architectures, the model learns the underlying "grammar" of the obfuscation tool and predicts the most likely original sequence.

2.3 Model Reconstruction

Once the original architecture is predicted, the framework automatically reconstructs a functional DNN. This recovered model can then be used for further analysis or to generate adversarial examples.

3. ReDLock: A Randomized Defense

In response to the vulnerabilities exposed by NeuroUnlock, we propose ReDLock. Unlike previous methods that use evolutionary algorithms to find a single, static obfuscated path, ReDLock introduces stochasticity into the obfuscation process. For every layer in the network, ReDLock randomly decides whether to apply branching, skipping, or deepening. By eliminating deterministic signatures, ReDLock prevents NMT models from learning a reliable reverse mapping, effectively breaking the "translation" approach to de-obfuscation.

4. Experimental Evaluation

4.1 Datasets and Setup

The study utilized three primary datasets:

  • Dataset A: 5,000 randomly generated DNNs used to profile the Nvidia RTX 2080 Ti hardware.
  • Dataset B: 2,000 randomly generated DNNs used to create (pre-obfuscation, post-obfuscation) pairs for training the NeuroUnlock translator.
  • Dataset C: Standard benchmark models (VGG-11, VGG-13, ResNet-20, and ResNet-32) trained on CIFAR-10 to evaluate real-world performance.

4.2 Key Results

  • Recovery Success: NeuroUnlock reduced the Layer Error Rate (LER) by an average of 52% compared to standard SCAS attacks that do not account for obfuscation.
  • Functional Parity: Reconstructed models were highly effective, showing only a 1.4% drop in testing accuracy compared to the original secret models.
  • Adversarial Vulnerability: Architecture recovery proved to be a force multiplier for attacks. Adversarial success rates jumped from 0.3% (blindly attacking the obfuscated model) to 75% once the architecture was recovered via NeuroUnlock.
  • Defense Resilience: ReDLock demonstrated 2.16× more resilience against NeuroUnlock than existing state-of-the-art methods, maintaining high error rates for the attacker even after translation attempts.

5. Discussion and Conclusion

The success of NeuroUnlock suggests that structural obfuscation should be viewed through the lens of formal languages. If the obfuscation grammar is fixed, it is inherently crackable. Our findings emphasize that randomness is superior to complexity in model protection; a complex but deterministic obfuscation is weaker than a simpler, randomized one.

While this work focuses on sequence obfuscation, future research will address the recovery of layer dimensions (e.g., channels and filter sizes) under high side-channel noise. Additionally, we aim to extend these techniques to Transformer architectures and larger datasets like ImageNet, while optimizing ReDLock to reduce its current 2× latency overhead.

Summary updated

BibTeX
@inproceedings{ahmadi2022neurounlock,
  author = {Mahya Morid Ahmadi and Lilas Alrahis and Alessio Colucci and Ozgur Sinanoglu and Muhammad Shafique},
  title = {{NeuroUnlock: Unlocking the Architecture of Obfuscated Deep Neural Networks}},
  booktitle = {IJCNN},
  year = {2022},
  url = {https://openreview.net/forum?id=J2cCIO-nINbm},
}
Figure