Does Knowledge Localization Hold True? Surprising Differences Between Entity and Relation Perspectives in Language Models

Yifan Wei, Xiaoyan Yu, Yixuan Weng, Huanhuan Ma, Yuanzhe Zhang +2 more
9/1/2024
cs.CLcs.AI

No official code found. Best implementation: weiyifan1023/RaKE (10 stars, last commit 2025-12-01).

Abstract

Large language models encapsulate knowledge and have demonstrated superior performance on various natural language processing tasks. Recent studies have localized this knowledge to specific model parameters, such as the MLP weights in intermediate layers. This study investigates the differences between entity and relational knowledge through knowledge editing. Our findings reveal that entity and relational knowledge cannot be directly transferred or mapped to each other. This result is unexpected, as logically, modifying the entity or the relation within the same knowledge triplet should yield equivalent outcomes. To further elucidate the differences between entity and relational knowledge, we employ causal analysis to investigate how relational knowledge is stored in pre-trained models. Contrary to prior research suggesting that knowledge is stored in MLP weights, our experiments demonstrate that relational knowledge is also significantly encoded in attention modules. This insight highlights the multifaceted nature of knowledge storage in language models, underscoring the complexity of manipulating specific types of knowledge within these models.

View on arXivView PDF

Code Implementations(1)

weiyifan1023/RaKECommunity68%

Code and Data for CIKM 2024 Paper "Does Knowledge Localization Hold True? Surprising Differences Between Entity and Relation Perspectives in Language Models"

100PythonNov 1, 202310 months ago
knowledge-edting

Similar Papers

Cite this paper

@article{wei2024does,
  title  = {Does Knowledge Localization Hold True? Surprising Differences Between Entity and Relation Perspectives in Language Models},
  author = {Yifan Wei and Xiaoyan Yu and Yixuan Weng and Huanhuan Ma and Yuanzhe Zhang and Jun Zhao and Kang Liu},
  year   = {2024},
  eprint = {2409.00617},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.00617v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2409.00617.svg)](https://codeofpaper.com/paper/2409.00617)

Discussion