Transforming Generic Coder LLMs to Effective Binary Code Embedding Models for Similarity Detection

Li-Tao Li, Leo Song, Steven H. H. Ding, B. Fung, Philippe Charland
1/1/2025

No confident code implementation found for this paper.

Abstract

Cybersecurity and software research have crossed paths with modern deep learning research for a few years. The power of large language models (LLMs) in particular has intrigued us to apply them to understanding binary code.

Show full abstract

In this paper, we investigate some of the many ways LLMs can be applied to binary code similarity detection, as it is a significantly more difficult task compared to source code similarity detection due to the sparsity of information and less meaningful syntax. It also has great practical implications, such as vulnerability and malware detection. We find that pretrained LLMs are mostly capable of detecting similar binary code, even with a zero-shot setting. Our main contributions and findings are to provide several supervised fine-tuning methods that, when combined, significantly surpass zero-shot LLMs and state-of-the-art binary code similarity detection methods. Specifically, we up-train the model through data augmentation, translation-style causal learning, LLM2Vec, and cumulative GTE loss. With a complete ablation study, we show that our training method can transform a generic language model into a powerful binary similarity expert, and is also robust and general enough for cross-optimization, cross-architecture, and cross-obfuscation detection.

DOISemantic Scholar

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{li2025transforming,
  title  = {Transforming Generic Coder LLMs to Effective Binary Code Embedding Models for Similarity Detection},
  author = {Li-Tao Li and Leo Song and Steven H. H. Ding and B. Fung and Philippe Charland},
  year   = {2025},
  doi    = {10.52202/085713-5681},
  url    = {https://doi.org/10.52202/085713-5681},
  journal = {Neural Information Processing Systems}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/a1a4d09a87a1fc2dc8caa020bc60e5bcf214b91a.svg)](https://codeofpaper.com/paper/a1a4d09a87a1fc2dc8caa020bc60e5bcf214b91a)

Discussion