Code is not Natural Language: Unlock the Power of {Semantics-Oriented} Graph Representation for Binary Code Similarity Detection
Haojie HeXLXingwei LinZiang WengRuijie ZhaoShuitao GanLibo ChenYuede JiJWJiashui WangZhi Xue
Haojie He
XLXingwei Lin
Ziang Weng
Ruijie Zhao
Shuitao Gan
Libo Chen
Yuede Ji
JWJiashui Wang
Zhi Xue
+9
Binary code similarity detection has relied on instruction streams, which treat code like natural language and ignore its well-defined semantic structure, or on control flow graphs, which capture only control flow. Motivated by observing that binary code has intra-instruction structure, inter-instruction relations such as def-use and branches, and implicit conventions such as calling conventions, the authors explicitly expose the relations and structures needed to express full semantics through a semantics-oriented graph representation, paired with a lightweight multi-head softmax aggregator that fuses these aspects efficiently. Experiments show large gains over the state of the art, e.g. in x64-XC retrieval with a pool size of 10000, recall exceeds Trex, GMN, and jTrans by 184%, 220%, and 153%.

USENIX · 2024