ContextualSHAP : Enhancing SHAP Explanations Through Contextual Language Generation
Not on the map. Why?
Abstract (arXiv)
Explainable Artificial Intelligence (XAI) has become an increasingly important area of research, particularly as machine learning models are deployed in high-stakes domains. Among various XAI approaches, SHAP (SHapley Additive exPlanations) has gained prominence due to its ability to provide both global and local explanations across different machine learning models. While SHAP effectively visualizes feature importance, it often lacks contextual explanations that are meaningful for end-users, especially those without technical backgrounds. To address this gap, we propose a Python package that extends SHAP by integrating it with a large language model (LLM), specifically OpenAI's GPT, to generate contextualized textual explanations. This integration is guided by user-defined parameters (such as feature aliases, descriptions, and additional background) to tailor the explanation to both the model context and the user perspective. We hypothesize that this enhancement can improve the perceived understandability of SHAP explanations. To evaluate the effectiveness of the proposed package, we applied it in a healthcare-related case study and conducted user evaluations involving real end-users. The results, based on Likert-scale surveys and follow-up interviews, indicate that the generated explanations were perceived as more understandable and contextually appropriate compared to visual-only outputs. While the findings are preliminary, they suggest that combining visualization with contextualized text may support more user-friendly and trustworthy model explanations.
Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 13 of its 33 references that are in the map. First posted on arXiv 8 Dec 2025.
Builds on
13 of 33 references.
References · 13
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2017A Unified Approach to Interpreting Model Predictionscited by 6,555
- 2019Explainable Artificial Intelligence (XAI): Concepts, Taxonomies, Opportunities and Challenges toward Responsible AIcited by 1,552
- 2017Explanation in Artificial Intelligence: Insights from the Social Sciencescited by 1,206
- 2018A Survey Of Methods For Explaining Black Box Modelscited by 973
- 2020Effect of Confidence and Explanation on Accuracy and Trust Calibration in AI-Assisted Decision Makingcited by 281
- 2021AMMUS : A Survey of Transformer-based Pretrained Models in Natural Language Processingcited by 131
- 2019Explainability Fact Sheets: A Framework for Systematic Assessment of Explainable Approachescited by 101
- 2017Explainable AI: Beware of Inmates Running the Asylum Or: How I Learnt to Stop Worrying and Love the Social and Behavioural Sciencescited by 85
- 2023A Survey of GPT-3 Family Large Language Models Including ChatGPT and GPT-4cited by 81
- 2020The Pragmatic Turn in Explainable Artificial Intelligence (XAI)cited by 54
Built on by
Citing papers per year: 2025: 1; 2026: 2.
3 papers.
- 2026Quality Without Usefulness: LLM-Generated XAI Narratives as Trust Heuristics Rather Than Decision Aidscited by 2
- 2025A Mobile Application Front-End for Presenting Explainable AI Results in Diabetes Risk Estimationcited by 0
- 2026Who Are You Explaining To? A Multi-Agent System for Audience-Aware XAI Narrativescited by 0
- 2026Who Are You Explaining To? A Multi-Agent System for Audience-Aware XAI Narratives11 Aug 2026
- 2026Quality Without Usefulness: LLM-Generated XAI Narratives as Trust Heuristics Rather Than Decision Aids26 May 2026
- 2025A Mobile Application Front-End for Presenting Explainable AI Results in Diabetes Risk Estimation9 Dec 2025