I nstruct E d: Soft-Instruction Tuning for Model Editing with Hops (2024)

Abstract: The task of model editing becomes popular for correcting inaccurate or outdated parametric knowledge in Large Language Models (LLMs). However, there are major limitations of state of the art (SOTA) model editing methods, including the excessive memorization issue caused by the direct editing methods, as well as the error propagation and knowledge conflict issues from the memory enhancement methods, resulting in hindering models’ *portability*, e.g., the ability to transfer the new knowledge to related one-hop or multi-hop content. To address these issues, we propose the InstructEd method, the idea of which is to insert soft instructions into the attention module so as to facilitate interactions between instructions and questions and to understand and utilize new facts. Our main findings are: (i) InstructEd has achieved SOTA performance on three datasets for one-hop/multi-hop evaluation with LLaMAs and GPT2, achieving 10% (5%) improvement in one-hop (multi-hop) model editing.(ii) Different from earlier methods on editing parameters in FFN, we show that editing attention can also help. (iii) Model editing is highly related to retrieval augmented methods, which can help improve the locality of model editing while slightly decrease the editing performance with hops.

## introduction large language models (llms) have accumulated substantial parametric knowledge @xcite , showcasing remarkable progress in knowledge-driven tasks such as question answering @xcite @xcite and reasoning @xcite . however, llms are susceptible to errors stemming from inaccurate or outdated parametric knowledge @xcite ), * contact authors restricting the reliability of these models. previous research has introduced model editing (me) @xcite to rectify or update parametric knowledge in llms without the need for expensive re-training processes. these methods either update the parametric knowledge within llms with either some given factual knowledge (called 'modification based setting') or some external knowledge repository (called 'memory based setting'). in this paper, we propose a method that can address both settings. in order to assess me methods' effectiveness in understanding and application of related factual knowledge, @xcite ; @xcite proposed two new benchmarks, introducing the notion of portability, e.g., the ability to apply the new knowledge to related one-hop @xcite ) or multi-hop @xcite ) content. as illustrated in fig. 1 , modification-based methods @xcite @xcite calculate the parameter shift θ based on the new fact, which can only used to recall modified knowledge (q-ed). once the facts are discrepant with the new fact (such as re-ed 1 ), they cannot answer these questions based on the modified facts. as for the memory-based methods @xcite maintain llms parameters unchanged and retrieve knowledge relevant to the current edit from a pre-constructed memory to achieve editing. some recent memory based methods like mello @xcite and pokemqa @xcite have been proposed to address multi-hop question editing. these methods rely on the retrieval results and necessitate decomposing multi-hop questions into subproblems. however, the knowledge conflict issue 2 between retrieved results and llms, and error propfigure 1 : the existing methods fail to leverage knowledge effectively. they either overlook whether the question is relevant to the facts, resulting in excessive memorization and inability to resolve re-ed; or they neglect whether the facts are accurate and applicable due to factors error propagation and knowledge conflicts. q-ed represents the questioning of a modified fact, re-ed represents the questioning related but un-equivalent to the modified facts. recently, instruction-tuning @xcite ) has emerged as a new paradigm for tuning llms to generate responses based on natural language instruction, which has been extensively researched in language @xcite and vision domains @xcite . these methods enhance llms by finetuning them using high-quality (instruction, output) pairs, boosting the model to comprehend user intentions and follow instructions more accurately. in this paper, we present instructed, a novel approach for the challenging task of model editing with hops, by using soft instruction tuning. we construct an instruction dataset based on existing editing data to facilitate training. unlike previous methods, we augment a set of learnable soft-instruction prompts as prefixes to the input instruction tokens in the attention module (rather ffn). we use a relevance score between the instruction and inputs to learn how to use knowledge and inject new knowledge (instructions) into the frozen llms. experimental results on three datasets demonstrate that our approach achieves superior portability of edits while maintaining stability in other essential properties. the main contributions of our work are as follows: ## conclusion in this paper, we have presented an instruction tuning based method instructed for modeling editing with hops. we validate the effectiveness of in-structed on varying scales of llms under three datasets, demonstrating instructed's excellent generalization in both modification based and memory based settings. our experiments indicate that, unlike previous editing methods, modifying attention parameters can model editing. last but not least, we investigated the feasibility of retrieval augmentation on model editing and found that the retrievalaugmented methods can enhance the locality of model editing while slightly decreasing the editing performance with hops.