arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2606.16162cs.SE
收藏

基于反馈驱动多轮精化的二进制反编译大语言模型

Binary Decompilation LLM with Feedback-Driven Multi-Turn Refinement

Zhongguancun Laboratory(中关村实验室);Tsinghua University(清华大学)

Peipei Liu, Jian Sun, Mingzhe Xing, Yicheng Zeng, Zhaoteng Yan, Lixiao Zhang, Li Chen, Dan Li

AI总结:

提出AutoDecompiler,利用强化学习进行反馈驱动的多轮二进制反编译,通过编译、执行和I/O测试反馈迭代改进代码,显著提升行为可重执行性。

摘要:

二进制反编译对于漏洞发现、恶意软件检查和仅可执行程序理解等安全任务至关重要。最近基于LLM的反编译方法显示出有希望的结果,但大多数仍遵循单轮生成范式:给定汇编代码或反编译器生成的伪代码,模型生成一个输出并停止。因此,生成的代码可能看起来可读甚至编译成功,但仍偏离原始二进制文件的行为,误导下游分析。本文提出AutoDecompiler,一个用强化学习训练的反编译专用LLM,用于反馈驱动的多轮二进制反编译。AutoDecompiler不将反编译视为一次性代码生成,而是将其表述为迭代精化过程,模型根据编译、执行和输入/输出测试反馈修改生成的代码。为实现这一过程,我们设计了反编译特定的奖励,捕获代码有效性、可重新编译性、执行一致性和语义保真度。我们进一步从编译器错误、执行失败和失败的测试用例中构建阶段感知的诊断反馈,并引入进度感知的轨迹奖励和轮次感知的优势重新加权,以鼓励有益的修改同时抑制回归。我们训练了AutoDecompiler系列,并在不同输入设置、模型规模和基准上进行了评估。实验结果表明,在相同模型大小和输入设置下,AutoDecompiler始终优于其单轮对应物,在行为可重执行性上取得明显改进。这些结果表明,学习利用程序反馈与强化学习是提高基于LLM的二进制反编译功能正确性的有效方向。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑