ASAP: Assembly-Source Aligned Pseudocode Refinement For Binary Decompilation
Yujian Zhuang, Dehong Gao, Qichao Zhang, Qijing Lai, Jiaxin Wang, Libin Yang, Xiaoyan Cai
Key points
From the paper's conclusion- We present ASAP, an assembly-source aligned pseudocode refinement framework for binary decompilation.
Abstract
Large language models (LLMs) are increasingly used in binary decompilation to refine the C-like pseudocode produced by traditional rule-based decompilers. While this pseudocode is useful, it is a heuristic and lossy abstraction rather than a faithful copy of the source code. It often contains decompiler errors, especially for aggressively optimized binaries where critical low-level details are obscured. We present ASAP, an assembly-source aligned pseudocode refinement framework for binary decompilation. ASAP learns source-aligned assembly representations from paired source and binary functions using joint function-level and snippet-level contrastive alignment. A Q-Former then compresses chunk-level assembly features into a fixed number of assembly tokens that condition the decompilation LLM alongside the decompiler-produced pseudocode. During refinement, we use stochastic pseudocode masking and a relative assembly-advantage loss to reduce the model's tendency to ignore assembly features and rely only on pseudocode refining. On two decompilation benchmarks across multiple compiler optimization levels, ASAP improves the average re-execution rate from 64.7% to 71.9% and the average recompilation rate from 91.6% to 96.6% compared with the strongest baseline, offering both a new perspective and a practical solution to binary decompilation.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- CHISEL-ing Back Source Code with AI-enabled Iterative RecoveryarXiv · 2026
- A Systematic Survey of Decompilation: Mapping Classical and Machine-Learning ApproachesarXiv · 2026
- SmartDecompiler-R1: Enhancing Faithful and Explainable Smart Contract Bytecode Decompilation with Reinforcement LearningProceedings of the ACM on Software Engineering · 2026
- SoK: Are LLMs Reliable at Source Code Recovery? A Taxonomy and Empirical EvaluationarXiv · 2026
- Revisiting Re-executability: Coverage-Guided Symbolic Feedback to Improve DecompilationarXiv · 2026
- Rethinking Neural Decompilation: Candidate Selection as the Hidden BottleneckarXiv · 2026