mlsanityData to 14 Oct 2026

Evaluating and Explaining Large Language Models for Code Using Syntactic Structures

arXiv 2308.03873 ↗First posted 7 Aug 2023cs.SE cs.LGcited by 9

Not on the map. Why?

Abstract (arXiv)

Large Language Models (LLMs) for code are a family of high-parameter, transformer-based neural networks pre-trained on massive datasets of both natural and programming languages. These models are rapidly being employed in commercial AI-based developer tools, such as GitHub CoPilot. However, measuring and explaining their effectiveness on programming tasks is a challenging proposition, given their size and complexity. The methods for evaluating and explaining LLMs for code are inextricably linked. That is, in order to explain a model's predictions, they must be reliably mapped to fine-grained, understandable concepts. Once this mapping is achieved, new methods for detailed model evaluations are possible. However, most current explainability techniques and evaluation benchmarks focus on model robustness or individual task performance, as opposed to interpreting model predictions. To this end, this paper introduces ASTxplainer, an explainability method specific to LLMs for code that enables both new methods for LLM evaluation and visualizations of LLM predictions that aid end-users in understanding model predictions. At its core, ASTxplainer provides an automated method for aligning token predictions with AST nodes, by extracting and aggregating normalized model logits within AST structures. To demonstrate the practical benefit of ASTxplainer, we illustrate the insights that our framework can provide by performing an empirical evaluation on 12 popular LLMs for code using a curated dataset of the most popular GitHub projects. Additionally, we perform a user study examining the usefulness of an ASTxplainer-derived visualization of model predictions aimed at enabling model users to explain predictions. The results of these studies illustrate the potential for ASTxplainer to provide insights into LLM effectiveness, and aid end-users in understanding predictions.

Key facts. Cited by 9 papers in the map (data through 14 Oct 2026). Builds on 36 of its 57 references that are in the map. First posted on arXiv 7 Aug 2023.

Builds on

36 of 57 references.

References · 36

  1. 2017Attention Is All You Needcited by 60,361
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  3. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,305
  4. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  5. 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,893
  6. 2021Program Synthesis with Large Language Modelscited by 3,637
  7. 2023A Survey of Large Language Modelscited by 2,576
  8. 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,411
  9. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
  10. 2017Interpretability Beyond Feature Attribution: Quantitative Testing with Concept Activation Vectors (TCAV)cited by 1,319
  11. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  12. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
24 more
  1. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 885
  2. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
  3. 2022GPT-NeoX-20B: An Open-Source Autoregressive Language Modelcited by 713
  4. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
  5. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
  6. 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 479
  7. 2021Unified Pre-training for Program Understanding and Generationcited by 366
  8. 2022A Systematic Evaluation of Large Language Models of Codecited by 363
  9. 2017Learning to Represent Programs with Graphscited by 220
  10. 2015Visualizing and Understanding Recurrent Networkscited by 160
  11. 2018SequenceR: Sequence-to-Sequence Learning for End-to-End Program Repaircited by 145
  12. 2018The Adverse Effects of Code Duplication in Machine Learning Models of Codecited by 126
  13. 2020Interpretable Machine Learning -- A Brief History, State-of-the-Art and Challengescited by 120
  14. 2020Principles and Practice of Explainable Machine Learningcited by 99
  15. 2022What Do They Capture? -- A Structural Analysis of Pre-Trained Language Models for Source Codecited by 50
  16. 2020On Learning Meaningful Assert Statements for Unit Test Casescited by 42
  17. 2020A Systematic Literature Review on the Use of Deep Learning in Software Engineering Researchcited by 35
  18. 2022Probing Pretrained Models of Source Codecited by 26
  19. 2021An Empirical Study on the Usage of BERT Models for Code Completioncited by 22
  20. 2021DoWhy: Addressing Challenges in Expressing and Validating Causal Assumptionscited by 20
  21. 2022AST-Probe: Recovering abstract syntax trees from hidden representations of pre-trained language modelscited by 16
  22. 2021Model Explainability in Deep Learning Based Natural Language Processingcited by 14
  23. 2023Toward a Theory of Causation for Interpreting Neural Code Modelscited by 12
  24. 2019Maybe Deep Neural Networks are the Best Choice for Modeling Source Codecited by 5

Built on by

Cited by year (2026 to 14 Oct)

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

9 papers.