Beyond Embeddings: Interpretable Feature Extraction for Binary Code Similarity

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Gagnon, Charles E., Ding, Steven H. H., Charland, Philippe, Fung, Benjamin C. M.
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909812913078272
author Gagnon, Charles E.
Ding, Steven H. H.
Charland, Philippe
Fung, Benjamin C. M.
author_facet Gagnon, Charles E.
Ding, Steven H. H.
Charland, Philippe
Fung, Benjamin C. M.
contents Binary code similarity detection is a core task in reverse engineering. It supports malware analysis and vulnerability discovery by identifying semantically similar code in different contexts. Modern methods have progressed from manually engineered features to vector representations. Hand-crafted statistics (e.g., operation ratios) are interpretable, but shallow and fail to generalize. Embedding-based methods overcome this by learning robust cross-setting representations, but these representations are opaque vectors that prevent rapid verification. They also face a scalability-accuracy trade-off, since high-dimensional nearest-neighbor search requires approximations that reduce precision. Current approaches thus force a compromise between interpretability, generalizability, and scalability. We bridge these gaps using a language model-based agent to conduct structured reasoning analysis of assembly code and generate features such as input/output types, side effects, notable constants, and algorithmic intent. Unlike hand-crafted features, they are richer and adaptive. Unlike embeddings, they are human-readable, maintainable, and directly searchable with inverted or relational indexes. Without any matching training, our method respectively achieves 42% and 62% for recall@1 in cross-architecture and cross-optimization tasks, comparable to embedding methods with training (39% and 34%). Combined with embeddings, it significantly outperforms the state-of-the-art, demonstrating that accuracy, scalability, and interpretability can coexist.
format Preprint
id arxiv_https___arxiv_org_abs_2509_23449
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Beyond Embeddings: Interpretable Feature Extraction for Binary Code Similarity
Gagnon, Charles E.
Ding, Steven H. H.
Charland, Philippe
Fung, Benjamin C. M.
Artificial Intelligence
Cryptography and Security
Software Engineering
Binary code similarity detection is a core task in reverse engineering. It supports malware analysis and vulnerability discovery by identifying semantically similar code in different contexts. Modern methods have progressed from manually engineered features to vector representations. Hand-crafted statistics (e.g., operation ratios) are interpretable, but shallow and fail to generalize. Embedding-based methods overcome this by learning robust cross-setting representations, but these representations are opaque vectors that prevent rapid verification. They also face a scalability-accuracy trade-off, since high-dimensional nearest-neighbor search requires approximations that reduce precision. Current approaches thus force a compromise between interpretability, generalizability, and scalability. We bridge these gaps using a language model-based agent to conduct structured reasoning analysis of assembly code and generate features such as input/output types, side effects, notable constants, and algorithmic intent. Unlike hand-crafted features, they are richer and adaptive. Unlike embeddings, they are human-readable, maintainable, and directly searchable with inverted or relational indexes. Without any matching training, our method respectively achieves 42% and 62% for recall@1 in cross-architecture and cross-optimization tasks, comparable to embedding methods with training (39% and 34%). Combined with embeddings, it significantly outperforms the state-of-the-art, demonstrating that accuracy, scalability, and interpretability can coexist.
title Beyond Embeddings: Interpretable Feature Extraction for Binary Code Similarity
topic Artificial Intelligence
Cryptography and Security
Software Engineering
url https://arxiv.org/abs/2509.23449