대형 언어 모델의 관계별 뉴런에 관한 연구
On Relation-Specific Neurons in Large Language Models
February 24, 2025
저자: Yihong Liu, Runsheng Chen, Lea Hirlimann, Ahmad Dawar Hakimi, Mingyang Wang, Amir Hossein Kargaran, Sascha Rothe, François Yvon, Hinrich Schütze
cs.AI
초록
대규모 언어 모델(LLM)에서는 특정 뉴런이 사전 훈련 중에 학습한 구별되는 지식 조각을 저장할 수 있습니다. 지식은 일반적으로 관계와 개체의 조합으로 나타나지만, 일부 뉴런이 개체와는 독립적으로 관계 자체에 집중하는지 여부는 여전히 명확하지 않습니다. 우리는 이러한 뉴런이 입력 텍스트에서 관계를 감지하고 해당 관계를 포함하는 생성을 안내하는 것으로 가설을 세웁니다. 이를 조사하기 위해 우리는 선택한 일련의 관계에 대해 통계 기반 방법을 사용하여 Llama-2 패밀리를 연구합니다. 우리의 실험은 관계별 뉴런의 존재를 증명합니다. 우리는 관계 r에 특정한 후보 뉴런을 선택적으로 비활성화하는 것이 LLM이 (1) 관계가 r인 사실과 (2) 관계가 다른 관계 r'이 아닌 사실을 처리하는 능력에 미치는 영향을 측정합니다. 관계 정보를 인코딩하는 능력에 대해, 관계별 뉴런의 다음 세 가지 특성에 대한 증거를 제시합니다. (i) 뉴런 누적성. r에 대한 뉴런은 누적 효과를 나타내어 그 중요한 부분을 비활성화하면 r의 더 많은 사실이 저하됩니다. (ii) 뉴런 다용성. 뉴런은 여러 밀접하게 관련된 관계뿐만 아니라 덜 관련된 관계 사이에서 공유될 수 있습니다. 일부 관계 뉴런은 언어 간에 전이될 수 있습니다. (iii) 뉴런 간섭. 한 관계에 특정한 뉴런을 비활성화하면 다른 관계의 사실에 대한 LLM 생성 성능이 향상될 수 있습니다. 우리의 코드는 다음 주소에서 공개적으로 제공될 예정입니다: https://github.com/cisnlp/relation-specific-neurons.
English
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.Summary
AI-Generated Summary