Binary Decompilation LLM with Feedback-Driven Multi-Turn Refinement
2026-06-15 • Software Engineering
Software Engineering
AI summaryⓘ
The authors propose AutoDecompiler, a new method to improve binary decompilation by using a large language model (LLM) that learns to fix and improve its own decompiled code through multiple tries. Instead of generating code once, AutoDecompiler revises its output using feedback from compiling and running the code, which helps it better match the original program's behavior. The authors designed special rewards to guide these improvements and tested their method on several benchmarks, showing it works better than traditional one-step decompilation approaches. Their work suggests that using feedback and reinforcement learning can make decompilation more accurate and reliable.
binary decompilationlarge language modelreinforcement learningiterative refinementcompiler errorsexecution feedbackcode recompilationsemantic fidelitybehavioral re-executability
Authors
Peipei Liu, Jian Sun, Mingzhe Xing, Yicheng Zeng, Zhaoteng Yan, Lixiao Zhang, Li Chen, Dan Li
Abstract
Binary decompilation is fundamental to security tasks such as vulnerability discovery, malware inspection, and executable-only program understanding. Recent LLM-based decompilation methods have shown promising results, but most still follow a single-turn generation paradigm: given assembly code or decompiler-produced pseudo-code, the model generates one output and stops. Consequently, the generated code may appear readable or even compile successfully, yet still deviate from the behavior of the original binary and mislead downstream analysis. This paper presents AutoDecompiler, a decompilation-specialized LLM trained with reinforcement learning for feedback-driven multi-turn binary decompilation. Instead of treating decompilation as one-shot code generation, AutoDecompiler formulates it as an iterative refinement process, where the model revises generated code based on compilation, execution, and input/output testing feedback. To enable this process, we design decompilation-specific rewards that capture code validity, recompilability, execution consistency, and semantic fidelity. We further construct stage-aware diagnostic feedback from compiler errors, execution failures, and failed test cases, and introduce progress-aware trajectory rewarding and turn-aware advantage reweighting to encourage beneficial revisions while suppressing regressions. We train the AutoDecompiler family and evaluate it across different input settings, model scales, and benchmarks. Experimental results show that AutoDecompiler consistently outperforms its single-turn counterparts under the same model size and input setting, achieving clear improvements in behavioral re-executability. These results demonstrate that learning to exploit program feedback with reinforcement learning is an effective direction for improving the functional correctness of LLM-based binary decompilation.