🤖 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.