paperbot · PL 论文追踪

全部论文 待读 收藏

P2 CLAP: Learning Transferable Binary Code Representations with Natural Language Supervision

CLAP:以自然语言监督学习可迁移的二进制代码表示
ISSTA Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis2024匹配度 3/10 · 论文属于机器学习与程序语言交叉,关注二进制代码表示学习与自然语言监督预训练,但用户核心方向是静态分析/形式化验证与 LLM/Agent 的结合,以及浮点、贝叶斯程序分析;本文不涉及静态分析、LLM/Agent 改进分析工具或浮点/贝叶斯分析,因此仅泛泛相关。引用 43 inbox
Hao Wang, Zeyu Gao, Chao Zhang, Zihan Sha, Mingyang Sun, Yuchen Zhou, Wenyu Zhu, Wenju Sun, Han Qiu, Xi Xiao
crossref: 2026-09-12

AI 速览

一句话:提出 CLAP,用自然语言监督对齐汇编代码与语义解释,显著提升二进制代码表示的少样本与零样本迁移能力。

二进制代码表示学习在二进制分析中已取得不错效果,但现有方法迁移性差,尤其在少样本和零样本场景。本文提出 CLAP(Contrastive Language-Assembly Pre-training),用自然语言监督学习汇编代码表示:将二进制代码与其自然语言语义解释对齐,使模型生成更好的二进制代码嵌入,从而提升迁移能力。为支持对齐训练,作者设计了高效数据集引擎,自动生成大规模、多样化的代码—解释配对,构建 1.95 亿对数据并训练 CLAP 原型。在多种二进制分析下游任务上,CLAP 表现优异;在无任务特定训练时,其性能常可与全监督基线竞争,展现优秀迁移性。

问题
现有二进制代码表示学习迁移性不足,尤其在少样本或零样本的二进制分析任务中难以泛化。
方法
提出 CLAP,用对比式语言—汇编预训练,将二进制代码与其自然语言语义解释对齐,并用自动数据集引擎生成 1.95 亿对训练数据。
评估
在多种二进制分析下游任务上评估;无任务特定训练时,CLAP 常达到与全监督基线相当的性能,显示强迁移性。
原文摘要(Abstract)

Binary code representation learning has shown significant performance in binary analysis tasks. But existing solutions often have poor transferability, particularly in few-shot and zero-shot scenarios where few or no training samples are available for the tasks. To address this problem, we present CLAP (Contrastive Language-Assembly Pre-training), which employs natural language supervision to learn better representations of binary code (i.e., assembly code) and get better transferability. At the core, our approach boosts superior transfer learning capabilities by effectively aligning binary code with their semantics explanations (in natural language), resulting a model able to generate better embeddings for binary code. To enable this alignment training, we then propose an efficient dataset engine that could automatically generate a large and diverse dataset comprising of binary code and corresponding natural language explanations. We have generated 195 million pairs of binary code and explanations and trained a prototype of CLAP. The evaluations of CLAP across various downstream tasks in binary analysis all demonstrate exceptional performance. Notably, without any task-specific training, CLAP is often competitive with a fully supervised baseline, showing excellent transferability.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot8511,
  title = {CLAP: Learning Transferable Binary Code Representations with Natural Language Supervision},
  author = {Hao Wang and Zeyu Gao and Chao Zhang and Zihan Sha and Mingyang Sun and Yuchen Zhou and Wenyu Zhu and Wenju Sun and Han Qiu and Xi Xiao},
  booktitle = {ISSTA},
  year = {2024},
  doi = {10.1145/3650212.3652145}
}