Towards Understanding What Code Language Models Learned
Not on the map. Why?
Abstract (arXiv)
Pre-trained language models are effective in a variety of natural language tasks, but it has been argued their capabilities fall short of fully learning meaning or understanding language. To understand the extent to which language models can learn some form of meaning, we investigate their ability to capture semantics of code beyond superficial frequency and co-occurrence. In contrast to previous research on probing models for linguistic features, we study pre-trained models in a setting that allows for objective and straightforward evaluation of a model's ability to learn semantics. In this paper, we examine whether such models capture the semantics of code, which is precisely and formally defined. Through experiments involving the manipulation of code fragments, we show that code pre-trained models of code learn a robust representation of the computational semantics of code that goes beyond superficial features of form alone
Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 30 of its 41 references that are in the map. First posted on arXiv 20 Jun 2023.
Builds on
30 of 41 references.
References · 30
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2020A Primer in BERTology: What we know about how BERT workscited by 815
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
- 2019Universal Adversarial Triggers for Attacking and Analyzing NLPcited by 722
- 2019Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailmentcited by 671
18 more
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
- 2019What do you learn from context? Probing for sentence structure in contextualized word representationscited by 438
- 2019What BERT is not: Lessons from a new suite of psycholinguistic diagnostics for language modelscited by 320
- 2019Negated and Misprimed Probes for Pretrained Language Models: Birds Can Talk, But Cannot Flycited by 243
- 2020Information-Theoretic Probing for Linguistic Structurecited by 207
- 2018The Adverse Effects of Code Duplication in Machine Learning Models of Codecited by 126
- 2023CodeGen2: Lessons for Training LLMs on Programming and Natural Languagescited by 125
- 2020Perturbed Masking: Parameter-free Probing for Analyzing and Interpreting BERTcited by 109
- 2020Contrastive Code Representation Learningcited by 76
- 2022NatGen: Generative pre-training by "Naturalizing" source codecited by 54
- 2022What Do They Capture? -- A Structural Analysis of Pre-Trained Language Models for Source Codecited by 50
- 2020Semantic Robustness of Models of Source Codecited by 45
- 2021What do pre-trained code models know about code?cited by 36
- 2023Emergent Representations of Program Semantics in Language Models Trained on Programscited by 30
- 2022Probing Pretrained Models of Source Codecited by 26
- 2021NOPE: A Corpus of Naturally-Occurring Presuppositions in Englishcited by 23
- 2023Redundancy and Concept Analysis for Code-trained Language Modelscited by 1
Built on by
Citing papers per year: 2024: 1; 2025: 1; 2026: 1.
3 papers.