Lifelong Model Editing with Graph-Based External Memory

Yash Kumar Atri, Ahmed M. Alaa, Thomas HartvigsenACL 2025

Abstract

Large Language Models (LLMs) often suffer from hallucinations or outdated information. While retraining is computationally prohibitive, model editing offers a surgical approach to updating specific parametric knowledge. However, traditional Euclidean-based editing methods frequently struggle with hierarchical knowledge structures, leading to catastrophic forgetting or unintended side effects. We present HYPE (HYperbolic Parameter Editing), a framework that utilizes hyperbolic geometry and Graph Neural Networks (GNNs) to map knowledge into a curved space. This approach preserves hierarchical relationships and ensures more stable, precise updates. HYPE demonstrates significant improvements in multi-hop reasoning and specificity across standard benchmarks.

Introduction: The Geometric Mismatch in Model Editing

The primary challenge in updating LLMs lies in the "geometric mismatch" between the flat Euclidean space used by current editing methods (like ROME and MEMIT) and the inherently hierarchical nature of human knowledge. Knowledge graphs are essentially tree-like structures where specific entities belong to broader categories. Forcing these relationships into a flat space often results in structural distortion during updates, causing the model to lose related information or overfit to the new edit.

Methods: Editing in Curved Space

HYPE introduces a three-pillar approach to move model editing into hyperbolic space, which naturally accommodates the exponential expansion of tree-like data.

Overview of the HYPE framework, including hyperbolic graph construction and Möbius-transformed updates.
  1. Hyperbolic Graph Construction: Knowledge triples (Subject-Relation-Object) from sources like Wikidata are projected into hyperbolic space using Poincaré embeddings. This preserves the relational depth and hierarchy of the data.
  2. Möbius-Transformed Updates: Instead of standard vector addition, HYPE employs Möbius addition. This non-Euclidean operation ensures that weight updates remain within the valid manifold (the Poincaré ball), preventing the structural collapse common in Euclidean updates.
  3. Dual Stabilization: To maintain global coherence over multiple edits, HYPE uses gradient masking to target critical parameters and resets the GNN parameters after each cycle. This prevents the "memory" of previous edits from interfering with new ones.

Key Results

HYPE was evaluated on GPT-J and GPT2-XL using the CounterFact and MQuAKE benchmarks. The results indicate that HYPE consistently outperforms state-of-the-art baselines.

Performance comparison of HYPE against baselines on the GPT2-XL model.
  • Accuracy and Efficacy: HYPE achieved a 99.43% efficacy score on GPT-J, surpassing previous methods.
  • Multi-Hop Reasoning: On the challenging MQuAKE benchmark, HYPE improved multi-hop reasoning accuracy by an average of 10.18 points over the best baseline.
  • Specificity: The framework showed a +9.42 point improvement in specificity, indicating that updates are highly localized and do not corrupt unrelated knowledge.

Discussion and Insights

The success of HYPE highlights the "tree advantage" of hyperbolic geometry. By allowing child nodes to be placed far from parents while maintaining relational proximity, hyperbolic space effectively "disentangles" the geometry of the model's weights.

Furthermore, the study found that the curvature of the space is a critical hyperparameter. A curvature of $c=1.0$ was found to be optimal; lower values approached Euclidean limitations, while higher values led to gradient instability.

Limitations and Future Work

Despite its performance, HYPE introduces a 1.1–1.3x increase in GPU memory overhead and approximately 12–15% additional latency per inference step due to the complexity of hyperbolic operations. Future work will focus on scaling the framework to larger models (e.g., LLaMA-3) and reducing the dependency on structured knowledge triples by incorporating methods for handling unstructured data.

Summary updated

BibTeX
@inproceedings{atri2025lifelong,
  author = {Yash Kumar Atri and Ahmed M. Alaa and Thomas Hartvigsen},
  title = {{Lifelong Model Editing with Graph-Based External Memory}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure