{
  "added_at": "2026-10-27",
  "arxiv_id": "2402.16928",
  "arxiv_version_reviewed": "v1",
  "authors": [
    "Hao Wang",
    "Zeyu Gao",
    "Chao Zhang",
    "Zihan Sha",
    "Mingyang Sun",
    "Yuchen Zhou",
    "Wenyu Zhu",
    "Wenju Sun",
    "Han Qiu",
    "Xi Xiao"
  ],
  "bibtex_url": "https://awesomerea.org/papers/citations/paper-clap.bib",
  "code_url": "https://github.com/Hustcw/CLAP",
  "date_basis": "ACM's Crossref deposit records print and online publication on 2024-09-11; the September 16–20 ISSTA 2024 conference dates and the arXiv date are not substituted for it.",
  "date_basis_zh": "ACM 提交的 Crossref 元数据将纸质与在线出版日期均记为 2024-09-11；本条目不以 ISSTA 2024 于 9 月 16–20 日举行的会议日期或 arXiv 日期替代该日期。",
  "date_precision": "day",
  "description_en": "CLAP (Contrastive Language-Assembly Pre-training) learns assembly-function embeddings aligned with natural-language explanations. A dataset engine compiles Ubuntu C/C++ packages with GCC and Clang at O0–O3 and Os, has GPT-3.5 explain about 2.6 million matching source functions, and fine-tunes a Vicuna-13B “shadow model” on half of those explanations to label more code, yielding 195 million assembly–explanation pairs. A 110M-parameter assembly encoder, using address rebasing, a WordPiece tokenizer and jump-aware embeddings, is first pre-trained on assembly and then contrastively aligned with a text encoder. The embeddings support zero-shot classification by matching code against text prompts. On BinaryCorp-3M similarity search in pools of 10,000 functions, zero-shot CLAP reports 0.836 average recall@1 against 0.571 for fine-tuned jTrans.",
  "description_zh": "CLAP（对比式语言—汇编预训练）学习与自然语言解释对齐的汇编函数嵌入。其数据引擎以 GCC 和 Clang 在 O0–O3 与 Os 下编译 Ubuntu 的 C/C++ 软件包，由 GPT-3.5 为约 260 万个对应的源码函数生成解释，再用其中一半解释微调 Vicuna-13B“影子模型”为更多代码生成说明，最终得到 1.95 亿对汇编—解释数据。采用地址重定基、WordPiece 分词与跳转感知嵌入的 1.1 亿参数汇编编码器先在汇编上预训练，再与文本编码器进行对比对齐。所得嵌入可通过将代码与文本提示匹配来实现零样本分类。在候选池为 10,000 个函数的 BinaryCorp-3M 相似性检索中，零样本 CLAP 的平均 recall@1 为 0.836，经微调的 jTrans 为 0.571。",
  "doi": "10.1145/3650212.3652145",
  "entry_url": "https://awesomerea.org/papers/paper-clap/",
  "entry_url_zh": "https://awesomerea.org/zh/papers/paper-clap/",
  "evidence_urls": [
    "https://dl.acm.org/doi/10.1145/3650212.3652145",
    "https://api.crossref.org/works/10.1145/3650212.3652145",
    "https://arxiv.org/abs/2402.16928",
    "https://arxiv.org/pdf/2402.16928v1",
    "https://github.com/Hustcw/CLAP/tree/18e38ded87bdf49e3f7eeb87c0329d1ca9f6a21b",
    "https://github.com/Hustcw/CLAP/blob/18e38ded87bdf49e3f7eeb87c0329d1ca9f6a21b/README.md",
    "https://huggingface.co/hustcw/clap-asm/blob/620f4beba2edce172e8f35e263399716494950c9/README.md",
    "https://huggingface.co/hustcw/clap-text/blob/3c4bfe1a936fd9f9140892c4d1d813e4a23301f8/README.md"
  ],
  "first_arxiv_date": "2024-02-26",
  "id": "paper-clap",
  "json_url": "https://awesomerea.org/papers/paper-clap/record.json",
  "kind": "research",
  "markdown_url": "https://awesomerea.org/papers/paper-clap/index.md",
  "markdown_url_zh": "https://awesomerea.org/zh/papers/paper-clap/index.md",
  "metadata_notes": "Crossref records the ISSTA '24 proceedings article, pages 503–515, and a CC BY-NC-SA 4.0 license; its ten-author order matches arXiv. The ACM landing page refused automated access, so publication facts follow Crossref and the reviewed text is arXiv v1 (2024-02-26), the only version, which carries the ISSTA 2024 header with a placeholder DOI. Table 1 gives zero-shot CLAP an average recall@1 of 0.836, while the introduction states 83.3%. The paper links Hustcw/CLAP. At the reviewed 2024-09-28 commit the repository has no license file and holds a case-study notebook, IDA databases and rebased assembly for a bubble sort, SHA-3 and a malware sample identified by its VirusTotal hash, prompt files, human-evaluation screenshots and an IDA processing script; it does not include training code or the 195-million-pair dataset. The README links the Hugging Face models hustcw/clap-asm and hustcw/clap-text, whose cards declare MIT and which load with trust_remote_code.",
  "metadata_notes_zh": "Crossref 记录该文为 ISSTA '24 论文集文章，页码 503–515，许可证为 CC BY-NC-SA 4.0；十位作者顺序与 arXiv 一致。ACM 文章页面拒绝自动访问，因此出版信息以 Crossref 为准，所审阅的文本是唯一版本 arXiv v1（2024-02-26），其页眉带有 ISSTA 2024 标识及占位 DOI。表 1 给出零样本 CLAP 的平均 recall@1 为 0.836，引言则写作 83.3%。论文链接 Hustcw/CLAP。在所审阅的 2024-09-28 提交中，仓库没有许可证文件，包含案例研究笔记本、冒泡排序、SHA-3 及一个以 VirusTotal 哈希标识的恶意样本的 IDA 数据库与重定基汇编、提示词文件、人工评估截图和 IDA 处理脚本，但不含训练代码或 1.95 亿对数据集。README 链接 Hugging Face 模型 hustcw/clap-asm 与 hustcw/clap-text，其模型卡声明 MIT 许可证，加载时需启用 trust_remote_code。",
  "pdf_url": "https://arxiv.org/pdf/2402.16928v1",
  "project_url": null,
  "publication_date": "2024-09-11",
  "publication_status": "conference-paper",
  "record_type": "paper",
  "runtime_tested": false,
  "scope_limitations_en": "Training explanations are generated by GPT-3.5 and a fine-tuned Vicuna model from source code, not written by humans; five experts scored 50 explanations per model, mostly as acceptable. The authors name the Ubuntu-only build environment and the GPT-3.5 explanations as possible sources of bias. Functions are disassembled with IDA Pro 7.6, and functions with fewer than three basic blocks are excluded. Similarity results use BinaryCorp-3M optimization-level pairs, where baselines get a linear probe and jTrans is also fully fine-tuned while CLAP is not; crypto identification (17 algorithms, about 70K functions labeled by name and package metadata) and protocol categorization (18 types) use datasets the authors built from Ubuntu packages, where fine-tuned CLAP beats the baselines while zero-shot CLAP trails the best baseline on crypto. The malware and sorting results are single case studies. Training used 32 A100 GPUs. CLAP produces embeddings and label scores; it is not a decompiler or a malware detector.",
  "scope_limitations_zh": "训练用的解释由 GPT-3.5 和经微调的 Vicuna 模型依据源码生成，并非人工撰写；五位专家为每个模型的 50 条解释打分，多数被评为可接受。作者指出，仅使用 Ubuntu 构建环境以及采用 GPT-3.5 生成解释都可能带来偏差。函数由 IDA Pro 7.6 反汇编，少于三个基本块的函数被排除。相似性结果使用 BinaryCorp-3M 中不同优化级别的函数对，各基线采用线性探测，jTrans 另做了完整微调，CLAP 则未经微调；密码算法识别（17 种算法，约 7 万个依据函数名与软件包元数据标注的函数）和协议分类（18 种类型）使用作者从 Ubuntu 软件包构建的数据集，其中微调后的 CLAP 超过基线，零样本 CLAP 在密码算法识别上则略逊于最佳基线。恶意软件与排序算法结果仅为个案研究。训练使用 32 块 A100 GPU。CLAP 输出的是嵌入和标签分数，既不是反编译器，也不是恶意软件检测器。",
  "targets": [
    "binary"
  ],
  "title": "CLAP: Learning Transferable Binary Code Representations with Natural Language Supervision",
  "title_zh": "CLAP：借助自然语言监督学习可迁移的二进制代码表示",
  "url": "https://dl.acm.org/doi/10.1145/3650212.3652145",
  "venue": "ACM ISSTA 2024",
  "verification": "source-reviewed",
  "verified_at": "2026-10-19",
  "why_fits_en": "Adds assembly representation learning aligned with natural language, which supports zero-shot and few-shot function labeling and similarity search in binary analysis, complementing jTrans and the LLM-based decompilation and summarization records.",
  "why_fits_zh": "补充与自然语言对齐的汇编表示学习方法，可在二进制分析中支持零样本和少样本函数标注及相似性检索，与 jTrans 以及基于大语言模型的反编译和摘要研究互补。",
  "year": 2024
}
