发现大模型会自我判断是否知道某个实体,影响其是否编造答案。
Do I Know This Entity? Knowledge Awareness and Hallucinations in Language Models
- 用稀疏自编码器识别模型对实体的认知状态,判断它是否掌握相关知识。
- 模型在不知情时会编造信息,而该机制可控制其拒绝回答或生成虚假内容。
- 该能力在微调后仍存在,适合研究幻觉成因与可信生成的学者参考。
大型语言模型中的幻觉问题普遍存在,但其发生机制尚不清晰,限制了问题的解决。本文利用稀疏自编码器作为可解释性工具,发现实体识别是关键机制之一:模型能检测自己是否具备关于某个实体(如运动员、电影)的事实知识。稀疏自编码器揭示了表征空间中具有语义意义的方向,这些方向可识别模型是否认知某实体——例如,判断它不知道某位运动员或某部电影。这表明模型具备自我知识:对其自身能力的内部表征。这些方向具有因果作用:可引导模型拒绝回答已知实体的问题,或在本应拒绝的情况下编造未知实体的属性。我们证明,尽管稀疏自编码器仅在基础模型上训练,其方向仍对聊天模型的拒绝行为产生因果影响,说明聊天微调已复用这一现有机制。此外,我们初步探索了这些方向在模型内部的作用机制,发现它们会干扰下游注意力头的运作,而这些注意力头通常负责将实体属性传递至最终输出标记。
原文摘要 · Abstract (English)
Hallucinations in large language models are a widespread problem, yet the mechanisms behind whether models will hallucinate are poorly understood, limiting our ability to solve this problem. Using sparse autoencoders as an interpretability tool, we discover that a key part of these mechanisms is entity recognition, where the model detects if an entity is one it can recall facts about. Sparse autoencoders uncover meaningful directions in the representation space, these detect whether the model recognizes an entity, e.g. detecting it doesn't know about an athlete or a movie. This suggests that models can have self-knowledge: internal representations about their own capabilities. These directions are causally relevant: capable of steering the model to refuse to answer questions about known entities, or to hallucinate attributes of unknown entities when it would otherwise refuse. We demonstrate that despite the sparse autoencoders being trained on the base model, these directions have a causal effect on the chat model's refusal behavior, suggesting that chat finetuning has repurposed this existing mechanism. Furthermore, we provide an initial exploration into the mechanistic role of these directions in the model, finding that they disrupt the attention of downstream heads that typically move entity attributes to the final token.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。