发现并定位大模型中可通用的知识编辑黄金层
Golden Layers and Where to Find Them: Improved Knowledge Editing for Large Language Models Via Layer Gradient Analysis
- 通过梯度分析识别对知识编辑最有效的固定层
- 黄金层在不同数据集上表现接近最优,且泛化性强
- 避免反复试错,提升编辑效率与稳定性
大型语言模型的知识编辑旨在更新特定查询的预测结果至目标值,同时保持模型在其他输入上的行为不变。该过程通常分为两步:确定需编辑的层和执行参数更新。我们假设存在固定的‘黄金层’,其编辑效果接近针对每个样本的最优层。通过实证比较黄金层与真实样本最优层,验证了该假设。进一步表明,黄金层可通过代理数据集可靠识别,并在未见测试查询上有效泛化。为此,提出一种新方法——层梯度分析(LGA),利用梯度归因高效估计黄金层,避免多次编辑尝试。在多个基准数据集上的大量实验表明,LGA方法在不同LLM类型及多种编辑方法下均具有效性和鲁棒性。
原文摘要 · Abstract (English)
Knowledge editing in Large Language Models (LLMs) aims to update the model's prediction for a specific query to a desired target while preserving its behavior on all other inputs. This process typically involves two stages: identifying the layer to edit and performing the parameter update. Intuitively, different queries may localize knowledge at different depths of the model, resulting in different sample-wise editing performance for a fixed editing layer. In this work, we hypothesize the existence of fixed golden layers that can achieve near-optimal editing performance similar to sample-wise optimal layers. To validate this hypothesis, we provide empirical evidence by comparing golden layers against ground-truth sample-wise optimal layers. Furthermore, we show that golden layers can be reliably identified using a proxy dataset and generalize effectively to unseen test set queries across datasets. Finally, we propose a novel method, namely Layer Gradient Analysis (LGA) that estimates golden layers efficiently via gradient-attribution, avoiding extensive trial-and-error across multiple editing runs. Extensive experiments on several benchmark datasets demonstrate the effectiveness and robustness of our LGA approach across different LLM types and various knowledge editing methods.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。