Addressing the issues of hallucinations and outdated knowledge in large language models is critical for their reliable application. Model Editing presents a promising avenue for mitigating these challenges in a cost-effective manner. However, existing methods often suffer from unsatisfactory generalization and unintended effects on non-edited samples. To overcome these limitations, we introduce a novel approach: Scalable Model Editing via Customized Expert Networks (SCEN), which is a two-stage continuous training paradigm. Specifically, in the first stage, we train lightweight expert networks individually for each piece of knowledge that needs to be updated. Subsequently, we train a corresponding indexing neuron for each expert to control the activation state of that expert. We conducted a series of experiments on the ZsRE and Hallucination benchmarks by tuning the advanced open-source LLM, Llama2, achieving state-of-the-art results compared to current mainstream methods. Our code is available at https://github.com/TAL-auroraX/SCEN.
翻译:解决大型语言模型中的幻觉和知识过时问题对其可靠应用至关重要。模型编辑为以经济高效的方式缓解这些挑战提供了一条有前景的途径。然而,现有方法通常存在泛化能力不足以及对未编辑样本产生意外影响的问题。为克服这些局限,我们提出了一种新方法:基于定制专家网络的可扩展模型编辑(SCEN),这是一种两阶段持续训练范式。具体而言,在第一阶段,我们为每条需要更新的知识单独训练轻量级专家网络。随后,我们为每个专家训练相应的索引神经元,以控制该专家的激活状态。我们在ZsRE和Hallucination基准测试上,通过微调先进的开源大语言模型Llama2进行了一系列实验,与当前主流方法相比取得了最先进的结果。我们的代码可在 https://github.com/TAL-auroraX/SCEN 获取。