Call graph context boosts similarity detection but harms other binary analysis tasks
Adding inter-procedural call-graph information improves binary code similarity detection but degrades performance on downstream semantic and syntactic tasks
Software arXiv 3 Aug 2026 Measurement Prototype evidence
Published as “Pretraining on Call Graphs: When Binary Analysis Tasks Profit From Context”
Why it matters
Practitioners should weigh the BCSD gains from call-graph pretraining against potential losses on other reverse-engineering tasks, especially when semantic precision is required.
Summary
Adding call-graph pretraining (especially with a GAT of depth 2) markedly improves binary code similarity detection (recall@1 rises from 0.758 to 0.867 for CLAP and from 0.579 to 0.817 for jTrans), but the same embeddings hurt downstream semantic function-labeling and syntactic compiler-provenance tasks, with performance often dropping as call depth increases. The evidence comes from experiments on the BinaryCorp dataset using two backbone embedding models (CLAP, jTrans) and several graph-neural-network variants, showing consistent trade-offs across tasks.
What they found 3
- GAT(2) yields the largest BCSD gains for both backbones.
“The usage of GAT(2) leads to a performance improvement of almost +0.11 from 0.758 to 0.867 for CLAP and an improvement of +0.24 from 0.579 to 0.817 for jTrans, almost achieving comparable results to the CLAP-based GATs.”
- Both backbones outperform any call-graph-enhanced model on the function-labeling (XFL) task.
“both CLAP and jTrans outperform every model that attempts to enhance the embeddings with contextual information from the call graph.”
- Semantic pretraining degrades syntactic COD performance, especially beyond call depth 2.
“the performance keeps deteriorating particularly starting at a call depth of 2.”
Caveats 6
- AVG models, on the other hand, outperform their backbone and continue improving with access to larger call depths when using CLAP as a backbone.
- AVG models perform comparably, if not even better, than the GNNs on the XFL task.
- The threats to internal validity arise primarily from design choices made in this study.
- we focused on examining trends in model performance changes as opposed to achieving the highest possible metric scores.
- A main threat to external validity is the selection of our downstream tasks.
- the selected dataset... may not hold for other binary corpora.
What’s new here 4
- Systematic evaluation of call-graph-enhanced embeddings on both semantic (function labeling) and syntactic (compiler provenance) downstream tasks, not just BCSD.
- Detailed robustness analysis across function size, call-graph similarity, source language, and compiler optimizations.
- Identification that benefits are strongest for namespace-related functions versus individual-logic functions.
- Comparison of simple averaging (AVG) versus GNN (GAT/GCN) approaches for integrating call-graph context.