ACL 2025finding0 citations

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.

BibTeX
@inproceedings{xiao-etal-2025-tokenshapley,
    title = "{T}oken{S}hapley: Token Level Context Attribution with Shapley Value",
    author = "Xiao, Yingtai  and
      Zhu, Yuqing  and
      Samyoun, Sirat  and
      Zhang, Wanrong  and
      Wang, Jiachen T.  and
      Du, Jian",
    editor = "Che, Wanxiang  and
      Nabende, Joyce  and
      Shutova, Ekaterina  and
      Pilehvar, Mohammad Taher",
    booktitle = "Findings of the Association for Computational Linguistics: ACL 2025",
    month = jul,
    year = "2025",
    address = "Vienna, Austria",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2025.findings-acl.200/",
    doi = "10.18653/v1/2025.findings-acl.200",
    pages = "3882--3894",
    ISBN = "979-8-89176-256-5"
}