mlsanityData to 7 Oct 2026

A Critical Study of What Code-LLMs (Do Not) Learn

arXiv 2406.11930 ↗First posted 17 Jun 2024cs.SE cs.AI cs.CLcited by 4

Not on the map. Why?

Abstract (arXiv)

Large Language Models trained on code corpora (code-LLMs) have demonstrated impressive performance in various coding assistance tasks. However, despite their increased size and training dataset, code-LLMs still have limitations such as suggesting codes with syntactic errors, variable misuse etc. Some studies argue that code-LLMs perform well on coding tasks because they use self-attention and hidden representations to encode relations among input tokens. However, previous works have not studied what code properties are not encoded by code-LLMs. In this paper, we conduct a fine-grained analysis of attention maps and hidden representations of code-LLMs. Our study indicates that code-LLMs only encode relations among specific subsets of input tokens. Specifically, by categorizing input tokens into syntactic tokens and identifiers, we found that models encode relations among syntactic tokens and among identifiers, but they fail to encode relations between syntactic tokens and identifiers. We also found that fine-tuned models encode these relations poorly compared to their pre-trained counterparts. Additionally, larger models with billions of parameters encode significantly less information about code than models with only a few hundred million parameters.

Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Builds on 34 of its 54 references that are in the map. First posted on arXiv 17 Jun 2024.

Builds on

34 of 54 references.

References · 34

  1. 2017Attention Is All You Needcited by 59,932
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  3. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
  4. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
  5. 2021Probing Classifiers: Promises, Shortcomings, and Advancescited by 831
  6. 2019Unified Language Model Pre-training for Natural Language Understanding and Generationcited by 668
  7. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
  8. 2019Designing and Interpreting Probes with Control Taskscited by 608
  9. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
  10. 2021Unified Pre-training for Program Understanding and Generationcited by 361
  11. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
  12. 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
22 more
  1. 2022Efficient Training of Language Models to Fill in the Middlecited by 248
  2. 2022Data Contamination: From Memorization to Exploitationcited by 234
  3. 2019Visualizing and Measuring the Geometry of BERTcited by 215
  4. 2020BERTology Meets Biology: Interpreting Attention in Protein Language Modelscited by 85
  5. 2022What Do They Capture? -- A Structural Analysis of Pre-Trained Language Models for Source Codecited by 50
  6. 2020A Tale of a Probe and a Parsercited by 40
  7. 2021What do pre-trained code models know about code?cited by 36
  8. 2021A Non-Linear Structural Probecited by 31
  9. 2023The Larger They Are, the Harder They Fail: Language Models do not Recognize Identifier Swaps in Pythoncited by 29
  10. 2022Probing Pretrained Models of Source Codecited by 26
  11. 2021DirectProbe: Studying Representations without Classifierscited by 25
  12. 2021Counterfactual Explanations for Models of Codecited by 24
  13. 2022Diet Code Is Healthy: Simplifying Programs for Pre-trained Models of Codecited by 24
  14. 2021Understanding Neural Code Intelligence Through Program Simplificationcited by 20
  15. 2020Learning Autocompletion from Real-World Datasetscited by 19
  16. 2021Memorization and Generalization in Neural Code Intelligence Modelscited by 17
  17. 2018Studying the Difference Between Natural and Programming Language Corporacited by 13
  18. 2022What does Transformer learn about source code?cited by 9
  19. 2022Syntax-Guided Program Reduction for Understanding Neural Code Intelligence Modelscited by 7
  20. 2022CAT-probing: A Metric-based Approach to Interpret How Pre-trained Models for Programming Language Attend Code Structurecited by 6
  21. 2023The EarlyBIRD Catches the Bug: On Exploiting Early Layers of Encoder Models for More Efficient Code Classificationcited by 5
  22. 2023Study of Distractors in Neural Models of Codecited by 2

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 1; 2025: 2; 2026: 1.

4 papers.