kTrans: Knowledge-Aware Transformer for Binary Code Embedding
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
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
- 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,375
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2022Training Compute-Optimal Large Language Modelscited by 3,019
- 2014Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modelingcited by 2,367
- 2018Deep contextualized word representationscited by 2,290
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2017Mixed Precision Trainingcited by 1,156
- 2014Distributed Representations of Sentences and Documentscited by 678
- 2021Unified Pre-training for Program Understanding and Generationcited by 366
16 more
- 2018code2vec: Learning Distributed Representations of Codecited by 250
- 2017Learning to Represent Programs with Graphscited by 220
- 2018code2seq: Generating Sequences from Structured Representations of Codecited by 179
- 2021What Makes Multi-modal Learning Better than Single (Provably)cited by 153
- 2019A Mutual Information Maximization Perspective of Language Representation Learningcited by 85
- 2017Neural Network-based Graph Embedding for Cross-Platform Binary Code Similarity Detectioncited by 65
- 2018DeepBugs: A Learning Approach to Name-based Bug Detectioncited by 65
- 2019Pythia: AI-assisted Code Completion Systemcited by 55
- 2021PalmTree: Learning an Assembly Language Model for Instruction Embeddingcited by 49
- 2022jTrans: Jump-Aware Transformer for Binary Code Similaritycited by 44
- 2018SAFE: Self-Attentive Function Embeddings for Binary Similaritycited by 33
- 2020XDA: Accurate, Robust Disassembly with Transfer Learningcited by 21
- 2020Revisiting Binary Code Similarity Analysis using Interpretable Feature Engineering and Lessons Learnedcited by 14
- 2022BinBert: Binary Code Understanding with a Fine-tunable and Execution-aware Transformercited by 8
- 2022Pre-Training Representations of Binary Code Using Contrastive Learningcited by 6
- 2021Callee: Recovering Call Graphs for Binaries with Transfer and Contrastive Learningcited by 4
Built on by
Citing papers per year: 2023: 1; 2024: 7; 2025: 1; 2026: 1.
10 papers.
- 2024LLM4Vuln: A Unified Evaluation Framework for Decoupling and Enhancing LLMs' Vulnerability Reasoningcited by 59
- 2024CLAP: Learning Transferable Binary Code Representations with Natural Language Supervisioncited by 17
- 2024Assemblage: Automatic Binary Dataset Construction for Machine Learningcited by 12
- 2024EyeTrans: Merging Human and Machine Attention for Neural Code Summarizationcited by 9
- 2024CodeArt: Better Code Models by Attention Regularization When Symbols Are Lackingcited by 7
- 2024Is Function Similarity Over-Engineered? Building a Benchmarkcited by 6
- 2023VEXIR2Vec: An Architecture-Neutral Embedding Framework for Binary Similaritycited by 1
- 2024A Progressive Transformer for Unifying Binary Code Embedding and Knowledge Transfercited by 1
- 2025Context-Guided Decompilation: A Step Towards Re-executabilitycited by 1
- 2026ASSEMBLAGE-DEEPHISTORY: A Cross-Build Binary Dataset with Temporal Coveragecited by 0
- 2026ASSEMBLAGE-DEEPHISTORY: A Cross-Build Binary Dataset with Temporal Coverage20 May 2026
- 2025Context-Guided Decompilation: A Step Towards Re-executability3 Nov 2025
- 2024A Progressive Transformer for Unifying Binary Code Embedding and Knowledge Transfer15 Dec 2024
- 2024Is Function Similarity Over-Engineered? Building a Benchmark30 Oct 2024
- 2024Assemblage: Automatic Binary Dataset Construction for Machine Learning7 May 2024
- 2024CLAP: Learning Transferable Binary Code Representations with Natural Language Supervision26 Feb 2024
- 2024EyeTrans: Merging Human and Machine Attention for Neural Code Summarization21 Feb 2024
- 2024CodeArt: Better Code Models by Attention Regularization When Symbols Are Lacking19 Feb 2024
- 2024LLM4Vuln: A Unified Evaluation Framework for Decoupling and Enhancing LLMs' Vulnerability Reasoning29 Jan 2024
- 2023VEXIR2Vec: An Architecture-Neutral Embedding Framework for Binary Similarity1 Dec 2023