mlsanityData to 14 Oct 2026

The Larger They Are, the Harder They Fail: Language Models do not Recognize Identifier Swaps in Python

arXiv 2305.15507 ↗First posted 24 May 2023cs.CL cs.AIcited by 29

Not on the map. Why?

Abstract (arXiv)

Large Language Models (LLMs) have successfully been applied to code generation tasks, raising the question of how well these models understand programming. Typical programming languages have invariances and equivariances in their semantics that human programmers intuitively understand and exploit, such as the (near) invariance to the renaming of identifiers. We show that LLMs not only fail to properly generate correct Python code when default function names are swapped, but some of them even become more confident in their incorrect predictions as the model size increases, an instance of the recently discovered phenomenon of Inverse Scaling, which runs contrary to the commonly observed trend of increasing prediction quality with increasing model size. Our findings indicate that, despite their astonishing typical-case performance, LLMs still lack a deep, abstract understanding of the content they manipulate, making them unsuitable for tasks that statistically deviate from their training data, and that mere scaling is not enough to achieve such capability.

Key facts. Cited by 29 papers in the map (data through 14 Oct 2026). Builds on 28 of its 40 references that are in the map. First posted on arXiv 24 May 2023.

Builds on

28 of 40 references.

References · 28

  1. 2017Attention Is All You Needcited by 60,361
  2. 2020Language Models are Few-Shot Learnerscited by 32,419
  3. 2022Training language models to follow instructions with human feedbackcited by 15,971
  4. 2017Proximal Policy Optimization Algorithmscited by 15,215
  5. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
  6. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  7. 2020Scaling Laws for Neural Language Modelscited by 6,586
  8. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
  9. 2022Large Language Models are Zero-Shot Reasonerscited by 4,374
  10. 2022OPT: Open Pre-trained Transformer Language Modelscited by 3,512
  11. 2022Scaling Instruction-Finetuned Language Modelscited by 3,024
  12. 2021TruthfulQA: Measuring How Models Mimic Human Falsehoodscited by 2,975
16 more
  1. 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,918
  2. 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,411
  3. 2022Survey of Hallucination in Natural Language Generationcited by 2,075
  4. 2022Beyond the Imitation Game: Quantifying and extrapolating the capabilities of language modelscited by 1,998
  5. 2020Shortcut Learning in Deep Neural Networkscited by 1,969
  6. 2022Competition-Level Code Generation with AlphaCodecited by 1,462
  7. 2021Geometric Deep Learning: Grids, Groups, Graphs, Geodesics, and Gaugescited by 1,167
  8. 2016Group Equivariant Convolutional Networkscited by 1,165
  9. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 885
  10. 2021BBQ: A Hand-Built Bias Benchmark for Question Answeringcited by 701
  11. 2021True Few-Shot Learning with Language Modelscited by 344
  12. 2021Scaling Laws for Transfercited by 272
  13. 2017A parallel corpus of Python functions and documentation strings for automated code documentation and code generationcited by 57
  14. 2016Learning Python Code Suggestion with a Sparse Pointer Networkcited by 12
  15. 2023BERT is not The Count: Learning to Match Mathematical Statements with Proofscited by 10
  16. 2023Equivariant MuZerocited by 3

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2023: 10; 2024: 11; 2025: 5; 2026: 3.

29 papers.

Sort:

By area:

  1. 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 300
  2. 2023Reasoning or Reciting? Exploring the Capabilities and Limitations of Language Models Through Counterfactual Taskscited by 246
  3. 2023Inverse Scaling: When Bigger Isn't Bettercited by 207
  4. 2024Vulnerability Detection with Code Language Models: How Far Are We?cited by 139
  5. 2023Exposing Attention Glitches with Flip-Flop Language Modelingcited by 75
  6. 2023LILO: Learning Interpretable Libraries by Compressing and Documenting Codecited by 49
  7. 2024CodeMind: Evaluating Large Language Models for Code Reasoningcited by 32
  8. 2026Large Language Model Reasoning Failurescited by 21
  9. 2024The Counterfeit Conundrum: Can Code Language Models Grasp the Nuances of Their Incorrect Generations?cited by 20
  10. 2023Machine-assisted quantitizing designs: augmenting humanities and social sciences with artificial intelligencecited by 15
  11. 2023Towards Interpretable Sequence Continuation: Analyzing Shared Circuits in Large Language Modelscited by 15
  12. 2023Coffee: Boost Your Code LLMs by Fixing Bugs with Feedbackcited by 15
17 more
  1. 2024What can Large Language Models Capture about Code Functional Equivalence?cited by 14
  2. 2024Interpreting Context Look-ups in Transformers: Investigating Attention-MLP Interactionscited by 12
  3. 2023An Investigation of LLMs' Inefficacy in Understanding Converse Relationscited by 9
  4. 2024Teacher-Student Training for Debiasing: General Permutation Debiasing for Large Language Modelscited by 8
  5. 2023Dialogue-based generation of self-driving simulation scenarios using Large Language Modelscited by 7
  6. 2025A Tool for In-depth Analysis of Code Execution Reasoning of Large Language Modelscited by 7
  7. 2025Are Large Language Models Robust in Understanding Code Against Semantics-Preserving Mutations?cited by 7
  8. 2024Scaling Behavior of Machine Translation with Large Language Models under Prompt Injection Attackscited by 4
  9. 2024A Critical Study of What Code-LLMs (Do Not) Learncited by 4
  10. 2024Do Current Language Models Support Code Intelligence for R Programming Language?cited by 4
  11. 2023Guess & Sketch: Language Model Guided Transpilationcited by 3
  12. 2024Models Can and Should Embrace the Communicative Nature of Human-Generated Mathcited by 1
  13. 2025Program Semantic Inequivalence Game with Large Language Modelscited by 1
  14. 2025Open the Oyster: Empirical Evaluation and Improvement of Code Reasoning Confidence in LLMscited by 1
  15. 2026Names Don't Matter: Symbol-Invariant Transformer for Open-Vocabulary Learningcited by 1
  16. 2025DEVAL: A Framework for Evaluating and Improving the Derivation Capability of Large Language Modelscited by 0
  17. 2026Position: Quantum Program Generation Must Prioritize Validity Over Probabilistic Scalingcited by 0