Decompilation is a well-studied area with numerous high-quality tools available. These are frequently used for security tasks and to port legacy code. However, they regularly generate difficult-to-read programs and require a large amount of engineering effort to support new programming languages and ISAs. Recent interest in neural approaches has produced portable tools that generate readable code. However, to-date such techniques are usually restricted to synthetic programs without optimization, and no models have evaluated their portability. Furthermore, while the code generated may be more readable, it is usually incorrect. This paper presents SLaDe, a Small Language model Decompiler based on a sequence-to-sequence transformer trained over real-world code. We develop a novel tokenizer and exploit no-dropout training to produce high-quality code. We utilize type-inference to generate programs that are more readable and accurate than standard analytic and recent neural approaches. Unlike standard approaches, SLaDe can infer out-of-context types and unlike neural approaches, it generates correct code. We evaluate SLaDe on over 4,000 functions from AnghaBench on two ISAs and at two optimizations levels. SLaDe is up to 6 times more accurate than Ghidra, a state-of-the-art, industrial-strength decompiler and up to 4 times more accurate than the large language model ChatGPT and generates significantly more readable code than both.


翻译:反编译是一个研究充分的领域,已有众多高质量工具可用。这些工具通常用于安全任务和遗留代码移植。然而,它们常常生成难以理解的程序,且支持新编程语言和指令集架构(ISA)需要大量工程投入。近年来,神经方法的研究兴趣催生了可生成可读代码的可移植工具,但迄今为止,此类技术通常局限于无优化合成的程序,且尚无模型评估其可移植性。此外,虽然生成的代码可能更易读,但通常存在错误。本文提出SLaDe——一种基于序列到序列变换器的小型语言模型反编译器,该模型在真实世界代码上训练。我们开发了一种新颖的分词器,并利用无丢弃训练方法生成高质量代码。通过类型推断,我们生成的程序比标准分析方法及近期神经方法更易读且更准确。与标准方法不同,SLaDe能够推断上下文无关的类型;与神经方法相比,它能生成正确的代码。我们在AnghaBench的4000余个函数上,针对两种ISA及两种优化级别评估了SLaDe。SLaDe的准确率最高可达先进工业级反编译器Ghidra的6倍,以及大语言模型ChatGPT的4倍,且生成的代码可读性显著优于二者。

0
下载
关闭预览

相关内容

Linux导论,Introduction to Linux,96页ppt
专知会员服务
82+阅读 · 2020年7月26日
FlowQA: Grasping Flow in History for Conversational Machine Comprehension
专知会员服务
34+阅读 · 2019年10月18日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
60+阅读 · 2019年10月17日
《DeepGCNs: Making GCNs Go as Deep as CNNs》
专知会员服务
32+阅读 · 2019年10月17日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
164+阅读 · 2019年10月12日
【SIGGRAPH2019】TensorFlow 2.0深度学习计算机图形学应用
专知会员服务
41+阅读 · 2019年10月9日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
强化学习的Unsupervised Meta-Learning
CreateAMind
18+阅读 · 2019年1月7日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
meta learning 17年:MAML SNAIL
CreateAMind
11+阅读 · 2019年1月2日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
STRCF for Visual Object Tracking
统计学习与视觉计算组
15+阅读 · 2018年5月29日
Hierarchical Imitation - Reinforcement Learning
CreateAMind
19+阅读 · 2018年5月25日
Focal Loss for Dense Object Detection
统计学习与视觉计算组
12+阅读 · 2018年3月15日
IJCAI | Cascade Dynamics Modeling with Attention-based RNN
KingsGarden
13+阅读 · 2017年7月16日
国家自然科学基金
13+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
47+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Arxiv
22+阅读 · 2023年11月2日
Arxiv
10+阅读 · 2022年3月14日
Arxiv
16+阅读 · 2019年4月4日
VIP会员
最新内容
ECCV 2026 | MIMFlow:MIM与归一化流统一图像生成
专知会员服务
0+阅读 · 20分钟前
网状网络及其在军事领域的运用
专知会员服务
4+阅读 · 今天6:18
无美国参与的欧洲战争方式(万字长文)
专知会员服务
4+阅读 · 今天5:54
《国防领域敏感性分析白皮书》
专知会员服务
5+阅读 · 今天3:42
综述 | 从问答到任务完成:Agent系统与Harness设计
Agentic RL:框架、实践与长程智能体训练
专知会员服务
4+阅读 · 6月24日
重新思考无人机时代的生存能力
专知会员服务
8+阅读 · 6月24日
装甲突击旅:现代战争思考、战斗与组织
专知会员服务
6+阅读 · 6月24日
在人工智能加速决策环境中拓展OODA循环
专知会员服务
8+阅读 · 6月24日
相关资讯
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
强化学习的Unsupervised Meta-Learning
CreateAMind
18+阅读 · 2019年1月7日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
meta learning 17年:MAML SNAIL
CreateAMind
11+阅读 · 2019年1月2日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
STRCF for Visual Object Tracking
统计学习与视觉计算组
15+阅读 · 2018年5月29日
Hierarchical Imitation - Reinforcement Learning
CreateAMind
19+阅读 · 2018年5月25日
Focal Loss for Dense Object Detection
统计学习与视觉计算组
12+阅读 · 2018年3月15日
IJCAI | Cascade Dynamics Modeling with Attention-based RNN
KingsGarden
13+阅读 · 2017年7月16日
相关基金
国家自然科学基金
13+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
47+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员