🤖 AI Summary
Large language models (LLMs) often generate factually incorrect or biased outputs due to outdated or erroneous knowledge embedded in their pretraining data; existing knowledge editing methods struggle to simultaneously support large-scale concurrent edits and preserve model generalization. This paper proposes a latent-space-guided knowledge editing framework that employs a lightweight hypernetwork to directly modulate internal entity representations—enabling precise localization and substitution of entity-specific knowledge without updating the backbone parameters. Our method supports synchronous editing of up to ten thousand factual assertions, achieving, for the first time, natural-language-style, high-fidelity, and highly scalable knowledge updates. Experiments on Llama-2 and Mistral demonstrate that after editing 10,000 facts, the models retain downstream task performance and general capabilities with no statistically significant degradation, substantially outperforming state-of-the-art editing approaches.
📝 Abstract
Large Language Models (LLMs) often retain inaccurate or outdated information from pre-training, leading to incorrect predictions or biased outputs during inference. While existing model editing methods can address this challenge, they struggle with editing large amounts of factual information simultaneously and may compromise the general capabilities of the models. In this paper, our empirical study demonstrates that it is feasible to edit the internal representations of LLMs and replace the entities in a manner similar to editing natural language inputs. Based on this insight, we introduce the Latent Knowledge Scalpel (LKS), an LLM editor that manipulates the latent knowledge of specific entities via a lightweight hypernetwork to enable precise and large-scale editing. Experiments conducted on Llama-2 and Mistral show even with the number of simultaneous edits reaching 10,000, LKS effectively performs knowledge editing while preserving the general abilities of the edited LLMs. Code is available at: https://github.com/Linuxin-xxx/LKS.