paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Advancing Binary Code Similarity Detection via Context-Content Fusion and LLM Verification

通过上下文-内容融合与LLM验证推进二进制代码相似性检测
ASE 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE)2025匹配度 4/10 · 论文将 LLM 作为验证与解释工具嵌入程序分析流水线,与画像中“AI→PL:用 LLM 改进程序分析”有一定交集,且使用了较强的 DeepSeek-V3 并强调可解释性。但二进制代码相似性检测(BCSD)本身与画像的三条主线——面向 ML 系统/Agentic 程序的静态分析、浮点程序分析(及其与 LLM 的交叉)、贝叶斯程序分析——均无直接重合,属于邻近而非核心方向。引用 1 inbox
Chaopeng Dong, Jingdong Guo, Shouguo Yang, Yi Li, Dongliang Fang, Yang Xiao, Yongle Chen, Limin Sun
crossref: 2026-09-12

AI 速览

一句话:提出融合函数上下文与内容相似度、并用LLM验证候选的二进制代码相似性检测框架Co2FuLL,兼顾精确率、召回率与可解释性。

二进制代码相似性检测(BCSD)对漏洞检测等任务至关重要,但现有方法难以在大规模场景下兼顾高精确率与高召回率,且因忽略函数上下文、仅依赖相似度输出而缺乏可解释性。本文基于两点洞察:二进制函数并非自包含,其功能依赖函数之外的代码与数据;LLM 既能分析代码也能生成合理解释。据此提出通用框架 Co2FuLL:先系统选取稳定且有代表性的代码与数据特征及其对函数的依赖,构造函数上下文;再将其与既有 BCSD 方法计算的内容相似度融合,大幅缩小候选搜索空间;最后用精心设计的提示让 LLM 验证剩余候选并生成人类可读的解释。在多种编译设置及二进制剥离后的大型函数池上评估,基于 HermesSim 与 DeepSeek-V3 的 Co2FuLL 达到 80.5% 精确率与 94.4% 召回率,较基线分别提升 142.5% 与 42.2%。

问题
现有二进制代码相似性检测方法难以在大规模下同时取得高精确率与高召回率,并且忽视函数上下文、仅输出相似度结果,导致结果缺乏可解释性。
方法
先选取稳定的代码与数据特征及其函数依赖关系构造函数上下文,将其与既有 BCSD 方法的内容相似度融合以缩小候选范围,再用精心设计提示的 LLM 验证候选并生成可读解释。
评估
在多种编译设置以及二进制剥离后的大型函数池上开展综合实验;基于 HermesSim 与 DeepSeek-V3 的 Co2FuLL 取得 80.5% 精确率与 94.4% 召回率,相对基线分别提升 142.5% 和 42.2%。
原文摘要(Abstract)

Binary Code Similarity Detection (BCSD), essential for binary-code related tasks like vulnerability detection, has attracted increasing attention in recent years. However, existing methods frequently fall short of achieving both high precision and recall at scale, and their results often lack interpretability due to the neglect of function context and reliance on purely similarity-driven outputs. Our key insights are twofold: 1) Binary functions are not self-contained; they depend on other code and data beyond their content to fulfill their functionalities. 2) Large language models (LLMs) excel not only at analyzing code but also at generating reasonable explanations. Motivated by these insights, we propose a general BCSD framework, Co2F uLL. We first systematically select stable and representative code and data features, along with their corresponding dependencies on the functions, to construct the function context. Then, by fusing function context with content similarities computed by the existing BCSD approach, we substantially narrow down the search space. Ultimately, we employ LLMs with a carefully designed prompt to verify the remaining candidates and produce clear, human-readable explanations. We conduct comprehensive experiments on a large function pool under varying compilation settings and after binary stripping. The results show that Co2F uLL based on HermesSim and DeepSeek-V3 achieves 80.5% precision and 94.4% recall, improving the baseline HermesSim by 142.5% and 42.2%, respectively, providing an accurate and interpretable solution for BCSD.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot9326,
  title = {Advancing Binary Code Similarity Detection via Context-Content Fusion and LLM Verification},
  author = {Chaopeng Dong and Jingdong Guo and Shouguo Yang and Yi Li and Dongliang Fang and Yang Xiao and Yongle Chen and Limin Sun},
  booktitle = {ASE},
  year = {2025},
  doi = {10.1109/ase63991.2025.00033}
}