mlsanityData to 7 Oct 2026

Benchmarking Causal Study to Interpret Large Language Models for Source Code

arXiv 2308.12415 ↗First posted 23 Aug 2023cs.SE cs.AIcited by 14

Not on the map. Why?

Abstract (arXiv)

One of the most common solutions adopted by software researchers to address code generation is by training Large Language Models (LLMs) on massive amounts of source code. Although a number of studies have shown that LLMs have been effectively evaluated on popular accuracy metrics (e.g., BLEU, CodeBleu), previous research has largely overlooked the role of Causal Inference as a fundamental component of the interpretability of LLMs' performance. Existing benchmarks and datasets are meant to highlight the difference between the expected and the generated outcome, but do not take into account confounding variables (e.g., lines of code, prompt size) that equally influence the accuracy metrics. The fact remains that, when dealing with generative software tasks by LLMs, no benchmark is available to tell researchers how to quantify neither the causal effect of SE-based treatments nor the correlation of confounders to the model's performance. In an effort to bring statistical rigor to the evaluation of LLMs, this paper introduces a benchmarking strategy named Galeras comprised of curated testbeds for three SE tasks (i.e., code completion, code summarization, and commit generation) to help aid the interpretation of LLMs' performance. We illustrate the insights of our benchmarking strategy by conducting a case study on the performance of ChatGPT under distinct prompt engineering methods. The results of the case study demonstrate the positive causal influence of prompt semantics on ChatGPT's generative performance by an average treatment effect of ≈ 3%. Moreover, it was found that confounders such as prompt size are highly correlated with accuracy metrics (≈ 0.412%). The end result of our case study is to showcase causal inference evaluations, in practice, to reduce confounding bias. By reducing the bias, we offer an interpretable solution for the accuracy metric under analysis.

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

Builds on

37 of 49 references.

References · 37

  1. 2023GPT-4 Technical Reportcited by 18,132
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  3. 2021Program Synthesis with Large Language Modelscited by 3,509
  4. 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,346
  5. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
  6. 2021Measuring Coding Challenge Competence With APPScited by 879
  7. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
  8. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
  9. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
  10. 2022A Systematic Evaluation of Large Language Models of Codecited by 360
  11. 2019Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networkscited by 266
  12. 2018SequenceR: Sequence-to-Sequence Learning for End-to-End Program Repaircited by 144
25 more
  1. 2022Large Language Models Meet NL2Code: A Surveycited by 135
  2. 2022MultiPL-E: A Scalable and Extensible Approach to Benchmarking Neural Code Generationcited by 132
  3. 2018The Adverse Effects of Code Duplication in Machine Learning Models of Codecited by 123
  4. 2019Neural Machine Translation with Byte-Level Subwordscited by 115
  5. 2018An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translationcited by 106
  6. 2021Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related Taskscited by 70
  7. 2022Using Pre-Trained Models to Boost Code Review Automationcited by 63
  8. 2021Towards Automating Code Review Activitiescited by 54
  9. 2019On Learning Meaningful Code Changes via Neural Machine Translationcited by 50
  10. 2020On Learning Meaningful Assert Statements for Unit Test Casescited by 42
  11. 2020A Systematic Literature Review on the Use of Deep Learning in Software Engineering Researchcited by 35
  12. 2023Improving ChatGPT Prompt for Code Generationcited by 28
  13. 2017Sorting and Transforming Program Repair Ingredients via Deep Learning Code Similaritiescited by 26
  14. 2021An Empirical Study on the Usage of BERT Models for Code Completioncited by 22
  15. 2021An Empirical Study on the Usage of Transformer Models for Code Completioncited by 22
  16. 2021DoWhy: Addressing Challenges in Expressing and Validating Causal Assumptionscited by 20
  17. 2022Using Transfer Learning for Code-Related Taskscited by 18
  18. 2018Learning How to Mutate Source Code from Bug-Fixescited by 13
  19. 2021Ensemble Models for Neural Source Code Summarization of Subroutinescited by 12
  20. 2023Toward a Theory of Causation for Interpreting Neural Code Modelscited by 12
  21. 2020ReAssert: Deep Learning for Assert Generationcited by 6
  22. 2020Improving the Effectiveness of Traceability Link Recovery using Hierarchical Bayesian Networkscited by 5
  23. 2019Deep Transfer Learning for Source Code Modelingcited by 4
  24. 2023An Empirical Investigation into the Use of Image Captioning for Automated Software Documentationcited by 4
  25. 2019IdBench: Evaluating Semantic Representations of Identifier Names in Source Codecited by 1

Built on by

Cited by year (2026 to 7 Oct)

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

14 papers.

Sort:

By area: