mlsanityData to 14 Oct 2026

How Programming Concepts and Neurons Are Shared in Code Language Models

arXiv 2506.01074 ↗First posted 1 Jun 2025cs.CL cs.PL cs.SEcited by 5

Not on the map. Why?

Abstract (arXiv)

Several studies have explored the mechanisms of large language models (LLMs) in coding tasks, but most have focused on programming languages (PLs) in a monolingual setting. In this paper, we investigate the relationship between multiple PLs and English in the concept space of LLMs. We perform a few-shot translation task on 21 PL pairs using two Llama-based models. By decoding the embeddings of intermediate layers during this task, we observe that the concept space is closer to English (including PL keywords) and assigns high probabilities to English tokens in the second half of the intermediate layers. We analyze neuron activations for 11 PLs and English, finding that while language-specific neurons are primarily concentrated in the bottom layers, those exclusive to each PL tend to appear in the top layers. For PLs that are highly aligned with multiple other PLs, identifying language-specific neurons is not feasible. These PLs also tend to have a larger keyword set than other PLs and are closer to the model's concept space regardless of the input/output PL in the translation task. Our findings provide insights into how LLMs internally represent PLs, revealing structural patterns in the model's concept space. Code is available at https://github.com/cisnlp/code-specific-neurons.

Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Builds on 34 of its 51 references that are in the map. First posted on arXiv 1 Jun 2025.

Builds on

34 of 51 references.

References · 34

  1. 2017Attention Is All You Needcited by 60,361
  2. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
  3. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 2,004
  4. 2020GLU Variants Improve Transformercited by 1,804
  5. 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,336
  6. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
  7. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 885
  8. 2024A Survey on Large Language Models for Code Generationcited by 658
  9. 2023Eliciting Latent Predictions from Transformers with the Tuned Lenscited by 623
  10. 2022Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Spacecited by 532
  11. 2022A Systematic Evaluation of Large Language Models of Codecited by 363
  12. 2024DeepSeek-Coder-V2: Breaking the Barrier of Closed-Source Models in Code Intelligencecited by 331
22 more
  1. 2024Do Llamas Work in English? On the Latent Language of Multilingual Transformerscited by 281
  2. 2020Unsupervised Translation of Programming Languagescited by 263
  3. 2022SGPT: GPT Sentence Embeddings for Semantic Searchcited by 204
  4. 2024How do Large Language Models Handle Multilingualism?cited by 150
  5. 2025CodeElo: Benchmarking Competition-level Code Generation of LLMs with Human-comparable Elo Ratingscited by 115
  6. 2024On the Multilingual Ability of Decoder-based Pre-trained Language Models: Finding and Controlling Language-Specific Neuronscited by 83
  7. 2024The Semantic Hub Hypothesis: Language Models Share Semantic Representations Across Languages and Modalitiescited by 69
  8. 2022XLCoST: A Benchmark Dataset for Cross-lingual Code Intelligencecited by 56
  9. 2022What Do They Capture? -- A Structural Analysis of Pre-Trained Language Models for Source Codecited by 50
  10. 2021A Primer on Pretrained Multilingual Language Modelscited by 49
  11. 2021Learning Language Specific Sub-network for Multilingual Machine Translationcited by 48
  12. 2024To Code, or Not To Code? Exploring Impact of Code in Pre-trainingcited by 47
  13. 2023Explaining How Transformers Use Context to Build Predictionscited by 43
  14. 2024Automatic Programming: Large Language Models and Beyondcited by 36
  15. 2024Sharing Matters: Analysing Neurons Across Languages and Tasks in LLMscited by 33
  16. 2024MEXA: Multilingual Evaluation of English-Centric LLMs via Cross-Lingual Alignmentcited by 25
  17. 2021Importance-based Neuron Allocation for Multilingual Neural Machine Translationcited by 23
  18. 2023On the Reliability and Explainability of Language Models for Program Generationcited by 17
  19. 2023Unveiling Multilinguality in Transformer Models: Exploring Language Specificity in Feed-Forward Networkscited by 13
  20. 2022Explainable AI for Pre-Trained Code Models: What Do They Learn? When They Do Not Work?cited by 8
  21. 2024Looking into Black Box Code Language Modelscited by 5
  22. 2024Understanding the role of FFNs in driving multilingual behaviour in LLMscited by 3

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 1; 2026: 4.

5 papers.