提出新型知识编辑方法,实现高效精准更新且不破坏原有知识。
Unlocking Efficient, Scalable, and Continual Knowledge Editing with Basis-Level Representation Fine-Tuning
- 通过输入依赖的基向量加权机制,实现知识编辑的自适应调整。
- 在三种大模型、五个基准上均优于现有方法,编辑准确率提升显著。
- 适合需要持续更新知识且保持模型稳定性的实际应用场景。
大型语言模型在各类自然语言任务中表现卓越,但其训练数据静态,知识易过时。为此,需发展知识编辑方法,在不干扰无关知识的前提下更新特定信息。以往方法通常仅微调模型局部参数,但在复杂场景下仍难以兼顾编辑效果与知识保留,存在显著的编辑局部性权衡问题。本文质疑该权衡是否源于参数更新具有全局影响——即修改的参数对所有输入均产生作用。基于此,我们探索表示微调的可行性:在学习到的子空间中对少数表示施加线性更新。尽管先前研究证明其能增强模型通用能力,但理论上仍存在局部性权衡。为此,我们提出BaFT,通过根据输入表示动态计算每个基向量的权重,实现输入相关的自适应更新。该机制使模型能区分不同知识类型,从而突破线性更新的局限,显著改善编辑局部性权衡。在三种主流大模型(LLaMA-2、ChatGLM3、Vicuna)和五个不同场景的编辑基准上进行实验,结果表明,BaFT在编辑精度与知识保留之间取得更优平衡,显著优于现有方法。
原文摘要 · Abstract (English)
Large language models (LLMs) have achieved remarkable performance on various natural language tasks. However, they are trained on static corpora and their knowledge can become outdated quickly in the fast-changing world. This motivates the development of knowledge editing methods designed to update certain knowledge in LLMs without changing unrelated others. To make selective edits, previous efforts often sought to update a small amount of parameters in some specific layer(s) of a LLM. Nonetheless, in challenging scenarios, they still fall short in making successful edits while preserving knowledge irrelevant to the updates simultaneously, resulting in a notable editing-locality trade-off. In this work, we question if the trade-offs are caused by the fact that parameter-based updates have a global effect, i.e., edited parameters affect all inputs indiscriminately. In light of this, we explore the feasibility of representation fine-tuning, which applied some linear update to a few representations in a learned subspace, for knowledge editing. While being effective to enhance an LLM's general ability as demonstrated in the previous work, we theoretically show that this linear update imposes a tension in editing-locality trade-off. Subsequently, BaFT is proposed to break the linearity. BaFT computes a weight for each basis that spans a dimension of the subspace based on the input representation. This input-dependent weighting mechanism allows BaFT to manage different types of knowledge in an adaptive way, thereby achieving a better editing-locality trade-off. Experiments on three LLMs with five editing benchmarks in diverse scenarios show the superiority of our method.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。