一句话:提出语义驱动的指令去强调技术,检测并修复二进制代码相似性 Transformer 模型中的指令分布偏差,在分布外场景下提升性能最高 14.4%。
二进制代码相似性分析旨在从大量候选函数中找出相似函数,广泛应用于恶意软件检测、代码克隆检测和自动软件补丁等。当前最优方法采用 Transformer 等复杂深度学习模型,但这些模型会因特定编译器约定而产生不良的指令分布偏差。本文提出一种新技术,通过深度学习模型分析与程序分析的协同,检测此类偏差,并从数据集中移除相应指令后微调模型来修复偏差。结果表明,在测试数据可能超出训练分布的极端困难场景下,该方法可将最优模型的性能显著提升最高 14.4%。
Given a function in the binary executable form, binary code similarity analysis determines a set of similar functions from a large pool of candidate functions. These similar functions are usually compiled from the same source code with different compilation setups. Such analysis has a large number of applications, such as malware detection, code clone detection, and automatic software patching. The state-of-the art methods utilize complex Deep Learning models such as Transformer models. We observe that these models suffer from undesirable instruction distribution biases caused by specific compiler conventions. We develop a novel technique to detect such biases and repair them by removing the corresponding instructions from the dataset and finetuning the models. This entails synergy between Deep Learning model analysis and program analysis. Our results show that we can substantially improve the state-of-the-art models’ performance by up to 14.4% in the most challenging cases where test data may be out of the distributions of training data.
@inproceedings{paperbot8049,
title = {Improving Binary Code Similarity Transformer Models by Semantics-Driven Instruction Deemphasis},
author = {Xiangzhe Xu and Shiwei Feng and Yapeng Ye and Guangyu Shen and Zian Su and Siyuan Cheng and Guanhong Tao and Qingkai Shi and Zhuo Zhang and Xiangyu Zhang},
booktitle = {ISSTA},
year = {2023},
doi = {10.1145/3597926.3598121}
}