mlsanityData to 14 Oct 2026

kTrans: Knowledge-Aware Transformer for Binary Code Embedding

arXiv 2308.12659 ↗First posted 24 Aug 2023cs.SE cs.AI cs.CRcited by 10

Not on the map. Why?

Abstract (arXiv)

Binary Code Embedding (BCE) has important applications in various reverse engineering tasks such as binary code similarity detection, type recovery, control-flow recovery and data-flow analysis. Recent studies have shown that the Transformer model can comprehend the semantics of binary code to support downstream tasks. However, existing models overlooked the prior knowledge of assembly language. In this paper, we propose a novel Transformer-based approach, namely kTrans, to generate knowledge-aware binary code embedding. By feeding explicit knowledge as additional inputs to the Transformer, and fusing implicit knowledge with a novel pre-training task, kTrans provides a new perspective to incorporating domain knowledge into a Transformer framework. We inspect the generated embeddings with outlier detection and visualization, and also apply kTrans to 3 downstream tasks: Binary Code Similarity Detection (BCSD), Function Type Recovery (FTR) and Indirect Call Recognition (ICR). Evaluation results show that kTrans can generate high-quality binary code embeddings, and outperforms state-of-the-art (SOTA) approaches on downstream tasks by 5.2%, 6.8%, and 12.6% respectively. kTrans is publicly available at: https://github.com/Learner0x5a/kTrans-release

Key facts. Cited by 10 papers in the map (data through 14 Oct 2026). Builds on 28 of its 57 references that are in the map. First posted on arXiv 24 Aug 2023.

Builds on

28 of 57 references.

References · 28

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  2. 2020Language Models are Few-Shot Learnerscited by 32,419
  3. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
  4. 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,375
  5. 2021Program Synthesis with Large Language Modelscited by 3,637
  6. 2022Training Compute-Optimal Large Language Modelscited by 3,019
  7. 2014Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modelingcited by 2,367
  8. 2018Deep contextualized word representationscited by 2,290
  9. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  10. 2017Mixed Precision Trainingcited by 1,156
  11. 2014Distributed Representations of Sentences and Documentscited by 678
  12. 2021Unified Pre-training for Program Understanding and Generationcited by 366
16 more
  1. 2018code2vec: Learning Distributed Representations of Codecited by 250
  2. 2017Learning to Represent Programs with Graphscited by 220
  3. 2018code2seq: Generating Sequences from Structured Representations of Codecited by 179
  4. 2021What Makes Multi-modal Learning Better than Single (Provably)cited by 153
  5. 2019A Mutual Information Maximization Perspective of Language Representation Learningcited by 85
  6. 2017Neural Network-based Graph Embedding for Cross-Platform Binary Code Similarity Detectioncited by 65
  7. 2018DeepBugs: A Learning Approach to Name-based Bug Detectioncited by 65
  8. 2019Pythia: AI-assisted Code Completion Systemcited by 55
  9. 2021PalmTree: Learning an Assembly Language Model for Instruction Embeddingcited by 49
  10. 2022jTrans: Jump-Aware Transformer for Binary Code Similaritycited by 44
  11. 2018SAFE: Self-Attentive Function Embeddings for Binary Similaritycited by 33
  12. 2020XDA: Accurate, Robust Disassembly with Transfer Learningcited by 21
  13. 2020Revisiting Binary Code Similarity Analysis using Interpretable Feature Engineering and Lessons Learnedcited by 14
  14. 2022BinBert: Binary Code Understanding with a Fine-tunable and Execution-aware Transformercited by 8
  15. 2022Pre-Training Representations of Binary Code Using Contrastive Learningcited by 6
  16. 2021Callee: Recovering Call Graphs for Binaries with Transfer and Contrastive Learningcited by 4

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2023: 1; 2024: 7; 2025: 1; 2026: 1.

10 papers.