GeoEdit: Geometric Knowledge Editing for Large Language Models

Yujie Feng, Li-Ming Zhan, Zexin Lu, Yongxin Xu, Xu Chu, Yasha Wang, Jiannong Cao, Philip S. Yu, Xiao-Ming Wu

Abstract

Regular updates are essential for maintaining up-to-date knowledge in large language models (LLMs). However, existing training-based model editing methods often struggle to effectively incorporate new knowledge while preserving unrelated general knowledge. To address this challenge, we propose a novel framework called Geometric Knowledge Editing (GeoEdit). GeoEdit utilizes the geometric relationships of parameter updates from fine-tuning to differentiate between neurons associated with new knowledge updates and those related to general knowledge perturbations. By employing a direction-aware knowledge identification method, we avoid updating neurons with directions approximately orthogonal to existing knowledge, thus preserving the model's generalization ability. For the remaining neurons, we integrate both old and new knowledge for aligned directions and apply a "forget-then-learn" editing strategy for opposite directions. Additionally, we introduce an importance-guided task vector fusion technique that filters out redundant information and provides adaptive neuron-level weighting, further enhancing model editing performance. Extensive experiments on two publicly available datasets demonstrate the superiority of GeoEdit over existing state-of-the-art methods.

Introduction

Large Language Models (LLMs) are static snapshots of knowledge captured at the time of their training. As the real world evolves, these models inevitably become outdated. Updating them efficiently without compromising their existing general knowledge is a critical challenge in model editing.

Current approaches typically fall into two categories: "Locate-and-Edit" methods, which attempt to find and perturb specific "knowledge neurons," and fine-tuning methods. While fine-tuning is simpler, it often suffers from "catastrophic forgetting" or poor Locality—where updating a specific fact inadvertently degrades performance on unrelated topics. Existing fine-tuning strategies, such as "Forgetting before Learning" (F-Learning), often operate under the assumption that all updates conflict with existing knowledge, leading to suboptimal balances between new and general knowledge.

Comparison between F-Learning and GeoEdit's direction-aware approach.

The GeoEdit Framework

GeoEdit addresses these limitations by analyzing the geometric relationships of parameter updates. The core insight is that knowledge conflict is not binary; many neurons are "innocent bystanders" whose updates should be minimized to preserve generalization.

1. Extracting Neuron-level Task Vectors

The process begins by fine-tuning the model separately on "old" knowledge (to identify retention directions) and "new" knowledge (to identify updating directions). This results in two sets of task vectors, $\tau_{old}$ and $\tau_{new}$, for every neuron $i$.

2. Dimensionality Reduction and Angular Extraction

In high-dimensional spaces, vectors often appear orthogonal due to noise. GeoEdit employs an Auto-Encoder to denoise these vectors and t-SNE to project them into a lower-dimensional space. This allows for the accurate measurement of the angular divergence ($\phi$) between the retention and updating directions.

3. Direction-aware Knowledge Editing

Based on the angle $\phi$, neurons are classified and treated differently:

  • Orthogonal ($\phi \approx 90^\circ$): These neurons likely represent unrelated general knowledge. Updates are masked to preserve the model's generalization ability.
  • Aligned (Acute $\phi$): These are synergistic updates. GeoEdit merges them to integrate both old and new knowledge.
  • Opposite (Obtuse $\phi$): These represent conflicting knowledge. A "forget-then-learn" strategy is applied to clear the old knowledge path before establishing the new one.
The GeoEdit pipeline: from task vector extraction to geometric knowledge editing.

Finally, an importance-guided task vector fusion technique uses gradient-weight products to apply adaptive neuron-level weighting, ensuring only the most influential parameters are modified.

Experimental Evaluation

GeoEdit was evaluated on standard benchmarks including ZsRE (Zero-Shot Relation Extraction), COUNTERFACT, and MQUAKE-CF-3K.

Key Results

  • Superior Locality: GeoEdit achieved a 7.4% improvement in the Locality metric over the state-of-the-art F-Learning method on the ZsRE dataset.
  • Efficiency and Robustness: By processing knowledge in parallel, GeoEdit is faster than sequential methods. It also outperformed ROME and MEMIT in multi-hop reasoning scenarios (MQUAKE), indicating more globally consistent internal updates.
  • Balanced Generalization: On COUNTERFACT, GeoEdit maintained a superior balance between Reliability (learning new facts) and Generality (recognizing facts in different contexts).

Conclusion and Future Work

GeoEdit demonstrates that the geometry of parameter updates provides a powerful signal for selective model editing. By distinguishing between synergistic, conflicting, and orthogonal updates at the neuron level, it significantly mitigates the trade-off between learning new information and preserving general knowledge.

Future research may explore incorporating additional geometric variables beyond angular alignment, such as vector magnitude, and extending the framework to more open-ended or creative tasks where reference datasets for "old" knowledge may be less clearly defined.

Summary updated

BibTeX
@inproceedings{feng2025geoedit,
  author = {Yujie Feng and Li-Ming Zhan and ZEXIN LU and Yongxin Xu and Xu Chu and Yasha Wang and Jiannong Cao and Philip S. Yu and Xiao-Ming Wu},
  title = {{GeoEdit: Geometric Knowledge Editing for Large Language Models}},
  booktitle = {KnowFM @ ACL},
  year = {2025},
  url = {https://openreview.net/forum?id=dTd08hRBE7},
}
Figure