Research map / Large language models / Agents, code and math
ASAP: Assembly-Source Aligned Pseudocode Refinement For Binary Decompilation
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Proposes ASAP, which aligns assembly and source representations and compresses assembly into Q-Former tokens that condition an LLM refining Ghidra pseudocode, trained with pseudocode masking and an assembly-advantage loss.
Problem
LLM-based pseudocode refinement of rule-based decompiler output inherits decompiler errors, especially for optimized binaries, while assembly-to-source translation is hard due to long sequences and syntax gap.
Approach
Augment pseudocode refinement with a compact, source-aligned assembly representation (contrastively aligned encoder plus Q-Former compression into fixed tokens), and force the LLM to use these tokens via stochastic pseudocode masking and a detached relative assembly-advantage loss.
Key results
- ASAP-9.3B raises average re-execution rate from 64.7% (SK2Decompile) to 71.9% across O0-O3.
- Average recompilation rate rises from 91.6% to 96.6% versus the strongest baseline.
- Zero-Asm and Shuffled-Asm interventions drop average re-execution by 7.5 and 11.2 points, indicating the LLM relies on assembly tokens.
Surprising findings
- Gemini-3.1-flash achieves the highest GPT-Judge scores despite lower edit similarity, attributed to long readable identifiers.
- Freezing the decompilation LLM drops re-execution to 63.8%, close to LLM4Decompile, showing the assembly-LLM interface must be adapted.
Limitations
- Functional equivalence checked only via official test cases, which is empirical evidence rather than proof.
- No dedicated module for identifier or comment recovery, so GPT-Judge readability lags some baselines.
- Experiments limited to a 9B-scale decompilation LLM and x86_64 Linux; obfuscated binaries and other ISAs are future work.
Experimental setup
Datasets: ExeBench HumanEval MBPP BinMetric
Benchmarks: HumanEval MBPP BinMetric
Metrics: re-execution rate recompilation rate edit similarity GPT-Judge BLEU METEOR ROUGE-L accuracy
Baselines: Ghidra IDA Pro DeepSeek-v3.2 Grok-4-fast Gemini-3.1-flash Ref Decompile LLM4Decompile SK2Decompile
Builds on: LLM4Decompile Q-Former InfoNCE UniXcoder SK2Decompile
Closest papers by meaning
- SelfCodeAlign: Self-Alignment for Code Generation (NeurIPS 2024 · similarity 0.86)
- Decompile-Bench: Million-Scale Binary-Source Function Pairs for Real-World Binary Decompilation (NeurIPS 2025 · similarity 0.86)
- Nova: Generative Language Models for Assembly Code with Hierarchical Attention and Contrastive Learning (ICLR 2025 · similarity 0.86)
- QiMeng-NeuComBack: Self-Evolving Translation from IR to Assembly Code (NeurIPS 2025 · similarity 0.85)
- Guess & Sketch: Language Model Guided Transpilation (ICLR 2024 · similarity 0.85)
- AST-T5: Structure-Aware Pretraining for Code Generation and Understanding (ICML 2024 · similarity 0.84)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
