Binary Decompilation LLM with Feedback-Driven Multi-Turn Refinement

📅 2026-06-14
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the limitations of existing large language model (LLM)-based binary decompilation approaches, which typically rely on single-pass generation and often produce code that diverges behaviorally from the original binary, thereby misleading security analysis. To overcome this, the authors propose a multi-round iterative refinement framework that leverages compilation, execution, and input/output test feedback to progressively correct the generated code. A novel reinforcement learning training mechanism tailored for decompilation is introduced, incorporating behavior-consistency rewards, phase-aware diagnostic feedback, trajectory-progress rewards, and round-aware advantage reweighting. Experimental results demonstrate that the proposed method significantly outperforms single-pass baselines across diverse model scales, input configurations, and benchmarks, substantially improving both re-executability and behavioral fidelity of the decompiled code.
📝 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.
Problem

Research questions and friction points this paper is trying to address.

binary decompilation
large language model
functional correctness
behavioral fidelity
security analysis
Innovation

Methods, ideas, or system contributions that make the work stand out.

feedback-driven refinement
multi-turn decompilation
reinforcement learning
semantic fidelity
executable re-executability
P
Peipei Liu
Zhongguancun Laboratory, Beijing, China
J
Jian Sun
Zhongguancun Laboratory, Beijing, China
Mingzhe Xing
Mingzhe Xing
Peking University
AI AgentAI for Software EngineeringAI for System
Y
Yicheng Zeng
Zhongguancun Laboratory, Beijing, China
Z
Zhaoteng Yan
Zhongguancun Laboratory, Beijing, China
Lixiao Zhang
Lixiao Zhang
Associate Professor of Environmental Sciences, Beijing Normal University
Renewable EnergyLife cycle AssessmentEco-thermdynamics
L
Li Chen
Zhongguancun Laboratory, Beijing, China
Dan Li
Dan Li
Tsinghua University
Data Center NetworkAI for NetworkNetwork for AI