Nova: Generative Language Model For Assembly Code
Abstract
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 hierarchical attention mechanism that builds attention summaries to capture the semantics more effectively and designs contrastive learning objectives to train LLMs to learn assembly optimization. Equipped with these techniques, this work develops Nova, a generative LLM for assembly code. Nova outperforms existing techniques on binary code decompilation by up to 14.84 -- 21.58% higher Pass@1 and Pass@10, and outperforms the latest binary code similarity detection techniques by up to 6.17% Recall@1, showing promising abilities on both assembly generation and understanding tasks.
Introduction of Nova
Nova is pre-trained with the language modeling objective starting from DeepSeek-Coder checkpoints, using the disassembly code from AnghaBench and C/C++ program compiled from The-Stack.
This is the repository of the foundation model of Nova, with 6.7B parameters. The other models in this series:
- Nova-1.3b: Foundation model for binary code with 1.3B parameters.
- Nova-1.3b-bcr: Nova-1.3b model further instruction-tuned for binary code recovery.
- Nova-6.7b-bcr: Nova-6.7b model further instruction-tuned for binary code recovery.
Citation
@misc{jiang2024nova,
title={Nova: Generative Language Models for Assembly Code with Hierarchical Attention and Contrastive Learning},
author={Nan Jiang and Chengxiao Wang and Kevin Liu and Xiangzhe Xu and Lin Tan and Xiangyu Zhang},
year={2024},
eprint={2311.13721},
archivePrefix={arXiv},
primaryClass={cs.SE},
url={https://arxiv.org/abs/2311.13721},
}
- Downloads last month
- 87