超越硬写和刚性保存:用于终身LLM编辑的软递归最小二乘法
Beyond Hard Writes and Rigid Preservation: Soft Recursive Least-Squares for Lifelong LLM Editing
AI总结:
本文提出RLSEdit,一种递归最小二乘编辑器,通过在线二次优化和软约束实现长期序列编辑,有效平衡编辑精度与稳定性,实验显示其在多个模型家族上稳定扩展至10000次编辑,优于现有基线。
摘要:
模型编辑通过更新预训练的LLM来引入新事实或规则,而无需重新训练,同时保持无关行为。在实际部署中,编辑以长流形式到来,产生塑性-稳定性困境:重复的定位-编辑"硬写"会随时间积累干扰,而刚性保存约束可能只保护显式约束方向,允许过去编辑或无约束行为偏离。我们提出RLSEdit,一种递归最小二乘编辑器用于长期序列编辑。RLSEdit将编辑建模为一个在线二次优化问题,带有软约束,最小化累积键值拟合目标以及两个正则化项,这些项控制偏离预训练权重和指定的锚定映射。该目标允许使用基于Woodbury的高效在线递归,每次编辑的成本与历史长度无关,仅随当前编辑大小缩放。我们进一步提供了偏差界限和许多编辑情况下的渐近特征化,以表征适应-保存权衡。在CounterFact和ZsRE上多个模型家族的实验显示,其在10000次编辑的稳定扩展,优于强基线在编辑成功率和整体稳定性方面,同时保留早期编辑并保持GLUE和保留推理/代码基准的一般能力。
英文摘要:
Model editing updates a pre-trained LLM with new facts or rules without retraining while preserving unrelated behavior. In real deployment, edits arrive as long streams, creating a plasticity-stability dilemma: repeated locate-then-edit "hard writes" can accumulate interference over time, while rigid preservation constraints may protect only explicitly constrained directions, allowing past edits or unconstrained behaviors to deviate. We propose RLSEdit, a recursive least-squares editor for long sequential editing. RLSEdit formulates editing as an online quadratic optimization with soft constraints, minimizing a cumulative key-value fitting objective together with two regularizers that control deviation from the pre-trained weights and from a designated anchor mapping. This objective admits an efficient Woodbury-based online recursion, with per-edit cost independent of history length and scaling only with the current edit size. We further provide deviation bounds and an asymptotic characterization of the adherence-preservation trade-off in the many-edits regime. Experiments on CounterFact and ZsRE across multiple model families show stable scaling to 10K edits, outperforming strong baselines in both edit success and holistic stability, while retaining early edits and preserving general capabilities on GLUE and held-out reasoning/code benchmarks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。