MicroSim:基于对比图神经网络的二进制代码相似性检测系统
MicroSim: Contrastive Graph Neural Networks for Binary Code Similarity Detection
做逆向或安全分析的朋友可以看看这篇:MicroSim 用 IDA 微码建图加孪生 GNN,在 84 万函数的 TREX 基准上 ROC-AUC 到了 0.9972,比 SAFE 和 jTrans 重训后的成绩都高。论文还对比了 InfoNCE 和余弦损失在不同任务上的差异,选损失函数时用得上。
MicroSim 是一个二进制代码相似性检测系统,将函数表示为由 IDA Pro Hex-Rays 微码构建的图,再用对比式孪生图神经网络(GNN)比较。在 TREX 跨优化基准上——覆盖 849,072 个函数级微码图、优化等级从 -O0 到 -O3,并采用训练与测试无共享函数的严格类不相交划分——MicroSim 取得 0.9972 ROC-AUC 和 0.9762 MCC。
同一切分下重训的对比方法中,Gemini 为 0.9332 ROC-AUC,SAFE 为 0.9752,jTrans 为 0.9740,无结构 BoW 基线为 0.9484,均低于 MicroSim。论文还分析了图 transformer 中成对分类与排序检索的差距:在统一平局处理评估下,CSLS 将 GraphGPS 的 MRR 从 0.2542 提升到 0.2559(R@1 = 0.1639,R@10 = 0.4561),严格满足理论上限。
在 5 个随机种子、相同算力的对比实验中,成对余弦嵌入损失的 ROC-AUC 略高(Δ = -0.0256,95% 置信区间 [-0.3282, +0.2770]),而监督对比 InfoNCE 损失在阈值化分类和排序检索上显著更好。对从事逆向工程、漏洞挖掘和恶意软件分析的团队,这套基于微码图的方案在跨编译优化场景下提供了比文本式嵌入更强的可比结果。
MicroSim: Contrastive Graph Neural Networks for Binary Code Similarity Detection
We present MicroSim, a system for binary code similarity detection that represents each function as a graph built from IDA Pro Hex-Rays microcode and compares such graphs with a contrastive Siamese graph neural network (GNN). We evaluate on the TREX cross-optimization benchmark, a corpus of 849,072 function-level microcode graphs spanning optimization levels -O0 through -O3, under a strict class-disjoint split in which no function key is shared between train and test. Under this protocol, MicroSim reaches 0.9972 area under the receiver operating characteristic curve (ROC-AUC) and 0.9762 Matthews correlation coefficient (MCC), outperforming Gemini (0.9332 ROC-AUC), SAFE (0.9752), and jTrans (0.9740) retrained on the same split, as well as a structure-free Bag-of-Words (BoW) baseline (0.9484). We analyze the gap between pair classification and ranked retrieval in graph transformers, showing that Cross-domain Similarity Local Scaling (CSLS) under unified tie-resolved evaluation raises GraphGPS mean reciprocal rank (MRR) from 0.2542 to 0.2559 (R@1 = 0.1639, R@10 = 0.4561), strictly satisfying the theoretical MRR upper bound. Finally, over 5 seeds with equal compute, the pairwise cosine-embedding loss attains a slightly higher ROC-AUC (Δ = -0.0256, 95% confidence interval [-0.3282, +0.2770]), whereas the supervised-contrastive information noise-contrastive estimation (InfoNCE) loss is significantly better on thresholded classification and ranked retrieval.
This report is categorized under AITOP's "Papers" desk. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows. Key entities and technical topics under continuous tracking include MicroSim, GNN, 二进制代码相似性, 逆向工程.
Source attribution: curated from arXiv cs.LG (@Moussa Moussaoui, Tarik Houichime, Abdelghani Souhar, Abdelalim Sadiq).