Bi-Directional Transformers vs. word2vec: Discovering Vulnerabilities in Lifted Compiled Code
Gary A. McCully, John D. Hastings, Shengjie Xu, Adam Fortier

TL;DR
This paper compares word2vec and transformer-based embeddings like BERT and RoBERTa for vulnerability detection in compiled code, finding simpler word2vec models outperform complex transformers in limited data scenarios.
Contribution
It is the first study to compare word2vec with multiple bidirectional transformers for vulnerability detection in LLVM IR code.
Findings
Word2vec Skip-Gram achieved 92% validation accuracy.
Transformers did not outperform simpler word2vec models.
Complex contextual embeddings may not be advantageous with limited data.
Abstract
Detecting vulnerabilities within compiled binaries is challenging due to lost high-level code structures and other factors such as architectural dependencies, compilers, and optimization options. To address these obstacles, this research explores vulnerability detection using natural language processing (NLP) embedding techniques with word2vec, BERT, and RoBERTa to learn semantics from intermediate representation (LLVM IR) code. Long short-term memory (LSTM) neural networks were trained on embeddings from encoders created using approximately 48k LLVM functions from the Juliet dataset. This study is pioneering in its comparison of word2vec models with multiple bidirectional transformers (BERT, RoBERTa) embeddings built using LLVM code to train neural networks to detect vulnerabilities in compiled binaries. Word2vec Skip-Gram models achieved 92% validation accuracy in detecting…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software Reliability and Analysis Research · Web Application Security Vulnerabilities
MethodsRefunds@Expedia|||How do I get a full refund from Expedia? · Attention Is All You Need · WordPiece · Linear Warmup With Linear Decay · Weight Decay · Attention Dropout · Linear Layer · Adam · Residual Connection · Multi-Head Attention
