Toward Explaining Large Language Models in Software Engineering Tasks
Antonio Vitale, Khai-Nguyen Nguyen, Denys Poshyvanyk, Rocco Oliveto, Simone Scalabrino, Antonio Mastropaolo

TL;DR
This paper introduces FeatureSHAP, a novel explainability framework for large language models in software engineering, improving interpretability and trust in code-related tasks through domain-specific explanations.
Contribution
We present FeatureSHAP, the first automated, model-agnostic explainability method tailored for software engineering tasks using Shapley values.
Findings
FeatureSHAP assigns less importance to irrelevant features.
It produces explanations with higher fidelity than baseline methods.
Practitioners find it helps interpret model outputs better.
Abstract
Recent progress in Large Language Models (LLMs) has substantially advanced the automation of software engineering (SE) tasks, enabling complex activities such as code generation and code summarization. However, the black-box nature of LLMs remains a major barrier to their adoption in high-stakes and safety-critical domains, where explainability and transparency are vital for trust, accountability, and effective human supervision. Despite increasing interest in explainable AI for software engineering, existing methods lack domain-specific explanations aligned with how practitioners reason about SE artifacts. To address this gap, we introduce FeatureSHAP, the first fully automated, model-agnostic explainability framework tailored to software engineering tasks. Based on Shapley values, FeatureSHAP attributes model outputs to high-level input features through systematic input perturbation…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsExplainable Artificial Intelligence (XAI) · Artificial Intelligence in Healthcare and Education · Software Engineering Research
