Introduction
Binary Function Similarity Detection (BFSD) is a critical task in security research, enabling the identification of known vulnerabilities within compiled code where source code is unavailable. For instance, a researcher identifying a vulnerability in an open-source library can use BFSD to locate the same flaw within proprietary IoT firmware. Despite the recent surge in AI-powered BFSD tools, the field has suffered from a lack of rigorous factor analysis, unrealistic evaluation datasets, and under-explored synergy between different tool representations.
This study presents the first large-scale empirical evaluation of nine state-of-the-art BFSD models. By introducing two massive new datasets and a novel consensus-based voting strategy, the authors provide actionable insights into performance bottlenecks and demonstrate a 13.4% improvement in real-world vulnerability detection.
Methodology and Tool Evaluation
The researchers evaluated nine representative BFSD tools categorized by their underlying code representation: graph-based models (Gemini, GMN, HermesSim), assembly-based models (Asm2Vec, PalmTree, SAFE, jTrans, CLAP), and a new decompilation-based baseline called DEJINA.
The standard BFSD pipeline involves embedding functions into vectors, ranking them by similarity, and verifying the results through manual or automated inspection.
A key contribution of this work is the Consensus-based Voting Strategy. By combining tools that "see" code differently—such as pairing a graph-based tool with a decompilation-based one—the researchers created an ensemble that compensates for individual tool weaknesses and complementary failure patterns.
Benchmarking with Large-Scale Datasets
To address the limitations of existing "clean" datasets, the authors developed two high-fidelity benchmarks:
- BINATLAS: A capability evaluation dataset featuring 12,453 binaries and over 7.3 million functions across 320 compilation configurations (various architectures, compilers, and optimization levels).
- BINARES: A real-world dataset derived from 58 IoT firmware images (e.g., ASUS, Cisco, Tenda), containing 54 known 1-day vulnerabilities and 1,442 manually verified ground-truth functions.
Key Insights and Performance Bottlenecks
The study revealed several critical factors affecting BFSD performance in realistic environments:
- The Representation Gap: Assembly-based tools are highly sensitive to architectural changes (e.g., x86 vs. ARM). In contrast, graph-based and decompilation-based tools exhibit greater robustness to these variations.
- Function Inlining: While minor inlining is manageable, significant semantic shifts (over 70% instruction difference) remain a major challenge for even the best tools.
- The Pool Size Penalty: Most existing research evaluates tools against small pools (~10,000 functions). This study demonstrates that as the search space scales to 100,000 functions—a more realistic scenario for firmware analysis—performance metrics like Mean Reciprocal Rank (MRR) can drop by up to 15%.
Results and Impact
- Top Performers: HermesSim (graph-based) and DEJINA (decompilation-based) emerged as the most consistent tools across diverse test cases.
- Ensemble Gains: Combining GMN and CLAP resulted in a 12.8% improvement in MRR.
- Real-World Validation: On the BINARES firmware dataset, the proposed voting strategy achieved an F1-score of 58.5% in top-25 results, representing a 13.4% improvement over the best individual tool (HermesSim).
Future Directions
While AI has significantly advanced BFSD, manual verification of top-ranked results remains necessary. Future work should explore the use of Large Language Models (LLMs) to automate this final inspection. Additionally, there is a pressing need for "sub-function" or snippet-level matching to identify vulnerabilities in small code segments, as well as more efficient filtering techniques to handle search pools containing millions of functions.
Summary updated