TextGenSHAP: Scalable Post-hoc Explanations in Text Generation with Long Documents
On the map: LLM reasoning → Reasoning benchmarks and evaluation
Abstract (arXiv)
Large language models (LLMs) have attracted huge interest in practical applications given their increasingly accurate responses and coherent reasoning abilities. Given their nature as black-boxes using complex reasoning processes on their inputs, it is inevitable that the demand for scalable and faithful explanations for LLMs' generated content will continue to grow. There have been major developments in the explainability of neural network models over the past decade. Among them, post-hoc explainability methods, especially Shapley values, have proven effective for interpreting deep learning models. However, there are major challenges in scaling up Shapley values for LLMs, particularly when dealing with long input contexts containing thousands of tokens and autoregressively generated output sequences. Furthermore, it is often unclear how to effectively utilize generated explanations to improve the performance of LLMs. In this paper, we introduce TextGenSHAP, an efficient post-hoc explanation method incorporating LM-specific techniques. We demonstrate that this leads to significant increases in speed compared to conventional Shapley value computations, reducing processing times from hours to minutes for token-level explanations, and to just seconds for document-level explanations. In addition, we demonstrate how real-time Shapley values can be utilized in two important scenarios, providing better understanding of long-document question answering by localizing important words and sentences; and improving existing document retrieval systems through enhancing the accuracy of selected passages and ultimately the final responses.
Key facts. Cited by 17 papers in the map (data through 14 Oct 2026). Placed in Reasoning benchmarks and evaluation, one of 17 directions in LLM reasoning. Builds on 57 of its 74 references that are in the map. First posted on arXiv 3 Dec 2023.
Builds on
57 of 74 references.
References · 57
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2017A Unified Approach to Interpreting Model Predictionscited by 6,555
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
- 2016"Why Should I Trust You?": Explaining the Predictions of Any Classifiercited by 5,070
- 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,824
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
- 2020Longformer: The Long-Document Transformercited by 3,413
- 2017Axiomatic Attribution for Deep Networkscited by 3,384
38 more
- 2019The Curious Case of Neural Text Degenerationcited by 2,916
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
- 2017Billion-scale similarity search with GPUscited by 2,497
- 2020REALM: Retrieval-Augmented Language Model Pre-Trainingcited by 2,141
- 2022Fast Inference from Transformers via Speculative Decodingcited by 1,653
- 2021Unsupervised Dense Information Retrieval with Contrastive Learningcited by 1,216
- 2020Leveraging Passage Retrieval with Generative Models for Open Domain Question Answeringcited by 1,210
- 2018Sanity Checks for Saliency Mapscited by 1,156
- 2022Atlas: Few-shot Learning with Retrieval Augmented Language Modelscited by 952
- 2019Attention is not Explanationcited by 929
- 2023Measuring Faithfulness in Chain-of-Thought Reasoningcited by 703
- 2023In-Context Retrieval-Augmented Language Modelscited by 702
- 2019Latent Retrieval for Weakly Supervised Open Domain Question Answeringcited by 695
- 2021Retrieval Augmentation Reduces Hallucination in Conversationcited by 692
- 2023Explainability for Large Language Models: A Surveycited by 333
- 2022RARR: Researching and Revising What Language Models Say, Using Language Modelscited by 287
- 2020Distilling Knowledge from Reader to Retriever for Question Answeringcited by 226
- 2022Memorizing Transformerscited by 226
- 2020Explaining by Removing: A Unified Framework for Model Explanationcited by 218
- 2023LongNet: Scaling Transformers to 1,000,000,000 Tokenscited by 204
- 2022Recurrent Memory Transformercited by 203
- 2020Generation-Augmented Retrieval for Open-domain Question Answeringcited by 186
- 2021Self-attention Does Not Need O(n2) Memorycited by 154
- 2022On the Origin of Hallucinations in Conversational Models: Is it the Datasets or the Models?cited by 138
- 2023Unlimiformer: Long-Range Transformers with Unlimited Length Inputcited by 128
- 2021SPLADE v2: Sparse Lexical and Expansion Model for Information Retrievalcited by 127
- 2021FastSHAP: Real-Time Shapley Value Estimationcited by 125
- 2021Sampling Permutations for Shapley Value Estimationcited by 102
- 2018L-Shapley and C-Shapley: Efficient Model Interpretation for Structured Datacited by 100
- 2023Scaling Transformer to 1M tokens and beyond with RMTcited by 98
- 2022Interpreting Language Models with Contrastive Explanationscited by 92
- 2020Aligning Faithful Interpretations with their Social Attributioncited by 79
- 2023Inseq: An Interpretability Toolkit for Sequence Generation Modelscited by 78
- 2021Contrastive Explanations for Model Interpretabilitycited by 75
- 2021Poolingformer: Long Document Modeling with Pooling Attentioncited by 60
- 2020Generating Hierarchical Explanations on Text Classification via Feature Interaction Detectioncited by 57
- 2022Making a MIRACL: Multilingual Information Retrieval Across a Continuum of Languagescited by 47
- 2020Gradient-based Analysis of NLP Models is Manipulablecited by 41
50 most cited of 57 All 57 (JSON)
Built on by
Citing papers per year: 2024: 4; 2025: 8; 2026: 5.
17 papers.
Sort:
By area:
- 2024Human-LLM Compound System for Scientific Ideation through Facet Recombination and Novelty Evaluationcited by 41
- 2025Game Theory Meets Large Language Models: A Systematic Survey with Taxonomy and New Frontierscited by 16
- 2024Learning to Understand: Identifying Interactions via the M"obius Transformcited by 13
- 2025TracLLM: A Generic Framework for Attributing Long Context LLMscited by 13
- 2024Multi-Level Explanations for Generative Language Modelscited by 11
- 2026The Why Behind the Action: Unveiling Internal Drivers via Agentic Attributioncited by 11
- 2025Interpretation Meets Safety: A Survey on Interpretation Methods and Tools for Improving LLM Safetycited by 10
- 2025Towards Transparent AI: A Survey on Explainable Large Language Modelscited by 7
- 2025B-cos LM: Efficiently Transforming Pre-trained Language Models for Improved Explainabilitycited by 4
- 2025Towards Transparent AI: A Survey on Explainable Language Modelscited by 3
- 2025Revitalizing Black-Box Interpretability: Actionable Interpretability for LLMs via Proxy Modelscited by 2
- 2026Not All Explanations Simulate Equally: Comparing Verbalized Feature Attributions and Self-Generated Rationalescited by 1
5 more
- 2024CELL your Model: Contrastive Explanations for Large Language Modelscited by 0
- 2025Bridging Fairness and Explainability: Can Input-Based Explanations Promote Fairness in Hate Speech Detection?cited by 0
- 2026TabSHAPcited by 0
- 2026Interpreting Black-Box Large Language Models with Sentence-Level Energy Landscapescited by 0
- 2026Auditing Agent Actions through Query-Conditioned Attributioncited by 0
- 2026Auditing Agent Actions through Query-Conditioned Attribution27 Sep 2026
- 2026Interpreting Black-Box Large Language Models with Sentence-Level Energy Landscapes3 Aug 2026
- 2026Not All Explanations Simulate Equally: Comparing Verbalized Feature Attributions and Self-Generated Rationales31 May 2026
- 2026TabSHAP22 Apr 2026
- 2026The Why Behind the Action: Unveiling Internal Drivers via Agentic Attribution21 Jan 2026
- 2025Bridging Fairness and Explainability: Can Input-Based Explanations Promote Fairness in Hate Speech Detection?26 Sep 2025
- 2025Towards Transparent AI: A Survey on Explainable Language Models25 Sep 2025
- 2025Towards Transparent AI: A Survey on Explainable Large Language Models26 Jun 2025
- 2025Interpretation Meets Safety: A Survey on Interpretation Methods and Tools for Improving LLM Safety5 Jun 2025
- 2025TracLLM: A Generic Framework for Attributing Long Context LLMs4 Jun 2025
- 2025Revitalizing Black-Box Interpretability: Actionable Interpretability for LLMs via Proxy Models18 May 2025
- 2025B-cos LM: Efficiently Transforming Pre-trained Language Models for Improved Explainability18 Feb 2025
5 more
- 2025Game Theory Meets Large Language Models: A Systematic Survey with Taxonomy and New Frontiers13 Feb 2025
- 2024Human-LLM Compound System for Scientific Ideation through Facet Recombination and Novelty Evaluation23 Sep 2024
- 2024CELL your Model: Contrastive Explanations for Large Language Models17 Jun 2024
- 2024Multi-Level Explanations for Generative Language Models21 Mar 2024
- 2024Learning to Understand: Identifying Interactions via the M"obius Transform4 Feb 2024
- 2024Human-LLM Compound System for Scientific Ideation through Facet Recombination and Novelty Evaluationcited by 41
- 2025Game Theory Meets Large Language Models: A Systematic Survey with Taxonomy and New Frontierscited by 16
- 2024Learning to Understand: Identifying Interactions via the M"obius Transformcited by 13
- 2025TracLLM: A Generic Framework for Attributing Long Context LLMscited by 13
- 2024Multi-Level Explanations for Generative Language Modelscited by 11
- 2025Towards Transparent AI: A Survey on Explainable Large Language Modelscited by 7
- 2025B-cos LM: Efficiently Transforming Pre-trained Language Models for Improved Explainabilitycited by 4
- 2025Towards Transparent AI: A Survey on Explainable Language Modelscited by 3
- 2024CELL your Model: Contrastive Explanations for Large Language Modelscited by 0
- 2025Bridging Fairness and Explainability: Can Input-Based Explanations Promote Fairness in Hate Speech Detection?cited by 0
- 2026TabSHAPcited by 0
- 2026Interpreting Black-Box Large Language Models with Sentence-Level Energy Landscapescited by 0
- 2026Interpreting Black-Box Large Language Models with Sentence-Level Energy Landscapes3 Aug 2026
- 2026TabSHAP22 Apr 2026
- 2025Bridging Fairness and Explainability: Can Input-Based Explanations Promote Fairness in Hate Speech Detection?26 Sep 2025
- 2025Towards Transparent AI: A Survey on Explainable Language Models25 Sep 2025
- 2025Towards Transparent AI: A Survey on Explainable Large Language Models26 Jun 2025
- 2025TracLLM: A Generic Framework for Attributing Long Context LLMs4 Jun 2025
- 2025B-cos LM: Efficiently Transforming Pre-trained Language Models for Improved Explainability18 Feb 2025
- 2025Game Theory Meets Large Language Models: A Systematic Survey with Taxonomy and New Frontiers13 Feb 2025
- 2024Human-LLM Compound System for Scientific Ideation through Facet Recombination and Novelty Evaluation23 Sep 2024
- 2024CELL your Model: Contrastive Explanations for Large Language Models17 Jun 2024
- 2024Multi-Level Explanations for Generative Language Models21 Mar 2024
- 2024Learning to Understand: Identifying Interactions via the M"obius Transform4 Feb 2024
Similar, not cited
Close in wording, no citation either way
- 2024Concept Bottleneck Large Language Models
- 2022Explanations from Large Language Models Make Small Reasoners Better
- 2025Explainability of Large Language Models: Opportunities and Challenges toward Generating Trustworthy Explanations
- 2024Towards Uncovering How Large Language Model Works: An Explainability Perspective
- 2022The Unreliability of Explanations in Few-shot Prompting for Textual Reasoning
- 2024Rethinking Interpretability in the Era of Large Language Models
- 2023Proto-lm: A Prototypical Network-Based Framework for Built-in Interpretability in Large Language Models
- 2025BELL: Benchmarking the Explainability of Large Language Models