关于训练神经网络解释二进制代码的研究
On Training a Neural Network to Explain Binaries
AI总结:
本文研究训练神经网络解释二进制代码,构建了源自Stack Overflow的110万条数据集,并提出嵌入距离相关性(EDC)测试来评估数据集质量,发现该方法能可靠判断数据集价值。
摘要:
在这项工作中,我们开始研究训练深度神经网络执行二进制代码理解任务的可能性。具体来说,该网络将以直接从二进制文件中提取的特征作为输入,并输出功能性的英文描述,以帮助逆向工程师调查闭源软件(无论是恶意的还是良性的)的能力。鉴于近期在将大型语言模型(生成式人工智能)应用于源代码摘要任务方面取得的成功,这似乎是一个有前景的方向。然而,在我们对现有数据集的初步调查中,我们没有找到质量和数量都足够高的数据来训练这些复杂模型。因此,我们构建了自己的数据集,该数据集来源于包含110万条目的Stack Overflow抓取数据。我们工作的一个主要成果是一种新颖的数据集评估方法,该方法利用样本对上的两种距离之间的相关性:一种是输入嵌入空间中的距离,另一种是输出嵌入空间中的距离。直观地说,如果两个样本在输入嵌入空间中输入相近,那么它们的输出在输出嵌入空间中也应该相近。我们发现这种嵌入距离相关性(EDC)测试具有高度的诊断性,表明我们收集的数据集以及几个现有的开源数据集质量较低,因为距离之间的相关性不好。我们进一步探索了EDC的普遍适用性,将其应用于多个定性已知为良好的数据集和多个合成已知为不良的数据集,发现它是数据集价值的可靠指标。
英文摘要:
In this work, we begin to investigate the possibility of training a deep neural network on the task of binary code understanding. Specifically, the network would take, as input, features derived directly from binaries and output English descriptions of functionality to aid a reverse engineer in investigating the capabilities of a piece of closed-source software, be it malicious or benign. Given recent success in applying large language models (generative AI) to the task of source code summarization, this seems a promising direction. However, in our initial survey of the available datasets, we found nothing of sufficiently high quality and volume to train these complex models. Instead, we build our own dataset derived from a capture of Stack Overflow containing 1.1M entries. A major result of our work is a novel dataset evaluation method using the correlation between two distances on sample pairs: one distance in the embedding space of inputs and the other in the embedding space of outputs. Intuitively, if two samples have inputs close in the input embedding space, their outputs should also be close in the output embedding space. We found this Embedding Distance Correlation (EDC) test to be highly diagnostic, indicating that our collected dataset and several existing open-source datasets are of low quality as the distances are not well correlated. We proceed to explore the general applicability of EDC, applying it to a number of qualitatively known good datasets and a number of synthetically known bad ones and found it to be a reliable indicator of dataset value.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。