Abstract
Knowledge Editing (KE) has emerged as a vital technique for updating factual information in Large Language Models (LLMs) without full retraining. However, current KE methodologies are predominantly entity-centric, focusing on modifying the objects of factual triplets. This paper introduces a novel perspective by investigating relation-based editing. We present RaKE, a comprehensive benchmark designed to evaluate this new dimension. Our findings reveal a significant performance gap: while state-of-the-art methods like ROME and MEMIT excel at entity-based updates, they fail catastrophically when tasked with relational changes. Causal analysis indicates that relational knowledge is primarily stored in Attention layers, whereas existing methods target Feed-Forward Networks (FFNs), identifying a fundamental architectural mismatch in current editing approaches.
Introduction: The Entity-Centric Blind Spot
Large Language Models store vast amounts of world knowledge, often conceptualized as triplets of (subject, relation, object). As real-world facts evolve—such as leadership changes in major corporations—these models require updates to remain accurate. Traditionally, Knowledge Editing (KE) has approached this by modifying the entity (the object). For example, if a new CEO is appointed, the model is prompted to change the answer to "Who is the CEO of Twitter?" from "Jack Dorsey" to "Parag Agrawal."
However, this entity-centric view ignores an equally valid perspective: the relation. One could update the same factual state by changing the relation associated with an entity, such as updating "Parag Agrawal is the CTO of Twitter" to "Parag Agrawal is the CEO of Twitter." Despite being logically equivalent in terms of the resulting world state, LLMs do not necessarily treat these two types of edits as identical. This paper investigates whether current KE methods can generalize to relation-centric updates.
The RaKE Benchmark
To rigorously test this hypothesis, we introduce the Relation-based Knowledge Editing (RaKE) benchmark. RaKE is constructed using data from Wikidata and PARAREL, with natural language prompts refined by GPT-3.5-turbo to ensure linguistic diversity and realism.
The dataset comprises 21,919 editing samples split between entity-based and relation-based tasks. To ensure robust evaluation, it includes:
- Edit Prompts: Direct requests for the factual update.
- Neighborhood Prompts: Unrelated facts used to ensure the edit does not cause "catastrophic forgetting" or unintended side effects.
- Paraphrase Prompts: Variations of the edit prompt to test if the model has truly "learned" the fact or merely memorized a specific string.
Mechanistic Analysis: Where Does Relation Knowledge Live?
To understand the failure of existing methods, we performed causal tracing on GPT-2 XL and GPT-J. This process involves three stages:
- Clean Run: Standard inference to establish a baseline.
- Corrupted Run: Introducing noise into relation embeddings to degrade performance.
- Restoration Run: Systematically restoring hidden states layer-by-layer to identify which components are responsible for recovering the correct relational prediction.
Our analysis yielded a surprising discovery. While previous research established that entity-based factual knowledge is concentrated in mid-layer Feed-Forward Networks (FFNs), relational knowledge is heavily distributed across Attention layers, particularly in the middle layers of the transformer.
We further validated this through "Severed Causal Analysis," where we selectively disabled MLP or Attention modules. Disabling Attention modules between layers 10 and 20 in GPT-2 XL resulted in a dramatic loss of relational information, confirming their critical role.
Experimental Results and Failure of Current SOTA
We evaluated several baseline KE methods, including Fine-Tuning (FT), Knowledge Neuron (KN), MEND, ROME, and MEMIT. The results highlight a massive disparity:
- Entity Editing Success: On GPT-2 XL, the ROME method achieved an Efficacy Magnitude (EM) of 97.94%, while MEMIT reached 64.06%.
- Relation Editing Failure: When applied to the same facts via a relation-centric prompt, ROME’s performance dropped to -3.7%, and MEMIT fell to -4.11%.
A negative EM score indicates that the editing process actually made the model less likely to predict the correct target than it was before the edit. This failure stems directly from the design of ROME and MEMIT, which were engineered to modify MLP weights. Since relational knowledge resides in the Attention layers, these methods are essentially "looking in the wrong place."
Conclusion and Future Directions
The current paradigm of Knowledge Editing is insufficient for comprehensive model updates. Our work demonstrates that logical equivalence in facts does not translate to architectural equivalence in LLMs. Future research must move toward hybrid editing techniques that can simultaneously target both Feed-Forward Networks and Attention layers. Only by addressing the distributed nature of relational knowledge can we build truly robust and reliable systems for maintaining the factual integrity of Large Language Models.
Summary updated