Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
38 tokens/sec
GPT-4o
59 tokens/sec
Gemini 2.5 Pro Pro
41 tokens/sec
o3 Pro
7 tokens/sec
GPT-4.1 Pro
50 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Analysing the Residual Stream of Language Models Under Knowledge Conflicts (2410.16090v1)

Published 21 Oct 2024 in cs.CL

Abstract: LLMs can store a significant amount of factual knowledge in their parameters. However, their parametric knowledge may conflict with the information provided in the context. Such conflicts can lead to undesirable model behaviour, such as reliance on outdated or incorrect information. In this work, we investigate whether LLMs can identify knowledge conflicts and whether it is possible to know which source of knowledge the model will rely on by analysing the residual stream of the LLM. Through probing tasks, we find that LLMs can internally register the signal of knowledge conflict in the residual stream, which can be accurately detected by probing the intermediate model activations. This allows us to detect conflicts within the residual stream before generating the answers without modifying the input or model parameters. Moreover, we find that the residual stream shows significantly different patterns when the model relies on contextual knowledge versus parametric knowledge to resolve conflicts. This pattern can be employed to estimate the behaviour of LLMs when conflict happens and prevent unexpected answers before producing the answers. Our analysis offers insights into how LLMs internally manage knowledge conflicts and provides a foundation for developing methods to control the knowledge selection processes.

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (9)
  1. Yu Zhao (207 papers)
  2. Xiaotang Du (4 papers)
  3. Giwon Hong (10 papers)
  4. Aryo Pradipta Gema (18 papers)
  5. Alessio Devoto (14 papers)
  6. Hongru Wang (62 papers)
  7. Xuanli He (43 papers)
  8. Kam-Fai Wong (92 papers)
  9. Pasquale Minervini (88 papers)
X Twitter Logo Streamline Icon: https://streamlinehq.com