压缩感知在大语言模型能力定位中的应用
Compressed Sensing for Capability Localization in Large Language Models
AI总结:
研究通过压缩感知方法识别大语言模型中特定能力依赖的稀疏注意力头,发现关闭少量头可显著降低特定能力表现,揭示了模型模块化组织原则。
摘要:
大型语言模型(LLMs)展现出广泛的能力,包括数学推理、代码生成和语言行为。我们证明Transformer架构包含少量注意力头,这些头对某些能力至关重要。关闭最少五个任务特定头可使标准基准测试中相关能力的表现下降高达60%,而对无关任务影响较小。我们引入一种基于压缩感知的方法,利用这些头的稀疏性,通过策略性删除和少量模型评估来识别它们。我们验证了这些发现,涵盖从1B到14B参数的Llama和Qwen模型,以及包括数学能力和代码生成在内的多种能力,揭示了模型中专门能力依赖于稀疏、功能不同的组件。总体而言,我们的结果表明,能力定位是Transformer语言模型的一般组织原则,对可解释性、模型编辑和AI安全有启示。代码可在https://github.com/locuslab/llm-components发布。
英文摘要:
Large language models (LLMs) exhibit a wide range of capabilities, including mathematical reasoning, code generation, and linguistic behaviors. We show that Transformer architectures contain small subsets of attention heads that are necessary for certain capabilities. Zeroing out as few as five task-specific heads can degrade performance by up to $60\%$ on standard benchmarks measuring the capability of interest, while largely preserving performance on unrelated tasks. We introduce a compressed sensing-based method that exploits the sparsity of these heads to identify them via strategic knockouts and a small number of model evaluations. We validate these findings across Llama and Qwen models ranging from 1B to 14B parameters and a diverse set of capabilities including mathematical abilities and code generation, revealing a modular organization in which specialized capabilities are dependent on sparse, functionally distinct components. Overall, our results suggest that capability localization is a general organizational principle of Transformer language models, with implications for interpretability, model editing, and AI safety. Code is released at https://github.com/locuslab/llm-components.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。