CLAP: Learning Transferable Binary Code Representations with Natural Language Supervision
Hao Wang, Zeyu Gao, Chao Zhang, Zihan Sha, Mingyang Sun, Yuchen Zhou, Wenyu Zhu, Wenju Sun, Han Qiu, Xi Xiao
摘要
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. We release our pre-trained model and code at https://github.com/Hustcw/CLAP .
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 19 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- ShieldedCode: Learning Robust Representations for Virtual Machine Protected Code 引用了 Asm2Vec: Boosting Static Representation Robustness for Binary Clone Search against Code Obfuscation and Compiler Optimization
- ShieldedCode: Learning Robust Representations for Virtual Machine Protected Code 引用了 Neural Network-based Graph Embedding for Cross-Platform Binary Code Similarity Detection
- Virtual Compiler Is All You Need For Assembly Code Search 引用了 Learning Transferable Visual Models From Natural Language Supervision
- Asm2Vec: Boosting Static Representation Robustness for Binary Clone Search against Code Obfuscation and Compiler Optimization 引用了 Neural Network-based Graph Embedding for Cross-Platform Binary Code Similarity Detection
- Improving ML-based Binary Function Similarity Detection by Assessing and Deprioritizing Control Flow Graph Features 引用了 Order Matters: Semantic-Aware Neural Networks for Binary Code Similarity Detection
- Improving ML-based Binary Function Similarity Detection by Assessing and Deprioritizing Control Flow Graph Features 引用了 Asm2Vec: Boosting Static Representation Robustness for Binary Clone Search against Code Obfuscation and Compiler Optimization
- Improving ML-based Binary Function Similarity Detection by Assessing and Deprioritizing Control Flow Graph Features 引用了 Neural Network-based Graph Embedding for Cross-Platform Binary Code Similarity Detection
- vSim: Semantics-Aware Value Extraction for Efficient Binary Code Similarity Analysis 引用了 Order Matters: Semantic-Aware Neural Networks for Binary Code Similarity Detection
- vSim: Semantics-Aware Value Extraction for Efficient Binary Code Similarity Analysis 引用了 Asm2Vec: Boosting Static Representation Robustness for Binary Clone Search against Code Obfuscation and Compiler Optimization
- vSim: Semantics-Aware Value Extraction for Efficient Binary Code Similarity Analysis 引用了 Neural Network-based Graph Embedding for Cross-Platform Binary Code Similarity Detection
- vSim: Semantics-Aware Value Extraction for Efficient Binary Code Similarity Analysis 引用了 Improving ML-based Binary Function Similarity Detection by Assessing and Deprioritizing Control Flow Graph Features
引用它的顶会 Paper19
- Improving ML-based Binary Function Similarity Detection by Assessing and Deprioritizing Control Flow Graph FeaturesJialai Wang, Chao Zhang, Longfei Chen, Yi Rong 等USENIX Security 2024 · 15 次引用
- SK2Decompile: LLM-based Two-Phase Binary Decompilation from Skeleton to SkinHanzhuo Tan, Weihao Li, Xiaolong Tian, Siyi Wang 等ICLR 2026 · 10 次引用
- ShieldedCode: Learning Robust Representations for Virtual Machine Protected CodeMingqiao Mo, Yunlong Tan, Hao Zhang, Heng Zhang 等ICLR 2026 · 10 次引用
- Virtual Compiler Is All You Need For Assembly Code SearchZeyu Gao, Hao Wang, Yuanda Wang, Chao ZhangACL 2024 · 3 次引用
- vSim: Semantics-Aware Value Extraction for Efficient Binary Code Similarity AnalysisHuaijin Wang, Zhiqiang LinNDSS 2026 · 3 次引用
它引用的 Paper11
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh 等ICML 2021 · 47,906 次引用
- Neural Network-based Graph Embedding for Cross-Platform Binary Code Similarity DetectionXiaojun Xu, Chang Liu, Qian Feng, Heng Yin 等CCS 2017 · 682 次引用
- Asm2Vec: Boosting Static Representation Robustness for Binary Clone Search against Code Obfuscation and Compiler OptimizationSteven H. H. Ding, Benjamin C. M. Fung, Philippe CharlandS&P 2019 · 447 次引用
- Order Matters: Semantic-Aware Neural Networks for Binary Code Similarity DetectionZeping Yu, Rui Cao, Qiyi Tang, Sen Nie 等AAAI 2020 · 265 次引用
- Neural Nets Can Learn Function Type Signatures From BinariesZheng Leong Chua, Shiqi Shen, Prateek Saxena, Zhenkai LiangUSENIX Security 2017 · 175 次引用
相关 Paper
- Understanding Transferable Representation Learning and Zero-shot Transfer in CLIPZixiang Chen, Yihe Deng, Yuanzhi Li, Quanquan GuICLR 2024 · 21 次引用
- Is a Caption Worth a Thousand Images? A Study on Representation LearningShibani Santurkar, Yann Dubois, Rohan Taori, Percy Liang 等ICLR 2023 · 9 次引用
- PalmTree: Learning an Assembly Language Model for Instruction EmbeddingXuezixiang Li, Yu Qu, Heng YinCCS 2021 · 139 次引用
- Towards Better Code Understanding in Decoder-Only Models with Contrastive LearningJiayi Lin, Yanlin Wang, Yibiao Yang, Lei Zhang 等AAAI 2026 · 2 次引用
- Advancing Multi-grained Alignment for Contrastive Language-Audio Pre-trainingYiming Li, Zhifang Guo, Xiangdong Wang, Hong LiuACM MM 2024 · 9 次引用
