Identifying the Source of Generation for Large Language Models
Bumjin Park, Jaesik Choi
TL;DR
This work addresses the problem of tracing the source documents underlying text generated by large language models (LLMs) by introducing a token-level, post-hoc source identification mechanism. It formalizes the task as a multi-label classification and proposes an $n$-gram Source Identifier implemented as a non-linear MLP that maps internal LLM activations to document labels, evaluated across multiple models and datasets. The study demonstrates that bigram representations offer the best generalization, with performance improving with larger models and depending on the layer used, while non-linear predictors generally outperform linear ones. The proposed approach enables provenance tagging and reliability for generated content without altering the LLMs, bearing significant implications for safety, copyright protection, and trust in AI systems, particularly for providers who can supply document-source labels for end users.
Abstract
Large language models (LLMs) memorize text from several sources of documents. In pretraining, LLM trains to maximize the likelihood of text but neither receives the source of the text nor memorizes the source. Accordingly, LLM can not provide document information on the generated content, and users do not obtain any hint of reliability, which is crucial for factuality or privacy infringement. This work introduces token-level source identification in the decoding step, which maps the token representation to the reference document. We propose a bi-gram source identifier, a multi-layer perceptron with two successive token representations as input for better generalization. We conduct extensive experiments on Wikipedia and PG19 datasets with several LLMs, layer locations, and identifier sizes. The overall results show a possibility of token-level source identifiers for tracing the document, a crucial problem for the safe use of LLMs.
