Peering into the Mind of Language Models: An Approach for Attribution in Contextual Question Answering

Anirudh Phukan, Shwetha Somasundaram, Apoorv Saxena, Koustava Goswami, Balaji Vasan Srinivasan
5/28/2024
cs.CL

No official code found. Best implementation: Anirudh-Phukan/verifiability-granular (5 stars, last commit 2024-05-29).

Abstract

With the enhancement in the field of generative artificial intelligence (AI), contextual question answering has become extremely relevant. Attributing model generations to the input source document is essential to ensure trustworthiness and reliability. We observe that when large language models (LLMs) are used for contextual question answering, the output answer often consists of text copied verbatim from the input prompt which is linked together with "glue text" generated by the LLM. Motivated by this, we propose that LLMs have an inherent awareness from where the text was copied, likely captured in the hidden states of the LLM. We introduce a novel method for attribution in contextual question answering, leveraging the hidden state representations of LLMs. Our approach bypasses the need for extensive model retraining and retrieval model overhead, offering granular attributions and preserving the quality of generated answers. Our experimental results demonstrate that our method performs on par or better than GPT-4 at identifying verbatim copied segments in LLM generations and in attributing these segments to their source. Importantly, our method shows robust performance across various LLM architectures, highlighting its broad applicability. Additionally, we present Verifiability-granular, an attribution dataset which has token level annotations for LLM generations in the contextual question answering setup.

View on arXivView PDF

Code Implementations(1)

50May 26, 20242 years ago

Similar Papers

Cite this paper

@article{phukan2024peering,
  title  = {Peering into the Mind of Language Models: An Approach for Attribution in Contextual Question Answering},
  author = {Anirudh Phukan and Shwetha Somasundaram and Apoorv Saxena and Koustava Goswami and Balaji Vasan Srinivasan},
  year   = {2024},
  eprint = {2405.17980},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2405.17980v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2405.17980.svg)](https://codeofpaper.com/paper/2405.17980)

Discussion