Variable Name Recovery in Decompiled Binary Code using Constrained Masked Language Modeling
Not on the map. Why?
Abstract (arXiv)
Decompilation is the procedure of transforming binary programs into a high-level representation, such as source code, for human analysts to examine. While modern decompilers can reconstruct and recover much information that is discarded during compilation, inferring variable names is still extremely difficult. Inspired by recent advances in natural language processing, we propose a novel solution to infer variable names in decompiled code based on Masked Language Modeling, Byte-Pair Encoding, and neural architectures such as Transformers and BERT. Our solution takes textitraw decompiler output, the less semantically meaningful code, as input, and enriches it using our proposed textitfinetuning technique, Constrained Masked Language Modeling. Using Constrained Masked Language Modeling introduces the challenge of predicting the number of masked tokens for the original variable name. We address this textitcount of token prediction challenge with our post-processing algorithm. Compared to the state-of-the-art approaches, our trained VarBERT model is simpler and of much better performance. We evaluated our model on an existing large-scale data set with 164,632 binaries and showed that it can predict variable names identical to the ones present in the original source code up to 84.15% of the time.
Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). Builds on 25 of its 53 references that are in the map. First posted on arXiv 23 Mar 2021.
Builds on
25 of 53 references.
References · 25
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2014Adam: A Method for Stochastic Optimizationcited by 36,960
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2016Gaussian Error Linear Units (GELUs)cited by 3,431
- 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,898
- 2019XLNet: Generalized Autoregressive Pretraining for Language Understandingcited by 2,801
- 2018SentencePiece: A simple and language independent subword tokenizer and detokenizer for Neural Text Processingcited by 1,973
- 2019LXMERT: Learning Cross-Modality Encoder Representations from Transformerscited by 1,548
- 2016Google's Neural Machine Translation System: Bridging the Gap between Human and Machine Translationcited by 1,471
- 2015Gated Graph Sequence Neural Networkscited by 792
- 2017A Survey of Machine Learning for Big Code and Naturalnesscited by 220
13 more
- 2017pix2code: Generating Code from a Graphical User Interface Screenshotcited by 113
- 2017Abstract Syntax Networks for Code Generation and Semantic Parsingcited by 92
- 2016Latent Predictor Networks for Code Generationcited by 73
- 2019DIRE: A Neural Approach to Decompiled Identifier Namingcited by 36
- 2015On the "Naturalness" of Buggy Codecited by 35
- 2014Learning Natural Coding Conventionscited by 28
- 2016Automated Correction for Syntax Errors in Programming Assignments using Recurrent Neural Networkscited by 13
- 2018Context2Name: A Deep Learning-Based Approach to Infer Natural Variable Names from Usage Contextscited by 11
- 2016sk_p: a neural program corrector for MOOCscited by 10
- 2018Deep Reinforcement Learning for Programming Language Correctioncited by 4
- 2019In Nomine Function: Naming Functions in Stripped Binaries with Neural Networkscited by 2
- 2017CodeSum: Translate Program Language to Natural Languagecited by 1
- 2019Neural Reverse Engineering of Stripped Binaries using Augmented Control Flow Graphscited by 1
Built on by
Citing papers per year: 2023: 3; 2024: 2; 2025: 1; 2026: 1.
7 papers.
- 2023Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Codecited by 62
- 2023Extending Source Code Pre-Trained Language Models to Summarise Decompiled Binariescited by 25
- 2023Binary Code Summarization: Benchmarking ChatGPT/GPT-4 and Other Large Language Modelscited by 13
- 2024Source Code Foundation Models are Transferable Binary Analysis Knowledge Basescited by 8
- 2025FidelityGPT: Correcting Decompilation Distortions with Retrieval Augmented Generationcited by 2
- 2024Unmasking the Shadows: Pinpoint the Implementations of Anti-Dynamic Analysis Techniques in Malware Using LLMcited by 1
- 2026REBENCH: A Procedural, Fair-by-Construction Benchmark for LLMs on Stripped-Binary Types and Names (Extended Version)cited by 1
- 2026REBENCH: A Procedural, Fair-by-Construction Benchmark for LLMs on Stripped-Binary Types and Names (Extended Version)30 Apr 2026
- 2025FidelityGPT: Correcting Decompilation Distortions with Retrieval Augmented Generation22 Oct 2025
- 2024Unmasking the Shadows: Pinpoint the Implementations of Anti-Dynamic Analysis Techniques in Malware Using LLM8 Nov 2024
- 2024Source Code Foundation Models are Transferable Binary Analysis Knowledge Bases30 May 2024
- 2023Binary Code Summarization: Benchmarking ChatGPT/GPT-4 and Other Large Language Models15 Dec 2023
- 2023Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Code14 Nov 2023
- 2023Extending Source Code Pre-Trained Language Models to Summarise Decompiled Binaries4 Jan 2023