On Relation-Specific Neurons in Large Language Models
Abstract
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.
Community
The paper demonstrates the existence of relation-specific neurons in Llama-2 models, showing that deactivating these neurons affects facts involving the corresponding relation and revealing properties of cumulativity, versatility, and interference.
This is an automated message from the Librarian Bot. I found the following papers similar to this paper.
The following papers were recommended by the Semantic Scholar API
- Exploring Translation Mechanism of Large Language Models (2025)
- Analyze the Neurons, not the Embeddings: Understanding When and Where LLM Representations Align with Humans (2025)
- How Do LLMs Acquire New Knowledge? A Knowledge Circuits Perspective on Continual Pre-Training (2025)
- Beyond Seen Data: Improving KBQA Generalization Through Schema-Guided Logical Form Generation (2025)
- AdaCoT: Rethinking Cross-Lingual Factual Reasoning through Adaptive Chain-of-Thought (2025)
- The Representation and Recall of Interwoven Structured Knowledge in LLMs: A Geometric and Layered Analysis (2025)
- When LLMs Struggle: Reference-less Translation Evaluation for Low-resource Languages (2025)
Please give a thumbs up to this comment if you found it helpful!
If you want recommendations for any Paper on Hugging Face checkout this Space
You can directly ask Librarian Bot for paper recommendations by tagging it in a comment:
@librarian-bot
recommend
Models citing this paper 0
No model linking this paper
Datasets citing this paper 0
No dataset linking this paper
Spaces citing this paper 0
No Space linking this paper