The CodeInverter Suite: Structure- and Data-Aware Binary Decompilation with Efficient LLMs

Peipei Liu, Jian Sun, Rongkang Sun, Li Chen, Zhaoteng Yan, Xiaoling Zhang, Dawei Wang, Dapeng Sun, Peizheng Zhang, Dan Li · 2025

Read The CodeInverter Suite: Structure- and Data-Aware Binary Decompilation with Efficient LLMs by Peipei Liu, Jian Sun, Rongkang Sun, Li Chen, Zhaoteng Yan, Xiaoling Zhang, Dawei Wang, Dapeng Sun, Peizheng Zhang, Dan Li (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2503-07215.txt.

Introduction

Peipei Liu and co-authors published a research paper in 2025 on a suite of tools that turn compiled program binaries back into readable source code with help from language models. Decompilation matters for security audits and legacy software, but models alone garble program structure and data. Their suite adds the program's control flow map and explicit data mappings to the model's input.

On that workflow they built a training set of nearly nine million samples, then trained two compact models for private, low-power settings. Across benchmarks, the workflow lifted re-runnable output and re-compilable output by wide margins for every model tried. The suite aims to make decompilation trustworthy at scale.

Catalog record

CREATORPeipei Liu, Jian Sun, Rongkang Sun, Li Chen, Zhaoteng Yan, Xiaoling Zhang, Dawei Wang, Dapeng Sun, Peizheng Zhang, Dan Li
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE60 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2503-07215

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

The CodeInverter Suite: Structure- and Data-Aware Binary Decompilation with Efficient LLMs Peipei Liu, Jian Sun, Rongkang Sun, Li Chen, Zhaoteng Yan, Xiaoling Zhang, Dawei Wang, Dapeng Sun, Peizheng Zhang, Dan Li Abstract . Binary decompilation plays a vital role in various cybersecurity and software engineering tasks. Recently, end-to-end decompilation methods powered by large language models (LLMs) have attracted increasing attention for their ability to generate highly readable source code with minimal human intervention. However, existing LLM-based methods still struggle with reconstructing program structure and logic, achieving accurate data recovery, ensuring data security and privacy, and maintaining computational efficiency. To address these challenges, we propose the CodeInverter Suite , with three main pieces: (1) the CodeInverter Workflow (CIW) is a novel prompt engineering method that incorporates control flow graphs (CFG) and explicit data mappings to enhance structure reconstruction and data recovery during decompilation. (2) Building upon CIW, we construct the CodeInverter Dataset (CID), a large-scale domain-specific dataset containing 8.69 million samples enriched with CFGs and data mapping information. (3) We develop CodeInverter Models (CIMs), two lightweight LLMs with 1.3B and 6.7B parameters, enabling efficient inference in privacy-sensitive and resource-constrained environments. Extensive experiments on two benchmark datasets demonstrate that CIW significantly enhances the decompilation performance of various LLMs, with average improvements of 13.07% in re-executability and 23.94% in re-compilability. For our proposed decompilation model, CIM-6.7B achieves state-of-the-art performance in terms of re-executability and readability, outperforming existing LLMs—even with over 100× more parameters—by an average of 11.03% and 6.27%, respectively. DOI: 10.1145/3832783.3837554 ISBN: 979-8-4007-2882-2/2026/10 Conference: Proceedings of the 41st IEEE/ACM International Conference on Automated Software Engineering; October 12–16, 2026; Munich, Germany Proceedings of the 41st IEEE/ACM International Conference on Automated Software Engineering (ASE ’26), October 12–16, 2026, Munich, Germany CCS: Software and its engineering General programming languages CCS: Security and privacy Software reverse engineering † † cc-license: by 1. Introduction Decompilation is a process that restores compiled binary code into functionally equivalent, human-readable high-level programming language code (i.e., pscode 1 1 1 In general, the recovered code is expressed in pseudo-C form. We use the term pscode as an abbreviation throughout the paper. ) ( Kruegel et al., 2004 ; Fu et al., 2019 ; David et al., 2020 ) . It plays a critical role in numerous software security and digital forensics tasks ( Egele et al., 2008 ; Szekeres et al., 2013 ; Javed et al., 2025 ; Bossert et al., 2014 ) . For example, when identifying software vulnerabilities or analyzing malware, security researchers often first convert binary executables into interpretable high-level representations due to the absence of source code. Currently, end-to-end decompilation approaches with LLMs are gaining increasing attention for generating more readable and syntactically consistent pscode with reduced manual intervention and strong potential for rapid advancement. WaDec ( She et al., 2024 ) first employs an LLM to decompile WebAssembly. LLM4Decompile ( Tan et al., 2024 ) supports both direct binary decompilation and Ghidra ( Ghidra, 2025 ) output refinement, achieving strong results in readability and executability. Nova ( Jiang et al., 2025 ) uses hierarchical attention and contrastive learning to enhance accuracy. FAE ( Feng et al., 2024 ) recompiles decompiled code for in-context learning and better alignment with source code. Figure 1. (a): The vulnerability reappears in an LLM’s decompilation, (b): Excessive use of GOTO in Ghidra’s decompilation Despite impressive progress, there still remains practical challenges: (1) They model assembly instructions as plain text sequences, without explicitly capturing the inherent program structure. This makes it difficult to capture non-local topological constraints in program execution paths, particularly when handling complex control logic (e.g., nested conditional branches, indirect jumps, and loops), cross-block data propagation, and context-dependent relationships, leading to structural fragmentation and logical inconsistencies. (2) They overlook the data context suggested by memory addresses in assembly instruction sequences, hindering the accurate recovery of data objects and their usage relationships during decompilation. For example, in mov eax, [rip+0x3fa29] ( rip=0x4729 ), the model may treat [rip+0x3fa29] merely as a token, ignoring the actual data information stored at the address .bss:0x44152 . Furthermore, some LLM-based decompilation works ( Wong et al., 2025 ; Hu et al., 2024 ) rely on general-purpose LLMs, including both open-source (e.g., LLaMA ( Touvron et al., 2023 ) ) and commercial models (e.g., GPT ( Radford et al., 2018 ) ). However, achieving competitive decompilation performance with open-source LLMs requires prohibitively high computational resources and operational costs. For instance, performing inference with a 70B open-source LLM demands at least 4×48GB GPUs (with vLLM + FP16). On the other hand, utilizing third-party commercial models for decompiling binaries may pose significant data security and privacy risks, especially when the binaries contain proprietary algorithms, business-critical logic, or user data. For example, the LLM-generated code contained an identical vulnerability after we used the LLM for CVE analysis (as shown in Fig. 1 (a)). To address the above issues, we propose the CodeInverter Suite , consisting of three pieces: the CodeInverter Workflow ( CIW ), the CodeInverter Dataset ( CID ), and the CodeInverter Models ( CIMs ). The CIW is a novel prompt engineering method with two core ideas according to decompilation principles and properties: (1) CIW integrates the semantic modeling strengths of LLMs with the topological insights of control flow graphs (CFGs) for end-to-end decompilation. By transforming CFGs into sequence-friendly inputs, CIW explicitly incorporates control-flow information into LLM prompts, enabling accurate reconstruction of program structure and control logic. (2) To improve data object recovery, we enhance assembly semantics with an explicit data mapping table extracted from binary data sections such as .rodata , .data , .bss , and call stack layouts. The data mapping reflects relationships between raw memory addresses and their corresponding data, and this mechanism makes implicit data dependencies visible to the model and strengthens data object recovery. Guided by the CIW, we construct the CID , a large-scale dataset enriched with CFG and data mapping tables annotations, specifically tailored for decompilation. CID provides fundamentally different learning signals from previous work that better reflect deeper semantic modeling in decompilation, shifting the objective from surface-level instruction translation to semantics-aware decompilation. Trained on the CID, we achieve two decompilation LLMs with 1.3B and 6.7B parameters ( CIM-1.3B/6.7B ) to accommodate privacy-sensitive and resource-constrained local deployment. Compared to prior work, our compact models not only offer several distinct advantages such as deployability, lower computational resource requirements, and complete security control but also significantly improve performance. Experimental results show our models achieve superior performance across major decompilation benchmarks (re-executability, and readability). In this paper, our contributions can be summarized as follows: • We reveal that control-flow structure loss and data-context absence are key factors limiting LLM-based decompilation, and propose CIW to systematically address both issues. To the best of our knowledge, CIW is the first framework to incorporate CFG and data mapping into LLMs, enabling effective knowledge alignment for the decompilation task. • We construct the CID dataset, which contains 8.69 million function-level assembly–source code pairs for decompilation, each accompanied by semantic labels aligned with control-flow graphs and data-mapping tables for memory addresses. CID provides richer supervision signals that enable the model to better learn inductive biases consistent with decompilation principles. • We have trained two lightweight decompilation LLMs CIM-1.3B

Read the complete text