An Explanation Method for Models of Code
Yu Wang, Ke Wang, Linzhang Wang
摘要
This paper introduces a novel method, called WheaCha, for explaining the predictions of code models. Similar to attribution methods, WheaCha seeks to identify input features that are responsible for a particular prediction that models make. On the other hand, it differs from attribution methods in crucial ways. Specifically, WheaCha separates an input program into "wheat" (i.e., defining features that are the reason for which models predict the label that they predict) and the rest "chaff" for any given prediction. We realize WheaCha in a tool, HuoYan, and use it to explain four prominent code models: code2vec, seq-GNN, GGNN, and CodeBERT. Results show that (1) HuoYan is efficient — taking on average under twenty seconds to compute wheat for an input program in an end-to-end fashion (i.e., including model prediction time); (2) the wheat that all models use to make predictions is predominantly comprised of simple syntactic or even lexical properties (i.e., identifier names); (3) neither the latest explainability methods for code models (i.e., SIVAND and CounterFactual Explanations) nor the most noteworthy attribution methods (i.e., Integrated Gradients and SHAP) can precisely capture wheat. Finally, we set out to demonstrate the usefulness of WheaCha, in particular, we assess if WheaCha’s explanations can help end users to identify defective code models (e.g., trained on mislabeled data or learned spurious correlations from biased data). We find that, with WheaCha, users achieve far higher accuracy in identifying faulty models than SIVAND, CounterFactual Explanations, Integrated Gradients and SHAP.
问问这篇 Paper
问问你的智能体。
Lune 读过与它相关的顶会 Paper,每个回答都会注明依据哪几篇。
引用它的顶会 Paper1
问问它们各自怎么用它相关 Paper
- Understanding neural code intelligence through program simplificationMd. Rafiqul Islam Rabin, Vincent J. Hellendoorn, Mohammad Amin AlipourFSE 2021 · 被引用 36 次
- Accelerating Shapley Explanation via Contributive Cooperator SelectionGuanchu Wang, Yu-Neng Chuang, Mengnan Du, Fan Yang 等ICML 2022 · 被引用 25 次
- Enabling Global, Human-Centered Explanations for LLMs: From Tokens to Interpretable Code and Test GenerationDipin Khati, Daniel Rodriguez-Cardenas, David N. Palacio, Alejandro Velasco 等ICSE 2026
- Graph Neural Networks for Vulnerability Detection: A Counterfactual ExplanationZhaoyang Chu, Yao Wan, Qian Li, Yang Wu 等ISSTA 2024 · 被引用 19 次
- DeciX: Explain Deep Learning Based Code Generation ApplicationsSimin Chen, Zexin Li, Wei Yang, Cong LiuFSE 2024 · 被引用 1 次
