Eu Conheço Esta Entidade? Consciência do Conhecimento e Alucinações em Modelos de Linguagem
Do I Know This Entity? Knowledge Awareness and Hallucinations in Language Models
November 21, 2024
Autores: Javier Ferrando, Oscar Obeso, Senthooran Rajamanoharan, Neel Nanda
cs.AI
Resumo
Alucinações em grandes modelos de linguagem são um problema generalizado, no entanto, os mecanismos por trás de quando os modelos irão alucinar são mal compreendidos, limitando nossa capacidade de resolver esse problema. Usando autoencoders esparsos como uma ferramenta de interpretabilidade, descobrimos que uma parte fundamental desses mecanismos é o reconhecimento de entidades, onde o modelo detecta se uma entidade é uma da qual ele pode recordar fatos. Autoencoders esparsos revelam direções significativas no espaço de representação, que detectam se o modelo reconhece uma entidade, por exemplo, detectando que ele não conhece um atleta ou um filme. Isso sugere que os modelos podem ter autoconhecimento: representações internas sobre suas próprias capacidades. Essas direções são causalmente relevantes: capazes de direcionar o modelo para recusar responder perguntas sobre entidades conhecidas, ou para alucinar atributos de entidades desconhecidas quando de outra forma recusaria. Demonstramos que, apesar dos autoencoders esparsos terem sido treinados no modelo base, essas direções têm um efeito causal no comportamento de recusa do modelo de chat, sugerindo que o ajuste fino do chat repurpôs esse mecanismo existente. Além disso, fornecemos uma exploração inicial do papel mecanicista dessas direções no modelo, descobrindo que elas perturbam a atenção das camadas subsequentes que normalmente movem atributos de entidades para o token final.
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.Summary
AI-Generated Summary