2022 · Conference paper

jTrans: Jump-Aware Transformer for Binary Code Similarity Detection

jTrans embeds binary functions for similarity search with a BERT-style Transformer. Its jump-aware representation shares parameters between a direct jump’s operand token and the positional embedding of the jump target, so control flow enters the instruction sequence without a separate graph network. The model is pre-trained with masked language modeling and jump-target prediction, then fine-tuned with a cosine triplet objective on functions compiled from the same source at different optimization levels. The paper also introduces BinaryCorp, built by compiling C/C++ packages from Arch Linux’s official repositories and the AUR with gcc and g++.

Scope and limitations

The model is trained on a single architecture (x86, per the paper’s discussion); cross-architecture search is not evaluated. Only direct jumps are encoded, and indirect-jump targets are left out of scope. Disassembly and function extraction rely on IDA Pro 7.5, so boundary errors upstream are not measured. BinaryCorp pairs gcc/g++ builds across O0–O3 and Os, with train and test split by project; it does not cover obfuscation or other compilers, and only the vulnerability study adds clang variants. Author-reported Recall@1 at pool size 10,000 on BinaryCorp-26M averages 62.5% against 32.0% for the best baseline, and accuracy still falls as pools grow, which the authors note for larger real-world pools. The vulnerability search uses eight CVEs with ten variants each. Baselines date from 2022, and Asm2Vec and OrderMatters were reimplemented, so the comparison does not establish current rankings. Similarity ranking identifies candidate matches; it does not recover source code, names or types.

Why it fits this collection

Adds learned binary code similarity search, a reverse-engineering aid for function matching, library identification and known-vulnerability search, complementing decompilation and symbol-recovery research.

Publication and review details

Venue
ACM ISSTA 2022
Status
Conference paper
Publication / posting date
July 18, 2022
Date source
ACM’s Crossref deposit records published/print and online publication on 2022-07-18. The date comes from that publisher deposit, not from the July 18–22 conference dates.
First arXiv submission
May 25, 2022
arXiv
2205.12713
Reviewed arXiv version
v1
DOI
10.1145/3533767.3534367

The arXiv abstract page titles the paper “jTrans: Jump-Aware Transformer for Binary Code Similarity”; its v1 PDF, the only version, carries the full ISSTA title, ACM reference format and DOI, and its comment cites ISSTA 2022. Crossref and the PDF agree on the eight-author order, the DOI, pages 1–13 and a CC BY 4.0 license. The README at the reviewed 2025-04-10 commit declares MIT and lists Linux, Python 3.8+, PyTorch 1.10+, CUDA 10.2+ and IDA Pro 7.5+ for dataset processing. Trained models, experiment files, the processed BinaryCorp and its original binaries are hosted on the authors’ lab file server outside GitHub, so their availability is separate from the repository. The released data-loading code truncates each function to 512 token positions. Packaged software in BinaryCorp retains its own licenses. Nothing was downloaded beyond the paper and repository files, and no code or experiments were run.

Sources reviewed

Source review only; experiments were not rerun for this collection. Cite the original authors using the linked paper or BibTeX.

Primary sources

  1. https://dl.acm.org/doi/10.1145/3533767.3534367
  2. https://api.crossref.org/works/10.1145/3533767.3534367
  3. https://arxiv.org/abs/2205.12713
  4. https://arxiv.org/pdf/2205.12713v1
  5. README.md GitHub · vul337/jTrans · Revision 1d40515
  6. LICENSE GitHub · vul337/jTrans · Revision 1d40515
  7. datautils/README.md GitHub · vul337/jTrans · Revision 1d40515
  8. data.py GitHub · vul337/jTrans · Revision 1d40515
  9. finetune.py GitHub · vul337/jTrans · Revision 1d40515