Steering Knowledge Selection Behaviours in LLMs via SAE-Based Representation Engineering
Abstract
Large language models (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 -- this phenomenon, known as context-memory knowledge conflicts, can lead to undesirable model behaviour, such as reliance on outdated or incorrect information. Analysing the internal activations of LLMs, we find that they can internally register the signals of knowledge conflict at mid-layers. Such signals allow us to detect whether a knowledge conflict occurs and use inference-time intervention strategies to resolve it. In this work, we propose SpARE, a training-free representation engineering method that uses pre-trained sparse auto-encoders (SAEs) to control the knowledge selection behaviour of LLMs. SpARE identifies the functional features that control the knowledge selection behaviours and applies them to edit the internal activations of LLMs at inference time. Our experimental results show that SpARE can effectively control the usage of either knowledge source to resolve knowledge conflict in open-domain question-answering tasks, surpassing existing representation engineering methods (+10%) as well as contrastive decoding methods (+15%).
Community
How do LLMs handle knowledge conflicts between parametric and contextual knowledge? 🤔 We introduce SpARE, a training-free method that uses sparse auto-encoders (SAEs) and task arithmetic to detect and resolve conflicts at inference time, with up to +15% improvement in open-domain QA
The preliminary study of this work is accepted at The Foundation Model Intervention Workshop @ NeurIPS 2024: Analysing the Residual Stream of Language Models Under Knowledge Conflicts
This is an automated message from the Librarian Bot. I found the following papers similar to this paper.
The following papers were recommended by the Semantic Scholar API
- Analysing the Residual Stream of Language Models Under Knowledge Conflicts (2024)
- Towards Inference-time Category-wise Safety Steering for Large Language Models (2024)
- Semantics-Adaptive Activation Intervention for LLMs via Dynamic Steering Vectors (2024)
- AdaCAD: Adaptively Decoding to Balance Conflicts between Contextual and Parametric Knowledge (2024)
- Improving Instruction-Following in Language Models through Activation Steering (2024)
Please give a thumbs up to this comment if you found it helpful!
If you want recommendations for any Paper on Hugging Face checkout this Space
You can directly ask Librarian Bot for paper recommendations by tagging it in a comment:
@librarian-bot
recommend
Models citing this paper 0
No model linking this paper
Datasets citing this paper 0
No dataset linking this paper
Spaces citing this paper 0
No Space linking this paper