Unfamiliar Finetuning Examples Control How Language Models Hallucinate

Katie Kang, Eric Wallace, Claire Tomlin, Aviral Kumar, Sergey Levine
3/8/2024
cs.LGcs.AIcs.CL

No official code found. Best implementation: katiekang1998/llm_hallucinations (18 stars, last commit 2024-05-28).

Abstract

Large language models are known to hallucinate when faced with unfamiliar queries, but the underlying mechanism that govern how models hallucinate are not yet fully understood. In this work, we find that unfamiliar examples in the models' finetuning data -- those that introduce concepts beyond the base model's scope of knowledge -- are crucial in shaping these errors. In particular, we find that an LLM's hallucinated predictions tend to mirror the responses associated with its unfamiliar finetuning examples. This suggests that by modifying how unfamiliar finetuning examples are supervised, we can influence a model's responses to unfamiliar queries (e.g., say ``I don't know''). We empirically validate this observation in a series of controlled experiments involving SFT, RL, and reward model finetuning on TriviaQA and MMLU. Our work further investigates RL finetuning strategies for improving the factuality of long-form model generations. We find that, while hallucinations from the reward model can significantly undermine the effectiveness of RL factuality finetuning, strategically controlling how reward models hallucinate can minimize these negative effects. Leveraging our previous observations on controlling hallucinations, we propose an approach for learning more reliable reward models, and show that they improve the efficacy of RL factuality finetuning in long-form biography and book/movie plot generation tasks.

View on arXivView PDF

Code Implementations(1)

180Shell, PythonMar 21, 20242 years ago

Cite this paper

@article{kang2024unfamiliar,
  title  = {Unfamiliar Finetuning Examples Control How Language Models Hallucinate},
  author = {Katie Kang and Eric Wallace and Claire Tomlin and Aviral Kumar and Sergey Levine},
  year   = {2024},
  eprint = {2403.05612},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2403.05612v2}
}

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/2403.05612.svg)](https://codeofpaper.com/paper/2403.05612)

Discussion