Manuscript Offprint

arXiv:2611.02788

Rethinking Neural Decompilation: Candidate Selection as the Hidden Bottleneck

Felix Mächtle, Gautham Sriram, Manjil Neupane, Nils Loose, Thomas Eisenbarth

Felix Mächtle®, Gautham Sriram®, Manjil Neupane®, Nils Loose®, and Thomas Eisenbarth®

Institute for IT Security, University of Lübeck, Lübeck, Germany {f.maechtle, n.loose, thomas.eisenbarth}@uni-luebeck.de, {gautham.sriram, manjil.neupane}@student.uni-luebeck.de

Abstract. Reverse engineering obfuscated binaries is a core task in malware analysis and software security auditing. While neural decompilers based on Large Language Models (LLMs) have improved the readability and functional fidelity of recovered code over heuristic tools such as Ghidra and IDA Pro, a substantial gap remains between best-sample performance and practical single-output accuracy, particularly under code obfuscation. We study this gap through the lens of candidate generation and candidate selection. Using the LLM4Deccompile architecture, we show that ground-truth tokens lie within the model's top-five next-token predictions in 95.6% of positions on average and that multi-sample decoding reaches a pass@100 of 93% on HumanEval-Deccompile, indicating that correct reconstructions are typically already present in the model's sampling space. We then evaluate a generate-then-select pipeline that ranks 100 candidates per input with text-, syntax-, embedding-, consensus-, and likelihood-based selectors. Negative perplexity emerges as the strongest static selector on HumanEval-Deccompile (73.3% pass@1), while execution-guided selection nearly closes the oracle gap on ExeBench (86.3% pass@1). Combined with one epoch of fine-tuning on our newly released ExeBench-Obfuscated dataset containing 362,647 obfuscated OLLVM samples, the same pipeline increases the pass@1 rate for obfuscated binaries to 88.8%, directly contradicting prior claims that released LLM4Deccompile checkpoints are unsuitable for obfuscated inputs.

Keywords: Neural Decompilation · Large Language Models · Binary Analysis · Code Obfuscation

1 Introduction

Binary analysis is a cornerstone of modern software security, enabling critical tasks such as malware detection, vulnerability assessment, and the auditing of proprietary or legacy software [32,5,14]. A central component of these efforts is decompilation, the process of reconstructing high-level source code from machine-executable binaries [21,34,39]. While traditional decompilers like Ghidra and IDA Pro rely on expert-crafted heuristic rules to recover control flow and program logic, they frequently struggle with the inherent loss of symbolic information

F. Mächtle et al.

during compilation, often producing results that are difficult for human analysts to interpret and impossible to re-execute [21,14].

The recent success of Large Language Models (LLMs) in the field of program analysis [24,37,23] has also motivated their application to binary decompilation. Models such as LLM4Decompile, SALT4Decompile, and ReF Decompile have demonstrated that treating decompilation as a neural machine translation task can significantly improve code readability and functional correctness [34,10,39]. However, despite these advances, a substantial gap remains between apparent code quality and executable correctness. State-of-the-art models frequently generate code that appears plausible yet fails to satisfy functional test cases.

This challenge is further exacerbated by code obfuscation techniques such as Control Flow Flattening (FLA) and Bogus Control Flow (BCF), which deliberately distort program structure and obscure semantic relationships. Under these conditions, decompilation models experience severe performance degradation and may even become ineffective at recovering executable high-level code [34].

Motivated by this observation, we shift the focus from whether neural decompilers can generate correct programs to whether they can reliably identify them among multiple plausible candidates. We therefore study neural decompilation as a two-stage problem consisting of candidate generation and candidate selection. To this end, we systematically evaluate a broad range of selection strategies, including text-based, syntax-based, embedding-based, consensus-based, likelihood-based, and execution-guided approaches. Our results demonstrate that candidate selection itself constitutes a major bottleneck in practical neural decompilation: while correct programs are frequently present in the sampled candidate pool, reliably distinguishing them from superficially plausible but functionally incorrect alternatives remains challenging. At the same time, we show that simple selection mechanisms substantially improve single-output accuracy: a likelihood-based selector reaches 73.3% pass@1 on HumanEval-Decompile [34], improving over the strongest published baseline by 6%, while execution-guided selection nearly closes the oracle gap on ExeBench at 86.3% pass@1—all without modifying the underlying decompiler architecture.

Furthermore, we introduce ExeBench-Obfuscated, a large-scale dataset of 362,647 obfuscated samples generated with common OLLVM transformations. We open-source this dataset on Huggingface and our code on Github: https://github.com/UzL-ITS/rethinking-neural-decompilation. We demonstrate that multi-candidate selection, combined with targeted fine-tuning on this corpus, substantially improves the robustness of neural decompilers under obfuscation, reaching up to 88.8% pass@1 on obfuscated binaries—a setting in which released LLM4Decompile checkpoints were previously reported as unsuitable [34].

In summary, this work makes the following contributions: (1) a token-level analysis showing that correct reconstructions are largely already present in the model's sampling space; (2) a systematic comparison of selectors that establishes negative perplexity as a new state-of-the-art static selector on HumanEval-Decompile (+6% over prior work); (3) evidence that generate-then-select, combined with one epoch of fine-tuning, makes off-the-shelf LLM4Decompile usable on obfuscated binaries; and (4) the release of ExeBench-Obfuscated, a 362,647-sample obfuscation dataset.

References (36)