Consecutive Batch Model Editing with HooK Layers
Shuaiyi Li, Yang Deng, Deng Cai, Hongyuan Lu, Liang Chen, Wai Lam
TL;DR
This work tackles the practical problem of updating knowledge in large language models without costly retraining or unbounded memory growth. It introduces CoachHooK, a memory-efficient editing framework that enables consecutive batch edits by inserting hook layers to capture editing changes while leaving the base weights intact; a transformer memory-updating mechanism and dynamic local-scope detection govern when and where edits apply. By leveraging outlier-based local editing scope identification and a dynamic threshold $\alpha$, CoachHooK demonstrates strong performance on ZsRE and COUNTERFACT across GPT2-XL and GPT-J in both single-round and consecutive editing scenarios, often outperforming batch-editing baselines in reliability, generality, and locality. The approach achieves these gains with modest inference-time and memory overhead, suggesting practical applicability for iterative knowledge updates in real-world LLM deployments.
Abstract
As the typical retraining paradigm is unacceptably time- and resource-consuming, researchers are turning to model editing to find an effective way that supports both consecutive and batch scenarios to edit the model behavior directly. Despite all these practical expectations, existing model editing methods fail to realize all of them. Furthermore, the memory demands for such sequential model editing approaches tend to be prohibitive, frequently necessitating an external memory that grows incrementally over time. To cope with these challenges, we propose CoachHooK, a model editing method that simultaneously supports sequential and batch editing. CoachHooK is memory-friendly as it only needs a small amount of it to store several hook layers whose size remains unchanged over time. Experimental results demonstrate the superiority of our method over other batch-supportive model editing methods under both single-round and consecutive batch editing scenarios. Extensive analyses of CoachHooK have been conducted to verify the stability of our method over a number of consecutive steps.
