Cabeças de Atenção em Modelos de Linguagem de Grande Escala: Uma Revisão
Attention Heads of Large Language Models: A Survey
September 5, 2024
Autores: Zifan Zheng, Yezhaohui Wang, Yuxin Huang, Shichao Song, Bo Tang, Feiyu Xiong, Zhiyu Li
cs.AI
Resumo
Desde o advento do ChatGPT, os Modelos de Linguagem de Grande Porte (LLMs) têm se destacado em diversas tarefas, mas permanecem amplamente como sistemas de caixa preta. Consequentemente, seu desenvolvimento depende fortemente de abordagens orientadas por dados, limitando a melhoria de desempenho por meio de alterações na arquitetura interna e nos caminhos de raciocínio. Como resultado, muitos pesquisadores começaram a explorar os potenciais mecanismos internos dos LLMs, visando identificar a essência de seus gargalos de raciocínio, com a maioria dos estudos focando nas cabeças de atenção. Nossa pesquisa visa elucidar os processos internos de raciocínio dos LLMs, concentrando-se na interpretabilidade e nos mecanismos subjacentes das cabeças de atenção. Primeiro, destilamos o processo de pensamento humano em uma estrutura de quatro estágios: Recuperação de Conhecimento, Identificação em Contexto, Raciocínio Latente e Preparação para Expressão. Utilizando essa estrutura, revisamos sistematicamente pesquisas existentes para identificar e categorizar as funções de cabeças de atenção específicas. Além disso, resumimos as metodologias experimentais utilizadas para descobrir essas cabeças especiais, dividindo-as em duas categorias: métodos Livres de Modelagem e métodos que Requerem Modelagem. Também delineamos métodos de avaliação e benchmarks relevantes. Por fim, discutimos as limitações da pesquisa atual e propomos várias direções futuras potenciais. Nossa lista de referências está disponível em código aberto em https://github.com/IAAR-Shanghai/Awesome-Attention-Heads.
English
Since the advent of ChatGPT, Large Language Models (LLMs) have excelled in
various tasks but remain largely as black-box systems. Consequently, their
development relies heavily on data-driven approaches, limiting performance
enhancement through changes in internal architecture and reasoning pathways. As
a result, many researchers have begun exploring the potential internal
mechanisms of LLMs, aiming to identify the essence of their reasoning
bottlenecks, with most studies focusing on attention heads. Our survey aims to
shed light on the internal reasoning processes of LLMs by concentrating on the
interpretability and underlying mechanisms of attention heads. We first distill
the human thought process into a four-stage framework: Knowledge Recalling,
In-Context Identification, Latent Reasoning, and Expression Preparation. Using
this framework, we systematically review existing research to identify and
categorize the functions of specific attention heads. Furthermore, we summarize
the experimental methodologies used to discover these special heads, dividing
them into two categories: Modeling-Free methods and Modeling-Required methods.
Also, we outline relevant evaluation methods and benchmarks. Finally, we
discuss the limitations of current research and propose several potential
future directions. Our reference list is open-sourced at
https://github.com/IAAR-Shanghai/Awesome-Attention-Heads.