Improving Binary Code Similarity Transformer Models by Semantics-Driven Instruction Deemphasis
Xiangzhe Xu, Shiwei Feng, Yapeng Ye, Guangyu Shen, Zian Su, Siyuan Cheng, Guanhong Tao, Qingkai Shi, Zhuo Zhang, Xiangyu Zhang
Abstract
Given a function in the binary executable form, binary code similarity analysis determines a set of similar functions from a large pool of candidate functions. These similar functions are usually compiled from the same source code with different compilation setups. Such analysis has a large number of applications, such as malware detection, code clone detection, and automatic software patching. The state-of-the art methods utilize complex Deep Learning models such as Transformer models. We observe that these models suffer from undesirable instruction distribution biases caused by specific compiler conventions. We develop a novel technique to detect such biases and repair them by removing the corresponding instructions from the dataset and finetuning the models. This entails synergy between Deep Learning model analysis and program analysis. Our results show that we can substantially improve the state-of-the-art models' performance by up to 14.4% in the most challenging cases where test data may be out of the distributions of training data.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
16 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- BinaryAI: Binary Software Composition Analysis via Intelligent Binary Source Code Matching cites Asm2Vec: Boosting Static Representation Robustness for Binary Clone Search against Code Obfuscation and Compiler Optimization
- BinaryAI: Binary Software Composition Analysis via Intelligent Binary Source Code Matching cites jTrans: jump-aware transformer for binary code similarity detection
- ShieldedCode: Learning Robust Representations for Virtual Machine Protected Code cites Asm2Vec: Boosting Static Representation Robustness for Binary Clone Search against Code Obfuscation and Compiler Optimization
- ShieldedCode: Learning Robust Representations for Virtual Machine Protected Code cites jTrans: jump-aware transformer for binary code similarity detection
- ShieldedCode: Learning Robust Representations for Virtual Machine Protected Code cites CEBin: A Cost-Effective Framework for Large-Scale Binary Code Similarity Detection
- jTrans: jump-aware transformer for binary code similarity detection cites Order Matters: Semantic-Aware Neural Networks for Binary Code Similarity Detection
- jTrans: jump-aware transformer for binary code similarity detection cites Asm2Vec: Boosting Static Representation Robustness for Binary Clone Search against Code Obfuscation and Compiler Optimization
- ReSym: Harnessing LLMs to Recover Variable and Data Structure Symbols from Stripped Binaries cites Language Models are Few-Shot Learners
- ReSym: Harnessing LLMs to Recover Variable and Data Structure Symbols from Stripped Binaries cites Asm2Vec: Boosting Static Representation Robustness for Binary Clone Search against Code Obfuscation and Compiler Optimization
- ReSym: Harnessing LLMs to Recover Variable and Data Structure Symbols from Stripped Binaries cites jTrans: jump-aware transformer for binary code similarity detection
- ReSym: Harnessing LLMs to Recover Variable and Data Structure Symbols from Stripped Binaries cites TriggerScope: Towards Detecting Logic Bombs in Android Applications
- ReSym: Harnessing LLMs to Recover Variable and Data Structure Symbols from Stripped Binaries cites Source Code Foundation Models are Transferable Binary Analysis Knowledge Bases
- CEBin: A Cost-Effective Framework for Large-Scale Binary Code Similarity Detection cites Order Matters: Semantic-Aware Neural Networks for Binary Code Similarity Detection
- CEBin: A Cost-Effective Framework for Large-Scale Binary Code Similarity Detection cites Asm2Vec: Boosting Static Representation Robustness for Binary Clone Search against Code Obfuscation and Compiler Optimization
- Source Code Foundation Models are Transferable Binary Analysis Knowledge Bases cites BinaryAI: Binary Software Composition Analysis via Intelligent Binary Source Code Matching
Cited by top-tier papers16
- BinaryAI: Binary Software Composition Analysis via Intelligent Binary Source Code MatchingLing Jiang, Junwen An, Huihui Huang, Qiyi Tang et al.ICSE 2024 · 43 citations
- ReSym: Harnessing LLMs to Recover Variable and Data Structure Symbols from Stripped BinariesDanning Xie, Zhuo Zhang, Nan Jiang, Xiangzhe Xu et al.CCS 2024 · 21 citations
- CEBin: A Cost-Effective Framework for Large-Scale Binary Code Similarity DetectionHao Wang, Zeyu Gao, Chao Zhang, Mingyang Sun et al.ISSTA 2024 · 21 citations
- Source Code Foundation Models are Transferable Binary Analysis Knowledge BasesZian Su, Xiangzhe Xu, Ziyang Huang, Kaiyuan Zhang et al.NeurIPS 2024 · 17 citations
- ShieldedCode: Learning Robust Representations for Virtual Machine Protected CodeMingqiao Mo, Yunlong Tan, Hao Zhang, Heng Zhang et al.ICLR 2026 · 10 citations
Builds on16
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- 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 citations
- Order Matters: Semantic-Aware Neural Networks for Binary Code Similarity DetectionZeping Yu, Rui Cao, Qiyi Tang, Sen Nie et al.AAAI 2020 · 265 citations
- TriggerScope: Towards Detecting Logic Bombs in Android ApplicationsYanick Fratantonio, Antonio Bianchi, William K. Robertson, Engin Kirda et al.S&P 2016 · 161 citations
- jTrans: jump-aware transformer for binary code similarity detectionHao Wang, Wenjie Qu, Gilad Katz, Wenyu Zhu et al.ISSTA 2022 · 139 citations
Related papers
- Transforming Generic Coder LLMs to Effective Binary Code Embedding Models for Similarity DetectionLitao Li, Leo Song, Steven H. H. Ding, Benjamin C. M. Fung et al.NeurIPS 2025 · 2 citations
- Unsupervised Binary Code Translation with Application to Code Clone Detection and Vulnerability DiscoveryIftakhar Ahmad, Lannan LuoEMNLP Findings 2023 · 5 citations
- Neural Machine Translation Inspired Binary Code Similarity Comparison beyond Function PairsFei Zuo, Xiaopeng Li, Patrick Young, Lannan Luo et al.NDSS 2019 · 262 citations
- BinAug: Enhancing Binary Similarity Analysis with Low-Cost Input RepairingWai Kin Wong, Huaijin Wang, Zongjie Li, Shuai WangICSE 2024 · 4 citations
- Towards Learning (Dis)-Similarity of Source Code from Program ContrastsYangruibo Ding, Luca Buratti, Saurabh Pujar, Alessandro Morari et al.ACL 2022
