paper-with-me

홈 › Papers

On Explaining (Large) Language Models For Code Using Global Code-Based Explanations

2025-03-21 · David N. Palacio, Dipin Khati, Daniel Rodriguez-Cardenas, Alejandro Velasco, Denys Poshyvanyk

In recent years, Language Models for Code (LLM4Code) have significantly changed the landscape of software engineering (SE) on downstream tasks, such as code generation, by making software development more efficient. Therefore, a growing interest has emerged in further evaluating these Language Models to homogenize the quality assessment of generated code. As the current evaluation process can significantly overreact on accuracy-based metrics, practitioners often seek methods to interpret LLM4Code outputs beyond canonical benchmarks. While the majority of research reports on code generation effectiveness in terms of expected ground truth, scant attention has been paid to LLMs' explanations. In essence, the decision-making process to generate code is hard to interpret. To bridge this evaluation gap, we introduce code rationales (Code$Q$), a technique with rigorous mathematical underpinning, to identify subsets of tokens that can explain individual code predictions. We conducted a thorough Exploratory Analysis to demonstrate the method's applicability and a User Study to understand the usability of code-based explanations. Our evaluation demonstrates that Code$Q$ is a powerful interpretability method to explain how (less) meaningful input concepts (i.e., natural language particle `at') highly impact output generation. Moreover, participants of this study highlighted Code$Q$'s ability to show a causal relationship between the input and output of the model with readable and informative explanations on code completion and test generation tasks. Additionally, Code$Q$ also helps to uncover model rationale, facilitating comparison with a human rationale to promote a fair level of trust and distrust in the model.

📄 PDF Abstract BibTeX arXiv:2503.16771

Code (0)

등록된 구현이 없습니다.

Tasks

Code CompletionCode Generation

Methods 이 논문이 사용한 방법론

Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Attention 설명 없음

Similar Papers 제목 키워드 기반

Benchmarking and Explaining Large Language Model-based Code Generation: A Causality-Centric Approach

2023-10-10 · Zhenlan Ji, Pingchuan Ma, Zongjie Li, Shuai Wang

While code generation has been widely used in various software development scenarios, the quality of the generated code is not guaranteed. This has been a particular concern in the era of large language models (LLMs)- ba…

BenchmarkingCode GenerationLanguage ModelingLanguage Modelling+1

Evaluating and Explaining Large Language Models for Code Using Syntactic Structures

2023-08-07 · David N Palacio, Alejandro Velasco, Daniel Rodriguez-Cardenas, Kevin Moran 외

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 i…

Explaining novel senses using definition generation with open language models

2025-09-30 · Mariia Fedorova, Andrey Kutuzov, Francesco Periti, Yves Scherrer arxiv

We apply definition generators based on open-weights large language models to the task of creating explanations of novel senses, taking target word usages as an input. To this end, we employ the datasets from the AXOLOTL…

Accurate Explanation Model for Image Classifiers using Class Association Embedding

2024-06-12 · Ruitao Xie, Jingbang Chen, Limai Jiang, Rui Xiao 외

Image classification is a primary task in data analysis where explainable models are crucially demanded in various applications. Although amounts of methods have been proposed to obtain explainable knowledge from the bla…

ClassificationExplainable Modelsimage-classificationImage Classification+1

Q-SENN: Quantized Self-Explaining Neural Networks

2023-12-21 · Thomas Norrenbrock, Marco Rudolph, Bodo Rosenhahn

Explanations in Computer Vision are often desired, but most Deep Neural Networks can only provide saliency maps with questionable faithfulness. Self-Explaining Neural Networks (SENN) extract interpretable concepts with f…

DiversityImage ClassificationInterpretable Machine Learning