Beyond Hard Writes and Rigid Preservation: Soft Recursive Least-Squares for Lifelong LLM Editing
Proceedings of the Thirty-Fifth International Joint Conference on Artificial Intelligence. Main Track. Pages 2382-2390.
https://doi.org/10.24963/ijcai.2026/265
Keywords
- Knowledge Representation and Reasoning: Applications
- Machine Learning: Generative models
- Constraint Satisfaction and Optimization: Constraint optimization problems
- Natural Language Processing: Language models
Abstract
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.
Code will be at here.
- [Chen et al., 2024] Qizhou Chen, Taolin Zhang, Xiaofeng He, Dongyang Li, Chengyu Wang, Longtao Huang, and Hui Xue'. Lifelong knowledge editing for llms with retrieval-augmented continuous prompt learning. In Yaser Al-Onaizan, Mohit Bansal, and Yun-Nung Chen, editors, Proceedings of the 2024 Conference on Empirical Meth- ods in Natural Language Processing, EMNLP 2024, Mi- ami, FL, USA, November 12-16, 2024, pages 13565- 13580. Association for Computational Linguistics, 2024.
- [De Cao et al., 2021] Nicola De Cao, Wilker Aziz, and Ivan Titov. Editing factual knowledge in language models. In Proceedings of the 2021 Conference on Empirical Meth- ods in Natural Language Processing, pages 6491-6506. Association for Computational Linguistics, 2021.
- [DeepSeek-AI and others, 2025] DeepSeek-AI et al. Deepseek-r1: Incentivizing reasoning capability in llms via reinforcement learning, 2025. arXiv preprint arXiv:2501.12948.
- [Deng et al., 2025] Jingcheng Deng, Zihao Wei, Liang Pang, Hanxing Ding, Huawei Shen, and Xueqi Cheng. Ev- erything is editable: Extend knowledge editing to un- structured data in large language models. In The Thir- teenth International Conference on Learning Representa- tions, ICLR 2025, Singapore, April 24-28, 2025. OpenRe- view.net, 2025.
- [Dubey and others, 2024] Abhimanyu Dubey et al. The llama 3 herd of models, 2024. arXiv preprint arXiv:2407.21783.
- [Fang et al., 2025] Junfeng Fang, Houcheng Jiang, Kun Wang, Yunshan Ma, Jie Shi, Xiang Wang, Xiangnan He, and Tat-Seng Chua. Alphaedit: Null-space constrained knowledge editing for language models. In The Thir- teenth International Conference on Learning Representa- tions, ICLR 2025, Singapore, April 24-28, 2025. OpenRe- view.net, 2025.
- [Gupta et al., 2024] Akshat Gupta, Anurag Rao, and Gopala Anumanchipalli. Model editing at scale leads to gradual and catastrophic forgetting. In Findings of the Association for Computational Linguistics: ACL 2024, pages 15202- 15232, Bangkok, Thailand, August 2024. Association for Computational Linguistics.
- [Hager, 1989] William W. Hager. Updating the inverse of a matrix. SIAM Review, 31(2):221-239, 1989.
- [Hartvigsen et al., 2023] Tom Hartvigsen, Swami Sankara- narayanan, Hamid Palangi, Yoon Kim, and Marzyeh Ghas- semi. Aging with GRACE: lifelong model editing with discrete key-value adaptors. In Advances in Neural Infor- mation Processing Systems 36 (NeurIPS 2023), 2023.
- [Jiang et al., 2025] Houcheng Jiang, Junfeng Fang, Ningyu Zhang, Mingyang Wan, Guojun Ma, Xiang Wang, Xi- angnan He, and Tat-Seng Chua. AnyEdit: Edit any knowledge encoded in language models. In Aarti Singh, Maryam Fazel, Daniel Hsu, Simon Lacoste-Julien, Fe- lix Berkenkamp, Tegan Maharaj, Kiri Wagstaff, and Jerry Zhu, editors, Proceedings of the 42nd International Con- ference on Machine Learning, volume 267 of Proceed- ings of Machine Learning Research, pages 27510-27533. PMLR, 13-19 Jul 2025.
- [Kirkpatrick et al., 2017] James Kirkpatrick, Razvan Pas- canu, Neil Rabinowitz, Joel Veness, Guillaume Des- jardins, Andrei A Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska, et al. Overcom- ing catastrophic forgetting in neural networks. Proceed- ings of the national academy of sciences, 114(13):3521- 3526, 2017.
- [Levy et al., 2017] Omer Levy, Minjoon Seo, Eunsol Choi, and Luke Zettlemoyer. Zero-shot relation extraction via reading comprehension. In Roger Levy and Lucia Specia, editors, Proceedings of the 21st Conference on Computa- tional Natural Language Learning (CoNLL 2017), pages 333-342, Vancouver, Canada, August 2017. Association for Computational Linguistics.
- [Lyu et al., 2025] Sicheng Lyu, Yu Gu, Xinyu Wang, Jerry Huang, Sitao Luan, Yufei Cui, Xiao-Wen Chang, and Peng Lu. Evoedit: Evolving null-space alignment for robust and efficient knowledge editing, 2025. Accepted to Findings of ACL 2026.
- [Meng et al., 2022] Kevin Meng, David Bau, Alex Ando- nian, and Yonatan Belinkov. Locating and editing fac- tual associations in GPT. In Sanmi Koyejo, S. Mohamed, A. Agarwal, Danielle Belgrave, K. Cho, and A. Oh, edi- tors, Advances in Neural Information Processing Systems 35: Annual Conference on Neural Information Process- ing Systems 2022, NeurIPS 2022, New Orleans, LA, USA, November 28 -December 9, 2022, 2022.
- [Meng et al., 2023] Kevin Meng, Arnab Sen Sharma, Alex J. Andonian, Yonatan Belinkov, and David Bau. Mass- editing memory in a transformer. In The Eleventh Inter- national Conference on Learning Representations, ICLR 2023, Kigali, Rwanda, May 1-5, 2023. OpenReview.net, 2023.
- [Mitchell et al., 2022] Eric Mitchell, Charles Lin, Antoine Bosselut, Chelsea Finn, and Christopher D. Manning. Fast model editing at scale. In International Conference on Learning Representations (ICLR), 2022. [OpenAI, 2023] OpenAI. GPT-4 technical report, 2023. arXiv preprint arXiv:2303.08774.
- [Ritter et al., 2018] Hippolyt Ritter, Aleksandar Botev, and David Barber. Online structured laplace approximations for overcoming catastrophic forgetting. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 31.
- Curran Associates, Inc., 2018.
- [Sayed, 2003] Ali H. Sayed. Fundamentals of Adaptive Fil- tering. Wiley-IEEE Press, 2003.
- [Sherman and Morrison, 1950] Jack Sherman and Winifred J. Morrison. Adjustment of an inverse ma- trix corresponding to a change in one element of a given matrix. The Annals of Mathematical Statistics, 21(1):124-127, 1950.
- [Sun et al., 2025] Wei Sun, Tingyu Qu, Mingxiao Li, Jesse Davis, and Marie-Francine Moens. Mitigating negative in- terference in multilingual knowledge editing through null- space constraints. In Wanxiang Che, Joyce Nabende, Eka- terina Shutova, and Mohammad Taher Pilehvar, editors, Findings of the Association for Computational Linguistics: ACL 2025, pages 8796-8810, Vienna, Austria, July 2025. Association for Computational Linguistics.
- [Wang et al., 2018] Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. GLUE: A multi-task benchmark and analysis platform for natural language understanding. In Tal Linzen, Grze- gorz Chrupała, and Afra Alishahi, editors, Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, pages 353- 355, Brussels, Belgium, November 2018. Association for Computational Linguistics.
- [Wang et al., 2024] Peng Wang, Zexi Li, Ningyu Zhang, Zi- wen Xu, Yunzhi Yao, Yong Jiang, Pengjun Xie, Fei Huang, and Huajun Chen. WISE: rethinking the knowledge mem- ory for lifelong model editing of large language models. In Amir Globersons, Lester Mackey, Danielle Belgrave, An- gela Fan, Ulrich Paquet, Jakub M. Tomczak, and Cheng Zhang, editors, Advances in Neural Information Process- ing Systems 38: Annual Conference on Neural Information Processing Systems 2024, NeurIPS 2024, Vancouver, BC, Canada, December 10 -15, 2024, 2024.
- [Wang et al., 2025] Xinyu Wang, Linrui Ma, Jerry Huang, Peng Lu, Prasanna Parthasarathi, Xiao-Wen Chang, Box- ing Chen, and Yufei Cui. Resona: Improving context copying in linear recurrence models with retrieval, 2025.
- [Woodbury, 1950] Max A. Woodbury. Inverting modified matrices. Memorandum Report 42, Statistical Research Group, Princeton University, 1950.
- [Yang and others, 2024] An Yang et al. Qwen2.5 technical report, 2024. arXiv preprint arXiv:2412.15115.
- [Zhu et al., 2020] Chen Zhu, Ankit Singh Rawat, Manzil Za- heer, Srinadh Bhojanapalli, Daliang Li, Felix X. Yu, and Sanjiv Kumar. Modifying memories in transformer mod- els, 2020. arXiv preprint arXiv:2012.00363.
References were extracted automatically from the PDF and may contain errors.
Full text extracted automatically from the PDF; figures, tables and equations may differ. The PDF is the version of record.
1 Introduction
Despite the large amount of knowledge they store within their parameters, large language models (LLMs) [Yang and others, 2024; OpenAI, 2023; DeepSeek-AI and others, 2025] inevitably contain outdated, incomplete, or incorrect knowledge [De Cao et al., 2021; Mitchell et al., 2022] when statically deployed without re-training or access to external knowledge bases. Due to the high computational cost of retraining from scratch, many applications require updating models through edits to a subset of parameters, with the goal of integrating new facts or rules while preserving general model behavior [Meng et al., 2022]. While early model editors largely focused on single or small-batch updates, practical deployments are inherently sequential: edits arrive continuously, and the editor must remain reliable after each edit [Hartvigsen et al., 2023; Gupta et al., 2024].
The many-edits regime presents a dilemma. To remain useful over long streams, an editor must both memorize incoming information and preserve knowledge acquired from earlier edits. In practice, failures often appear as two coupled forms of forgetting:
- Retroactive Edit Forgetting: future edits can overwrite edits applied in the past.
- General-Ability Degradation: edits can deteriorate out-ofscope reasoning and language understanding.
Existing sequential editors typically fail for complementary reasons. Locate-then-edit approaches [Meng et al., 2022; Meng et al., 2023] perform hard writes, forcing the model to learn new associations with limited control over previously stored knowledge. As the number of edits accumulates, these updates may interfere with one another, leading to instability and retroactive forgetting of earlier facts. Conversely, null-space editors [Fang et al., 2025; Sun et al., 2025; Lyu et al., 2025] project updates into a feasible subspace conditioned on an anchor mapping, thereby preserving the associations explicitly constrained by that mapping. However, as edits are repeatedly applied, maintaining complete preservation would require a growing set of constraints, while loosening these constraints may still allow degradation in general abilities or retention of previous facts. As a consequence, neither paradigm is sufficient for long sequential editing.
We focus on parameter-editing methods. This distinction is mechanism-based rather than dataset-based. [Wang et al., 2025] Alternatively, sequential parameter editing can be viewed as online regularized least squares on a layer-wise key-value surrogate [Sayed, 2003]. Each edit contributes a quadratic fitting term, while preservation is controlled by two explicit deviation terms: one penalizing deviation from the initial model, and another penalizing deviation from a designated anchor mapping. This gives a soft-constraint formulation in which learning new edits and preserving previous knowledge are optimized within a single objective.
From this view, we propose RLSEdit, a recursive leastsquares editor for long sequential editing. RLSEdit formulates editing as a quadratic objective and derives an efficient online recursion via the Woodbury identity [Sherman and Morrison, 1950; Woodbury, 1950; Hager, 1989]. Its per-edit cost is independent of the number of previous edits and instead scales with the current edit rank/size. We further provide theoretical deviation bounds and an asymptotic characterization of the edit-preservation trade-off under long edit streams.
To summarize, our main contributions are:
- We formulate lifelong editing as online regularized least squares with explicit parameter-deviation and anchordeviation controls, providing a soft-constraint alternative between hard writing and hard preservation.
- We derive a Woodbury-based online update whose per-edit cost is independent of the number of past edits.
- We provide deviation bounds and an asymptotic characterization of the adherence-preservation trade-off under long edit streams.
- We evaluate RLSEdit on Llama-3 [Dubey and others, 2024] and Qwen2.5 [Yang and others, 2024] after 10K edits, showing stronger edit success, improved early-edit retention, and better preservation of general capabilities on held-out reasoning and code benchmarks.
2 RelatedWork
We review model editing methods through a soft versus hard constraint lens. We explain how different editing methods balance between making new edits and preserving previous edits and knowledge, and why long-sequential editing is challenging. In particular, we consider layer-wise input-output pairs, where we edit a single linear map in layer ℓ (e.g., an attention projection). Given an input prompt, we run a forward pass and collect a set of module-level input-output feature pairs (k, v) at selected token positions, where k ∈ Rdk is the input activation to the edited map and v ∈ Rdv is the corresponding output activation. For the t-th edit, we stack ut such pairs to formKt ∈ Rut×dk and Vt ∈ Rut×dv .
The Writing and Preservation Trade-off. The goal of editing is to perform targeted updates to the model parameters to learn new key-value associations. With soft or no direct constraint on how this changes the parameters, this can be expressed as a constrained LS problem:
Here (K, V ) denotes the current key-value associations contained within the model parameters, and (K⋆ ,V ⋆ ) denotes the edit constraints defined by the new set of edits.
Alternatively, one can attempt to preserve greater amounts of existing knowledge by restricting updates to a feasible subspace so that performance on a designated preservation set (e.g., an anchor/background mapping) remains unchanged. This can be expressed as
This leads to a soft fit to the new edits under a hard preservation constraint. In ALPHAEDIT [Fang et al., 2025], Kpres,t is typically fixed to a chosen anchor/background set, preserving only what is explicitly constrained. LANGEDIT [Sun et al., 2025] retains the same principle but updates multilingual preservation statistics online, so that Kpres,t and the induced projector evolve over time.
Moving to Longer Edit Streams. When only a single batch of edits needs to be applied, existing editing methods have shown strong performance. However, such settings are not fully representative of real-world LLM use cases. Models often exist in environments where they are deployed for long periods of time and where the number of required edits can grow continuously. In such longer edit streams, existing methods can suffer for several reasons: hard satisfaction of each batch can induce growing interference between incoming edits and prior knowledge, leading to retroactive forgetting and degradation in out-of-scope performance, while attempting to preserve too much prior knowledge can lead to insufficient learning of new associations.
Soft Updates with Preservation. MEMIT [Meng et al., 2023] uses a soft LS objective over a batch of past and new associations, but is not formulated as a long-stream sequential objective. To address the long-edit stream setting, we enforce soft adherence and preservation within a quadratic objective that encompasses both hard regimes as limiting cases.
Relation to Continual Learning. RLSEdit is also related to continual learning methods such as EWC [Kirkpatrick et al., 2017] and online Laplace [Ritter et al., 2018], which use quadratic penalties to restrict parameter drift from previously learned solutions. In our objective, the termλ2 ∥WW0∥2F plays a similar regularizing role. However, our setting is different: RLSEdit targets long sequential LLM editing through layer-wise key-value constraints, combines the drift penalty with an anchor-mapping term, and admits an exact Woodbury-based recursive update whose per-edit cost is independent of the edit history length.
Beyond Direct Parameter Writes. Several recent lines differ from direct streaming parameter updates mainly in editing mechanism. ANYEDIT [Jiang et al., 2025] broadens the scope of editable knowledge beyond simple factual statements, while UNKE [Deng et al., 2025] targets unstructured knowledge. For lifelong settings, WISE [Wang et al., 2024] separates edited knowledge from pre-trained knowledge via dual memories and routing, and RECIPE [Chen et al., 2024] externalizes updates as retrieval-augmented continuous prompts with gating. These approaches can be evaluated on related editing tasks, but they intervene through additional components such as memory, retrieval, or prompting. They are therefore complementary to our focus on an efficient, single-objective streaming parameter editor. Model editing is also related to continual learning, especially quadraticregularization methods such as EWC and online Laplace approximations [Kirkpatrick et al., 2017; Ritter et al., 2018]. However, RLSEdit is designed for post-training LLM editing and couples cumulative key-value least squares, an anchormapping penalty, and a Woodbury recursion with historyindependent per-edit cost.
3 Methodology
We present our editing framework in three parts. We first introduce a recursive least-squares (RLS) formulation that accumulates all editing residuals in a single quadratic objective, with penalties on both deviation from the initial model parameters and deviation from an anchor mapping in Section 3.1. We then analyze the computational complexity of the resulting updates and compare them with existing sequential editors under long edit streams in Section 3.2. Finally, we contrast soft and hard constraint designs, showing how existing editors can be viewed as limiting cases of our formulation in Section 3.3.
3.1 A recursive least squares editor
Setup We consider editing a single linear map W ∈ Rdk×dv , such as a projection matrix in a transformer layer. Each edit provides a set of key-value constraints (Kt,Vt), where Kt ∈ Rut×dk and Vt ∈ Rut×dv , with ut being the number of contexts collected for the t-th edit. Layer-wise edit adherence is measured by the residual ∥KtW -Vt∥F . The goal of our method is two-fold. First, it should incorporate all edits up to time t. Second, it should control deviation from the initial weights W0 and from a set of anchor pairs (K0,V0). We therefore introduce two regularization terms for these two purposes.
Regularized Least-Squares Equation
At time t, our objective is to obtain the optimal weight W ∗ t that minimizes:
where λ and µ are hyperparameters. The first term fits all edit pairs observed so far. The second term penalizes parameter drift from the initial weight W0, and the third term encourages the edited weight to preserve the anchor mapping K0W ≈ V0.
To rewrite Equation 3 as a standard matrix least-squares problem, define
Then Equation 3 becomes
To make the closed-form solution explicit, consider one output column at a time. For a column w of W and the corresponding column bt of Bt, Equation 5 reduces to

Taking the derivative and setting it to zero gives the normal equation
Stacking the solutions for all output columns gives the matrix normal equation
Let
When λ > 0, St ≻ 0, so the minimizer is unique and is given by
This solution jointly fits all edit pairs up to time t, while the two regularizers keep the edited weights close to W0 and preserve the anchor mapping K0W ≈ V0.
Efficient Recursion via Normal Equations
Direct computation of Equation 8 requires inverting St, which is expensive when repeated over a long edit stream. We therefore derive an efficient recursive update. From Equation 8, the minimizer W ∗ t satisfies
Let Ct := S-1 t . Using Equation 6, we have
Algorithm 1 RLS-Woodbury Editing
Require: Initial weightW0; anchor pair (K0,V0); penalties (λ, µ); edit stream {(Kt, Vt)}Tt=1 .
Ensure: Edited weight W ∗ T .
- 1: S0 ← λ2Idk +µ2K⊤ 0 K0
2: T0 ← λ2W0 +µ2K⊤
- 4: C0 ←S-1 0
- 3: S0 =R⊤ 0 R0
- 5: W ∗ 0 ←C0T0
- 6: for t = 1, 2, . . . , T do Covariance update
- 7: Ft ←Ct-1K⊤ t
- 8: Ht ← Iut +KtFt
- 9: Ht =R⊤ t Rt
- 11: Ct ←Ct-1 -YtY ⊤ t Weight update
- 10: Yt ←FtR-1 t
- 12: Et ←Vt -KtW ∗ t-1
- 13: Gt ←FtH-1 t
- 14: W ∗ t ←W ∗ t-1 + GtEt
- 15: end for
- 16: returnW ∗ T
0 V0
▷ Cholesky factorization
▷ Computed via triangular solves
▷ Cholesky factorization
▷ Triangular solve
▷ Gain matrix
Next, define
By the Sherman-Morrison-Woodbury identity,
In implementation, we factorize Ht = R⊤ t Rt by Cholesky and use triangular solves, avoiding explicit matrix inversion.
From Equation 7, we also have
Combining this with the covariance recursion gives the weight update
Equivalently, since CtK⊤ t = FtH-1 t , the update only requires solving the small ut × ut system in Ht. Letting Et := Vt -KtW ∗ t-1 , each edit requires only updating Ct via Equation 11 and then updating W ∗ t via Equation 12.
3.2 Complexity analysis
We report the per-edit cost at step t. MultiplyingM ∈ Rm×n and N ∈ Rn×p costs O(mnp), and solving a dense n × n linear system costs O(n3 ).
RLS-Woodbury Updates
RLSEdit maintains Ct = S-1 t ∈ Rdk×dk and updates it via Woodbury using
The covariance-state update is dominated by forming these products, solving the resulting ut × ut system, and applying the low-rank correction:
For the weight update, we reuse the same ut × ut solve to apply the gain Gt = CtK⊤ t = FtH-1 t ∈ Rdk×ut and update Wt using the residual Et. This step is dominated by the key-value multiplication against dv outputs:
Overall, the per-edit runtime is therefore
which simplifies to O(d2k ut + dkdvut ) when ut ≪ dk, dv.
Comparison to other sequential editors
For a fair long-sequential comparison, we focus on existing sequential editors. ALPHAEDIT introduces hard preservation by projecting the weight update onto the null space of a fixed preserved-knowledge set. In sequential editing, it also regularizes against disrupting previously updated knowledge represented by accumulated key-value pairs. A direct sequential implementation therefore involves history-dependent dense matrices over the feature dimension and repeated projection or factorization steps. Let mt-1 denote the number of previously updated pairs and let ut denote the number of pairs in the current edit. The dominant cost can include a dense dk × dk factorization, together with Gram matrix construction over the accumulated pairs:
Even with more careful incremental implementations, the cost remains tied to the accumulated preservation set or the dimension of the remaining feasible subspace. In contrast, RLSEdit avoids an O(d3k ) factorization during the edit stream by maintaining Ct = (A⊤t At)-1 and using a Woodbury recursion. Each edit only solves a ut × ut system, where typically ut ≪ dk, making the update more efficient in long-edit settings, as shown in 3.
3.3 Hard versus Soft Constraints
RLSEdit can be viewed as a soft-constraint alternative to two common hard regimes. Locate-then-edit methods such as ROME enforce the new association as a hard write while softly penalizing background deviation. Null-space methods such as ALPHAEDIT instead enforce hard preservation by restricting updates to a feasible subspace. In contrast, RLSEdit keeps both edit adherence and preservation soft through the cumulative objective
As µ → ∞, the anchor mapping becomes a hard constraint. Similarly, assigning infinite weight to selected past fitting terms recovers hard preservation through the standard penalty method. Thus, RLSEdit interpolates between hard-write and hard-preserve behavior while remaining in a soft-soft regime for finite (λ, µ).

4 Theoretical Analysis
We provide deviation bounds in terms of (λ, µ): λ controls global parameter deviation from W0, and µ controls deviation of the anchor mapping K0W.
Theorem4.1 (Global deviation bounds). LetW ∗ t be theminimizer of Jt(W) and define Rt := Vt - KtW ∗ t-1 . Let σmin(K) denote the smallest singular value of K.
- (i) (Parameter deviation) If λ > 0, then for any T ≥ 1,
- (ii) (Anchor-map deviation) If µ > 0, then for any T ≥ 1,
Theorem 4.1 shows that λ and µ control different types of deviation. A larger λ keeps the solution closer to the original weights W0, while a larger µ better preserves the anchor mapping K0W ≈ V0. The residual Rt measures how well the current edit is satisfied before the t-th update. Thus, increasing λ or µ makes the update more conservative, but may also increase the edit residual when the new edit conflicts with the preservation constraints.
4.1 Asymptotic Scaling
To connect (λ, µ) to the many-edits regime, we view Equation 3 as a ridge-type estimator for a layer-wise linear mapping. We use the statistical model
where Ei captures approximation error from other layers, context variability, and mismatch in the linearized output.
Sequential edits do not need to be i.i.d. We only assume long-run stability of the empirical second moments, namely that there exist matrices Σk and Σkv such that
s.t. Σk ≻ 0 on the relevant subspace.
Allow λ = λt and µ = µt to depend on t and define
For asymptotic analysis, it is convenient to work with the normalized objective ˜ Jt(W) := Jt(W)/t, which has the same minimizer as Jt for each fixed t:
Proposition 4.2 (Asymptotic behavior of the RLS editor). Assume Equation 13, and the moment convergence in Equation 14. Also assume supi E∥Ki∥4F < ∞ and supi E∥Vi∥4F < ∞. Let W ∗ t be the minimizer of Jt(W), with αt = λ2t /t and βt = µ2t /t. Suppose that αt → α and βt→β for some α, β∈[0,∞) as t→∞. Define the limiting quadratic risk R(W) through the limiting second moments in Equation 14. Then:
- (i) The normalized objectives ˜ Jt converge pointwise to the regularized limiting risk
- (ii) The function Rridge is strictly convex and admits a unique minimizer W † .
- (iii) The RLS editor converges to this minimizer:
Remark 4.3. Proposition 4.2 is an asymptotic characterization for long-run stable edit streams, not a universal guarantee for arbitrary non-stationary deployments. It does not assume that edits are i.i.d.; the key requirement is the convergence of the empirical second moments in Equation 14. If these limits do not exist, then the editor should not be interpreted as converging to a single limiting risk minimizer. In that case, the relevant guarantee is the finite-time deviation bound in Proposition 4.1.
If α = β = 0 (e.g., when λt, µt are held fixed), then W † =W ⋆ and W ∗ t converges to the least-squares limiting minimizer. If α > 0 and/or β > 0, then W † interpolates between the data-driven optimum W ⋆ and the anchor constraints encoded by (W0,K0,V0): larger α shrinks W † towardW0, and larger β enforces K0W † ≈V0 even as t→∞.
| Method | Model | Efficacy ↑ | Generalization ↑ | Specificity ↑ | Fluency ↑ | Consistency ↑ |
|---|---|---|---|---|---|---|
| RLSEdit (Ours) AlphaEdit ROME MEMIT | Llama-3-8B | 89.94±0.75 66.78±3.19 47.57±0.10 49.73±1.44 74.76±0.00 | 72.84±1.21 58.27±1.59 48.45±0.33 49.24±0.48 64.49±0.00 | 60.56±0.35 51.79±0.70 52.52±0.44 51.54±0.68 39.69±0.00 | 615.58±4.34 489.91±33.83 465.02±17.88 323.01±16.40 342.42±0.20 | 26.27±0.35 4.59±0.39 1.83±0.14 3.45±1.62 1.31±0.00 |
| RLSEdit (Ours) AlphaEdit ROME MEMIT FT | Qwen2.5-7B | 94.45±1.07 94.10±0.42 35.70±1.36 | 68.55±0.47 70.29±2.30 37.16±1.19 51.39±0.49 56.46±0.00 | 73.37±0.44 75.29±0.65 65.20±1.42 51.52±0.92 45.23±0.00 | 625.74±0.71 623.51±0.24 619.67±16.98 532.38±24.31 | 31.62±0.81 31.37±0.49 31.79±3.59 1.63±2.22 |
| FT | ||||||
| 53.13±0.72 | ||||||
| 65.72±0.00 | 324.70±0.04 | 1.87±0.03 |

Thus, increasing λ and µ makes the update more conservative. This improves preservation, but can reduce edit adherence when the new edit conflicts with the original mapping. A common policy is to set a deviation budget for the associated penalties, then tune (λ, µ) to satisfy both bounds.
The limits µ, λ → ∞ yield hard anchoring (K0W =V0) and frozen parameters (W ∗ t →W0).
5 Experiments and Results
5.1 Experimental Setup
Models and Baselines. We conduct experiments with two backbone models, Llama3-8B and Qwen2.5-7B, against ALPHAEDIT [Fang et al., 2025], ROME [Meng et al., 2022], MEMIT [Meng et al., 2023], and fine-tuning (FT) [Zhu et al., 2020].
Datasets and Metrics. Following prior work, we mainly use the CounterFact dataset [Meng et al., 2022]. We report Efficacy (rewrite success), Generalization (paraphrase success), Specificity (neighborhood success), Fluency (generation entropy), and Consistency (reference score). To further test whether the trend holds beyond CounterFact, we also evaluate on ZsRE.
5.2 Main Results
Editing Results. Table 1 reports performance after 10K edits with batch size 100 on CounterFact. On Llama3-8B, RLSEdit achieves the best scores across all five metrics. In particular, it obtains a clear improvement in Efficacy over the second-best method (89.94 vs. 74.76), while also improving Generalization, Specificity, Fluency, and Consistency.
On Qwen2.5-7B, the results are more nuanced. RLSEdit achieves the best Efficacy and Fluency, while ALPHAEDIT gives slightly higher Generalization and Specificity, and ROME gives the best Consistency. This difference suggests that the editing-preservation trade-off is modeldependent rather than evidence of instability in RLSEdit. Overall, RLSEdit remains competitive with ALPHAEDIT on Qwen2.5-7B and substantially outperforms ROME, MEMIT, and FT on most metrics.
ZsRE Results. We further test RLSEdit on ZsRE [Levy et al., 2017]. As shown in Table 2, RLSEdit achieves 81.20 Efficacy on Llama3-8B, outperforming ALPHAEDIT, MEMIT, and ROME. This supports the generality of the empirical trend across different editing datasets.

| Metric | ROME | MEMIT | AlphaEdit | RLSEdit |
|---|---|---|---|---|
| ZsRE Efficacy ↑ | 1.52 | 0.96 | 70.04 | 81.20 |
General Capability Results. To assess how well editing methods preserve the pre-edited model's general abilities, we evaluate five tasks from GLUE [Wang et al., 2018], together with additional benchmarks for general knowledge (MMLU), math reasoning (GSM8K), and coding ability (HumanEval, MBPP). We conduct the evaluation on multiple editing checkpoints of the Llama3-8B model, using 10K total edits with a batch size of 100.
Figure 3 summarizes the general capability evaluations. Across the evaluated language understanding, knowledge, math, and coding benchmarks, RLSEdit better preserves the model's general capabilities throughout the editing trajectory. This is especially important in the long sequential setting, where many edits may accumulate interference over time. In contrast, MEMIT, ROME, and FT show stronger degradation as edits accumulate. ALPHAEDIT performs competitively in the early stages, but drops more noticeably after a large number of edits. These results suggest that RLSEdit provides a better balance between edit reliability and general capability preservation.
5.3 Analysis and Discussion
Early Edits Comparison. To examine how well RLSEdit and the baselines preserve earlier edits in a sequential editing setting, we re-evaluate the first N edited cases, where N ∈ {500, 1K, 2K, 4K}, after performing 10K sequential edits with batch size 100 on Llama3-8B. As shown in Figure 4, RLSEdit consistently achieves the best retention across all N: its Rewrite scores range from 71.22 at N=500 to 81.28 at N=4K, and its Paraphrase scores range from 60.49 to 66.98. In contrast, the baselines remain noticeably lower, suggesting weaker preservation of previously edited knowledge under long sequential editing.
| Method | Llama3-8B | Qwen2.5-7B | ||||
|---|---|---|---|---|---|---|
| 100 | 200 | 500 | 100 | 200 | 500 | |
| AlphaEdit | 525.15 | 227.93 | 108.07 | 978.32 | 412.94 | 197.49 |
| RLSEdit | 328.39 | 166.84 | 66.85 | 545.65 | 271.20 | 112.88 |
Effect of Regularization. The two regularization parameters play different roles. The parameter λ controls the drift from the original weights W0, while µ controls the anchor mapping K0W. We find that the effect of λ is modeldependent. On Llama3-8B, setting λ = 0 while keeping µ = 12000 reduces the Efficacy score to 87.0, with the other metrics also slightly lower. This suggests that the parameterdrift penalty improves the editing-preservation trade-off for this backbone. In contrast, Qwen2.5-7B performs best with λ = 0, indicating that this model is more robust to direct weight changes.
The anchor parameter µ is important in practice. Removing it can make the linear system ill-conditioned in long sequential editing. For a new backbone, we therefore tune (λ, µ) using a small pilot sweep and monitor the three objective terms: edit fitting, parameter drift, and anchor-mapping error.
Speed-upAnalysis. Table 3 reports the update computation time for RLSEdit and ALPHAEDIT across two model backbones and three batch sizes. Across all six configurations, RLSEdit runs faster, reducing update time by 1.37×-1.79× relative to ALPHAEDIT. This is consistent with the theoretical time-complexity analysis in Section 3.2.
6 Conclusion
Existing model editing methods often degrade when the number of edits becomes large. We propose RLSEdit, a recursive least-squares framework for long sequential editing with soft editing and soft preservation constraints. RLSEdit introduces two regularization terms to control deviation from the pretrained weights and from an anchor mapping, allowing it to balance edit adherence and preservation. The resulting objective admits an efficient Woodbury-based recursion whose per-edit update cost is independent of the edit history length.
Empirically, RLSEdit scales stably to 10K edits on Llama-3 and Qwen2.5, achieves strong results on CounterFact and ZsRE, and better preserves general capabilities across language understanding, knowledge, math, and coding benchmarks. These results support RLSEdit as a practical approach for continuous model editing. A remaining limitation is that our experiments focus on 7B-8B backbones; evaluating larger models and more failure cases is an important direction for future work.
Ethical Statement
While our work centers on model-editing methods, it is important to acknowledge that such techniques can also be misused to inject undesirable knowledge or behavioral traits into a model. These risks merit careful consideration and discussion.
Contribution Statement
Xinyu Wang, Sicheng Lyu, and Yu Gu contributed equally to this work. Xiao-Wen Chang is the corresponding author.
@inproceedings{ijcai2026p265,
title = {Beyond Hard Writes and Rigid Preservation: Soft Recursive Least-Squares for Lifelong LLM Editing},
author = {Wang, Xinyu and Lyu, Sicheng and Gu, Yu and Huang, Jerry and Lu, Peng and Cui, Yufei and Chang, Xiao-Wen},
booktitle = {Proceedings of the Thirty-Fifth International Joint Conference on
Artificial Intelligence, {IJCAI-26}},
publisher = {International Joint Conferences on Artificial Intelligence Organization},
editor = {Diego Calvanese},
pages = {2382--2390},
year = {2026},
month = {8},
note = {Main Track},
doi = {10.24963/ijcai.2026/265},
url = {https://doi.org/10.24963/ijcai.2026/265},
}
TY - CPAPER TI - Beyond Hard Writes and Rigid Preservation: Soft Recursive Least-Squares for Lifelong LLM Editing AU - Wang, Xinyu AU - Lyu, Sicheng AU - Gu, Yu AU - Huang, Jerry AU - Lu, Peng AU - Cui, Yufei AU - Chang, Xiao-Wen T2 - Proceedings of the Thirty-Fifth International Joint Conference on Artificial Intelligence, IJCAI-26 PB - International Joint Conferences on Artificial Intelligence Organization PY - 2026 SP - 2382 EP - 2390 DO - 10.24963/ijcai.2026/265 UR - https://doi.org/10.24963/ijcai.2026/265 ER -Copied
Machine-readable versions of this paper, for tools and AI agents: