mlsanityData to 7 Oct 2026

Redundancy and Concept Analysis for Code-trained Language Models

arXiv 2305.00875 ↗First posted 1 May 2023cs.SE cs.AI cs.LGcited by 1

Not on the map. Why?

Abstract (arXiv)

Code-trained language models have proven to be highly effective for various code intelligence tasks. However, they can be challenging to train and deploy for many software engineering applications due to computational bottlenecks and memory constraints. Implementing effective strategies to address these issues requires a better understanding of these 'black box' models. In this paper, we perform the first neuron-level analysis for source code models to identify textitimportant neurons within latent representations. We achieve this by eliminating neurons that are highly similar or irrelevant to the given task. This approach helps us understand which neurons and layers can be eliminated (redundancy analysis) and where important code properties are located within the network (concept analysis). Using redundancy analysis, we make observations relevant to knowledge transfer and model optimization applications. We find that over 95% of the neurons are redundant with respect to our code intelligence tasks and can be eliminated without significant loss in accuracy. We also discover several subsets of neurons that can make predictions with baseline accuracy. Through concept analysis, we explore the traceability and distribution of human-recognizable concepts within latent code representations which could be used to influence model predictions. We trace individual and subsets of important neurons to specific code properties and identify 'number' neurons, 'string' neurons, and higher-level 'text' neurons for token-level tasks and higher-level concepts important for sentence-level downstream tasks. This also helps us understand how decomposable and transferable task-related features are and can help devise better techniques for transfer learning, model compression, and the decomposition of deep neural networks into modules.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 44 of its 65 references that are in the map. First posted on arXiv 1 May 2023.

Builds on

44 of 65 references.

References · 44

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  2. 2014Adam: A Method for Stochastic Optimizationcited by 36,960
  3. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
  4. 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,854
  5. 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,665
  6. 2019Similarity of Neural Network Representations Revisitedcited by 1,695
  7. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  8. 2019BERT Rediscovers the Classical NLP Pipelinecited by 1,046
  9. 2022Toy Models of Superpositioncited by 928
  10. 2019Attention is not Explanationcited by 916
  11. 2021Probing Classifiers: Promises, Shortcomings, and Advancescited by 831
  12. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
32 more
  1. 2019Attention is not not Explanationcited by 629
  2. 2019Designing and Interpreting Probes with Control Taskscited by 608
  3. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
  4. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
  5. 2018What Is One Grain of Sand in the Desert? Analyzing Individual Neurons in Deep NLP Modelscited by 124
  6. 2018The Adverse Effects of Code Duplication in Machine Learning Models of Codecited by 123
  7. 2018Identifying and Controlling Important Neurons in Neural Machine Translationcited by 110
  8. 2020Analyzing Individual Neurons in Pre-trained Language Modelscited by 97
  9. 2021CoSQA: 20,000+ Web Queries for Code Search and Question Answeringcited by 74
  10. 2019Visualizing and Understanding the Effectiveness of BERTcited by 67
  11. 2019Adversarial Examples for Models of Codecited by 61
  12. 2021On the Pitfalls of Analyzing Individual Neurons in Language Modelscited by 61
  13. 2022Discovering Latent Concepts Learned in BERTcited by 56
  14. 2022What Do They Capture? -- A Structural Analysis of Pre-Trained Language Models for Source Codecited by 50
  15. 2020On the Generalizability of Neural Program Models with respect to Semantic-Preserving Program Transformationscited by 41
  16. 2023Explainable Automated Debugging via Large Language Model-driven Scientific Debuggingcited by 40
  17. 2021Neural Transfer Learning for Repairing Security Vulnerabilities in C Codecited by 36
  18. 2021What do pre-trained code models know about code?cited by 36
  19. 2018NeuroX: A Toolkit for Analyzing Individual Neurons in Neural Networkscited by 31
  20. 2023An Empirical Comparison of Pre-Trained Models of Source Codecited by 25
  21. 2021Counterfactual Explanations for Models of Codecited by 24
  22. 2022Diet Code Is Healthy: Simplifying Programs for Pre-trained Models of Codecited by 24
  23. 2021Understanding Neural Code Intelligence Through Program Simplificationcited by 20
  24. 2021Memorization and Generalization in Neural Code Intelligence Modelscited by 17
  25. 2020Probing Model Signal-Awareness via Prediction-Preserving Input Minimizationcited by 14
  26. 2018Studying the Difference Between Natural and Programming Language Corporacited by 13
  27. 2023KNOD: Domain Knowledge Distilled Tree Decoder for Automated Program Repaircited by 13
  28. 2020Towards Demystifying Dimensions of Source Code Embeddingscited by 9
  29. 2022Benchmarking Language Models for Code Syntax Understandingcited by 8
  30. 2019On the Feasibility of Transfer-learning Code Smells using Deep Learningcited by 7
  31. 2022Syntax-Guided Program Reduction for Understanding Neural Code Intelligence Modelscited by 7
  32. 2022Learning Program Semantics with Code Representations: An Empirical Studycited by 6

Built on by

Cited by year

Citing papers per year: 2023: 1.

1 paper.