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 and task-specific similarity comparisons, while remaining compatible with both open-source and proprietary LLMs. We evaluate FeatureSHAP on two bi-modal SE tasks: code generation and code summarization. The results show that FeatureSHAP assigns less importance to irrelevant input features and produces explanations with higher fidelity than baseline methods. A practitioner survey involving 37 participants shows that FeatureSHAP helps practitioners better interpret model outputs and make more informed decisions. Collectively, FeatureSHAP represents a meaningful step toward practical explainable AI in software engineering. FeatureSHAP is available at https://github.com/deviserlab/FeatureSHAP.


翻译:近年来,大语言模型(LLMs)的发展显著推动了软件工程(SE)任务的自动化,实现了代码生成与代码摘要等复杂活动。然而,LLMs的黑箱特性仍然是其在高风险与安全关键领域应用的主要障碍,这些领域中的可解释性与透明度对于建立信任、确保问责制以及实现有效的人工监督至关重要。尽管针对软件工程的可解释人工智能研究日益受到关注,但现有方法缺乏与从业者对软件工程制品推理方式相一致的领域特定解释。为填补这一空白,我们提出了FeatureSHAP——首个为软件工程任务定制的全自动、模型无关的可解释性框架。基于沙普利值,FeatureSHAP通过系统化的输入扰动和任务特定的相似性比较,将模型输出归因于高层次输入特征,同时保持对开源与专有LLMs的兼容性。我们在两项双模态软件工程任务(代码生成与代码摘要)上评估FeatureSHAP。结果表明,与基线方法相比,FeatureSHAP对不相关输入特征赋予的重要性更低,且产生的解释具有更高的保真度。一项涉及37名参与者的从业者调研显示,FeatureSHAP能帮助从业者更好地解读模型输出并做出更明智的决策。总体而言,FeatureSHAP代表了软件工程领域迈向实用可解释人工智能的重要一步。FeatureSHAP项目地址:https://github.com/deviserlab/FeatureSHAP。

0
下载
关闭预览

相关内容

软件(中国大陆及香港用语,台湾作软体,英文:Software)是一系列按照特定顺序组织的计算机数据和指令的集合。一般来讲软件被划分为编程语言、系统软件、应用软件和介于这两者之间的中间件。软件就是程序加文档的集合体。
PlanGenLLMs:大型语言模型规划能力的最新综述
专知会员服务
32+阅读 · 5月18日
论文浅尝 | GEOM-GCN: Geometric Graph Convolutional Networks
开放知识图谱
14+阅读 · 2020年4月8日
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员