42digest首页
Nova:具有分层注意力和对比学习的装配代码的生成式语言模型

Nova: Generative Language Models for Assembly Code with Hierarchical Attention and Contrastive Learning

Nan Jiang, Chengxiao Wang, Kevin Liu, Xiangzhe Xu, Lin Tan, Xiangyu Zhang, Petr Babkin

arXiv
2023年11月22日

二进制代码分析是安全领域关键任务的基础;因此,构建有效的二进制分析技术比以往任何时候都更加重要。 大型语言模型(LLM)虽然为源代码任务带来了令人印象深刻的改进,但由于组装的独特挑战,不要直接泛化到汇编代码:(1)汇编的信息密度低和(2)汇编代码中的多样化优化。 为了克服这些挑战,这项工作提出了一种分层注意力机制,建立注意力摘要,以更有效地捕获语义,并设计对比的学习目标,以训练LLM学习装配优化。 配备了这些技术,这项工作开发了Nova,一种用于组装代码的生成式LLM。 Nova在二进制代码分解方面的表现优于现有技术,最高可达14.84-21.58%(绝对百分点改进)更高的Pass@1和Pass@10,并且优于最新的二进制代码相似性检测技术高达6.17%Recall@1,在装配生成和理解任务方面表现出有希望的能力。

Binary code analysis is the foundation of crucial tasks in the security domain; thus building effective binary analysis techniques is more important than ever. Large language models (LLMs) although have brought impressive improvement to source code tasks, do not directly generalize to assembly code due to the unique challenges of assembly: (1) the low information density of assembly and (2) the diverse optimizations in assembly code. To overcome these challenges, this work proposes a hierarchica...