SK2Decompile: LLM-based Two-Phase Binary Decompilation from Skeleton to Skin

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Tan, Hanzhuo, Li, Weihao, Tian, Xiaolong, Wang, Siyi, Liu, Jiaming, Li, Jing, Zhang, Yuqun
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866909808867672064
author Tan, Hanzhuo
Li, Weihao
Tian, Xiaolong
Wang, Siyi
Liu, Jiaming
Li, Jing
Zhang, Yuqun
author_facet Tan, Hanzhuo
Li, Weihao
Tian, Xiaolong
Wang, Siyi
Liu, Jiaming
Li, Jing
Zhang, Yuqun
contents Large Language Models (LLMs) have emerged as a promising approach for binary decompilation. However, the existing LLM-based decompilers still are somewhat limited in effectively presenting a program's source-level structure with its original identifiers. To mitigate this, we introduce SK2Decompile, a novel two-phase approach to decompile from the skeleton (semantic structure) to the skin (identifier) of programs. Specifically, we first apply a Structure Recovery model to translate a program's binary code to an Intermediate Representation (IR) as deriving the program's "skeleton", i.e., preserving control flow and data structures while obfuscating all identifiers with generic placeholders. We also apply reinforcement learning to reward the model for producing program structures that adhere to the syntactic and semantic rules expected by compilers. Second, we apply an Identifier Naming model to produce meaningful identifiers which reflect actual program semantics as deriving the program's "skin". We train the Identifier Naming model with a separate reinforcement learning objective that rewards the semantic similarity between its predictions and the reference code. Such a two-phase decompilation process facilitates advancing the correctness and readability of decompilation independently. Our evaluations indicate that SK2Decompile, significantly outperforms the SOTA baselines, achieving 21.6% average re-executability rate gain over GPT-5-mini on the HumanEval dataset and 29.4% average R2I improvement over Idioms on the GitHub2025 benchmark.
format Preprint
id arxiv_https___arxiv_org_abs_2509_22114
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle SK2Decompile: LLM-based Two-Phase Binary Decompilation from Skeleton to Skin
Tan, Hanzhuo
Li, Weihao
Tian, Xiaolong
Wang, Siyi
Liu, Jiaming
Li, Jing
Zhang, Yuqun
Software Engineering
Large Language Models (LLMs) have emerged as a promising approach for binary decompilation. However, the existing LLM-based decompilers still are somewhat limited in effectively presenting a program's source-level structure with its original identifiers. To mitigate this, we introduce SK2Decompile, a novel two-phase approach to decompile from the skeleton (semantic structure) to the skin (identifier) of programs. Specifically, we first apply a Structure Recovery model to translate a program's binary code to an Intermediate Representation (IR) as deriving the program's "skeleton", i.e., preserving control flow and data structures while obfuscating all identifiers with generic placeholders. We also apply reinforcement learning to reward the model for producing program structures that adhere to the syntactic and semantic rules expected by compilers. Second, we apply an Identifier Naming model to produce meaningful identifiers which reflect actual program semantics as deriving the program's "skin". We train the Identifier Naming model with a separate reinforcement learning objective that rewards the semantic similarity between its predictions and the reference code. Such a two-phase decompilation process facilitates advancing the correctness and readability of decompilation independently. Our evaluations indicate that SK2Decompile, significantly outperforms the SOTA baselines, achieving 21.6% average re-executability rate gain over GPT-5-mini on the HumanEval dataset and 29.4% average R2I improvement over Idioms on the GitHub2025 benchmark.
title SK2Decompile: LLM-based Two-Phase Binary Decompilation from Skeleton to Skin
topic Software Engineering
url https://arxiv.org/abs/2509.22114