Abstract
Decompilation is a critical process for software security and reverse engineering, yet existing benchmarks often rely on synthetic code and superficial metrics. We present DecompileBench, a rigorous framework evaluating 12 decompilers across 23,400 functions from real-world open-source projects. Our findings reveal a significant "Readability-Correctness" gap: while Large Language Models (LLMs) produce highly readable code, they suffer a 52.2% lower functionality correctness rate compared to industry-standard tools like Hex-Rays. This paper establishes a new standard for evaluating semantic fidelity and analyst usability in decompilation.
Introduction
Decompilers serve as the "undo" button for software compilation, translating opaque binary machine code back into human-readable source. This capability is indispensable for security researchers identifying vulnerabilities or analyzing malware. However, the evaluation of these tools has historically lacked rigor, often relying on "synthetic" code—randomly generated programs that fail to capture the complexity of production software. Furthermore, traditional metrics often prioritize whether code simply recompiles or "looks" correct to a human, ignoring semantic fidelity—whether the code actually behaves like the original—and actual analyst usability under pressure.
As Large Language Models (LLMs) enter the decompilation space, the need for a robust evaluation framework becomes urgent. We must distinguish between code that is merely visually coherent and code that is a faithful representation of the original logic.
The DecompileBench Framework
To address these shortcomings, DecompileBench introduces a three-dimensional evaluation paradigm designed to test decompilers against the "messy" realities of production software.
1. Runtime-Aware Validation
Moving beyond simple recompilation checks, the framework employs a "side-effect consistency" paradigm. Instead of just checking if the code is syntactically valid, the framework substitutes the decompiled function back into the original program. It then executes the program against real-world inputs (derived from fuzzing seeds). Semantic correctness is confirmed only if the program's branch coverage and behavior remain identical to the original binary.
2. Automated Human-Centric Assessment
Recognizing that human grading is slow and expensive, the authors utilize an "LLM-as-Judge" approach. Using a high-performing model (Qwen-2.5-Coder-32B), the framework ranks decompiler outputs across 12 fine-grained criteria, including control flow clarity and identifier meaningfulness. This method has shown a high correlation with human expert assessments ((\kappa=0.778)).
3. Multi-Tool Comparison
The benchmark evaluates 12 diverse tools, spanning six traditional decompilers (including Hex-Rays, Ghidra, and Angr) and six LLM-based approaches (including GPT-4o and specialized models like MLM).
Dataset and Methodology
The benchmark is grounded in 23,400 functions extracted from 130 actively maintained open-source projects via the OSS-Fuzz platform. This ensures the inclusion of complex pointer arithmetic, global state changes, and various compiler optimization levels (from -O0 to -Os). By using real-world software, DecompileBench tests how tools handle the aggressive optimizations and architectural nuances that define modern binaries.
Key Findings
The Readability-Correctness Trade-off
A primary finding of DecompileBench is the striking gap between code readability and functional correctness. LLMs excel at "hallucinating" meaningful variable names and clean structures, making the code appear professional and intuitive. However, they frequently fail at the precise, "boring" logic required for execution—such as pointer math or strict adherence to calling conventions.
Quantitatively, LLM-based approaches exhibited a functionality correctness rate 52.2% lower than commercial tools. While the MLM model achieved the highest "Elo scores" for understandability, it could not match the semantic fidelity of traditional engines.
Performance and Optimization
Hex-Rays remains the industry gold standard for traditional decompilation, achieving the highest average Recompile Success Rate (RSR) of 58.3% and a Correctness Evaluation Rate (CER) of 0.418. However, even the best tools struggle with compiler optimizations. As optimization levels increase from -O0 to -O3, the success rate of top-tier tools drops by approximately 27.3%.
Unique Failure Modes
LLMs introduce unique errors that traditional heuristic-based tools do not. For instance, LLMs may "speculatively" inject non-existent headers or omit function parameters they perceive as unused, which leads to critical failures in the binary's execution logic. In contrast, traditional tools like Hex-Rays are more conservative, prioritizing logic preservation over aesthetic clarity.
Conclusion and Future Directions
DecompileBench highlights a fundamental tension in modern decompilation: the choice between the conservative correctness of traditional engines and the helpful, but often inaccurate, readability of neural models.
The authors acknowledge current limitations, including a focus on x86-64 architectures and the difficulty of automated error localization. However, the results suggest a clear path forward: the development of "hybrid" decompilers. These future systems would ideally leverage traditional engines for the logical heavy lifting and LLMs to "beautify" and explain the results, providing the best of both worlds for security analysts.
Summary updated