Skip to main content
QUICK REVIEW

[论文解读] Is Bigger Edit Batch Size Always Better? -- An Empirical Study on Model Editing with Llama-3

Jun-Sang Yoon, A.K. Gupta|arXiv (Cornell University)|May 1, 2024
Digital Rights Management and SecurityComputer Science被引用 3
一句话总结

本文研究了在 Llama-3 上使用 ROME、MEMIT 和 EMMET 进行模型编辑,比较了顺序、批量以及顺序-批量编辑策略。研究发现,更大的批量大小会降低性能,尤其是在局部性指标方面;而采用批量大小为 1024 的顺序-批量编辑策略表现最佳,挑战了‘更大批量总是更优’的假设。

ABSTRACT

This study presents a targeted model editing analysis focused on the latest large language model, Llama-3. We explore the efficacy of popular model editing techniques - ROME, MEMIT, and EMMET, which are designed for precise layer interventions. We identify the most effective layers for targeted edits through an evaluation that encompasses up to 4096 edits across three distinct strategies: sequential editing, batch editing, and a hybrid approach we call as sequential-batch editing. Our findings indicate that increasing edit batch-sizes may degrade model performance more significantly than using smaller edit batches sequentially for equal number of edits. With this, we argue that sequential model editing is an important component for scaling model editing methods and future research should focus on methods that combine both batched and sequential editing. This observation suggests a potential limitation in current model editing methods which push towards bigger edit batch sizes, and we hope it paves way for future investigations into optimizing batch sizes and model editing performance.

研究动机与目标

  • 评估不同模型编辑策略(顺序、批量、顺序-批量)在 Llama-3 模型上的有效性。
  • 通过测试 8B 参数模型的全部 32 个层,确定 Llama-3 中最适合目标编辑的层。
  • 评估增加编辑批量大小是否能提升性能,或导致性能下降,特别是在事实局部性和知识保留方面。
  • 为未来在 Llama-3 上的模型编辑研究建立透明且可复现的基准测试流程。
  • 主张将关注点从单纯增加批量大小,转向结合顺序与批量编辑的混合策略。

提出的方法

  • 在 Llama-3-8b 的全部 32 个层上执行单层编辑,以识别最有效的干预点。
  • 应用三种编辑策略:(1) 顺序编辑(逐个编辑),(2) 批量编辑(一次更新多个编辑),(3) 顺序-批量编辑(按序列更新批次)。
  • 使用 ROME、MEMIT 和 EMMET —— 三种通过优化保留-记忆目标来修改参数的编辑方法。
  • 对于 MEMIT 和 EMMET,采用闭式解法执行不同批量大小(16 到 4096)的批量编辑,以最小化计算成本。
  • 使用四项指标评估性能:有效性得分(ES)、改写得分(PS)、邻域得分(NS)以及综合得分(S)。
  • 对 MEMIT 和 EMMET 进行超参数调优,并报告多种批量大小下的结果,以识别最优扩展行为。

实验结果

研究问题

  • RQ1在准确性和知识保留方面,Llama-3 中哪个层最适合作为目标模型编辑的层?
  • RQ2增加编辑批量大小是否始终能提升模型编辑性能,还是会导致性能下降?
  • RQ3与标准批量编辑相比,顺序-批量编辑在性能和局部性保留方面表现如何?
  • RQ4是否存在一个最优批量大小,使顺序-批量编辑在性能与可扩展性之间达到平衡?
  • RQ5顺序编辑策略是否能缓解先前研究中观察到的大批量大小带来的负面影响?

主要发现

  • Llama-3-8b 中最佳编辑层为第 1 层,该层在编辑准确性和知识保留之间实现了最佳平衡。
  • 更大的批量大小(如 4096)显著降低性能,尤其是在邻域得分(NS)方面,表明对附近事实的干扰增加。
  • 采用批量大小为 1024 的顺序-批量编辑在 MEMIT 和 EMMET 的所有指标上均取得最佳整体性能。
  • 对于邻域得分(NS),更大的批量大小(如 4096)优于较小批量,表明全局性能与局部性之间存在权衡。
  • 改写得分(PS)从批量大小 16 增加到 64,表明在中等批量大小下,事实改写鲁棒性可能得到提升。
  • 批量大小为 1 的顺序编辑在大多数指标上优于更大批量,表明更小、更频繁的更新优于大规模批量更新。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。