Abstract
Current Knowledge Editing (KE) methods for Large Language Models (LLMs) typically assume that knowledge is stored as simple, discrete triplets. However, real-world data often exhibits Knowledge Element Overlap (KEO), where a single subject-relation pair maps to multiple objects (e.g., "The Roman Empire existed in [Europe, Asia]"). In such cases, standard "locate-then-edit" approaches often overwrite existing facts when attempting to add new ones. We introduce SetKE, a framework that treats knowledge updates as set-to-set transformations. By utilizing bipartite matching to align model predictions with target sets, SetKE effectively resolves editing conflicts and prevents knowledge overwriting.
Introduction
Large Language Models (LLMs) frequently require updates to correct hallucinations or integrate new information. Knowledge Editing (KE) offers a surgical alternative to full retraining, aiming to modify specific facts directly within the model's parameters. Most research in this field assumes a one-to-one mapping between a subject-relation pair and an object. However, analysis of benchmarks like COUNTERFACT reveals that only 6% of instances follow this "normal" pattern; the vast majority involve overlapping knowledge elements.
The Knowledge Element Overlap (KEO) Problem
The core challenge identified is Knowledge Element Overlap (KEO). When a subject-relation pair corresponds to a set of objects, traditional editors fail to distinguish between adding a new element and replacing an old one. This leads to a performance collapse where the model "forgets" previously known overlapping facts.
As illustrated in Figure 2, the root of this problem lies in the model's architecture. Overlapping triplets share the same "knowledge neurons" within the Feed-Forward Network (FFN) layers. When a standard editor optimizes for a single new triplet, it inadvertently overwrites the parameters that store its "sibling" facts, causing the model to lose its broader context.
The SetKE Framework
To overcome the overlap trap, we propose Knowledge Set Editing (KSE) and its implementation, SetKE. SetKE reframes the editing target from a single triplet $(s, r, o) \to (s, r, o^*)$ to a set-based transformation $(s, r, O) \to (s, r, O^*)$.
The defining feature of SetKE is the Bipartite Matching Constraint. To update model weights without conflict, the framework must align the model's current internal representations with the full target set. SetKE employs the Hungarian algorithm to find the optimal one-to-one mapping between predicted objects and target objects. This global optimization ensures that every element in the set is accounted for simultaneously.
SetKE follows the "locate-then-edit" paradigm by identifying specific FFN layers where factual knowledge is localized. It then calculates a weight update ($\Delta$) that minimizes a combined loss function:
- Edit Loss: Ensures the model predicts the correct set of objects.
- Constraint Loss (Locality): Uses KL divergence to ensure the edit does not degrade unrelated knowledge (e.g., editing facts about the Roman Empire should not affect knowledge about the Eiffel Tower).
Experimental Results
The authors introduced EDITSET, a new benchmark derived from Wikidata containing over 40,000 instances across 710 relations, specifically designed to evaluate KEO scenarios.
SetKE was tested against state-of-the-art baselines including MEND, ROME, MEMIT, and PMET on models like GPT2-XL and GPT-J (6B).
- Superior Efficacy: On GPT2-XL, SetKE achieved an Efficacy Score of 95.90%, significantly outperforming ROME (75.27%) and MEMIT (61.12%) in KEO scenarios.
- Robust Generalization: SetKE maintained a 91.68% Generalization Score, whereas ROME’s performance dropped to 73.58%.
- Ablation Success: Comparisons showed that SetKE's bipartite matching approach is far more effective at resolving conflicts than simple object concatenation.
Conclusion and Future Work
SetKE provides a robust solution for editing overlapping knowledge in LLMs, preventing the destructive overwriting common in previous methods. While the current work focuses on Relation-Subject Overlap (RSO), future research will investigate other types of overlap and how set-based editing scales to larger models (70B+) and complex multi-hop reasoning tasks.
Summary updated