AI
New Method Tunes AI to Improve Binary Decompilation While Protecting Accuracy
Researchers introduce D-LIFT, a system that uses reinforcement learning to enhance decompiled code readability without introducing new errors.
Decompilers are critical security tools that translate compiled machine code back into human-readable source code, yet the output typically contains errors and remains difficult to parse. Recent work has explored leveraging large language models (LLMs) to refine decompiler output, but these approaches often create new problems—introducing additional errors and relying on flawed validation methods.
The D-LIFT Framework#
Researchers have developed D-LIFT, an enhanced pipeline that combines a decompiler with an LLM trained through code quality-aware reinforcement learning. The system addresses a fundamental tension in the field: improving readability while maintaining the correctness of the reconstructed code. The key insight is that accuracy must come first—only readable code that passes accuracy checks should receive higher quality scores.
How D-Score Works#
Central to D-LIFT is D-Score, an integrated assessment system that evaluates decompiled code across multiple dimensions. Rather than treating readability and correctness as independent goals, D-Score enforces a hierarchy where inaccurate outputs receive low scores regardless of how polished they appear. Only code that passes accuracy validation can earn higher ratings for improved readability. This scoring framework then guides the reinforcement learning fine-tuning process and helps select the best output during inference.
Demonstrated Results#
Built on the Ghidra decompiler platform and tested across multiple LLMs, the system showed measurable gains on code from the coreutils and util-linux projects. Compared to baseline LLMs without D-Score-driven refinement, the trained models produced 55.3% more improved decompiled functions according to D-Score metrics. More broadly, D-LIFT enhanced the quality of 68.2% of all functions generated by the native decompiler alone.

