2025-02-28 · 专家 · 机器学习 · 自然语言处理

On Relation-Specific Neurons in Large Language Models

这篇论文研究了大型语言模型中是否存在专注于关系的特定神经元,并揭示了这些神经元在处理关系知识时的关键特性。

更新于 2025-02-28。作者:Yihong Liu、Runsheng Chen、Lea Hirlimann、Ahmad Dawar Hakimi、Mingyang Wang、Amir Hossein Kargaran、Sascha Rothe、François Yvon、Hinrich Schütze。

中文摘要

在大规模语言模型(LLMs)中,某些神经元可以存储在预训练期间学习到的不同知识片段。虽然知识通常表现为关系和实体的组合,但尚不清楚是否有些神经元专注于关系本身——而不依赖于任何实体。我们假设这样的神经元能够检测输入文本中的关系,并引导涉及这种关系的生成。为了研究这一点,我们使用基于统计的方法,在选定的一组关系上研究了Llama-2系列模型。我们的实验证明了存在特定于关系(relation-specific)的神经元。我们测量了选择性地关闭特定于关系r的候选神经元对LLM处理以下两方面能力的影响:(1)关系为r的事实,以及(2)关系为不同关系r'(r'不等于r)的事实。关于它们编码关系信息的能力,我们为以下三个特性提供了证据。(i)神经元累积性。r的神经元呈现出累积效应,因此关闭较大一部分神经元会导致r中更多事实的退化。(ii)神经元通用性。神经元可以跨越多个密切相关以及不太相关的多个关系共享。一些关系神经元可以在不同语言之间迁移。(iii)神经元干扰。关闭特定于一个关系的神经元可以提高LLM对其他关系事实的生成性能。我们将在https://github.com/cisnlp/relation-specific-neurons上公开我们的代码。

英文摘要

In large language models (LLMs), certain neurons can store distinct pieces of knowledge learned during pretraining. While knowledge typically appears as a combination of relations and entities, it remains unclear whether some neurons focus on a relation itself -- independent of any entity. We hypothesize such neurons detect a relation in the input text and guide generation involving such a relation. To investigate this, we study the Llama-2 family on a chosen set of relations with a statistics-based method. Our experiments demonstrate the existence of relation-specific neurons. We measure the effect of selectively deactivating candidate neurons specific to relation r on the LLM's ability to handle (1) facts whose relation is r and (2) facts whose relation is a different relation r' neq r. With respect to their capacity for encoding relation information, we give evidence for the following three properties of relation-specific neurons. (i) Neuron cumulativity. The neurons for r present a cumulative effect so that deactivating a larger portion of them results in the degradation of more facts in r. (ii) Neuron versatility. Neurons can be shared across multiple closely related as well as less related relations. Some relation neurons transfer across languages. (iii) Neuron interference. Deactivating neurons specific to one relation can improve LLM generation performance for facts of other relations. We will make our code publicly available at https://github.com/cisnlp/relation-specific-neurons.

解读

一句话总结

这篇论文研究了大型语言模型中是否存在专注于关系的特定神经元,并揭示了这些神经元在处理关系知识时的关键特性。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源

机器可读索引:llms.txt