Where is the answer? Investigating Positional Bias in Language Model Knowledge Extraction
Kuniaki Saito, Kihyuk Sohn, Chen-Yu Lee, Yoshitaka Ushiku
TL;DR
This work tackles why fine-tuned LLMs struggle to extract knowledge described later in training documents, a phenomenon tied to autoregressive training and termed a perplexity curse. By introducing synthetic Bio and Wiki2023+ datasets with QA pairs annotated to source sentences, the authors study how the position of the answer within a document affects extraction. They evaluate several training recipes, notably denoising auto-regressive training ($D$-AR), attention dropout, and sentence shuffling, demonstrating that vanilla autoregressive training degrades performance for middle/end positions while $D$-AR substantially improves extraction across positions and larger models with regularization close the gap. The findings inform the trade-offs between retrieval-augmented generation (RAG) and fine-tuning for domain adaptation and provide practical datasets to advance research on extractable knowledge in LLMs.
Abstract
Large language models require updates to remain up-to-date or adapt to new domains by fine-tuning them with new documents. One key is memorizing the latest information in a way that the memorized information is extractable with a query prompt. However, LLMs suffer from a phenomenon called perplexity curse; despite minimizing document perplexity during fine-tuning, LLMs struggle to extract information through a prompt sentence. In this new knowledge acquisition and extraction, we find a very intriguing fact that LLMs can accurately answer questions about the first sentence, but they struggle to extract information described in the middle or end of the documents used for fine-tuning. Our study suggests that the auto-regressive training causes this issue; each token is prompted by reliance on all previous tokens, which hinders the model from recalling information from training documents by question prompts. To conduct the in-depth study, we publish both synthetic and real datasets, enabling the evaluation of the QA performance w.r.t. the position of the corresponding answer in a document. Our investigation shows that even a large model suffers from the perplexity curse, but regularization such as denoising auto-regressive loss can enhance the information extraction from diverse positions. These findings will be (i) a key to improving knowledge extraction from LLMs and (ii) new elements to discuss the trade-off between RAG and fine-tuning in adapting LLMs to a new domain.
