BinMetric: A Comprehensive Binary Analysis Benchmark for Large Language Models

Xiuwei Shang, Guoqiang Chen, Shaoyin Cheng, Benlong Wu, Li Hu, Gangyang Li, Weiming Zhang, Nenghai YuarXiv 2025 · DOI

Abstract

Binary analysis is a cornerstone of software security, yet it remains a labor-intensive process requiring deep human expertise. While Large Language Models (LLMs) have demonstrated remarkable capabilities in high-level programming, their proficiency in low-level assembly and machine code analysis is largely unquantified. This paper introduces BinMetric, the first standardized benchmark designed to evaluate LLMs across a spectrum of binary analysis tasks. Featuring 1,000 questions derived from real-world projects, BinMetric provides a rigorous framework for measuring progress in automated reverse engineering. Our evaluation of 12 state-of-the-art models reveals that while LLMs show promise in semantic comprehension, they face significant hurdles in low-level synthesis and precise binary lifting.

Introduction

Traditional binary analysis—the process of deciphering compiled programs without source code—is essential for malware analysis and vulnerability research. However, the field currently lacks a "North Star" for evaluating AI-driven automation. Existing benchmarks typically focus on source code or isolated tasks, leaving three major gaps: a lack of high-quality "stripped" binary datasets, insufficient task diversity, and a lack of rigorous, reproducible evaluation frameworks. BinMetric addresses these gaps by providing a multi-dimensional benchmark that reflects real-world reverse engineering challenges.

Methodology

The researchers developed a robust pipeline to ensure the realism and quality of the BinMetric benchmark. The process involves three primary stages: dataset collection, construction, and evaluation.

The BinMetric Pipeline for Dataset Construction and Evaluation
  1. Dataset Collection & Preprocessing: 20 popular open-source C projects (e.g., OpenSSL, Redis, SQLite) were selected based on criteria like diversity and quality. These were compiled for x86-64 and "stripped" of debugging symbols to mimic real-world scenarios.
  2. Dataset Construction: Using industry-standard tools like IDA Pro, the team generated assembly and pseudo-code. They then applied length and data-leakage filtering before constructing prompts.
  3. Query & Evaluation: The benchmark employs specialized evaluators for different task categories, including a Dockerized environment for the Assembly Synthesis Evaluator to verify execution correctness.

The BinMetric Benchmark

BinMetric categorizes binary analysis into a hierarchy of six tasks, ranging from low-level code lifting to high-level logical analysis.

Hierarchy of Binary Analysis Tasks and Corresponding Benchmark Categories
  • Binary Code Lifting: Includes Call-site Reconstruction (CSR) and Decompilation (DEC).
  • Semantic Comprehension: Focuses on Signature Recovery (SR) and Binary Code Summarization (BCS).
  • Logical Analysis: Involves Algorithm Classification (AC) to identify routine types (e.g., encryption or sorting).
  • Assembly Synthesis: Tests the model's ability to perform Assembly Instruction Generation (AIG) from natural language.

Key Results and Insights

The study evaluated 12 state-of-the-art LLMs using a one-shot prompting strategy, which improved performance by an average of 16.65% for most models. Key findings include:

  • Performance Leaders: GPT-4 emerged as the overall leader with an average score of 27.46%, excelling particularly in decompilation and logical analysis. Among open-source models, CodeLlama-34B was the top performer, outclassing GPT-3.5 in several categories.
  • The Complexity Ceiling: Performance dropped by an average of 6% as input code length increased, highlighting ongoing challenges with long-context architectural analysis.
  • The "Final Bosses": Assembly Instruction Generation (AIG) and Call-site Reconstruction (CSR) proved the most difficult. Most models scored near zero on execution correctness for assembly, indicating a significant gap in handling low-level hardware logic.
  • Domain Specialization: Models pre-trained on code (e.g., DeepSeek-Coder) significantly outperformed general-purpose models of comparable size, underscoring the importance of domain-specific training.

Conclusion and Future Work

BinMetric establishes a critical baseline for the application of LLMs in binary analysis. While current models are not yet ready to replace human experts—particularly in tasks requiring strict syntactic and logical precision—they are becoming invaluable assistants. Future iterations of BinMetric aim to incorporate obfuscated binaries, diverse hardware architectures, and more complex data structures to further push the boundaries of AI-assisted security research.

Summary updated

BibTeX
@misc{shang2025binmetric,
  author = {Xiuwei Shang and Guoqiang Chen and Shaoyin Cheng and Benlong Wu and Li Hu and Gangyang Li and Weiming Zhang and Nenghai Yu},
  title = {{BinMetric: A Comprehensive Binary Analysis Benchmark for Large Language Models}},
  year = {2025},
  eprint = {2505.07360},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.07360},
}
Figure