ACL Findings2025
TokenShapley: Token Level Context Attribution with Shapley Value
Yingtai Xiao, Yuqing Zhu, Sirat Samyoun, Wanrong Zhang, Jiachen T. Wang, Jian Du
Abstract
Large language models (LLMs) demonstrate strong capabilities in in-context learning, but verifying the correctness of their generated responses remains a challenge. Prior work has explored attribution at the sentence level, but these methods fall short when users seek attribution for specific keywords within the response, such as numbers, years, or names. To address this limitation, we propose TokenShapley, a novel token-level attribution method that combines Shapley value-based data attribution with KNN-based retrieval techniques inspired by recent advances in KNN-augmented LLMs. By leveraging a precomputed datastore for contextual retrieval and computing Shapley values to quantify token importance, TokenShapley provides a fine-grained data attribution approach. Extensive evaluations on four benchmarks show that TokenShapley outperforms state-of-the-art baselines in token-level attribution, achieving a 11-23% improvement in accuracy.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
1 top-tier paper has cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- A Survey on In-context Learning cites Language Models are Few-Shot Learners
- Cite Pretrain: Retrieval-Free Knowledge Attribution for Large Language Models cites Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflection
- Cite Pretrain: Retrieval-Free Knowledge Attribution for Large Language Models cites TRAK: Attributing Model Behavior at Scale
- TRAK: Attributing Model Behavior at Scale cites Language Models are Few-Shot Learners
Cited by top-tier papers1
Builds on17
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Self-RAG: Learning to Retrieve, Generate, and Critique through Self-ReflectionAkari Asai, Zeqiu Wu, Yizhong Wang, Avirup Sil et al.ICLR 2024 · 1,798 citations
- Generalization through Memorization: Nearest Neighbor Language ModelsUrvashi Khandelwal, Omer Levy, Dan Jurafsky, Luke Zettlemoyer et al.ICLR 2020 · 1,038 citations
- A Survey on In-context LearningQingxiu Dong, Lei Li, Damai Dai, Ce Zheng et al.EMNLP 2024 · 479 citations
- TRAK: Attributing Model Behavior at ScaleSung Min Park, Kristian Georgiev, Andrew Ilyas, Guillaume Leclerc et al.ICML 2023 · 260 citations
Related papers
- TextGenSHAP: Scalable Post-Hoc Explanations in Text Generation with Long DocumentsJames Enouen, Hootan Nakhost, Sayna Ebrahimi, Sercan Ö. Arik et al.ACL Findings 2024 · 3 citations
- Context Attribution with Multi-Armed Bandit OptimizationDeng Pan, Keerthiram Murugesan, Ting Hua, Nuno Moniz et al.ACL Findings 2026
- Attribute or Abstain: Large Language Models as Long Document AssistantsJan Buchmann, Xiao Liu, Iryna GurevychEMNLP 2024
- From Scoring to Explanations: Evaluating SHAP and LLM Rationales for Rubric-based Teaching Quality AssessmentIvo Bueno, Babette Bühler, Philipp Stark, Tim Fütterer et al.ACL Findings 2026
- AttributionBench: How Hard is Automatic Attribution Evaluation?Yifei Li, Xiang Yue, Zeyi Liao, Huan SunACL Findings 2024 · 4 citations
