Model editing aims to precisely alter the behaviors of large language models (LLMs) in relation to specific knowledge, while leaving unrelated knowledge intact. This approach has proven effective in addressing issues of hallucination and outdated information in LLMs. However, the potential of using model editing to modify knowledge in the medical field remains largely unexplored, even though resolving hallucination is a pressing need in this area. Our observations indicate that current methods face significant challenges in dealing with specialized and complex knowledge in medical domain. Therefore, we propose MedLaSA, a novel Layer-wise Scalable Adapter strategy for medical model editing. MedLaSA harnesses the strengths of both adding extra parameters and locate-then-edit methods for medical model editing. We utilize causal tracing to identify the association of knowledge in neurons across different layers, and generate a corresponding scale set from the association value for each piece of knowledge. Subsequently, we incorporate scalable adapters into the dense layers of LLMs. These adapters are assigned scaling values based on the corresponding specific knowledge, which allows for the adjustment of the adapter's weight and rank. The more similar the content, the more consistent the scale between them. This ensures precise editing of semantically identical knowledge while avoiding impact on unrelated knowledge. To evaluate the editing impact on the behaviours of LLMs, we propose two model editing studies for medical domain: (1) editing factual knowledge for medical specialization and (2) editing the explanatory ability for complex knowledge. We build two novel medical benchmarking datasets and introduce a series of challenging and comprehensive metrics. Extensive experiments on medical LLMs demonstrate the editing efficiency of MedLaSA, without affecting unrelated knowledge.
翻译:模型编辑旨在精确改变大语言模型(LLMs)在特定知识上的行为,同时保持无关知识不受影响。该方法已被证明能有效解决LLMs中的幻觉和过时信息问题。然而,尽管解决幻觉在医学领域是迫切需求,利用模型编辑来修正医学知识的潜力在很大程度上仍未得到探索。我们的观察表明,现有方法在处理医学领域专业且复杂的知识时面临显著挑战。为此,我们提出MedLaSA,一种用于医学模型编辑的新型分层可扩展适配器策略。MedLaSA结合了添加额外参数和定位-编辑方法在医学模型编辑中的优势。我们利用因果追踪来识别知识在不同层神经元中的关联,并根据关联值为每条知识生成相应的缩放集合。随后,我们将可扩展适配器集成到LLMs的稠密层中。这些适配器根据对应的特定知识被分配缩放值,从而允许调整适配器的权重和秩。内容越相似,它们之间的缩放比例越一致。这确保了在精确编辑语义相同知识的同时,避免对无关知识产生影响。为评估编辑对LLMs行为的影响,我们提出了两项医学领域的模型编辑研究:(1)针对医学专业化的知识编辑,以及(2)针对复杂知识的解释能力编辑。我们构建了两个新颖的医学基准数据集,并引入了一系列具有挑战性且全面的评估指标。在医学LLMs上的大量实验证明了MedLaSA的编辑效率,且不影响无关知识。