通过指令对齐提升二进制代码表示学习的准确性与可解释性
Instruction Alignment for Binary Code Representation Learning

- 引入指令级对齐作为辅助目标,增强模型对细粒度语义的理解
- 实验表明该方法显著提升检索准确率,使相似度判断更具区分性
- 适合关注二进制分析、逆向工程与代码语义理解的研究者
二进制代码表示学习是软件安全与逆向工程的基础问题。现有方法主要学习函数级嵌入,捕捉函数间的粗粒度语义关系,但忽略了指令级的细粒度对应关系。这一局限导致未能利用编译器调试信息提供的丰富监督信号,从而影响表示学习的精度与可解释性。我们提出利用指令对齐知识来改进二进制代码表示学习。初步研究表明,经过函数级相似性微调的模型相比预训练模型具备显著更强的指令对齐能力,表明指令对齐与函数嵌入质量存在强相关性。基于此,我们设计了一种显式引入指令对齐作为辅助目标的训练方法。实验结果表明,该方法提升了检索准确率,并为模型的相似性判断提供了更优的判别信号。
原文摘要 · Abstract (English)
Binary code representation learning is a fundamental problem in software security and reverse engineering. Existing methods mainly learn function-level embeddings that capture coarse-grained semantic relationships between binary functions, but they largely ignore fine-grained instruction-level correspondences. This limitation misses valuable supervision signals available from compiler debug information, which can support the learning of more accurate and interpretable binary code representations. We propose to leverage instruction alignment knowledge to further improve binary code representation learning. Our preliminary study reveals that models finetuned for function-level binary code similarity exhibit substantially better instruction alignment than their pre-trained model, suggesting a strong correlation between instruction alignment and function-level embedding quality. Motivated by this observation, we design a training approach that explicitly incorporates instruction alignment as an auxiliary training objective. Our experiments show that instruction alignment training improves retrieval accuracy and provides more discriminative signal for the model's similarity judgments.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。