arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.03752cs.CL
收藏

大型语言模型的注意力头:一项综述

Attention Heads of Large Language Models: A Survey

Institute for Advanced Algorithms Research (IAAR)(高级算法研究院(IAAR));Institute for AI Industry Research (AIR), Tsinghua University(清华大学人工智能产业研究院);Research Institute of China Telecom(中国电信研究院)

Zifan Zheng, Yezhaohui Wang, Yuxin Huang, Shichao Song, Mingchuan Yang, Bo Tang, Feiyu Xiong, Zhiyu Li

AI总结:

本文综述了大型语言模型中注意力头的作用与机制,提出受人类思维启发的四阶段框架,系统分类特定注意力头功能及实验方法,并探讨未来研究方向。

摘要:

自 ChatGPT 问世以来,大型语言模型(LLMs)在各类任务中表现优异,但仍是黑盒系统。理解 LLMs 的推理瓶颈已成为一项关键挑战,因为这些局限性与其内部架构紧密相关。其中,注意力头已成为探究 LLMs 底层机制的核心焦点。在这项综述中,我们旨在通过系统探索注意力头的作用与机制,来揭开 LLMs 内部推理过程的神秘面纱。我们首先引入了一个受人类思维过程启发的全新四阶段框架:知识回忆、上下文识别、潜在推理和表达准备。利用该框架,我们全面回顾了现有研究,以识别并分类特定注意力头的功能。此外,我们分析了用于发现这些特殊注意力头的实验方法,将其分为两类:无需建模方法和需要建模方法。我们进一步总结了相关的评估方法和基准。最后,我们讨论了当前研究的局限性,并提出了几个潜在的未来方向。

英文摘要:

Since the advent of ChatGPT, Large Language Models (LLMs) have excelled in various tasks but remain as black-box systems. Understanding the reasoning bottlenecks of LLMs has become a critical challenge, as these limitations are deeply tied to their internal architecture. Among these, attention heads have emerged as a focal point for investigating the underlying mechanics of LLMs. In this survey, we aim to demystify the internal reasoning processes of LLMs by systematically exploring the roles and mechanisms of attention heads. We first introduce a novel four-stage framework inspired by the human thought process: Knowledge Recalling, In-Context Identification, Latent Reasoning, and Expression Preparation. Using this framework, we comprehensively review existing research to identify and categorize the functions of specific attention heads. Additionally, we analyze the experimental methodologies used to discover these special heads, dividing them into two categories: Modeling-Free and Modeling-Required methods. We further summarize relevant evaluation methods and benchmarks. Finally, we discuss the limitations of current research and propose several potential future directions.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑