Context2Name: A Deep Learning-Based Approach to Infer Natural Variable Names from Usage Contexts
Not on the map. Why?
Abstract (arXiv)
Most of the JavaScript code deployed in the wild has been minified, a process in which identifier names are replaced with short, arbitrary and meaningless names. Minified code occupies less space, but also makes the code extremely difficult to manually inspect and understand. This paper presents Context2Name, a deep learningbased technique that partially reverses the effect of minification by predicting natural identifier names for minified names. The core idea is to predict from the usage context of a variable a name that captures the meaning of the variable. The approach combines a lightweight, token-based static analysis with an auto-encoder neural network that summarizes usage contexts and a recurrent neural network that predict natural names for a given usage context. We evaluate Context2Name with a large corpus of real-world JavaScript code and show that it successfully predicts 47.5% of all minified identifiers while taking only 2.9 milliseconds on average to predict a name. A comparison with the state-of-the-art tools JSNice and JSNaughty shows that our approach performs comparably in terms of accuracy while improving in terms of efficiency. Moreover, Context2Name complements the state-of-the-art by predicting 5.3% additional identifiers that are missed by both existing tools.
Key facts. Cited by 11 papers in the map (data through 7 Oct 2026). First posted on arXiv 31 Aug 2018.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 5; 2022: 2; 2023: 1; 2024: 0; 2025: 2; 2026: 1.
11 papers.
- 2021DOBF: A Deobfuscation Pre-Training Objective for Programming Languagescited by 68
- 2021VarCLR: Variable Semantic Representation Pre-training via Contrastive Learningcited by 11
- 2021Variable Name Recovery in Decompiled Binary Code using Constrained Masked Language Modelingcited by 7
- 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Groundingcited by 4
- 2021Self-Supervised Learning to Prove Equivalence Between Straight-Line Programs via Rewrite Rulescited by 3
- 2022AdaptivePaste: Code Adaptation through Learning Semantics-aware Variable Usage Representationscited by 3
- 2021Proving Equivalence Between Complex Expressions Using Graph-to-Sequence Neural Modelscited by 2
- 2022Towards Top-Down Automated Development in Limited Scopes: A Neuro-Symbolic Framework from Expressibles to Executablescited by 2
- 2026Identifying Adversary Tactics and Techniques in Malware Binaries with an LLM Agentcited by 2
- 2023Epicure: Distilling Sequence Model Predictions into Patternscited by 0
- 2025Neural Variable Name Repair: Learning to Rename Identifiers for Readabilitycited by 0
- 2026Identifying Adversary Tactics and Techniques in Malware Binaries with an LLM Agent6 Feb 2026
- 2025Neural Variable Name Repair: Learning to Rename Identifiers for Readability30 Nov 2025
- 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Grounding27 Mar 2025
- 2023Epicure: Distilling Sequence Model Predictions into Patterns16 Aug 2023
- 2022Towards Top-Down Automated Development in Limited Scopes: A Neuro-Symbolic Framework from Expressibles to Executables4 Sep 2022
- 2022AdaptivePaste: Code Adaptation through Learning Semantics-aware Variable Usage Representations23 May 2022
- 2021VarCLR: Variable Semantic Representation Pre-training via Contrastive Learning5 Dec 2021
- 2021Self-Supervised Learning to Prove Equivalence Between Straight-Line Programs via Rewrite Rules22 Sep 2021
- 2021Proving Equivalence Between Complex Expressions Using Graph-to-Sequence Neural Models1 Jun 2021
- 2021Variable Name Recovery in Decompiled Binary Code using Constrained Masked Language Modeling23 Mar 2021
- 2021DOBF: A Deobfuscation Pre-Training Objective for Programming Languages15 Feb 2021