CAMR:面向大语言模型持续学习的兼容性感知记忆回放

arXiv cs.CL 论文

摘要

论文提出 CAMR(兼容性感知记忆回放)框架,通过兼容性检查与学习到的记忆门控联合决定当前样本的监督与历史样本回放策略,在 Qwen3-8B-Base 上实现了持续事实更新与跨任务学习的更优稳定性和保持能力。

arXiv:2610.36734v1 Announce Type: new Abstract: Continual learning requires large language models to acquire new knowledge and capabilities while retaining what they have learned. Fine-tuning and replay support acquisition and retention, but deciding whether incoming examples need supervision and which historical examples to revisit remains a challenge. We propose Compatibility-Aware Memory Replay (CAMR), an adaptive framework that jointly controls current-example supervision and historical replay. CAMR combines compatibility checks with a learned memory gate to guide an online policy over three actions: learning incoming examples with general replay, jointly reinforcing compatible related examples, and skipping direct supervision of verified mastered duplicates. The policy learns from acquisition, retention, and training-cost feedback under a bounded per-arrival replay budget. We evaluate CAMR with Qwen3-8B-Base on continual factual updating and cross-task and cross-domain learning. On WikiBigEdit, CAMR consistently leads evaluated methods in Original Match from 3K to 100K facts, reaching 93.66% after just 3K facts and surpassing Full-history Replay (LoRA) after 100K facts. It also achieves the highest final scores on all four selected TRACE tasks and maintains or improves earlier-task performance relative to post-acquisition levels in a sequence spanning financial question answering, mathematical reasoning, code generation, and summarization.
查看原文
查看缓存全文

缓存时间: 2026/10/28 08:10

# Compatibility-Aware Memory Replay for Continual Learningin Large Language Models
Source: [https://arxiv.org/html/2610.36734](https://arxiv.org/html/2610.36734)
Tianhao LiFengxian JiYufeng WangShuxin ZhengXiaoqing Zhang††thanks:Corresponding author\.Affiliation:

Beijing Zhongguancun Academy Northeastern University Beihang University Renmin University of China

###### Abstract

Continual learning requires large language models to acquire new knowledge and capabilities while retaining what they have learned\. Fine\-tuning and replay support acquisition and retention, but deciding whether incoming examples need supervision and which historical examples to revisit remains a challenge\. We propose Compatibility\-Aware Memory Replay \(CAMR\), an adaptive framework that jointly controls current\-example supervision and historical replay\.CAMRcombines compatibility checks with a learned memory gate to guide an online policy over three actions: learning incoming examples with general replay, jointly reinforcing compatible related examples, and skipping direct supervision of verified mastered duplicates\. The policy learns from acquisition, retention, and training\-cost feedback under a bounded per\-arrival replay budget\. We evaluateCAMRwith Qwen3\-8B\-Base on continual factual updating and cross\-task and cross\-domain learning\. On WikiBigEdit,CAMRconsistently leads evaluated methods in Original Match from 3K to 100K facts, reaching 93\.66% after just 3K facts and surpassing Full\-history Replay \(LoRA\) after 100K facts\. It also achieves the highest final scores on all four selected TRACE tasks and maintains or improves earlier\-task performance relative to post\-acquisition levels in a sequence spanning financial question answering, mathematical reasoning, code generation, and summarization\.[Github\.](https://anonymous.4open.science/r/CAMR-FE92/)

## 1Introduction

Continual learning enables large language models \(LLMs\) to acquire new knowledge and capabilities while retaining prior knowledge, allowing them to adapt as knowledge and task requirements evolve\. However, successive updates can disrupt previously learned knowledge, giving rise to the stability–plasticity problem\([McCloskey and Cohen, 1989](https://arxiv.org/html/2610.36734#bib.bib4);[De Lange et al\., 2022](https://arxiv.org/html/2610.36734#bib.bib5)\)\.

![Refer to caption](https://arxiv.org/html/2610.36734v1/intro.png)Figure 1:Overview ofCAMRand its empirical evaluation\.\(a\)Schematic illustration ofCAMR\. It shows howAdd,Merge, andIgnorehandle incoming data during continual learning\.\(b\)Example comparison ofCAMRwith Random Replay in the multi\-task setting\.\(c\)Results for single\-task and cross\-task settings, together with Replay\-Count Scaling experiments\.One line of work mitigates interference by controlling parameter updates\. Parameter\-space methods constrain update directions or separate task\-specific subspaces\([Wang et al\., 2023a](https://arxiv.org/html/2610.36734#bib.bib29)\), while knowledge\-editing methods make targeted changes to factual associations, with subsequent advances improving stability over successive edits\([Meng et al\., 2022](https://arxiv.org/html/2610.36734#bib.bib8);[Meng et al\., 2023](https://arxiv.org/html/2610.36734#bib.bib9);[Fang et al\., 2025](https://arxiv.org/html/2610.36734#bib.bib11);[Liu et al\., 2026](https://arxiv.org/html/2610.36734#bib.bib37)\)\. These approaches improve learning under given supervision, but their update mechanisms do not directly determine which incoming and historical examples should be used for training\.

Experience replay complements these approaches by revisiting historical examples to support retention\([Rolnick et al\., 2019](https://arxiv.org/html/2610.36734#bib.bib6)\)\. Full\-history replay incurs growing training costs, while random replay does not account for individual learning needs\. Adaptive methods select historical examples based on relevance, interference risk, or transfer value, as illustrated by MIR\([Aljundi et al\., 2019](https://arxiv.org/html/2610.36734#bib.bib7)\)and TSR\([Meng et al\., 2026](https://arxiv.org/html/2610.36734#bib.bib35)\)\. Yet selecting historical examples addresses only part of supervision allocation\. Incoming examples may require further learning, benefit from joint training with compatible related history, or need no further direct supervision when they repeat material the model has already mastered\. Meanwhile, unrelated historical examples still need replay coverage to support retention\. These considerations motivate coordinating current\-example supervision with the composition of historical replay\.

We propose*Compatibility\-Aware Memory Replay*\(CAMR\), which jointly controls current\-example supervision and historical replay under a bounded per\-arrival replay budget \(Figure[1](https://arxiv.org/html/2610.36734#S1.F1)\)\. Compatibility checks identify eligible history, and a learned memory gate summarizes retrieved candidates\. The resulting memory representation and model mastery guide an online policy over three actions:Addtrains on the incoming example with general replay;Mergeadditionally prioritizes compatible related history within the replay budget; andIgnoreskips direct supervision of a verified mastered duplicate while allowing historical replay\. The policy adapts online through feedback on acquisition, retention, and training cost\. The language model undergoes full\-parameter supervised fine\-tuning, with retrieval and policy decisions confined to training\.

We evaluateCAMRwith Qwen3\-8B\-Base on WikiBigEdit, WikiFactDiff, a four\-task TRACE sequence, and a cross\-domain sequence\. On WikiBigEdit,CAMRconsistently achieves the highest Original Match among evaluated methods at checkpoints from 3K to 100K facts\. It reaches 93\.66% after just 3K facts, surpassing Full\-history Replay \(LoRA\) after 100K facts \(92\.07%\)\. On WikiFactDiff, it improves final\-stage generalization success over Random Replay \(Full FT\) by 1\.25 percentage points\. It also achieves the highest final scores on all four selected TRACE tasks and maintains or improves earlier\-task performance relative to post\-acquisition levels in the FinQA→\\rightarrowGSM8K→\\rightarrowAPPS→\\rightarrowSAMSum sequence\. Replay\-count scaling and ablations examine sensitivity to replay capacity and the contributions of key policy components\. Our contributions are threefold:

- •We introduce a compatibility\-aware framework that jointly determines current\-fact supervision and historical replay under a bounded per\-arrival replay budget\.
- •We develop an online policy that combines model mastery and gated historical information to adapt supervision decisions through learning feedback\.
- •We demonstrate the effectiveness ofCAMRin continual factual updating and cross\-task and cross\-domain continual learning, supported by replay\-count scaling and component ablations\.

## 2Related Work

#### Continual learning and parameter updates\.

Continual\-learning methods mitigate forgetting by constraining parameter updates, through regularization\([Kirkpatrick et al\., 2017](https://arxiv.org/html/2610.36734#bib.bib13)\), gradient projection\([Wang et al\., 2021](https://arxiv.org/html/2610.36734#bib.bib30)\), or orthogonal low\-rank subspaces in LLMs\([Wang et al\., 2023a](https://arxiv.org/html/2610.36734#bib.bib29)\)\. Knowledge\-editing methods rewrite specific factual associations\([Meng et al\., 2022](https://arxiv.org/html/2610.36734#bib.bib8);[Meng et al\., 2023](https://arxiv.org/html/2610.36734#bib.bib9)\), and later work improves stability over long edit sequences\([Fang et al\., 2025](https://arxiv.org/html/2610.36734#bib.bib11)\)\. These methods control how parameters change, whereasCAMRdecides which examples supervise each update\.

#### Experience replay and adaptive selection\.

Experience replay mixes stored examples with new data to support retention\([Rolnick et al\., 2019](https://arxiv.org/html/2610.36734#bib.bib6)\)\. Adaptive variants select history by interference risk\([Aljundi et al\., 2019](https://arxiv.org/html/2610.36734#bib.bib7)\)or transfer value\([Meng et al\., 2026](https://arxiv.org/html/2610.36734#bib.bib35)\)\. These methods choose which history to revisit, whileCAMRalso decides how the incoming example itself is supervised\.

#### Memory mechanisms and learned supervision policies\.

Reinforcement learning has been used to learn which data a model should train on, for example through teacher models that select examples\([Fan et al\., 2018](https://arxiv.org/html/2610.36734#bib.bib41)\)and bandit\-based curricula driven by learning progress\([Graves et al\., 2017](https://arxiv.org/html/2610.36734#bib.bib42)\)\. Our writer follows this direction with an actor–critic policy\([Mnih et al\., 2016](https://arxiv.org/html/2610.36734#bib.bib3)\)rewarded by acquisition, retention, and training cost\. Its state includes a gated summary of history, adapted from the conditional memory of Engram\([Cheng et al\., 2026](https://arxiv.org/html/2610.36734#bib.bib1)\)\.

![Refer to caption](https://arxiv.org/html/2610.36734v1/CAMR.png)Figure 2:Overview ofCAMR\. The writer retrieves and filters compatible history, then selectsAdd,Merge, orIgnoreto form the training batch; feedback from the updated language model trains the writer\.

## 3Problem Setting

We consider a stream of supervised examples𝒮=\(x1,…,xT\)\\mathcal\{S\}=\(x\_\{1\},\\ldots,x\_\{T\}\), wherext=\(qt,yt,mt\)x\_\{t\}=\(q\_\{t\},y\_\{t\},m\_\{t\}\)contains an input, a target output, and optional identity, task, or version metadata\. At arrivaltt, the learner may use the current and previously observed examples, but has no access to future arrivals or held\-out targets\. The objective is to acquire new knowledge and capabilities while retaining prior learning that remains valid\. For factual updates, supervision is trusted: an authoritative replacement makes the new answer valid and retires the old one\.

Letpθtp\_\{\\theta\_\{t\}\}andℳt\\mathcal\{M\}\_\{t\}denote the model and external memory before arrivaltt\. The writer jointly controls current\-example supervision and historical replay under a per\-arrival replay capKK, which counts historical replay examples and excludes the current example:Addtrains on the current example with general replay;Mergeadditionally prioritizes compatible related history within the same budget; andIgnoreskips direct supervision of a verified mastered duplicate while allowing history\-only replay\. All replay examples must satisfy the compatibility criteria\. Training updates the model topθt\+1p\_\{\\theta\_\{t\+1\}\}\. Regardless of the action, the observed example is stored or linked to an equivalent record inℳt\+1\\mathcal\{M\}\_\{t\+1\}\. Retired or conflicting records are archived but excluded from replay and retention evaluation\. Evaluation is closed\-book, with retrieval and writer decisions confined to training\.

## 4Method

Figure[2](https://arxiv.org/html/2610.36734#S2.F2)summarizesCAMR\. The writer combines model mastery with a gated representation of compatible history to selectAdd,Merge, orIgnore, jointly determining current\-example supervision and historical replay\. The resulting nonempty batches update the language model using answer\-only loss\. Pre\- and post\-event measurements provide acquisition, retention, and training\-cost feedback for writer updates at rollout boundaries\. The language model and writer use separate optimizers, while the sentence encoder remains frozen\.

### 4\.1Memory Retrieval and Compatibility

Memory stores observed examples with their embeddings, identity/version metadata, and replay statistics\. For each incoming examplextx\_\{t\}, we distinguish equivalent, conflicting, and retired historical records\. With structured metadata, a slot is defined by \(subject, relation, scope\), and fact identity additionally includes object and target\. Records with the same fact identity are equivalent; different values within the same slot are treated as conflicts\. Without structured metadata, input–output pairs that match after conservative Unicode and whitespace normalization are equivalent, while different targets for the same normalized input are conflicting\. A record is retired only by an explicit replacement reference or an authoritative update to a declared single\-valued slot\. Conflicting records are excluded from the current event’s replay but are not automatically retired\. We define eligible historyℋt\\mathcal\{H\}\_\{t\}by excluding retired, current\-equivalent, and conflicting records from memory\. Equivalent records remain available to determine whetherIgnoreis permitted\.

Before action selection, we uniformly sample a probe set𝒫t\\mathcal\{P\}\_\{t\}fromℋt\\mathcal\{H\}\_\{t\}without replacement, with\|𝒫t\|=min⁡\(P,⌊\|ℋt\|/2⌋\)\|\\mathcal\{P\}\_\{t\}\|=\\min\(P,\\lfloor\|\\mathcal\{H\}\_\{t\}\|/2\\rfloor\)\. These probes measure historical loss changes across the event and are excluded from its training batch\. The remaining records form the replay pool𝒰t=ℋt∖𝒫t\\mathcal\{U\}\_\{t\}=\\mathcal\{H\}\_\{t\}\\setminus\\mathcal\{P\}\_\{t\}\.

As shown in Figure[2](https://arxiv.org/html/2610.36734#S2.F2), retrieval combines semantic search with exact lookups\. A frozen MPNet encoder\([Song et al\., 2020](https://arxiv.org/html/2610.36734#bib.bib2)\)maps each input–output pair to a mean\-pooled, L2\-normalized embedding\. Letete\_\{t\}andeie\_\{i\}denote current and historical embeddings\. Random\-hyperplane locality\-sensitive hashing\([Charikar, 2002](https://arxiv.org/html/2610.36734#bib.bib14)\)retrieves semantically similar records, while exact indices retrieve records by fact identity and slot\. The results are reranked by cosine similarity to form a capped shortlist\. We then apply the compatibility rules above and exclude probe records\. The remaining records with similarity aboveτs\\tau\_\{s\}form the candidate set𝒞t⊆𝒰t\\mathcal\{C\}\_\{t\}\\subseteq\\mathcal\{U\}\_\{t\}\. These candidates feed the writer’s relevance gate, while𝒰t\\mathcal\{U\}\_\{t\}supplies general historical replay\. After action selection, the action\-specific replay rule selectsℛt⊆𝒰t\\mathcal\{R\}\_\{t\}\\subseteq\\mathcal\{U\}\_\{t\}subject to\|ℛt\|≤K\|\\mathcal\{R\}\_\{t\}\|\\leq K\. After the event, new examples are stored in memory, while equivalent arrivals are linked to existing records\.

### 4\.2Writer Policy and Replay

Given the compatible candidates𝒞t\\mathcal\{C\}\_\{t\}, the writer summarizes related history, selects a supervision action, and constructs the training batch \(Figure[2](https://arxiv.org/html/2610.36734#S2.F2)\)\.

We adapt the sigmoid query–key gating mechanism of Engram\([Cheng et al\., 2026](https://arxiv.org/html/2610.36734#bib.bib1)\)to current and historical example embeddings\. The frozen MPNet embeddings are projected into a shareddhd\_\{h\}\-dimensional space and normalized using RMSNorm\([Zhang and Sennrich, 2019](https://arxiv.org/html/2610.36734#bib.bib15)\):

ut=RMSNorm⁡\(WQ​et\),ki=RMSNorm⁡\(WK​ei\)\.\\displaystyle u\_\{t\}=\\operatorname\{RMSNorm\}\(W\_\{Q\}e\_\{t\}\),\\quad k\_\{i\}=\\operatorname\{RMSNorm\}\(W\_\{K\}e\_\{i\}\)\.

\(1\)The gate assigns each candidate a relevance weight:

gt​i=σ⁡\(ut⊤​kidh\)\.g\_\{ti\}=\\sigma\\\!\\left\(\\frac\{u\_\{t\}^\{\\top\}k\_\{i\}\}\{\\sqrt\{d\_\{h\}\}\}\\right\)\.\(2\)We aggregate the gated candidate representations and their mean gate value as

vt=1\|𝒞t\|​∑i∈𝒞tgt​i​ki,g¯t=1\|𝒞t\|​∑i∈𝒞tgt​i\.v\_\{t\}=\\frac\{1\}\{\|\\mathcal\{C\}\_\{t\}\|\}\\sum\_\{i\\in\\mathcal\{C\}\_\{t\}\}g\_\{ti\}k\_\{i\},\\qquad\\bar\{g\}\_\{t\}=\\frac\{1\}\{\|\\mathcal\{C\}\_\{t\}\|\}\\sum\_\{i\\in\\mathcal\{C\}\_\{t\}\}g\_\{ti\}\.\(3\)Both are set to zero when𝒞t\\mathcal\{C\}\_\{t\}is empty\. The gate operates in the writer, outside the language model\.

The actor receives the concatenated statezt=\[ft;ut;vt;g¯t\]z\_\{t\}=\[f\_\{t\};u\_\{t\};v\_\{t\};\\bar\{g\}\_\{t\}\]\. The eight features inftf\_\{t\}encode top similarity, equivalence, current NLL, probe NLL, ambiguity, candidate count, stream progress, and update frequency\. Two actor heads produce masked probabilitiesρtI=btI​σ​\(aI​\(zt\)\)\\rho\_\{t\}^\{I\}=b\_\{t\}^\{I\}\\sigma\(a\_\{I\}\(z\_\{t\}\)\)andρtM=btM​σ​\(aM​\(zt\)\)\\rho\_\{t\}^\{M\}=b\_\{t\}^\{M\}\\sigma\(a\_\{M\}\(z\_\{t\}\)\), wherebtI,btM∈\{0,1\}b\_\{t\}^\{I\},b\_\{t\}^\{M\}\\in\\\{0,1\\\}indicate action eligibility\. The action distribution is

πϕ\(Ignore∣zt\)=ρtI,πϕ\(Merge∣zt\)=\(1−ρtI\)ρtM,πϕ​\(Add∣zt\)=\(1−ρtI\)​\(1−ρtM\)\.\\displaystyle\\begin\{gathered\}\\pi\_\{\\phi\}\(\\textsc\{Ignore\}\{\}\\mid z\_\{t\}\)=\\rho\_\{t\}^\{I\},\\quad\\pi\_\{\\phi\}\(\\textsc\{Merge\}\{\}\\mid z\_\{t\}\)=\(1\-\\rho\_\{t\}^\{I\}\)\\rho\_\{t\}^\{M\},\\\\ \\pi\_\{\\phi\}\(\\textsc\{Add\}\{\}\\mid z\_\{t\}\)=\(1\-\\rho\_\{t\}^\{I\}\)\(1\-\\rho\_\{t\}^\{M\}\)\.\\end\{gathered\}

\(4\)Mergeis eligible only when𝒞t\\mathcal\{C\}\_\{t\}is nonempty\.Ignorerequires an equivalent active record, current NLL≤τm\\leq\\tau\_\{m\}, no retirement triggered by the current arrival, and a fresh greedy answer matching the full target after conservative Unicode and whitespace normalization\. If neither action is eligible, the policy selectsAdd\. The critic estimates the state value for online learning, as described in Section[4\.3](https://arxiv.org/html/2610.36734#S4.SS3)\.

The sampled action determines current\-example supervision and the composition of historical replay\.AddandIgnoresample uniformly from the replay pool𝒰t\\mathcal\{U\}\_\{t\}\.Mergecombines general history with related candidates: it reserves part of the replay budget for uniform sampling and allocates the remainder to compatible candidates from𝒞t\\mathcal\{C\}\_\{t\}\. Unused candidate slots are filled by uniform sampling from the remaining replay pool\. All replay sampling is without replacement and selects at mostKKrecords\. The training batch contains the current example andℛt\\mathcal\{R\}\_\{t\}underAddorMerge, and onlyℛt\\mathcal\{R\}\_\{t\}underIgnore\. Each replayed example remains a separate input–output pair\.

Table 1:Long\-stream match accuracy \(%\) and checkpoint change\. All checkpoints belong to the same 100K continual stream\. Parentheses at 100K report the change from 3K in percentage points\. The light peach shadingmarks the highest value in each column, these values are also bold\. The additionalCAMRLoRA run usesK=8K=8and a learning rate of2×10−42\\times 10^\{\-4\}through 50K updates and10−410^\{\-4\}thereafter, continuing the same model and optimizer\.
### 4\.3Learning Objectives and Online Updates

We optimize an answer\-prediction objective for the language model and an actor–critic objective for the writer\. Letℓθ​\(x\)\\ell\_\{\\theta\}\(x\)denote the average answer\-token NLL over a fact’s original question and optional same\-answer training view, excluding evaluation reformulations\. The loss includes end\-of\-sequence tokens but excludes prompt tokens\. When current\-fact supervision is active and replay is nonempty, the language\-model objective is

ℒtLM=α​ℓθ​\(xt\)\+1−α\|ℛt\|​∑x∈ℛtℓθ​\(x\),\\mathcal\{L\}^\{\\mathrm\{LM\}\}\_\{t\}=\\alpha\\ell\_\{\\theta\}\(x\_\{t\}\)\+\\frac\{1\-\\alpha\}\{\|\\mathcal\{R\}\_\{t\}\|\}\\sum\_\{x\\in\\mathcal\{R\}\_\{t\}\}\\ell\_\{\\theta\}\(x\),\(5\)whereα\\alphabalances current and historical supervision\. Current\-only updates assign unit weight to the current loss; history\-only updates average replay losses\. An emptyIgnorebatch triggers no model update\. We use AdamW\([Loshchilov and Hutter, 2019](https://arxiv.org/html/2610.36734#bib.bib16)\), retaining optimizer state across events\.

The writer receives feedback from NLL measurements before and after each event on the original current question and the same probes𝒫t\\mathcal\{P\}\_\{t\}\. LetΔtcur\\Delta\_\{t\}^\{\\mathrm\{cur\}\}andΔthist\\Delta\_\{t\}^\{\\mathrm\{hist\}\}denote current and mean historical loss reductions, with zero historical gain for empty probes\. The reward balances acquisition, retention, and training cost:

rt=Δtcur\+λh​Δthist−λc​CtCref,r\_\{t\}=\\Delta\_\{t\}^\{\\mathrm\{cur\}\}\+\\lambda\_\{h\}\\Delta\_\{t\}^\{\\mathrm\{hist\}\}\-\\lambda\_\{c\}\\frac\{C\_\{t\}\}\{C\_\{\\mathrm\{ref\}\}\},\(6\)whereλh\\lambda\_\{h\}andλc\\lambda\_\{c\}weight retention and cost\. HereCtC\_\{t\}counts logical nonpadding training tokens, including views and repeated steps, andCrefC\_\{\\mathrm\{ref\}\}is a dataset\-specific cost\-normalization hyperparameter\. Probe and mastery\-check forward passes are excluded fromCtC\_\{t\}\.

Writer parameters remain fixed within each configured rolloutℬ\\mathcal\{B\}and are updated at its end\. The critic predictsVt=Vψ​\(sg⁡\(zt\)\)V\_\{t\}=V\_\{\\psi\}\(\\operatorname\{sg\}\(z\_\{t\}\)\), wheresg\\operatorname\{sg\}stops gradients\. Discounted returns and advantages are

Gt=rt\+γGt\+1,A¯t=Gt−sg\(Vt\)\.\\begin\{gathered\}G\_\{t\}=r\_\{t\}\+\\gamma G\_\{t\+1\},\\qquad\\bar\{A\}\_\{t\}=G\_\{t\}\-\\operatorname\{sg\}\(V\_\{t\}\)\.\\end\{gathered\}\(7\)At the rollout boundary, the recursion uses the next observed state’s detached value, or zero at stream termination\. All returns are fixed targets\.

The actor adjusts action probabilities using advantages, while the critic fits the returns\. For choice events𝒟⊆ℬ\\mathcal\{D\}\\subseteq\\mathcal\{B\}and policy entropyHtH\_\{t\}, we minimize

ℒπ\\displaystyle\\mathcal\{L\}\_\{\\pi\}=−1\|𝒟\|∑t∈𝒟\[Atlogπϕ\(at∣zt\)\+βHt\],\\displaystyle=\-\\frac\{1\}\{\|\\mathcal\{D\}\|\}\\sum\_\{t\\in\\mathcal\{D\}\}\\left\[A\_\{t\}\\log\\pi\_\{\\phi\}\(a\_\{t\}\\mid z\_\{t\}\)\+\\beta H\_\{t\}\\right\],\(8\)ℒV\\displaystyle\\mathcal\{L\}\_\{V\}=1\|ℬ\|∑t∈ℬ\(Vt−Gt\)2,ℒW=ℒπ\+cvℒV\.\\displaystyle=\\frac\{1\}\{\|\\mathcal\{B\}\|\}\\sum\_\{t\\in\\mathcal\{B\}\}\(V\_\{t\}\-G\_\{t\}\)^\{2\},\\;\\mathcal\{L\}\_\{W\}=\\mathcal\{L\}\_\{\\pi\}\+c\_\{v\}\\mathcal\{L\}\_\{V\}\.Hereγ\\gammacontrols discounting,β\\betaweights entropy regularization, andcvc\_\{v\}weights the critic loss\. We setℒπ=0\\mathcal\{L\}\_\{\\pi\}=0when𝒟\\mathcal\{D\}is empty\. Forced\-action events train only the critic; the relevance gate learns only through the actor\. The complete set of hyperparameters introduced in theCAMRformulation is reported in Appendix[D](https://arxiv.org/html/2610.36734#A4)\.

## 5Experiments and Discussion

### 5\.1Experimental Setup

We evaluate Qwen3\-8B\-Base in the closed\-book setting, with Qwen3\-14B\-Base as an unmodified WikiBigEdit reference\([Yang et al\., 2025](https://arxiv.org/html/2610.36734#bib.bib31)\), on WikiBigEdit\([Thede et al\., 2025](https://arxiv.org/html/2610.36734#bib.bib32)\), WikiFactDiff\([Ammar Khodja et al\., 2024](https://arxiv.org/html/2610.36734#bib.bib33)\), TRACE \(C\-STANCE, MeetingBank, Py150, and text\-only ScienceQA\)\([Wang et al\., 2023b](https://arxiv.org/html/2610.36734#bib.bib17);[Zhao et al\., 2023](https://arxiv.org/html/2610.36734#bib.bib18);[Hu et al\., 2023](https://arxiv.org/html/2610.36734#bib.bib19);[Raychev et al\., 2016](https://arxiv.org/html/2610.36734#bib.bib20);[Lu et al\., 2022](https://arxiv.org/html/2610.36734#bib.bib21)\), and FinQA→\\rightarrowGSM8K→\\rightarrowAPPS introductory→\\rightarrowSAMSum\([Chen et al\., 2021](https://arxiv.org/html/2610.36734#bib.bib22);[Cobbe et al\., 2021](https://arxiv.org/html/2610.36734#bib.bib23);[Hendrycks et al\., 2021](https://arxiv.org/html/2610.36734#bib.bib24);[Gliwa et al\., 2019](https://arxiv.org/html/2610.36734#bib.bib25)\); ablations use FOMC, NumGLUE\-cm/ds, and Py150\([Shah et al\., 2023](https://arxiv.org/html/2610.36734#bib.bib26);[Mishra et al\., 2022](https://arxiv.org/html/2610.36734#bib.bib27)\)\. Baselines span unmodified models; fine\-tuning and parameter\-space methods\([Hu et al\., 2022](https://arxiv.org/html/2610.36734#bib.bib28);[Wang et al\., 2023a](https://arxiv.org/html/2610.36734#bib.bib29);[Wang et al\., 2021](https://arxiv.org/html/2610.36734#bib.bib30)\); knowledge\-editing methods\([Yang et al\., 2026](https://arxiv.org/html/2610.36734#bib.bib36);[Meng et al\., 2022](https://arxiv.org/html/2610.36734#bib.bib8);[Meng et al\., 2023](https://arxiv.org/html/2610.36734#bib.bib9);[Gupta et al\., 2024](https://arxiv.org/html/2610.36734#bib.bib12);[Fang et al\., 2025](https://arxiv.org/html/2610.36734#bib.bib11);[Wang et al\., 2024](https://arxiv.org/html/2610.36734#bib.bib10);[Liu et al\., 2026](https://arxiv.org/html/2610.36734#bib.bib37);[Ikram et al\., 2026](https://arxiv.org/html/2610.36734#bib.bib38);[Ma et al\., 2026](https://arxiv.org/html/2610.36734#bib.bib39);[Gu et al\., 2026](https://arxiv.org/html/2610.36734#bib.bib40)\); and replay\-based methods\([Rolnick et al\., 2019](https://arxiv.org/html/2610.36734#bib.bib6);[Aljundi et al\., 2019](https://arxiv.org/html/2610.36734#bib.bib7);[Meng et al\., 2026](https://arxiv.org/html/2610.36734#bib.bib35);[Li et al\., 2025](https://arxiv.org/html/2610.36734#bib.bib34)\)\. We report Match/Exact, ES/GS, ED/GD, accuracy, ROUGE\-L, edit similarity, and pass@1 as appropriate\.

### 5\.2Single\-Task Data Scaling

We process 100,000 WikiBigEdit facts\([Thede et al\., 2025](https://arxiv.org/html/2610.36734#bib.bib32)\)in their original eight\-interval order\.CAMRachieves the highest Original Match at 3K, 10K, 50K, and 100K among evaluated methods, with little fluctuation \(Table[1](https://arxiv.org/html/2610.36734#S4.T1)\)\. At 150K, it improves and surpasses Full\-history Replay \(LoRA\) on all four Match metrics, while the baseline’s Rephrase, Persona, and Locality scores decline \(Appendix[A](https://arxiv.org/html/2610.36734#A1)\)\. This suggests better generalization and less interference as the stream grows\.

![Refer to caption](https://arxiv.org/html/2610.36734v1/wikifactdiff.png)Figure 3:WikiFactDiff replacement results over the 36K\-update stream, evaluated on the current stage every 3K updates\. ES/GS report success rates, while ED/GD report new\-minus\-obsolete answer\-probability gaps\.On WikiFactDiff\([Ammar Khodja et al\., 2024](https://arxiv.org/html/2610.36734#bib.bib33)\), we process twelve stages of 2,700 new facts and 300 replacements\.CAMRmaintains current\-stage ES near 100% and consistently exceeds Random Replay \(Full FT\) on GS \(Figure[3](https://arxiv.org/html/2610.36734#S5.F3)\)\. At 36K, both reach 99\.33% ES, whileCAMRachieves 98\.08% GS, a 1\.25\-point improvement\. Positive mean ED and GD at every reported replacement checkpoint indicate higher average probability for updated answers than obsolete ones\.

Table 2:Continual learning performance \(%\) and final checkpoint change on the four\-task TRACE stream\. T4 parentheses report changes from the stage when each task was first learned\. The light peach shadingmarks the highest value in each column, these values are also bold\.
### 5\.3Cross\-Task and Cross\-Domain Performance

On the TRACE sequence C\-STANCE→\\rightarrowMeetingBank→\\rightarrowPy150→\\rightarrowtext\-only ScienceQA,CAMRachieves the highest final scores among evaluated methods on all four tasks: 56\.75%, 69\.84%, 67\.92%, and 95\.40%, respectively \(Table[2](https://arxiv.org/html/2610.36734#S5.T2)\)\. The three earlier tasks lose only 0\.75, 0\.55, and 0\.42 points relative to their post\-acquisition scores, indicating limited forgetting across successive tasks\.

Table 3:Continual learning performance \(%\) and final checkpoint change on the four\-task cross\-domain stream\. T4 parentheses report changes from the stage when each task was first learned\. The light peach shadingmarks the highest value in each column, these values are also bold\.On FinQA→\\rightarrowGSM8K→\\rightarrowAPPS introductory→\\rightarrowSAMSum, all three earlier tasks retain or improve upon their post\-acquisition scores \(Table[3](https://arxiv.org/html/2610.36734#S5.T3)\)\. Final scores reach 76\.11%, 81\.58%, 30\.50%, and 45\.10%, exceeding Random Replay \(Full FT\) by 2\.70, 5\.46, 9\.10, and 3\.43 points, respectively\.CAMRleads on FinQA and SAMSum, while O\-LoRA and Adam\-NSCL achieve the highest GSM8K and APPS scores, respectively\.

### 5\.4Sensitivity to Replay Count

Table 4:Replay strategies under different per\-arrival replay capsKK\. All methods use full\-parameter fine\-tuning\. Best scores within eachKKgroup are bold\.Table[4](https://arxiv.org/html/2610.36734#S5.T4)evaluates different replay counts\.CAMRleads Original and Rephrase Match at every tested budget, showing that its advantage is not tied to a singleKK\. IncreasingKKfrom 4 to 16 improves these scores from 93\.98%/86\.56% to 98\.10%/90\.42%\. AtK=8K=8,CAMRachieves its highest Persona and Locality scores \(72\.62%/19\.86%\) and leads all four metrics\. We useK=4K=4as the default to evaluate the method under a limited replay budget\.

### 5\.5Writer Component Ablations

Table[5](https://arxiv.org/html/2610.36734#S5.T5)compares the complete writer with five ablations\. Specifically, w/o Action Selection usesAdd\-only routing; w/o Online Feedback freezes the initialized writer; w/o Memory Gate weights all candidates equally; w/oIgnoremasks that action; and w/o Replay onIgnoreskips historical replay for that action\. The complete writer achieves the best performance on all four tasks, tying w/o Online Feedback on NumGLUE\-cm\. Removing action selection orIgnoredegrades performance across all tasks, supporting the benefit of adapting current\-example supervision and historical replay\. NumGLUE\-ds is particularly sensitive to memory gating and replay underIgnore, with substantial degradation when either component is removed\. Online feedback improves three tasks, with the largest gain on NumGLUE\-ds\.

Table 5:Writer ablation results under full\-parameter fine\-tuning\. The light peach shadingmarks the highest score in each column, including ties\.
### 5\.6Replay Sample Selection Analysis

CAMRbalances focused replay with historical coverage under a fixed budget\. At 100K, its replay share for the high\-frequency core\-3K set is 2\.42×\\timesthat of Random Replay \(Table[10](https://arxiv.org/html/2610.36734#A6.T10)\)\. Its replay concentrates on regions similar to Semantic Replay but covers more arrived facts: 90\.4% versus 83\.9% \(Appendix[E](https://arxiv.org/html/2610.36734#A5)\)\. This pattern is consistent with its hybrid sampling:Mergeprioritizes compatible related history while reserving uniform slots, andAddsamples uniformly\.CAMRalso outperforms Semantic Replay on Original and Rephrase Match at every testedKK\(Table[4](https://arxiv.org/html/2610.36734#S5.T4)\)\.

## 6Conclusion

We introducedCAMR, which jointly controls current\-example supervision and bounded historical replay through compatibility\-aware memory and an online writer policy\. Experiments on factual updating, cross\-task learning, and cross\-domain learning demonstrate strong acquisition and retention across replay budgets\. Our results highlight the value of jointly adapting current supervision and historical replay in continual learning\.

## Limitations

Due to computational constraints, our experiments focus on Qwen3\-8B\-Base; sinceCAMRis not tied to a specific architecture or scale, we plan to extend it to larger models and other model families\. Some baselines use LoRA rather than full\-parameter fine\-tuning to limit cost, and a full\-parameter comparison of all baselines is left for future work\.Ignoreis not triggered on WikiBigEdit, which contains few repeated facts, but it accounted for 19\.14% of decisions under the gate defined in Section[4\.2](https://arxiv.org/html/2610.36734#S4.SS2)on the APPS stream with repeated examples \(Appendix[C](https://arxiv.org/html/2610.36734#A3)\)\. RemovingIgnorelowers performance on all four ablation tasks, showing its benefit on redundant data\. We will further evaluate it on streams with naturally occurring repetitions\.

## References

- Aljundiet al\.\(2019\)R\. Aljundi, E\. Belilovsky, T\. Tuytelaars, L\. Charlin, M\. Caccia, M\. Lin, and L\. Page\-CacciaOnline continual learning with maximal interfered retrieval\.InAdvances in Neural Information Processing Systems,Vol\.32\.External Links:[Link](https://proceedings.neurips.cc/paper_files/paper/2019/hash/15825aee15eb335cc13f9b559f166ee8-Abstract.html)Cited by:[§1](https://arxiv.org/html/2610.36734#S1.p3.1),[§2](https://arxiv.org/html/2610.36734#S2.SS0.SSS0.Px2.p1.1),[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1)\.
- Ammar Khodjaet al\.\(2024\)H\. Ammar Khodja, F\. Béchet, Q\. Brabant, A\. Nasr, and G\. LecorvéWikiFactDiff: a large, realistic, and temporally adaptable dataset for atomic factual knowledge update in causal language models\.InProceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation \(LREC\-COLING 2024\),pp\. 17614–17624\.External Links:[Document](https://dx.doi.org/10.63317/5kmnn4c4u35s),[Link](https://aclanthology.org/2024.lrec-main.1532/)Cited by:[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1),[§5\.2](https://arxiv.org/html/2610.36734#S5.SS2.p2.1)\.
- Charikar \(2002\)M\. S\. CharikarSimilarity estimation techniques from rounding algorithms\.InProceedings of the 34th Annual ACM Symposium on Theory of Computing,pp\. 380–388\.External Links:[Document](https://dx.doi.org/10.1145/509907.509965),[Link](https://doi.org/10.1145/509907.509965)Cited by:[§4\.1](https://arxiv.org/html/2610.36734#S4.SS1.p3.1)\.
- Chenet al\.\(2021\)Z\. Chen, W\. Chen, C\. Smiley, S\. Shah, I\. Borova, D\. Langdon, R\. Moussa, M\. Beane, T\. Huang, B\. Routledge, and W\. Y\. WangFinQA: a dataset of numerical reasoning over financial data\.InProceedings of the 2021 Conference on Empirical Methods in Natural Language Processing,pp\. 3697–3711\.External Links:[Document](https://dx.doi.org/10.18653/v1/2021.emnlp-main.300),[Link](https://aclanthology.org/2021.emnlp-main.300/)Cited by:[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1)\.
- Chenget al\.\(2026\)X\. Cheng, R\. Tian, W\. Zeng, D\. Dai, Q\. Chen, B\. Wang, Z\. Xie, K\. Huang, X\. Yu, C\. Deng, S\. Zhou, C\. Zhao, Z\. Hao, Y\. Li, H\. Zhang, Z\. Zhang, Y\. Wei, M\.Y\. Xu, H\. Zhang, D\. Zhao, and W\. LiangConditional memory via scalable lookup: a new axis of sparsity for large language models\.arXiv preprint arXiv:2601\.07372\.External Links:[Document](https://dx.doi.org/10.48550/arXiv.2601.07372),2601\.07372,[Link](https://arxiv.org/abs/2601.07372)Cited by:[§2](https://arxiv.org/html/2610.36734#S2.SS0.SSS0.Px3.p1.1),[§4\.2](https://arxiv.org/html/2610.36734#S4.SS2.p2.1)\.
- Cobbeet al\.\(2021\)K\. Cobbe, V\. Kosaraju, M\. Bavarian, M\. Chen, H\. Jun, L\. Kaiser, M\. Plappert, J\. Tworek, J\. Hilton, R\. Nakano, C\. Hesse, and J\. SchulmanTraining verifiers to solve math word problems\.InarXiv preprint arXiv:2110\.14168,External Links:2110\.14168,[Link](https://arxiv.org/abs/2110.14168)Cited by:[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1)\.
- De Langeet al\.\(2022\)M\. De Lange, R\. Aljundi, M\. Masana, S\. Parisot, X\. Jia, A\. Leonardis, G\. Slabaugh, and T\. TuytelaarsA continual learning survey: defying forgetting in classification tasks\.IEEE Transactions on Pattern Analysis and Machine Intelligence44\(7\),pp\. 3366–3385\.External Links:[Document](https://dx.doi.org/10.1109/TPAMI.2021.3057446),[Link](https://doi.org/10.1109/TPAMI.2021.3057446)Cited by:[§1](https://arxiv.org/html/2610.36734#S1.p1.1)\.
- Fanet al\.\(2018\)Y\. Fan, F\. Tian, T\. Qin, X\. Li, and T\. LiuLearning to teach\.InInternational Conference on Learning Representations,Cited by:[§2](https://arxiv.org/html/2610.36734#S2.SS0.SSS0.Px3.p1.1)\.
- Fanget al\.\(2025\)J\. Fang, H\. Jiang, K\. Wang, Y\. Ma, S\. Jie, X\. Wang, X\. He, and T\. ChuaAlphaEdit: null\-space constrained knowledge editing for language models\.InInternational Conference on Learning Representations,Note:Oral presentationExternal Links:2410\.02355,[Document](https://dx.doi.org/10.48550/arXiv.2410.02355),[Link](https://arxiv.org/abs/2410.02355)Cited by:[§1](https://arxiv.org/html/2610.36734#S1.p2.1),[§2](https://arxiv.org/html/2610.36734#S2.SS0.SSS0.Px1.p1.1),[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1)\.
- Gliwaet al\.\(2019\)B\. Gliwa, I\. Mochol, M\. Biesek, and A\. WawerSAMSum corpus: a human\-annotated dialogue dataset for abstractive summarization\.InProceedings of the 2nd Workshop on New Frontiers in Summarization,pp\. 70–79\.External Links:[Document](https://dx.doi.org/10.18653/v1/D19-5409),[Link](https://aclanthology.org/D19-5409/)Cited by:[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1)\.
- Graveset al\.\(2017\)A\. Graves, M\. G\. Bellemare, J\. Menick, R\. Munos, and K\. KavukcuogluAutomated curriculum learning for neural networks\.InProceedings of the 34th International Conference on Machine Learning,Proceedings of Machine Learning Research, Vol\.70,pp\. 1311–1320\.External Links:[Link](https://proceedings.mlr.press/v70/graves17a.html)Cited by:[§2](https://arxiv.org/html/2610.36734#S2.SS0.SSS0.Px3.p1.1)\.
- Guet al\.\(2026\)X\. Gu, Z\. Huang, J\. Gu, and K\. ZhangUltraEdit: training\-, subject\-, and memory\-free lifelong editing in language models\.Note:TMLR 2026; arXiv:2505\.14679External Links:2505\.14679,[Document](https://dx.doi.org/10.48550/arXiv.2505.14679),[Link](https://arxiv.org/abs/2505.14679)Cited by:[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1)\.
- Guptaet al\.\(2024\)A\. Gupta, S\. Baskaran, and G\. AnumanchipalliRebuilding ROME: resolving model collapse during sequential model editing\.InProceedings of the 2024 Conference on Empirical Methods in Natural Language Processing,pp\. 21738–21744\.External Links:[Document](https://dx.doi.org/10.18653/v1/2024.emnlp-main.1210),[Link](https://aclanthology.org/2024.emnlp-main.1210/)Cited by:[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1)\.
- Hendryckset al\.\(2021\)D\. Hendrycks, S\. Basart, S\. Kadavath, M\. Mazeika, A\. Arora, E\. Guo, C\. Burns, S\. Puranik, H\. He, D\. Song, and J\. SteinhardtMeasuring coding challenge competence with apps\.InarXiv preprint arXiv:2105\.09938,External Links:2105\.09938,[Link](https://arxiv.org/abs/2105.09938)Cited by:[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1)\.
- Huet al\.\(2022\)E\. J\. Hu, Y\. Shen, P\. Wallis, Z\. Allen\-Zhu, Y\. Li, S\. Wang, L\. Wang, and W\. ChenLoRA: low\-rank adaptation of large language models\.InInternational Conference on Learning Representations,External Links:[Link](https://openreview.net/forum?id=nZeVKeeFYf9),2106\.09685Cited by:[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1)\.
- Huet al\.\(2023\)Y\. Hu, T\. Ganter, H\. Deilamsalehy, F\. Dernoncourt, H\. Foroosh, and F\. LiuMeetingBank: a benchmark dataset for meeting summarization\.InProceedings of the 61st Annual Meeting of the Association for Computational Linguistics \(Volume 1: Long Papers\),pp\. 16409–16423\.External Links:[Document](https://dx.doi.org/10.18653/v1/2023.acl-long.906),[Link](https://aclanthology.org/2023.acl-long.906/)Cited by:[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1)\.
- Ikramet al\.\(2026\)Z\. Ikram, A\. Firouzkouhi, S\. Tu, M\. Soltanolkotabi, and P\. RashidinejadCrispEdit: low\-curvature projections for scalable non\-destructive LLM editing\.Note:ICML 2026; arXiv:2602\.15823External Links:2602\.15823,[Document](https://dx.doi.org/10.48550/arXiv.2602.15823),[Link](https://arxiv.org/abs/2602.15823)Cited by:[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1)\.
- Kirkpatricket al\.\(2017\)J\. Kirkpatrick, R\. Pascanu, N\. Rabinowitz, J\. Veness, G\. Desjardins, A\. A\. Rusu, K\. Milan, J\. Quan, T\. Ramalho, A\. Grabska\-Barwinska, D\. Hassabis, C\. Clopath, D\. Kumaran, and R\. HadsellOvercoming catastrophic forgetting in neural networks\.Proceedings of the National Academy of Sciences114\(13\),pp\. 3521–3526\.External Links:[Document](https://dx.doi.org/10.1073/pnas.1611835114),[Link](https://doi.org/10.1073/pnas.1611835114)Cited by:[§2](https://arxiv.org/html/2610.36734#S2.SS0.SSS0.Px1.p1.1)\.
- Liet al\.\(2025\)J\. Li, M\. Armandpour, S\. I\. Mirzadeh, S\. Mehta, V\. Shankar, R\. Vemulapalli, S\. Bengio, O\. Tuzel, M\. Farajtabar, H\. Pouransari, and F\. FaghriTiC\-LM: a web\-scale benchmark for time\-continual LLM pretraining\.Association for Computational Linguistics\.External Links:[Document](https://dx.doi.org/10.18653/v1/2025.acl-long.1551),[Link](https://aclanthology.org/2025.acl-long.1551/)Cited by:[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1)\.
- Liuet al\.\(2026\)M\. Liu, Z\. Zhu, Z\. Miao, and K\. FujisawaNorm anchors make model edits last\.Note:arXiv:2602\.02543External Links:2602\.02543,[Document](https://dx.doi.org/10.48550/arXiv.2602.02543),[Link](https://arxiv.org/abs/2602.02543)Cited by:[§1](https://arxiv.org/html/2610.36734#S1.p2.1),[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1)\.
- Loshchilov and Hutter \(2019\)I\. Loshchilov and F\. HutterDecoupled weight decay regularization\.InInternational Conference on Learning Representations,Note:arXiv:1711\.05101External Links:[Link](https://openreview.net/forum?id=Bkg6RiCqY7)Cited by:[§4\.3](https://arxiv.org/html/2610.36734#S4.SS3.p1.2)\.
- Luet al\.\(2022\)P\. Lu, S\. Mishra, T\. Xia, L\. Qiu, K\. Chang, S\. Zhu, O\. Tafjord, P\. Clark, and A\. KalyanLearn to explain: multimodal reasoning via thought chains for science question answering\.InAdvances in Neural Information Processing Systems,Vol\.35,pp\. 2507–2521\.External Links:[Link](https://doi.org/10.52202/068431-0182)Cited by:[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1)\.
- Maet al\.\(2026\)X\. Ma, W\. Chen, Q\. Liu, D\. Xu, Z\. Zheng, T\. Xu, and E\. ChenMore edits, more stable: understanding the lifelong normalization in sequential model editing\.Note:ICML 2026; arXiv:2605\.11836External Links:2605\.11836,[Document](https://dx.doi.org/10.48550/arXiv.2605.11836),[Link](https://arxiv.org/abs/2605.11836)Cited by:[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1)\.
- McCloskey and Cohen \(1989\)M\. McCloskey and N\. J\. CohenCatastrophic interference in connectionist networks: the sequential learning problem\.InPsychology of Learning and Motivation,Vol\.24,pp\. 109–165\.External Links:[Document](https://dx.doi.org/10.1016/S0079-7421%2808%2960536-8),[Link](https://doi.org/10.1016/S0079-7421(08)60536-8)Cited by:[§1](https://arxiv.org/html/2610.36734#S1.p1.1)\.
- Menget al\.\(2022\)K\. Meng, D\. Bau, A\. Andonian, and Y\. BelinkovLocating and editing factual associations in GPT\.InAdvances in Neural Information Processing Systems,Vol\.35,pp\. 17359–17372\.External Links:[Document](https://dx.doi.org/10.52202/068431-1262),[Link](https://proceedings.neurips.cc/paper_files/paper/2022/hash/6f1d43d5a82a37e89b0665b33bf3a182-Abstract-Conference.html)Cited by:[§1](https://arxiv.org/html/2610.36734#S1.p2.1),[§2](https://arxiv.org/html/2610.36734#S2.SS0.SSS0.Px1.p1.1),[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1)\.
- Menget al\.\(2023\)K\. Meng, A\. S\. Sharma, A\. Andonian, Y\. Belinkov, and D\. BauMass\-editing memory in a transformer\.InInternational Conference on Learning Representations,External Links:[Link](https://openreview.net/forum?id=MkbcKIqIkl2),2210\.07229Cited by:[§1](https://arxiv.org/html/2610.36734#S1.p2.1),[§2](https://arxiv.org/html/2610.36734#S2.SS0.SSS0.Px1.p1.1),[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1)\.
- Menget al\.\(2026\)Y\. Meng, Z\. Liu, Z\. Zhao, and Y\. ChenRethinking transfer in continual learning: a replay\-based realisation\.Note:arXiv:2607\.15587External Links:2607\.15587,[Link](https://arxiv.org/abs/2607.15587)Cited by:[§1](https://arxiv.org/html/2610.36734#S1.p3.1),[§2](https://arxiv.org/html/2610.36734#S2.SS0.SSS0.Px2.p1.1),[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1)\.
- Mishraet al\.\(2022\)S\. Mishra, A\. Mitra, N\. Varshney, B\. Sachdeva, P\. Clark, C\. Baral, and A\. KalyanNumGLUE: a suite of fundamental yet challenging mathematical reasoning tasks\.InProceedings of the 60th Annual Meeting of the Association for Computational Linguistics \(Volume 1: Long Papers\),pp\. 3505–3523\.External Links:[Document](https://dx.doi.org/10.18653/v1/2022.acl-long.246),[Link](https://aclanthology.org/2022.acl-long.246/)Cited by:[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1)\.
- Mnihet al\.\(2016\)V\. Mnih, A\. P\. Badia, M\. Mirza, A\. Graves, T\. Lillicrap, T\. Harley, D\. Silver, and K\. KavukcuogluAsynchronous methods for deep reinforcement learning\.InProceedings of The 33rd International Conference on Machine Learning,Proceedings of Machine Learning Research, Vol\.48,pp\. 1928–1937\.External Links:[Link](https://proceedings.mlr.press/v48/mniha16.html)Cited by:[§2](https://arxiv.org/html/2610.36734#S2.SS0.SSS0.Px3.p1.1)\.
- Raychevet al\.\(2016\)V\. Raychev, P\. Bielik, and M\. VechevProbabilistic model for code with decision trees\.InProceedings of the 2016 ACM SIGPLAN International Conference on Object\-Oriented Programming, Systems, Languages, and Applications,pp\. 731–747\.External Links:[Document](https://dx.doi.org/10.1145/2983990.2984041)Cited by:[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1)\.
- Rolnicket al\.\(2019\)D\. Rolnick, A\. Ahuja, J\. Schwarz, T\. Lillicrap, and G\. WayneExperience replay for continual learning\.InAdvances in Neural Information Processing Systems,Vol\.32\.External Links:[Link](https://proceedings.neurips.cc/paper_files/paper/2019/hash/fa7cdfad1a5aaf8370ebeda47a1ff1c3-Abstract.html)Cited by:[§1](https://arxiv.org/html/2610.36734#S1.p3.1),[§2](https://arxiv.org/html/2610.36734#S2.SS0.SSS0.Px2.p1.1),[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1)\.
- Shahet al\.\(2023\)A\. Shah, S\. Paturi, and S\. ChavaTrillion dollar words: a new financial dataset, task and market analysis\.InProceedings of the 61st Annual Meeting of the Association for Computational Linguistics \(Volume 1: Long Papers\),pp\. 6664–6679\.External Links:[Document](https://dx.doi.org/10.18653/v1/2023.acl-long.368),[Link](https://aclanthology.org/2023.acl-long.368/)Cited by:[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1)\.
- Songet al\.\(2020\)K\. Song, X\. Tan, T\. Qin, J\. Lu, and T\. LiuMPNet: masked and permuted pre\-training for language understanding\.InAdvances in Neural Information Processing Systems,Vol\.33,pp\. 16857–16867\.External Links:[Link](https://proceedings.neurips.cc/paper_files/paper/2020/hash/c3a690be93aa602ee2dc0ccab5b7b67e-Abstract.html)Cited by:[§4\.1](https://arxiv.org/html/2610.36734#S4.SS1.p3.1)\.
- Thedeet al\.\(2025\)L\. Thede, K\. Roth, M\. Bethge, Z\. Akata, and T\. HartvigsenWikiBigEdit: understanding the limits of lifelong knowledge editing in LLMs\.InProceedings of the 42nd International Conference on Machine Learning,Proceedings of Machine Learning Research, Vol\.267,pp\. 59326–59354\.External Links:[Link](https://proceedings.mlr.press/v267/thede25a.html)Cited by:[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1),[§5\.2](https://arxiv.org/html/2610.36734#S5.SS2.p1.1)\.
- Wanget al\.\(2024\)P\. Wang, Z\. Li, N\. Zhang, Z\. Xu, Y\. Yao, Y\. Jiang, P\. Xie, F\. Huang, and H\. ChenWISE: rethinking the knowledge memory for lifelong model editing of large language models\.InAdvances in Neural Information Processing Systems,Vol\.37,pp\. 53764–53797\.External Links:[Document](https://dx.doi.org/10.52202/079017-1703),[Link](https://proceedings.neurips.cc/paper_files/paper/2024/hash/60960ad78868fce5c165295fbd895060-Abstract-Conference.html)Cited by:[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1)\.
- Wanget al\.\(2021\)S\. Wang, X\. Li, J\. Sun, and Z\. XuTraining networks in null space of feature covariance for continual learning\.InProceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition,pp\. 184–193\.External Links:[Link](https://openaccess.thecvf.com/content/CVPR2021/html/Wang_Training_Networks_in_Null_Space_of_Feature_Covariance_for_Continual_CVPR_2021_paper.html)Cited by:[§2](https://arxiv.org/html/2610.36734#S2.SS0.SSS0.Px1.p1.1),[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1)\.
- Wanget al\.\(2023a\)X\. Wang, T\. Chen, Q\. Ge, H\. Xia, R\. Bao, R\. Zheng, Q\. Zhang, T\. Gui, and X\. HuangOrthogonal subspace learning for language model continual learning\.InFindings of the Association for Computational Linguistics: EMNLP 2023,pp\. 10658–10671\.External Links:[Document](https://dx.doi.org/10.18653/v1/2023.findings-emnlp.715),[Link](https://aclanthology.org/2023.findings-emnlp.715/)Cited by:[§1](https://arxiv.org/html/2610.36734#S1.p2.1),[§2](https://arxiv.org/html/2610.36734#S2.SS0.SSS0.Px1.p1.1),[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1)\.
- Wanget al\.\(2023b\)X\. Wang, Y\. Zhang, T\. Chen, S\. Gao, S\. Jin, X\. Yang, Z\. Xi, R\. Zheng, Y\. Zou, T\. Gui, Q\. Zhang, and X\. HuangTRACE: a comprehensive benchmark for continual learning in large language models\.arXiv preprint arXiv:2310\.06762\.External Links:[Link](https://arxiv.org/abs/2310.06762),2310\.06762Cited by:[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1)\.
- Yanget al\.\(2025\)A\. Yang, A\. Li, B\. Yang, B\. Zhang, B\. Hui, B\. Zheng, B\. Yu, C\. Gao, C\. Huang, C\. Lv, C\. Zheng, D\. Liu, F\. Zhou, F\. Huang, F\. Hu, H\. Ge, H\. Wei, H\. Lin, J\. Tang, J\. Yang, J\. Tu, J\. Zhang, J\. Yang, J\. Yang, J\. Zhou, J\. Zhou, J\. Lin, K\. Dang, K\. Bao, K\. Yang, L\. Yu, L\. Deng, M\. Li, M\. Xue, M\. Li, P\. Zhang, P\. Wang, Q\. Zhu, R\. Men, R\. Gao, S\. Liu, S\. Luo, T\. Li, T\. Tang, W\. Yin, X\. Ren, X\. Wang, X\. Zhang, X\. Ren, Y\. Fan, Y\. Su, Y\. Zhang, Y\. Zhang, Y\. Wan, Y\. Liu, Z\. Wang, Z\. Cui, Z\. Zhang, Z\. Zhou, and Z\. QiuQwen3 technical report\.arXiv preprint arXiv:2505\.09388\.External Links:2505\.09388,[Link](https://arxiv.org/abs/2505.09388)Cited by:[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1)\.
- Yanget al\.\(2026\)W\. Yang, R\. Tang, H\. Zang, D\. Su, Q\. Cao, J\. Wang, H\. Shen, X\. Cheng, and F\. SunFine\-tuning done right in model editing\.Note:ICLR 2026; arXiv:2509\.22072External Links:2509\.22072,[Document](https://dx.doi.org/10.48550/arXiv.2509.22072),[Link](https://arxiv.org/abs/2509.22072)Cited by:[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1)\.
- Zhang and Sennrich \(2019\)B\. Zhang and R\. SennrichRoot mean square layer normalization\.InAdvances in Neural Information Processing Systems,Vol\.32\.External Links:[Link](https://proceedings.neurips.cc/paper_files/paper/2019/hash/1e8a19426224ca89e83cef47f1e7f53b-Abstract.html)Cited by:[§4\.2](https://arxiv.org/html/2610.36734#S4.SS2.p2.1)\.
- Zhaoet al\.\(2023\)C\. Zhao, Y\. Li, and C\. CarageaC\-STANCE: a large dataset for Chinese zero\-shot stance detection\.InProceedings of the 61st Annual Meeting of the Association for Computational Linguistics \(Volume 1: Long Papers\),pp\. 13369–13385\.External Links:[Document](https://dx.doi.org/10.18653/v1/2023.acl-long.747),[Link](https://aclanthology.org/2023.acl-long.747/)Cited by:[§5\.1](https://arxiv.org/html/2610.36734#S5.SS1.p1.1)\.

## Appendix AAdditional 150K WikiBigEdit Evaluation

We compareCAMR\(Full FT\) with Full\-history Replay \(LoRA\) at 150K using the same Match definitions as the 100K evaluation\.CAMRexceeds Full\-history Replay on Original, Rephrase, Persona, and Locality Match by 3\.78, 9\.06, 22\.28, and 7\.42 percentage points, respectively \(Table[6](https://arxiv.org/html/2610.36734#A1.T6)\)\.

Table 6:WikiBigEdit Match accuracy \(%\) after 150,000 continual updates\. The best result in each column is shown in bold\.
## Appendix BWikiBigEdit Replay Volume

Table[7](https://arxiv.org/html/2610.36734#A2.T7)reports cumulative fact presentations over 100K WikiBigEdit facts\. One fact presentation counts one selected fact once; total fact presentations include the current facts and historical replay\.CAMRand Random Replay use full\-parameter updates, whereas Full\-history Replay uses LoRA\. Full\-history Replay trains new facts in blocks of up to 375; a block also ends at each native\-interval boundary \(every 12\.5K facts\) and at each evaluation checkpoint\. At the start of every block, it replays all previously observed facts\. Its cumulative historical replay count is∑bsb\\sum\_\{b\}s\_\{b\}, wheresbs\_\{b\}is the number of previously observed facts at the start of blockbb\.

Table 7:Cumulative WikiBigEdit fact presentations, including current facts and historical replay\.
## Appendix CWriter Action Utilization

![Refer to caption](https://arxiv.org/html/2610.36734v1/semantic_density_ratio.png)Figure 4:Age\- and eligibility\-corrected semantic replay allocation across the WikiBigEdit stream\. Rows showCAMR, count\-matched Random Replay fromCAMR’s logged eligible history pools, count\-matched cosine Top\-8 Semantic Replay from the same pools, and the theoretical 375\-record Full\-history Replay at 3K, 10K, 50K, 100K, and 150K\. Each panel reports local cumulative replay intensity divided by the exact event\-wise Random Replay expectation after identical fixed\-grid smoothing\. Neutral gray denotes×1\\\!\\timesexpectation, red denotes over\-allocation, and blue denotes under\-allocation on the shared log2scale\. All checkpoints use the same frozen representation and PCA projection\.Table 8:Cumulative writer\-action shares \(%\) under theIgnoregate\.Table[8](https://arxiv.org/html/2610.36734#A3.T8)reports a controlled action audit using theIgnoregate defined in Section[4\.2](https://arxiv.org/html/2610.36734#S4.SS2)from the original experiments\. Under this gate,Ignorerequires an equivalent active record, current NLL≤τm\\leq\\tau\_\{m\}, no retirement triggered by the arrival, and a fresh greedy answer matching the full target\. No arrival in the 100K WikiBigEdit stream satisfied the duplicate/equivalence prerequisite, soIgnorewas never selected\.

For each task, we construct a 5K\-arrival stream by randomly subsampling larger training sets or supplementing smaller ones with randomly sampled training examples\. All methods use the same resulting stream and order\.

We used the same gate in a separate diagnostic with repeated APPS examples\. Starting from the original single\-pass stream of 2,639 examples, we appended 2,361 exact input–output duplicates of previously observed active examples, producing 5,000 arrivals\. Over this stream, the writer selectedAdd2,947 times \(58\.94%\),Merge1,096 times \(21\.92%\), andIgnore957 times \(19\.14%\)\. This diagnostic shows that, under repeated exposure, the writer selectively skips direct supervision of examples that satisfy the mastery criteria\.

![Refer to caption](https://arxiv.org/html/2610.36734v1/appendix_semantic_replay_story.png)Figure 5:Unnormalized cumulative replay counts in the same semantic space\. Rows and checkpoints follow Figure[4](https://arxiv.org/html/2610.36734#A3.F4)\. Each point is a replayed fact at its actual PCA coordinate, and color gives its cumulative replay count on a shared logarithmic scale\. The shared axes, frozen representation, and PCA projection make semantic coverage and per\-fact repetition directly comparable across methods and stream prefixes\.Table 9:Complete set ofCAMRhyperparameters governing memory, replay, the writer architecture, and the learning objectives\.HyperparameterValueTraining and optimizationBase language modelQwen3\-8B\-BaseLanguage\-model updateFull\-parameter SFTLanguage\-model optimizerAdamWLanguage\-model learning rate2×10−62\\times 10^\{\-6\}Writer optimizerAdamWriter learning rate3×10−43\\times 10^\{\-4\}Optimizer steps per arrival1Logical batch size per arrival1\+\|ℛt\|≤51\+\|\\mathcal\{R\}\_\{t\}\|\\leq 5factsWeight decay / gradient clip00/1\.01\.0Memory and replayProbe capPP4Retrieved\-candidate cap64Candidate similarity thresholdτs\\tau\_\{s\}0\.65Mastery NLL thresholdτm\\tau\_\{m\}0\.25Per\-arrival replay capKK4Mergeuniform\-replay quota2 of 4 slotsMergecandidate quotaUp to 2 of 4 slotsMergecandidate selectionWriter\-selected from𝒞t\\mathcal\{C\}\_\{t\}, without replacementWriter and learning objectivesWriter projection dimensiondhd\_\{h\}32Writer rollout length\|ℬ\|\|\\mathcal\{B\}\|4 eventsCurrent\-example loss weightα\\alpha0\.5Retention reward weightλh\\lambda\_\{h\}1\.0Cost penalty weightλc\\lambda\_\{c\}0\.01Cost referenceCrefC\_\{\\mathrm\{ref\}\}128 tokens ifLmax<128L\_\{\\max\}<128; 1,024 tokens otherwiseDiscount factorγ\\gamma0\.95Entropy coefficientβ\\beta0\.01Critic\-loss coefficientcvc\_\{v\}0\.5

## Appendix DComplete CAMR Hyperparameter Specification

Table[9](https://arxiv.org/html/2610.36734#A3.T9)reports the complete set of hyperparameters introduced in theCAMRformulation, together with their values in the reference configuration\.

These values define the referenceCAMRconfiguration\. The choicesP=4P=4andK=4K=4bound the per\-arrival probe and replay loads, whileτs=0\.65\\tau\_\{s\}=0\.65andτm=0\.25\\tau\_\{m\}=0\.25impose selective compatibility and mastery criteria\. The 32\-dimensional projection keeps the writer compact\. Settingα=0\.5\\alpha=0\.5gives equal weight to the current\-example term and the aggregate replay term in Equation[5](https://arxiv.org/html/2610.36734#S4.E5)\. The reward weights retain the historical\-gain term at unit scale and apply a token\-cost penalty in Equation[6](https://arxiv.org/html/2610.36734#S4.E6), normalized by the dataset\-specificCrefC\_\{\\mathrm\{ref\}\}values in Table[9](https://arxiv.org/html/2610.36734#A3.T9)\. Specifically, lettingLmaxL\_\{\\max\}denote the maximum sequence length of a dataset, we setCref=128C\_\{\\mathrm\{ref\}\}=128whenLmax<128L\_\{\\max\}<128andCref=1024C\_\{\\mathrm\{ref\}\}=1024otherwise\. Finally,γ=0\.95\\gamma=0\.95preserves credit within the four\-event rollout,β=0\.01\\beta=0\.01supplies a modest entropy bonus, andcv=0\.5c\_\{v\}=0\.5gives the critic loss a moderate coefficient in Equations[7](https://arxiv.org/html/2610.36734#S4.E7)and[8](https://arxiv.org/html/2610.36734#S4.E8)\.

## Appendix ESemantic Replay Trajectory Analysis

We compare the cumulative replay allocations ofCAMR, Random Replay, Semantic Replay, and the theoretical Full\-history Replay at 3K, 10K, 50K, 100K, and 150K\. All facts are projected from the frozen 768\-dimensional memory representation\. PCA is fitted once on all 150K facts and shared across checkpoints; the first two components explain 8\.61% of the variance\. Random Replay and Semantic Replay matchCAMR’s per\-event replay budget over the same logged safe, non\-probe history pools; the former samples uniformly without replacement, whereas the latter selects up to eight nearest facts by cosine similarity\. The full\-history allocation follows the 375\-record block rule described in Appendix[B](https://arxiv.org/html/2610.36734#A2)\.

Figure[4](https://arxiv.org/html/2610.36734#A3.F4)removes the cumulative advantage of earlier\-arriving facts and the event\-wise variation in eligible history\. Random Replay remains close to the neutral×1\\\!\\timeslevel across regions and checkpoints\.CAMRforms localized regions of elevated and reduced intensity as the stream grows, showing targeted semantic reweighting within a bounded replay budget\. Semantic Replay follows nearest\-neighbor structure and produces stronger hotspots and cold regions\. The Full\-history Replay is below the matched\-budget expectation at 3K and reaches the upper range across the map from 50K onward as repeated full\-history sweeps accumulate\.

The raw\-count view in Figure[5](https://arxiv.org/html/2610.36734#A3.F5)shows both semantic coverage and repeated selection\. Under the matched budget,CAMRmaintains broad support while concentrating additional presentations in selected neighborhoods; Random Replay distributes presentations diffusely, whereas Semantic Replay repeats a smaller set of nearest neighbors more often\. At 100K, the three strategies have replayed 90\.4%, 88\.8%, and 83\.9% of the arrived facts, respectively\. Full\-history Replay reaches 99\.8% coverage but produces a broadly elevated count field as its cumulative replay volume grows\. Together, the normalized and raw\-count views show thatCAMRcombines broad semantic support with selective allocation of a bounded replay budget\.

## Appendix FCore\-knowledge replay under stream growth\.

Table[10](https://arxiv.org/html/2610.36734#A6.T10)reports the share of replay slots assigned to a fixed high\-frequency core\-3K set at each WikiBigEdit checkpoint\.

Table 10:Share \(%\) of replay slots allocated to the fixed high\-frequency core\-3K set as the WikiBigEdit history grows\.Both methods devote a smaller share of replay to the core\-3K set as the history expands\. Random Replay samples uniformly from the available history, so its core share falls from 19\.49% at 3K to 3\.02% at 100K\. WhenMergeis selected,CAMRreserves part of its replay budget for compatible retrieved facts, allowing core facts related to later arrivals to receive targeted rehearsal\. Its core share remains higher at every checkpoint, decreasing from 25\.54% to 7\.30%\. At 100K,CAMRassigns 2\.42×\\timesthe replay share of Random Replay to the core\-3K set, reducing the dilution of core knowledge as the replay pool grows\.

相似文章

持续学习机制组合以实现长期记忆

Hugging Face Daily Papers

本文表明,结合互补的持续学习机制可以增强语言模型中的长期记忆,通过数据、功能和权重锚点以及合并的LoRA,将保留率提升28倍。

CAMeR: 关键词门控混合激活机制用于LLM智能体的自适应记忆留存

arXiv cs.CL

本文提出了CAMeR,一种用于LLM智能体的记忆留存框架,该框架结合了关键词门控混合激活与自适应权重动态,并推出了CAMeR-Bench,一个用于评估自适应记忆留存的基准测试。实验表明,与仅基于嵌入或时间驱动的基线相比,混合符号-神经门控在留存差距和检索效率方面表现更优。