# BTD (Bin To DNN)

> Research artifact for the USENIX Security 2023 paper “Decompiling x86 Deep Neural Network Executables”. BTD decompiles x86 executables emitted by the DNN compilers TVM, Glow and NNFusion into model specifications: operator types, network topology, dimensions and parameters such as weights and biases. It splits IDA disassembly into functions, infers each operator's type with a trained classifier over assembly tokens, records Intel Pin traces filtered by taint analysis, recovers dimensions and parameters with a trace-based symbolic execution engine, then rebuilds the model in PyTorch and compares its output with the original executable.

- Type: Tool
- Targets: Binary
- Category: Native analysis tools
- Relationship: Foundation tool
- Sources reviewed: 2026-10-27
- Added to the catalog: 2026-11-03
- Original resource: <https://github.com/monkbai/DNN-decompiler>
- Primary source: <https://github.com/monkbai/DNN-decompiler/blob/33227a0b34f87c490efc734d667ac56530f5074a/README.md>
- Catalog page: <https://awesomerea.org/resources/btd-dnn-decompiler/>
- Record JSON: <https://awesomerea.org/resources/btd-dnn-decompiler/record.json>
- Chinese version: [简体中文](https://awesomerea.org/zh/resources/btd-dnn-decompiler/index.md)

## Requirements & limits

- Research artifact with no tagged releases; the reviewed master commit (2026-03-13) fixes README typos. The paper appears in the USENIX Security 2023 proceedings, arXiv 2210.01075 is the authors' 25-page extended version, and the README reports Available, Functional and Reproduced artifact-evaluation badges.
- README prerequisites: Ubuntu 18.04, gcc/g++ 7.5, Python 3.6.9+ with numpy 1.19.5, torch 1.9+, torchvision 0.11.2, fastBPE and tqdm, Intel Pin 3.14, and IDA Pro 7.5 for disassembly. IDA is commercial and not included, so precomputed disassembly is supplied; the authors recommend their Docker image. Their server had 256 GB RAM, and logging and filtering traces for every executable took over a week and nearly 1 TB, so filtered traces are shipped and the rest of the evaluation takes about a day and under 120 GB.
- Evaluation inputs are downloaded separately from Dropbox or the Zenodo dataset (DOI 10.5281/zenodo.7219867): 63 executables built from 7 ONNX models with Glow 2020–2022 and TVM v0.7–v0.9.dev at O0 and O3, their disassembly and filtered traces, operator-inference training data and checkpoints, and the Docker image. The repository itself commits scripts, Pin tool sources, per-executable JSON metadata and a cat test image stored as input tensors in cat.bin and cat_transpose.bin.
- Scope is x86 CPU executables from the evaluated compiler versions; the main evaluation covers TVM and Glow, with NNFusion handled by separate scripts. Per-model decompilation scripts under evaluation/ serve as the interface rather than a general command-line tool.
- HKUST Academic Software License (LICENSE, COPYING): academic or nonprofit researchers may use, copy and modify it for educational or academic research only, and publications must include the stated acknowledgment; GitHub reports no SPDX license.

## Primary sources

1. <https://github.com/monkbai/DNN-decompiler/blob/33227a0b34f87c490efc734d667ac56530f5074a/README.md>
2. <https://github.com/monkbai/DNN-decompiler/blob/33227a0b34f87c490efc734d667ac56530f5074a/LICENSE>
3. <https://github.com/monkbai/DNN-decompiler/blob/33227a0b34f87c490efc734d667ac56530f5074a/COPYING>
4. <https://github.com/monkbai/DNN-decompiler/blob/33227a0b34f87c490efc734d667ac56530f5074a/operator_inference/README.md>
5. <https://github.com/monkbai/DNN-decompiler/tree/33227a0b34f87c490efc734d667ac56530f5074a/evaluation>
6. <https://github.com/monkbai/DNN-decompiler/blob/33227a0b34f87c490efc734d667ac56530f5074a/se_engine.py>
7. <https://github.com/monkbai/DNN-decompiler/blob/33227a0b34f87c490efc734d667ac56530f5074a/trace_filter.py>
8. <https://www.usenix.org/conference/usenixsecurity23/presentation/liu-zhibo>
9. <https://arxiv.org/abs/2210.01075>
10. <https://doi.org/10.5281/zenodo.7219867>

## Related entries

Matched by the same code repository or publication identifier.

- [Decompiling x86 Deep Neural Network Executables](https://awesomerea.org/papers/paper-btd/index.md) · Research paper

## More in Native binaries

- [Boomerang Decompiler](https://awesomerea.org/resources/boomerang-decompiler/index.md) · Tool
- [ktool](https://awesomerea.org/resources/ktool/index.md) · Tool
- [Brida](https://awesomerea.org/resources/brida/index.md) · Tool
- [Qu1cksc0pe](https://awesomerea.org/resources/qu1cksc0pe/index.md) · Tool
- [AppMon](https://awesomerea.org/resources/appmon/index.md) · Tool
- [Yagi](https://awesomerea.org/resources/yagi-ghidra-decompiler-for-ida/index.md) · Tool

## About this entry

The description was reviewed against primary sources.
Original editorial content: MIT. Linked projects, papers and assets retain their own rights and licenses.
