arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2406.10868cs.CL
收藏

在大型语言模型中识别与查询相关的神经元以生成长文本

Identifying Query-Relevant Neurons in Large Language Models for Long-Form Texts

Imperial College(帝国学院)

Lihu Chen, Adam Dejl, Francesca Toni

AI总结:

本文提出QRNCA框架,用于识别LLM中与查询相关的神经元,通过多选问答任务评估其有效性,并展示在不同领域中的局部知识区域。

摘要:

大型语言模型(LLMs)在其参数中拥有大量知识,促使研究寻找和编辑这些知识的方法。先前工作主要集中在较小模型中定位实体相关(通常是单个标记)事实。然而,仍存在几个关键问题:(1)如何有效定位解码器-only LLMs(如Llama和Mistral)中的查询相关神经元?(2)如何解决长文本(或自由形式)生成的挑战?(3)LLMs中是否存在局部知识区域?在本研究中,我们引入了查询相关神经元聚类归因(QRNCA),一种架构无关的框架,能够识别LLM中的查询相关神经元。QRNCA通过使用多选问答的代理任务来检查超越三元组事实的长文本回答。为了评估所检测神经元的有效性,我们构建了两个覆盖不同领域和语言的多选问答数据集。实证评估显示,我们的方法显著优于基线方法。进一步分析神经元分布揭示了可见的局部区域,尤其是在不同领域中。最后,我们展示了所检测神经元在知识编辑和基于神经元的预测中的潜在应用。

英文摘要:

Large Language Models (LLMs) possess vast amounts of knowledge within their parameters, prompting research into methods for locating and editing this knowledge. Previous work has largely focused on locating entity-related (often single-token) facts in smaller models. However, several key questions remain unanswered: (1) How can we effectively locate query-relevant neurons in decoder-only LLMs, such as Llama and Mistral? (2) How can we address the challenge of long-form (or free-form) text generation? (3) Are there localized knowledge regions in LLMs? In this study, we introduce Query-Relevant Neuron Cluster Attribution (QRNCA), a novel architecture-agnostic framework capable of identifying query-relevant neurons in LLMs. QRNCA allows for the examination of long-form answers beyond triplet facts by employing the proxy task of multi-choice question answering. To evaluate the effectiveness of our detected neurons, we build two multi-choice QA datasets spanning diverse domains and languages. Empirical evaluations demonstrate that our method outperforms baseline methods significantly. Further, analysis of neuron distributions reveals the presence of visible localized regions, particularly within different domains. Finally, we show potential applications of our detected neurons in knowledge editing and neuron-based prediction.

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

↑