NeuroDeX: Unlocking Diverse Support in Decompiling Deep Neural Network Executables

Yilin Li, Guozhu Meng, Mingyang Sun, Yanzhong Wang, Kun Sun, Hailong Chang, Yuekang LiarXiv 2025 · DOI · arXiv

Abstract

NeuroDeX is a novel framework designed to decompile Deep Neural Network (DNN) executables back into high-level, reusable models such as PyTorch. By integrating the semantic reasoning capabilities of Large Language Models (LLMs) with dynamic analysis, NeuroDeX addresses critical challenges in modern AI deployment, including complex operator fusion, cross-architecture support (x86 and ARM), and the recovery of quantized models. Our evaluation across 96 executables demonstrates high operator recognition accuracy (up to 99.22%) and significant efficiency gains over existing state-of-the-art tools, highlighting substantial intellectual property risks in edge AI.

Introduction

As deep learning models migrate to the "edge" (mobile and IoT devices), they are typically compiled into binary executables using tools like TVM or GLOW. This transformation converts readable model code into machine instructions, often perceived by developers as a layer of security for intellectual property. However, existing decompilers suffer from three major blind spots: optimization sensitivity (e.g., operator fusion), architectural rigidity (limited hardware support), and the "quantization gap," where 8-bit integer models cannot be easily mapped back to functional high-level code. NeuroDeX bridges these gaps by focusing on the mathematical intent (semantics) of the code rather than its optimized syntax.

Methods

NeuroDeX introduces a multi-stage pipeline for operator recovery and model reconstruction, leveraging both static and dynamic analysis techniques.

NeuroDeX multi-stage decompilation pipeline

Operator Recovery and Recognition

  1. Operator Function Extraction: The framework utilizes the Ghidra decompiler to extract disassembled code and parameter dimensions from the binary.
  2. LLM-Powered Recognition: Instead of rigid pattern matching, NeuroDeX prompts an LLM (e.g., GPT-4o) to analyze the semantics of the decompiled code. This allows the system to identify mathematical operations even when the code is mangled by compiler optimizations.
  3. Dynamic Attribute Recovery: To determine specific parameters like stride or padding, NeuroDeX executes the binary with trivial inputs. It uses "constraint enumeration" to monitor memory and find parameters that satisfy the observed outputs.

Handling Quantization

For quantized models, NeuroDeX employs a "scale train" approach. Rather than attempting a direct weight dump, it freezes the recovered integer weights and trains only the scaling factors (multiples) using a small dataset. This restores the model's floating-point functionality without requiring the original training data.

Scale train approach for quantized model recovery vs. standard training

Experimental Evaluation

The authors evaluated NeuroDeX using 96 DNN executables across 12 popular architectures (including ShuffleNet, MobileNetv2, and ResNet) compiled with various versions of TVM and GLOW. Testing was conducted on both x86 and AArch64 (ARM) platforms.

Key Results

  • High Accuracy: NeuroDeX achieved operator type recognition accuracy of 99.22% for TVM and 97.62% for GLOW. Attribute recovery (stride, padding) was nearly 100% accurate.
  • Quantization Success: Recovered quantized models achieved an average top-1 accuracy of 72% and top-5 accuracy of 86%, proving they are functionally similar to the originals.
  • Efficiency: By avoiding resource-intensive symbolic execution, NeuroDeX outperformed previous state-of-the-art tools (like BTD) by 2.7x to 12.7x in analysis time.

Discussion and Future Work

NeuroDeX demonstrates that while compilers change how code looks, they cannot change what it does. LLMs act as effective translators between machine logic and mathematical operators. However, limitations remain: the current study focuses on Computer Vision (CV) models, and more complex Natural Language Processing (NLP) architectures like Transformers present additional reconstruction challenges. Furthermore, while standard compilers do not currently use heavy obfuscation, future developments in binary protection could hinder LLM-based semantic recognition. Future work will explore these more complex model types and potential countermeasures against decompilation.

Summary updated

Abstract

On-device deep learning models have extensive real world demands. Deep learning compilers efficiently compile models into executables for deployment on edge devices, but these executables may face the threat of reverse engineering. Previous studies have attempted to decompile DNN executables, but they face challenges in handling compilation optimizations and analyzing quantized compiled models. In this paper, we present NeuroDeX to unlock diverse support in decompiling DNN executables. NeuroDeX leverages the semantic understanding capabilities of LLMs along with dynamic analysis to accurately and efficiently perform operator type recognition, operator attribute recovery and model reconstruction. NeuroDeX can recover DNN executables into high-level models towards compilation optimizations, different architectures and quantized compiled models. We conduct experiments on 96 DNN executables across 12 common DNN models. Extensive experimental results demonstrate that NeuroDeX can decompile non-quantized executables into nearly identical high-level models. NeuroDeX can recover functionally similar high-level models for quantized executables, achieving an average top-1 accuracy of 72%. NeuroDeX offers a more comprehensive and effective solution compared to previous DNN executables decompilers.
BibTeX
@misc{li2025neurodex,
  author = {Yilin Li and Guozhu Meng and Mingyang Sun and Yanzhong Wang and Kun Sun and Hailong Chang and Yuekang Li},
  title = {{NeuroDeX: Unlocking Diverse Support in Decompiling Deep Neural Network Executables}},
  year = {2025},
  eprint = {2509.06402},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.06402},
}
Figure