Decoupling Reasoning and Knowledge Injection for In-Context Knowledge Editing (2025)

Abstract: Knowledge editing enables efficient updates to Large Language Models (LLMs) by modifying specific knowledge without full-model retraining. Among knowledge editing approaches, in-context editing (ICE) stands out for its ability to inject knowledge without modifying the model’s parameters. However, existing ICE approaches directly edit model context without isolating target knowledge from the reasoning path of model inference, resulting in unreliable and low-quality outputs, particularly in multi-hop tasks. To investigate this issue, we analyze the interaction between reasoning path planning and knowledge injection, showing that the reasoning ability of a LLM is usually coupled with its original knowledge, and directly replacing old knowledge with new one could simultaneously hurt the LLM’s performance in task reasoning. Based on these findings, we propose DecKER, a novel ICE framework that separates model reasoning from knowledge editing. Extensive experiments show that DecKER significantly improves multi-hop reasoning performance by mitigating knowledge conflicts and preserving reasoning integrity.

## introduction large language models (llms) have achieved remarkable performance across a wide range of knowledge-intensive tasks @xcite @xcite . however, their reliance on static parametric knowledge acquired during pre-training makes it difficult to keep them aligned with evolving realworld facts. while continued pre-training offers a straightforward solution for updating model knowledge, it is computationally expensive and impractical for frequent updates. to address this limitation, knowledge editing has emerged as a promising alternative. instead of retraining the entire model, knowledge editing aims to efficiently modify specific factual associations within an llm, allowing for low-cost, targeted updates that preserve the model's overall capabilities. existing knowledge editing approaches can be broadly categorized into two categories: parameterized editing, which updates the model's weights to encode new facts (e.g., rome @xcite ), and in-context editing (ice), which introduces new information into the model's input without modifying parameters @xcite . while parameterized approaches offer persistent updates, they often suffer from side effects such as degraded performance on unrelated tasks @xcite @xcite and struggle in complex reasoning scenarios @xcite . in contrast, ice methods aim to address the limitations of parameterized editing by preserving the original parameters of llms and directly editing the input context (e.g., prompts) to guide llms to behave based on the updated knowledge @xcite @xcite . in principle, ice methods should preserve the reasoning capabilities of llms by editing only the input context and avoiding parameter modifications. however, our empirical observations reveal a surprising contradiction: existing ice methods often lead to substantial performance degradation. in multi-hop qa tasks, for instance, injecting new facts into the context can reduce accuracy by over 80% (see section 3). this discrepancy challenges the core assumption that editing the context preserves the model's reasoning behavior. to understand this phenomenon, we conduct preliminary experiments to analyze how ice influences the model's reasoning behavior. our results indicate that when llms answer multi-hop questions based on their internal parametric knowledge, they demonstrate strong reasoning capabilities through high-quality chain-of-thought (cot) reasoning path @xcite . however, after new knowledge is injected into the input context, the model's reasoning process is often affected. the conflict between the injected information and the model's internal knowledge causes the llm to stray from its original chain-of-thought reasoning, making it effectively "forget" how to solve the task. this indicates that the reasoning ability of llms is closely tied to their internal knowledge, and adding conflicting context through ice can interfere with the generation process and significantly degrade the model's performance. this phenomenon could limit the future applications of ice methods, particularly when inference scaling and reasoning llm (like deepseek-r1) has recently become the dominant direction for super-intelligence development @xcite . in light of these findings, we propose decker, a novel in-context editing method that decouples knowledge editing and model reasoning. taking multi-hop qa as an example, decker first extracts a masked reasoning path from llms, where entities subject to potential edits are replaced with placeholders along with corresponding type hints. then, for each placeholder, we propose a hybrid mechanism combining retrieval-based conflict detection and model judgment to determine whether the entity is related to edited knowledge and fill it accordingly. furthermore, decker samples multiple reasoning paths and selects the most consistent candidate using a set of scoring criteria, ensuring that the model retains its original reasoning structure while accurately integrating new facts. experimental results on multiple knowledge editing benchmark datasets show that decker significantly outperforms existing ice methods by mitigating knowledge conflicts and preserving reasoning consistency. in summary, this paper makes the following key contributions: ## related work knowledge editing (ke) aims to efficiently update knowledge in llms, divided into parameterized and non-parameterized methods @xcite . rome @xcite , a typical parameterized method, uses causal intervention to locate and edit related neurons, while memit @xcite extends this capability to handle larger edit batch. non-parameterized methods leverage the llm's in-context learning(brown et al., 2020) abilities. mello (zhong et al., 2023) employs incontext editing (ice) to tackle complex problems by breaking them into subtasks and performing finegrained edits. built on this, pokemqa(gu et al., 2024a) enhances robustness and deepedit(wang et al., 2024d) focuses on the reasoning process. additionally, shi et al. (2024) addresses multi-hop tasks in knowledge editing by emphasizing the retrieval process with their rae method, which employs knowledge graph editing and retrieval to boost multi-hop reasoning performance. to evaluate llms' reasoning abilities postediting, cohen et al. (2024) introduces the concept of ripple effects, where altering one piece of knowledge can impact related facts. zhong et al. (2023) develops a multi-hop qa dataset to assess if edited models can utilize new knowledge for complex reasoning. their findings indicate that ice methods outperform parameterized methods in managing ripple effects and complex reasoning. ## preliminary study this section begins by introducing the multi-hop question-answering (mqa) task under knowledge editing. then, we discuss the phenomenon of reasoning degradation in existing ice methods and design an analytical experiment to explain it. ## methodology we propose decker, a method that decouples reasoning and knowledge injection to maintain the reasoning framework while editing. the workflow is shown in figure 3 , with its pseudocode in appendix a. ## conclusion and future works in this paper, we explore multi-hop qa to highlight the importance of decoupling reasoning and knowledge injection when applying in-context editing. consequently, we propose a novel in-context editing method, decker, which achieves this decoupling by first planning the reasoning path and then filling knowledge entities. our method demonstrates strong performance across 3 llms and 4 datasets, offering a new perspective for optimizing in-context editing methods. in future work, we plan to extend decker to a broader range of tasks beyond multi-hop qa, such as fact verification @xcite and long-form text generation @xcite , where reasoning quality and factual accuracy are both critical. another promising direction is examining the connection between our findings and retrieval-augmented generation (rag) @xcite @xcite @xcite . similar to ice, rag injects retrieved content into the model input, risking semantic conflicts with parametric knowledge. inspired by our preliminary analysis, we aim to adapt decker to the rag setting, investigating whether decoupling retrieval-based knowledge injection from reasoning path planning can enhance generation consistency and robustness.