[Paper Review] Is Bigger Edit Batch Size Always Better? -- An Empirical Study on Model Editing with Llama-3
This paper investigates model editing in Llama-3 using ROME, MEMIT, and EMMET, comparing sequential, batched, and sequential-batch editing strategies. It finds that larger batch sizes degrade performance—especially on locality metrics—while sequential-batched editing with a batch size of 1024 yields optimal results, challenging the assumption that bigger batches are always better for scalable model editing.
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.
Motivation & Objective
- To evaluate the efficacy of different model editing strategies—sequential, batched, and sequential-batched—on the Llama-3 model.
- To identify the optimal layer for targeted editing in Llama-3 by testing all 32 layers of the 8B parameter model.
- To assess whether increasing edit batch size improves performance or leads to degradation, especially in fact locality and knowledge preservation.
- To establish a transparent, reproducible benchmarking procedure for future model editing research on Llama-3.
- To argue for a shift in focus from solely increasing batch size toward hybrid strategies combining sequential and batched editing.
Proposed method
- Performed single-layer editing on Llama-3-8b across all 32 layers to identify the most effective intervention point.
- Applied three editing strategies: (1) sequential editing (one edit at a time), (2) batch editing (multiple edits in one update), and (3) sequential-batched editing (batches updated in sequence).
- Used ROME, MEMIT, and EMMET—three parameter-modifying editing methods that optimize the preservation-memorization objective.
- For MEMIT and EMMET, applied closed-form solutions to perform batch edits with varying batch sizes (16 to 4096), minimizing computational cost.
- Evaluated performance using four metrics: Efficacy Score (ES), Paraphrase Score (PS), Neighborhood Score (NS), and a composite Score (S).
- Conducted hyperparameter tuning for MEMIT and EMMET and reported results across multiple batch sizes to identify optimal scaling behavior.
Experimental results
Research questions
- RQ1Which layer in Llama-3 is most effective for targeted model editing in terms of accuracy and knowledge preservation?
- RQ2Does increasing the edit batch size consistently improve model editing performance, or does it lead to degradation?
- RQ3How does sequential-batched editing compare to standard batched editing in terms of performance and locality preservation?
- RQ4Is there an optimal batch size for sequential-batched editing that balances performance and scalability?
- RQ5Can sequential editing strategies mitigate the negative effects of large batch sizes observed in prior work?
Key findings
- The optimal layer for editing in Llama-3-8b is layer 1, which achieves the best balance between editing accuracy and knowledge preservation.
- Larger batch sizes (e.g., 4096) significantly degrade performance, particularly on the Neighborhood Score (NS), indicating increased interference with nearby facts.
- Sequential-batched editing with a batch size of 1024 achieves the best overall performance across all metrics for both MEMIT and EMMET.
- For the Neighborhood Score (NS), larger batch sizes (e.g., 4096) perform better than smaller ones, suggesting a trade-off between global performance and locality.
- The Paraphrase Score (PS) increases from batch size 16 to 64, indicating potential for improved robustness in fact paraphrasing at moderate batch sizes.
- Sequential editing with batch size 1 outperforms larger batch sizes on most metrics, demonstrating that smaller, frequent updates yield better results than large-scale batch updates.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.