mlsanityData to 7 Oct 2026

Towards More Trustworthy and Interpretable LLMs for Code through Syntax-Grounded Explanations

arXiv 2407.08983 ↗First posted 12 Jul 2024cs.SE cs.AI cs.LGcited by 10

Not on the map. Why?

Abstract (arXiv)

Trustworthiness and interpretability are inextricably linked concepts for LLMs. The more interpretable an LLM is, the more trustworthy it becomes. However, current techniques for interpreting LLMs when applied to code-related tasks largely focus on accuracy measurements, measures of how models react to change, or individual task performance instead of the fine-grained explanations needed at prediction time for greater interpretability, and hence trust. To improve upon this status quo, this paper introduces ASTrust, an interpretability method for LLMs of code that generates explanations grounded in the relationship between model confidence and syntactic structures of programming languages. ASTrust explains generated code in the context of syntax categories based on Abstract Syntax Trees and aids practitioners in understanding model predictions at both local (individual code snippets) and global (larger datasets of code) levels. By distributing and assigning model confidence scores to well-known syntactic structures that exist within ASTs, our approach moves beyond prior techniques that perform token-level confidence mapping by offering a view of model confidence that directly aligns with programming language concepts with which developers are familiar. To put ASTrust into practice, we developed an automated visualization that illustrates the aggregated model confidence scores superimposed on sequence, heat-map, and graph-based visuals of syntactic structures from ASTs. We examine both the practical benefit that ASTrust can provide through a data science study on 12 popular LLMs on a curated set of GitHub repos and the usefulness of ASTrust through a human study.

Key facts. Cited by 10 papers in the map (data through 7 Oct 2026). Builds on 84 of its 175 references that are in the map. First posted on arXiv 12 Jul 2024.

Builds on

84 of 175 references.

References · 84

  1. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  3. 2020Measuring Massive Multitask Language Understandingcited by 7,768
  4. 2017A Unified Approach to Interpreting Model Predictionscited by 6,488
  5. 2016"Why Should I Trust You?": Explaining the Predictions of Any Classifiercited by 5,040
  6. 2017Axiomatic Attribution for Deep Networkscited by 3,350
  7. 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,346
  8. 2017Towards A Rigorous Science of Interpretable Machine Learningcited by 1,400
  9. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
  10. 2017Interpretability Beyond Feature Attribution: Quantitative Testing with Concept Activation Vectors (TCAV)cited by 1,309
  11. 2017Explanation in Artificial Intelligence: Insights from the Social Sciencescited by 1,201
  12. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
38 more
  1. 2019Generalization through Memorization: Nearest Neighbor Language Modelscited by 788
  2. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
  3. 2023DecodingTrust: A Comprehensive Assessment of Trustworthiness in GPT Modelscited by 505
  4. 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 468
  5. 2021Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributionscited by 417
  6. 2023Trustworthy LLMs: a Survey and Guideline for Evaluating Large Language Models' Alignmentcited by 394
  7. 2021Unified Pre-training for Program Understanding and Generationcited by 361
  8. 2022A Systematic Evaluation of Large Language Models of Codecited by 360
  9. 2021AI Chains: Transparent and Controllable Human-AI Interaction by Chaining Large Language Model Promptscited by 265
  10. 2023The Impact of AI on Developer Productivity: Evidence from GitHub Copilotcited by 264
  11. 2020Questioning the AI: Informing Design Practices for Explainable AI User Experiencescited by 251
  12. 2021Adversarial GLUE: A Multi-Task Benchmark for Robustness Evaluation of Language Modelscited by 227
  13. 2023PromptRobust: Towards Evaluating the Robustness of Large Language Models on Adversarial Promptscited by 218
  14. 2021Trustworthy AI: From Principles to Practicescited by 206
  15. 2022Do Users Write More Insecure Code with AI Assistants?cited by 186
  16. 2015Visualizing and Understanding Recurrent Networkscited by 158
  17. 2018SequenceR: Sequence-to-Sequence Learning for End-to-End Program Repaircited by 144
  18. 2020Interpretable Machine Learning -- A Brief History, State-of-the-Art and Challengescited by 120
  19. 2021What Do We Want From Explainable Artificial Intelligence (XAI)? -- A Stakeholder Perspective on XAI and a Conceptual Model Guiding Interdisciplinary XAI Researchcited by 119
  20. 2023AI Transparency in the Age of LLMs: A Human-Centered Research Roadmapcited by 119
  21. 2019Artificial Intelligence: the global landscape of ethics guidelinescited by 107
  22. 2023Don't Trust ChatGPT when Your Question is not in English: A Study of Multilingual Abilities and Types of LLMscited by 103
  23. 2021Trustworthy AI: A Computational Perspectivecited by 93
  24. 2022Lost at C: A User Study on the Security Implications of Large Language Model Code Assistantscited by 87
  25. 2018Beyond Word Importance: Contextual Decomposition to Extract Interactions from LSTMscited by 67
  26. 2024"I'm Not Sure, But...": Examining the Impact of Large Language Models' Uncertainty Expression on User Reliance and Trustcited by 67
  27. 2020Big Code != Big Vocabulary: Open-Vocabulary Models for Source Codecited by 53
  28. 2022What Do They Capture? -- A Structural Analysis of Pre-Trained Language Models for Source Codecited by 50
  29. 2024Calibration and Correctness of Language Models for Codecited by 49
  30. 2022Designing for Responsible Trust in AI Systems: A Communication Perspectivecited by 48
  31. 2020Towards Transparent and Explainable Attention Modelscited by 47
  32. 2018Deep Learning for Electromyographic Hand Gesture Signal Classification Using Transfer Learningcited by 46
  33. 2020On Learning Meaningful Assert Statements for Unit Test Casescited by 42
  34. 2021Perfection Not Required? Human-AI Partnerships in Code Translationcited by 42
  35. 2020A Systematic Literature Review on the Use of Deep Learning in Software Engineering Researchcited by 35
  36. 2021Do Humans Trust Advice More if it Comes from AI? An Analysis of Human-AI Interactionscited by 35
  37. 2023Investigating and Designing for Trust in AI-powered Code Generation Toolscited by 34
  38. 2023Navigating the Complexity of Generative AI Adoption in Software Engineeringcited by 32

50 most cited of 84 All 84 (JSON)

Built on by

Cited by year (2026 to 7 Oct)

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

10 papers.