arXiv:2507.05261cs.CLcs.LG2025-07ACL被引 18

用沙普利值精准定位大模型回答中每个词的来源,提升可解释性。

TokenShapley: Token Level Context Attribution with Shapley Value

  • 结合沙普利值与KNN检索,实现词级别上下文溯源。
  • 在4个基准上准确率提升11%-23%。
  • 适合需要验证关键信息来源的研究者或开发者。

大语言模型在上下文学习中表现出强大能力,但验证其生成结果的正确性仍具挑战。以往研究仅支持句级归因,难以满足用户对回答中特定关键词(如数字、年份、姓名)的溯源需求。为此,我们提出TokenShapley,一种基于沙普利值的数据归因方法,融合了最近邻检索(KNN)技术,借鉴近期KNN增强型大模型的进展。通过预计算数据存储进行上下文检索,并计算沙普利值量化各词重要性,实现了细粒度的数据归因。在四个基准上的广泛评估表明,TokenShapley在词级别归因任务上优于现有最先进方法,准确率提升11%-23%。

原文摘要 · Abstract (English)

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 an 11-23% improvement in accuracy.

可解释性大模型归因分析

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。