On the Lexical Superstition of Large Language Models for Code Comprehension: Re-evaluation on Code of Low Lexical Quality
Not on the map. Why?
Abstract (arXiv)
Recent advances in large language models (LLMs) have made them widely used for code-related tasks. Identifier names are statistically informative in naturally occurring code, but their information is not always reliable. We investigate whether current LLMs assign disproportionate weight to lexical cues when renaming preserves program structure. We introduce Face/Off, a semantics-preserving identifier-renaming framework, and evaluate progressive naming conditions across multiple models and code-comprehension tasks. Within this framework, lexical overemphasis is pervasive across the evaluated models and primary tasks: performance generally decreases as identifier information is removed or made misleading, and outputs are often directed toward the meanings suggested by misleading names. The pattern persists under representative prompt- and fine-tuning-based interventions, suggesting that lexical overemphasis is an entrenched problem. A type-inference control confirms a boundary: naming effects are smaller when the answer is locally recoverable without the target name. These results do not imply that identifiers are unhelpful; rather, they reveal a systematic vulnerability in how current LLMs balance lexical cues against program structure. Our findings motivate evaluations and modeling methods that preserve the benefits of natural code regularities while keeping conclusions grounded in accurate, formalized code semantics.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 41 of its 67 references that are in the map. First posted on arXiv 22 Sep 2026.
Builds on
41 of 67 references.
References · 41
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2023GPT-4 Technical Reportcited by 18,396
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2024Qwen2 Technical Reportcited by 2,120
- 2020Shortcut Learning in Deep Neural Networkscited by 1,969
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
29 more
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 885
- 2019Right for the Wrong Reasons: Diagnosing Syntactic Heuristics in Natural Language Inferencecited by 876
- 2023StarCoder: may the source be with you!cited by 799
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
- 2022A Survey on In-context Learningcited by 721
- 2024A Survey on Large Language Models for Code Generationcited by 658
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
- 2024DeepSeek-Coder-V2: Breaking the Barrier of Closed-Source Models in Code Intelligencecited by 331
- 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 300
- 2022Data Contamination: From Memorization to Exploitationcited by 236
- 2017A Survey of Machine Learning for Big Code and Naturalnesscited by 221
- 2022Natural Attack for Pre-trained Models of Codecited by 75
- 2023Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)cited by 72
- 2024NExT: Teaching Large Language Models to Reason about Code Executioncited by 63
- 2023Large Language Models for Code Analysis: Do LLMs Really Do Their Job?cited by 45
- 2024A Deep Dive into Large Language Models for Automated Bug Localization and Repaircited by 39
- 2020Adversarial Robustness for Codecited by 38
- 2023ChatGPT vs SBST: A Comparative Assessment of Unit Test Suite Generationcited by 32
- 2023Large Language Models of Code Fail at Completing Code with Potential Bugscited by 29
- 2021Adversarial Robustness of Deep Code Comment Generationcited by 22
- 2022Are We Building on the Rock? On the Importance of Data Preprocessing for Code Summarizationcited by 22
- 2024Rewriting the Code: A Simple Method for Large Language Model Augmented Code Searchcited by 17
- 2022RoPGen: Towards Robust Code Authorship Attribution via Automatic Coding Style Transformationcited by 15
- 2022How Important are Good Method Names in Neural Code Generation? A Model Robustness Perspectivecited by 11
- 2022Two Sides of the Same Coin: Exploiting the Impact of Identifiers in Neural Code Comprehensioncited by 10
- 2021ManyTypes4Py: A Benchmark Python Dataset for Machine Learning-based Type Inferencecited by 9
- 2023An Extensive Study on Adversarial Attack against Pre-trained Models of Codecited by 8
- 2023Transfer Attacks and Defenses for Large Language Models on Coding Taskscited by 2
Built on by
Not cited yet.