# GraphBinMatch: Graph-based Similarity Learning for Cross-Language Binary and Source Code Matching

**Authors:** Ali TehraniJamsaz, Hanze Chen, Ali Jannesari  
**arXiv:** [2304.04658](https://arxiv.org/abs/2304.04658)  
**Date:** 2023-04-10  
**Summary page:** https://www.summarizepaper.com/en/arxiv-id/2304.04658v1/

## Key points

- Matching binary code to source code and vice versa is crucial in various fields including computer security, software engineering, and reverse engineering.
- Existing methods focus on matching source code with binary code for specific programming languages, but programs are developed using different languages based on their requirements.
- Cross-language binary-to-source code matching has gained increased interest.
- The authors propose GraphBinMatch, an approach based on a graph neural network that learns the similarity between binary and source codes.
- The goal of GraphBinMatch is to accurately predict matches between binary and source code across different programming languages.
- Cross-language binary-source matching is important in practical scenarios where software applications are written in multiple programming languages to meet various requirements.
- Detecting binary-source code clones across different languages can be beneficial for vulnerability assessment and improving code bases.
- Input files are converted to LLVM IR, a language-independent format commonly used in modern compilers, to facilitate easier comparison of code written in different programming languages.
- GraphBinMatch significantly outperforms state-of-the-art approaches with improvements of up to 15% in terms of F1 score.
- GraphBinMatch also demonstrates superior performance in single-language scenarios.
- The paper concludes with discussions on related works and future research directions.

## Summary

Matching binary code to source code and vice versa is a crucial task in various fields, including computer security, software engineering, and reverse engineering. While there are existing methods that focus on matching source code with binary code for specific programming languages, the reality is that programs are developed using different languages based on their requirements. This has led to an increased interest in cross-language binary-to-source code matching. In this paper, the authors propose GraphBinMatch, an approach based on a graph neural network that learns the similarity between binary and source codes. The goal is to address the challenges of accurately predicting matches between binary and source code across different programming languages. The paper highlights the importance of cross-language binary-source matching in practical scenarios where software applications are written in multiple programming languages to meet various requirements. Detecting binary-source code clones across different languages can be beneficial, especially for vulnerability assessment and improving code bases. To facilitate easier comparison of code written in different programming languages, the authors convert input files to LLVM IR, a language-independent format commonly used in modern compilers. This allows for more efficient code comparison and analysis. The authors evaluate GraphBinMatch on several tasks, including cross-language binary-to-source code matching, cross-language source-to-source matching, and single-language binary-to-source code matching. Experimental results demonstrate that GraphBinMatch significantly outperforms state-of-the art approaches with improvements of up to 15% in terms of F1 score. The effectiveness of GraphBinMatch extends beyond cross language matching and also applies to single language scenarios. Overall, GraphBinMatch demonstrates superior performance compared to existing approaches making it a promising solution for accurate cross language binary to source code matching. The paper concludes with discussions on related works and future research directions.
