betaFeedback

WorksComputer Science

CAMR: Compatibility-Aware Memory Replay for Continual Learning in Large Language Models

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.

Introduction

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 [24, 7].

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), while knowledge-editing methods make targeted changes to factual associations, with subsequent advances improving stability over successive edits [25, 26, 9, 20]. 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 [31]. 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 [1] and TSR [27]. 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. 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: ADD trains on the incoming example with general replay; MERGE additionally prioritizes compatible related history within the replay budget; and IGNORE skips 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.

Figure 1. Overview of CAMR and its empirical evaluation. (a) Schematic illustration of CAMR. It shows how ADD, MERGE, and IGNORE handle incoming data during continual learning. (b) Example comparison of CAMR with Random Replay in the multi-task setting. (c) Results for single-task and cross-task settings, together with Replay-Count Scaling experiments.

We evaluate CAMR with Qwen3-8B-Base on WikiBigEdit, WikiFactDiff, a four-task TRACE sequence, and a cross-domain sequence. On WikiBigEdit, CAMR consistently 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 →\rightarrow GSM8K →\rightarrow APPS →\rightarrow SAMSum 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 of CAMR in continual factual updating and cross-task and cross-domain continual learning, supported by replay-count scaling and component ablations.

Related Work

Continual learning and parameter updates. Continual-learning methods mitigate forgetting by constraining parameter updates, through regularization [18], gradient projection (Wang et al., 2021), or orthogonal low-rank subspaces in LLMs (Wang et al., 2023a). Knowledge-editing methods rewrite specific factual associations [25, 26], and later work improves stability over long edit sequences [9]. These methods control how parameters change, whereas CAMR decides which examples supervise each update.

Experience replay and adaptive selection. Experience replay mixes stored examples with new data to support retention [31]. Adaptive variants select history by interference risk [1] or transfer value [27]. These methods choose which history to revisit, while CAMR also 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 [8] and bandit-based curricula driven by learning progress [11]. Our writer follows this direction with an actor–critic policy [29] rewarded by acquisition, retention, and training cost. Its state includes a gated summary of history, adapted from the conditional memory of Engram [5].

Problem Setting

We consider a stream of supervised examples S=(x1,…,xT)\mathcal{S} = (x_1,\ldots,x_T), where xt=(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 arrival tt, 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.

Let pθtp_{\theta_t} and Mt\mathcal{M}_t denote the model and external memory before arrival tt. The writer jointly controls current-example supervision and historical replay under a per-arrival replay cap KK, which counts historical replay examples and excludes the current example: ADD trains on the current example with general replay; MERGE additionally prioritizes compatible related history within the same budget; and IGNORE skips direct supervision of a verified mastered duplicate while allowing history-only replay. All replay examples must satisfy the compatibility criteria. Training updates the model to pθt+1p_{\theta_{t+1}}. Regardless of the action, the observed example is stored or linked to an equivalent record in Mt+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.

Method

Figure 2 summarizes CAMR. The writer combines model mastery with a gated representation of compatible history to select ADD, MERGE, or IGNORE, 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.

Figure 2. Overview of CAMR. The writer retrieves and filters compatible history, then selects ADD, MERGE, or IGNORE to form the training batch; feedback from the updated language model trains the writer.

Memory Retrieval and Compatibility

Memory stores observed examples with their embeddings, identity/version metadata, and replay statistics. For each incoming example xtx_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 Ht\mathcal{H}_t by excluding retired, current-equivalent, and conflicting records from memory. Equivalent records remain available to determine whether IGNORE is permitted.

Before action selection, we uniformly sample a probe set PtP_t from HtH_t without replacement, with ∣Pt∣=min⁡(P,⌊∣Ht∣/2⌋)|P_t| = \min(P, \lfloor|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 Ut=Ht∖PtU_t = H_t \setminus P_t.

As shown in Figure 2, retrieval combines semantic search with exact lookups. A frozen MPNet encoder (Song et al., 2020) maps each input–output pair to a mean-pooled, L2-normalized embedding. Let ete_t and eie_i denote current and historical embeddings. Random-hyperplane locality-sensitive hashing (Charikar, [3]) 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 Ct⊆UtC_t \subseteq U_t. These candidates feed the writer’s relevance gate, while UtU_t supplies general historical replay. After action selection, the action-specific replay rule selects Rt⊆UtR_t \subseteq U_t subject to ∣Rt∣≤K|R_t| \le K. After the event, new examples are stored in memory, while equivalent arrivals are linked to existing records.

Writer Policy and Replay

Given the compatible candidates CtC_t, the writer summarizes related history, selects a supervision action, and constructs the training batch (Figure 2).

We adapt the sigmoid query–key gating mechanism of Engram (Cheng et al., [5]) to current and historical example embeddings. The frozen MPNet embeddings are projected into a shared dhd_h-dimensional space and normalized using RMSNorm (Zhang and Sennrich, 2019):

ut=RMSNorm⁡(WQet),ki=RMSNorm⁡(WKei).(1)u_t = \operatorname{RMSNorm}(W_Q e_t), \quad k_i = \operatorname{RMSNorm}(W_K e_i). \tag*{(1)}

The gate assigns each candidate a relevance weight:

gti=σ(utTkidh).(2)g_{ti} = \sigma\left(\frac{u_t^{\mathsf{T}} k_i}{\sqrt{d_h}}\right). \tag*{(2)}

We aggregate the gated candidate representations and their mean gate value as

vt=1∣Ct∣∑i∈Ctgtiki,gˉt=1∣Ct∣∑i∈Ctgti.(3)v_t = \frac{1}{|C_t|}\sum_{i \in C_t} g_{ti} k_i, \qquad\bar{g}_t = \frac{1}{|C_t|}\sum_{i \in C_t} g_{ti}. \tag*{(3)}

Both are set to zero when CtC_t is empty. The gate operates in the writer, outside the language model. The actor receives the concatenated state zt=[ft;ut;vt;gˉt]z_t = [f_t; u_t; v_t; \bar{g}_t]. The eight features in ftf_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)), where btI,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\pi_\phi(\mathrm{IGNORE}\mid z_t)=\rho_t^I,\qquad\pi_\phi(\mathrm{MERGE}\mid z_t)=(1-\rho_t^I)\rho_t^M
πϕ(ADD∣zt)=(1−ρtI)(1−ρtM).(4)\pi_\phi(\mathrm{ADD}\mid z_t)=(1-\rho_t^I)(1-\rho_t^M). \tag*{(4)}

MERGE is eligible only when CtC_t is nonempty. IGNORE requires an equivalent active record, current NLL ≤τm\le\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 selects ADD. The critic estimates the state value for online learning, as described in § 4.3.

The sampled action determines current-example supervision and the composition of historical replay. ADD and IGNORE sample uniformly from the replay pool UtU_t. MERGE combines general history with related candidates: it reserves part of the replay budget for uniform sampling and allocates the remainder to compatible candidates from CtC_t. Unused candidate slots are filled by uniform sampling from the remaining replay pool. All replay sampling is without replacement and selects at most KK records. The training batch contains the current example and RtR_t under ADD or MERGE, and only RtR_t under IGNORE. Each replayed example remains a separate input–output pair.

Learning 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

LtLM=αℓθ(xt)+1−α∣Rt∣∑x∈Rtℓθ(x),(5)\mathcal{L}^{\mathrm{LM}}_t=\alpha\ell_\theta(x_t)+\frac{1-\alpha}{\lvert R_t\rvert}\sum_{x\in R_t}\ell_\theta(x), \tag*{(5)}

where α\alpha balances current and historical supervision. Current-only updates assign unit weight to the current loss; history-only updates average replay losses. An empty IGNORE batch triggers no model update. We use AdamW (Loshchilov and Hutter, [21]), 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 PtP_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−λcCtCref,(6)r_t=\Delta_t^{\mathrm{cur}}+\lambda_h\Delta_t^{\mathrm{hist}}-\lambda_c\frac{C_t}{C_{\mathrm{ref}}}, \tag*{(6)}

where λh\lambda_h and λc\lambda_c weight retention and cost. Here CtC_t counts logical nonpadding training tokens, including views and repeated steps, and CrefC_{\mathrm{ref}} is a dataset-specific cost-normalization hyperparameter. Probe and mastery-check forward passes are excluded from CtC_t.

Writer parameters remain fixed within each configured rollout B\mathcal{B} and are updated at its end. The critic predicts Vt=Vψ(sg⁡(zt))V_t=V_\psi(\operatorname{sg}(z_t)), where sg⁡\operatorname{sg} stops gradients. Discounted returns and advantages are

Gt=rt+γGt+1,Aˉt=Gt−sg⁡(Vt).(7)G_t=r_t+\gamma G_{t+1},\qquad\bar{A}_t=G_t-\operatorname{sg}(V_t). \tag*{(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 D⊆B\mathcal{D}\subseteq\mathcal{B} and policy entropy HtH_t, we minimize

Lπ=−1∣D∣∑t∈D[Aˉtlog⁡πϕ(at∣zt)+βHt]\mathcal{L}_\pi=-\frac{1}{\lvert\mathcal{D}\rvert}\sum_{t\in\mathcal{D}}\left[\bar{A}_t\log\pi_\phi(a_t\mid z_t)+\beta H_t\right]
LV=1∣B∣∑t∈B(Vt−Gt)2,LW=Lπ+cvLV.(8)\mathcal{L}_V=\frac{1}{\lvert\mathcal{B}\rvert}\sum_{t\in\mathcal{B}}(V_t-G_t)^2,\qquad\mathcal{L}_W=\mathcal{L}_\pi+c_v\mathcal{L}_V. \tag*{(8)}

Here γ\gamma controls discounting, β\beta weights entropy regularization, and cvc_v weights the critic loss. We set Lπ=0\mathcal{L}_\pi=0 when D\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 the CAMR formulation is reported in Appendix § 10.

Experiments and Discussion

Experimental Setup

We evaluate Qwen3-8B-Base in the closed-book setting, with Qwen3-14B-Base as an unmodified WikiBigEdit reference (Yang et al., 2025), on WikiBigEdit (Thede et al., 2025), WikiFactDiff (Ammar Khodja et al., [2]), TRACE (C-STANCE, MeetingBank, Py150, and text-only ScienceQA) (Wang et al., 2023b; Zhao et al., 2023; Hu et al., [16]; Raychev et al., [30]; Lu et al., [22]), and FinQA →\rightarrow GSM8K →\rightarrow APPS introductory →\rightarrow SAMSum ([4, 6, 14, 10]); ablations use FOMC, NumGLUE-cm/ds, and Py150 ([32, 28]). Base-lines span unmodified models; fine-tuning and parameter-space methods ([15] (Wang et al. 2023a; Wang et al. 2021)); knowledge-editing methods ([25, 26, 13, 9, 20, 17, 23, 12] (Yang et al. 2026; Wang et al. 2024)); and replay-based methods ([31, 1, 27, 19]). We report Match/Exact, ES/GS, ED/GD, accuracy, ROUGE-L, edit similarity, and pass@1 as appropriate.

Single-Task Data Scaling

We process 100,000 WikiBigEdit facts (Thede et al., 2025) in their original eight-interval order. CAMR achieves the highest Original Match at 3K, 10K, 50K, and 100K among evaluated methods, with little fluctuation (Table 1). 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 § 7). This suggests better generalization and less interference as the stream grows.

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 shading marks the highest value in each column, these values are also bold. The additional CAMR LoRA run uses K=8K = 8 and a learning rate of 2×10−42 \times10^{-4} through 50K updates and 10−410^{-4} thereafter, continuing the same model and optimizer.

Method3K Original3K Rephrase3K Persona3K Locality10K Original10K Rephrase10K Persona10K Locality50K Original50K Rephrase50K Persona50K Locality100K Original100K Rephrase100K Persona100K Locality
Unmodified base models
Qwen3-8B-Base14.6713.7111.205.8813.1612.519.339.6212.0411.908.7610.5512.88 (-1.79)12.33 (-1.38)9.08 (-2.12)13.09 (+7.21)
Qwen3-14B-Base21.6320.2011.5329.4120.4219.699.9921.1517.2616.558.7217.5817.40 (-4.23)16.76 (-3.44)8.74 (-2.79)18.75 (-10.66)
Fine-tuning and parameter-space methods
Fine-Tuning (LoRA)51.4047.8338.5721.9756.8352.3444.6121.9548.2743.1034.7024.6241.08 (-10.32)37.40 (-10.43)28.23 (-10.34)23.21 (+1.24)
Sequential Fine-Tuning (Full FT)60.7356.0047.6318.4462.3057.6451.1621.1852.7948.0338.9821.4245.83 (-14.90)41.47 (-14.53)34.36 (-13.27)22.66 (+4.22)
Joint Fine-Tuning (Full FT)61.2056.1048.4719.6063.1258.5451.7221.5958.1952.9544.0923.1356.36 (-4.84)51.08 (-5.02)42.15 (-6.32)24.32 (+4.72)
O-LoRA51.6347.2738.5322.6857.8452.5543.8623.4452.2847.1237.1227.6448.31 (-3.32)43.45 (-3.82)32.33 (-6.20)28.35 (+5.67)
Adam-NSCL15.7714.7211.8011.7617.9316.4911.6019.2317.4316.6911.7016.4118.09 (+2.32)17.29 (+2.57)12.19 (+0.39)17.58 (+5.82)
LoRA-Merge25.9824.7820.1429.4126.0926.2819.7519.2331.1127.5421.1427.3435.31 (+9.33)30.80 (+6.02)22.44 (+2.30)29.10 (-0.31)
Knowledge-editing methods
LocFT29.0326.3021.7318.3640.4936.0830.2421.6841.9834.2225.8925.9841.98 (+12.95)34.02 (+7.72)23.81 (+2.08)27.34 (+8.98)
ROME37.0735.4727.3313.7725.7224.4617.9913.5517.8217.2912.7214.2817.94 (-19.13)16.98 (-18.49)12.37 (-14.96)14.41 (+0.64)
R-ROME37.3035.1728.5013.6726.6325.5220.1213.8819.5517.8013.2214.9019.52 (-17.78)17.99 (-17.18)13.35 (-15.15)15.52 (+1.85)
AlphaEdit89.7675.4261.0523.5384.8267.8448.4317.3158.9541.0922.1811.3341.72 (-48.04)29.20 (-46.22)15.54 (-45.51)12.70 (-10.83)
NAS83.0766.1059.2310.2876.9655.9037.6611.9744.7527.4514.949.6427.08 (-55.99)18.51 (-47.59)10.74 (-48.49)8.95 (-1.33)
CrispEdit26.1025.1720.7711.5238.1135.3628.1916.9938.8935.1923.8819.3438.73 (+12.63)34.35 (+9.18)23.34 (+2.57)18.16 (+6.64)
UltraEdit17.1415.5212.505.8815.7914.8510.859.6218.5015.2011.0713.2819.11 (+1.97)17.51 (+1.79)12.66 (+0.17)17.58 (+11.70)
StableEdit24.1322.8016.0718.0027.2624.9117.6320.0435.4928.8916.4825.5935.43 (+11.30)28.84 (+6.04)17.36 (+1.29)24.10 (+6.10)
WISE-Retrieve23.7721.9117.3117.6523.8021.3915.6023.0813.7612.8611.0913.6711.37 (-12.40)10.54 (-11.37)10.08 (-7.23)12.89 (-4.76)
Replay-based continual-learning methods
Random Replay (Full FT)87.9680.2367.4623.5391.3284.7568.9423.9290.7481.6260.5225.3489.12 (+1.16)80.89 (+0.66)61.99 (-5.47)24.73 (+1.20)
Random Replay (LoRA)68.6662.0751.9823.5364.3459.5350.2819.2347.7345.0635.2421.8841.63 (-27.03)38.68 (-23.29)29.16 (-22.82)21.48 (-2.05)
Full-history Replay (LoRA)50.9246.0236.6129.4187.3775.2456.4728.8588.8677.1053.3826.9592.07 (+41.15)83.53 (+37.51)61.55 (+24.94)22.71 (-6.70)
Semantic Replay (LoRA)51.4047.8338.5723.9457.5153.3045.4225.8651.3446.9036.7425.4746.83 (-4.57)42.51 (-5.32)33.68 (-4.89)23.42 (-0.52)
Relation Oracle Replay (LoRA)68.0261.7150.9229.4163.6558.8947.9419.2347.2344.0234.5528.9146.39 (-21.63)48.52 (-13.19)33.62 (-17.30)22.44 (-5.97)
TIC-style Replay (LoRA)65.2959.5748.5223.5363.6958.1047.5125.0051.1347.8037.6628.1346.84 (-18.45)43.92 (-15.65)34.59 (-13.93)26.37 (+2.84)
Maximally Interfered Retrieval (LoRA)31.6728.2723.6320.9044.8040.5133.5421.8839.9534.1023.4526.7638.73 (+7.06)33.37 (+5.10)22.90 (-0.73)26.37 (+4.27)
Transfer Selective Replay (LoRA)46.8741.7734.0325.2149.1144.4736.9826.5944.9839.0530.5327.9645.62 (-1.25)40.01 (-1.76)30.22 (-3.81)28.98 (+3.77)
CAMR (Full FT, ours)93.6684.3869.2630.4793.8683.8468.3833.0891.4381.4561.0830.4792.94 (-0.72)82.82 (-1.56)62.61 (-6.65)27.73 (-2.74)
CAMR (LoRA, ours)92.3686.4573.0617.6589.3483.4266.9923.0874.1865.3245.3219.1482.49 (-9.88)71.06 (-15.39)46.06 (-27.00)24.41 (+6.77)

Table 1.

On WikiFactDiff ([2]), we process twelve stages of 2,700 new facts and 300 replacements. CAMR maintains current-stage ES near 100% and consistently exceeds Random Replay (Full FT) on GS (Figure 3). At 36K, both reach 99.33% ES, while CAMR achieves 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.

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.

Cross-Task and Cross-Domain Performance

On the TRACE sequence C-STANCE →\rightarrow Meeting-Bank →\rightarrow Py150 →\rightarrow text-only ScienceQA, CAMR achieves the highest final scores among evaluated methods on all four tasks: 56.75%, 69.84%, 67.92%, and 95.40%, respectively (Table 2). 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.

MethodT1 Acc. C-STANCET2 Acc. C-STANCET2 ROUGE-L MeetingBankT3 Acc. C-STANCET3 ROUGE-L MeetingBankT3 Edit Py150T4 Acc. C-STANCET4 ROUGE-L MeetingBankT4 Edit Py150T4 Acc. ScienceQA
Fine-tuning and parameter-space methods
Fine-Tuning (LoRA)50.5550.1058.9153.7056.0667.8853.85 (+3.30)56.30 (-2.61)67.30 (-0.58)94.25
Sequential Fine-Tuning (LoRA)56.6056.7565.3056.8058.6667.6955.00 (-1.60)53.85 (-11.45)66.25 (-1.44)91.95
Sequential Fine-Tuning (Full FT)49.3046.0569.2046.7568.1463.3947.70 (-1.60)68.97 (-0.23)62.76 (-0.63)92.60
Joint Fine-Tuning (Full FT)46.2551.6542.7053.6044.7460.3451.50 (+5.25)68.16 (+25.46)59.60 (-0.74)94.00
O-LoRA54.1553.7556.9754.2555.3567.8254.05 (-0.10)56.40 (-0.57)67.54 (-0.28)93.30
Adam-NSCL50.3050.2517.0150.3017.0611.4850.30 (+0.00)17.05 (+0.04)11.48 (+0.00)87.65
LoRA-Merge58.2058.7532.6559.0033.5320.8356.60 (-1.60)33.68 (+1.03)21.42 (+0.59)89.00
Knowledge-editing methods
LocFT55.9554.7559.9254.4537.6966.9955.30 (-0.65)31.95 (-27.97)66.04 (-0.95)88.95
MEMIT51.5550.101.3947.651.225.5846.35 (-5.20)1.21 (-0.18)5.36 (-0.22)88.85
AlphaEdit50.700.302.730.600.141.970.05 (-50.65)0.09 (-2.64)5.89 (+3.92)0.00
NAS50.3544.4017.0340.7015.735.1133.75 (-16.60)10.84 (-6.19)5.85 (+0.74)0.75
MEMIT + NAS47.0035.601.3235.401.284.1926.55 (-20.45)1.18 (-0.14)4.02 (-0.17)64.10
CrispEdit56.3543.9033.2743.1531.6062.6247.40 (-8.95)24.12 (-9.15)62.01 (-0.61)87.50
UltraEdit52.5552.5016.9951.4516.9911.5951.90 (-0.65)17.08 (+0.09)87.30
StableEdit56.0556.1021.0456.1021.176.3356.35 (+0.30)21.10 (+0.06)6.31 (-0.02)87.65
WISE-Retrieve45.6545.6518.3845.6518.1444.7545.65 (+0.00)18.13 (-0.25)44.75 (+0.00)85.30
Replay-based continual-learning methods
Random Replay (Full FT)51.8050.5066.4151.0566.8968.1350.50 (-1.30)66.45 (+0.04)67.80 (-0.33)95.35
Random Replay (LoRA)54.8055.6063.3856.0560.9367.5554.45 (-0.35)52.33 (-11.05)65.22 (-2.03)91.75
Semantic Replay (LoRA)53.4555.0564.9654.6053.9967.1359.90 (-1.55)52.34 (-1.62)66.67 (-0.46)92.70
TiC-style Replay (LoRA)55.7553.7564.5452.1558.1367.4355.45 (-0.30)51.04 (-13.50)67.12 (-0.61)91.30
Maximally Interfered Retrieval (LoRA)53.7552.9063.2952.0549.2168.3950.30 (-3.45)35.10 (-28.19)66.32 (-2.07)91.05
Transfer Selective Replay (LoRA)56.6055.8562.8355.9523.7562.2255.35 (-1.25)41.40 (-21.43)58.21 (-4.01)92.55
CAMR (Full FT, ours)57.5055.6570.3956.7569.2268.3456.75 (-0.75)69.84 (-0.55)67.92 (-0.42)95.40
CAMR (LoRA, ours)54.6056.7064.3054.7565.3866.4955.00 (+0.40)63.10 (-1.20)64.45 (-2.04)92.80

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 shading marks the highest value in each column, these values are also bold.

On FinQA →\rightarrow GSM8K →\rightarrow APPS introductory →\rightarrow SAMSum, all three earlier tasks retain or improve upon their post-acquisition scores (Table 3). 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. (72.62%/19.86%) and leads all four metrics. We use K=4K = 4 as the default to evaluate the method under a limited replay budget. CAMR leads on FinQA and SAMSum, while O-LoRA and Adam-NSCL achieve the highest GSM8K and APPS scores, respectively.

Sensitivity to Replay Count

Table Table 4 evaluates different replay counts. CAMR leads Original and Rephrase Match at every tested budget, showing that its advantage is not tied to a single KK. Increasing KK from 4 to 16 improves these scores from 93.98%/86.56% to 98.10%/90.42%. At K=8K = 8, CAMR achieves its highest Persona and Locality scores (72.62%/19.86%) and leads all four metrics. We use K=4K = 4 as the default to evaluate the method under a limited replay budget.

Writer Component Ablations

Table Table 5 compares the complete writer with five ablations. Specifically, w/o Action Selection uses ADD-only routing; w/o Online Feedback freezes the initialized writer; w/o Memory Gate weights all candidates equally; w/o IGNORE masks that action; and w/o Replay on IGNORE skips historical replay for that action. The complete writer achieves the best performance on all four tasks, tying w/o

MethodT1 Acc. FinQAT2 Acc. FinQAT2 Acc. GSM8KT3 Acc. FinQAT3 Acc. GSM8KT3 pass@1 APPST4 Acc. FinQAT4 Acc. GSM8KT4 pass@1 APPST4 ROUGE-L SAMSum
Fine-tuning and parameter-space methods
Fine-Tuning (LoRA)30.5122.2382.4126.9480.8930.4022.23 (-8.28)70.05 (-12.36)30.60 (+0.20)43.79
Sequential Fine-Tuning (Full FT)23.3724.2475.0624.8573.6220.8023.54 (+0.17)70.66 (-4.40)22.80 (+2.00)42.25
O-LoRA31.5631.3982.9430.9582.6428.8030.43 (-1.13)83.55 (+0.61)29.10 (+0.30)44.59
Adam-NSCL7.157.1575.667.1575.4436.107.06 (-0.09)76.04 (+0.38)36.10 (+0.00)25.46
LoRA-Merge64.2564.1782.4964.1783.7033.5063.30 (-0.95)83.32 (+0.83)32.60 (-0.90)41.17
Knowledge-editing methods
LocFT74.0267.5783.6267.5779.6132.2068.09 (-5.93)81.27 (-2.35)32.80 (+0.60)43.82
MEMIT4.806.6380.676.7180.5923.806.19 (+1.39)80.74 (+0.07)24.70 (+0.90)32.47
AlphaEdit6.546.8967.026.9766.9432.606.97 (+0.43)67.85 (+0.83)32.60 (+0.00)26.19
NAS7.507.3274.377.5974.0735.207.41 (-0.09)75.36 (+0.99)35.60 (+0.40)25.72
MEMIT + NAS7.327.5978.857.4178.8534.807.67 (+0.35)78.77 (-0.08)35.90 (+1.10)25.68
CrispEdit50.2216.7481.8820.9278.2425.6021.10 (-29.12)48.37 (-33.51)7.50 (-18.10)37.96
UltraEdit8.028.2080.528.0278.6234.508.11 (+0.09)80.21 (-0.31)34.10 (-0.40)26.27
StableEdit17.8717.5283.5517.8782.8716.7017.52 (-0.35)82.56 (-0.99)14.90 (-1.80)42.58
WISE-Retrieve2.092.0947.382.1859.891.701.92 (-0.17)58.98 (+11.60)2.00 (+0.30)12.96
Replay-based continual-learning methods
Random Replay (Full FT)75.1574.8081.8873.6778.6226.3073.41 (-1.74)76.12 (-5.76)21.40 (-4.90)41.67
Random Replay (LoRA)32.1735.1482.3435.2280.7430.7026.85 (-5.32)76.65 (-5.69)27.60 (-3.10)44.86
Semantic Replay (LoRA)28.8634.7080.0634.2680.0629.6030.95 (+2.09)77.94 (-2.12)29.20 (-0.40)43.75
Relation Oracle Replay (Full FT)27.7233.8382.5633.8382.1829.3029.64 (+1.92)78.77 (-3.79)27.70 (-1.60)43.43
TiC-style Replay (LoRA)36.7935.1483.0234.8781.4328.9034.18 (-2.61)81.20 (-1.82)30.80 (+1.90)44.94
Maximally Interfered Retrieval (LoRA)32.6132.6182.2631.1281.7327.9031.30 (-1.31)82.26 (+0.00)29.70 (+1.80)43.61
Transfer Selective Replay (LoRA)36.9736.0983.2435.2282.0330.8034.52 (-2.45)81.43 (-1.81)29.60 (-1.20)44.26
CAMR (Full FT, ours)75.2475.8581.5875.9482.1830.1076.11 (+0.87)81.58 (+0.00)30.50 (+0.40)45.10
CAMR (LoRA, ours)76.1076.3683.4777.1585.7532.8077.24 (+1.14)84.91 (+1.44)31.80 (-1.00)43.96

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 shading marks the highest value in each column, these values are also bold.

KKMethodOriginalRephrasePersonaLocality
4CAMR (ours)93.98%86.56%69.98%18.34%
Random Replay93.62%86.08%70.74%19.58%
Semantic Replay80.40%73.36%63.21%11.91%
8CAMR (ours)96.70%89.26%72.62%19.86%
Random Replay96.62%89.08%70.92%19.30%
Semantic Replay82.62%74.73%65.70%13.67%
16CAMR (ours)98.10%90.42%71.72%19.16%
Random Replay97.52%88.16%68.74%18.98%
Semantic Replay87.96%79.42%71.78%14.06%

Table 4. Replay strategies under different per-arrival replay caps KK. All methods use full-parameter fine-tuning. Best scores within each KK group are bold.

Online Feedback on NumGLUE-cm. Removing action selection or IGNORE degrades 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 under IGNORE, with substantial degradation when either component is removed. Online feedback improves three tasks, with the largest gain on NumGLUE-ds.

VariantFOMCNumGLUE-cmNumGLUE-dsPy150
CAMR (ours)72.3876.5477.5467.75
w/o Action Selection71.2574.0774.5766.89
w/o Online Feedback71.2576.5475.6967.58
w/o Memory Gate70.6374.0772.8566.65
w/o IGNORE71.8874.0776.6366.63
w/o Replay on IGNORE71.2572.8473.5466.49

Table 5. Writer ablation results under full-parameter fine-tuning. The light peach shading marks the highest score in each column, including ties.

Replay Sample Selection Analysis

CAMR balances focused replay with historical coverage under a fixed budget. At 100K, its replay share for the high-frequency core-3K set is 2.42× that of Random Replay Table 10. Its replay concentrates on regions similar to Semantic Replay but covers more arrived facts: 90.4% versus 83.9% Appendix E. This pattern is consistent with its hybrid sampling: MERGE prioritizes compatible related history while reserving uniform slots, and ADD samples uniformly. CAMR also outperforms @page 8/14 starts_mid=0 ends_mid=1

Method3K10K50K100K
CAMR25.5420.939.747.30
Random Replay19.4913.565.943.02

Table 10. Share (%) of replay slots allocated to the fixed high-frequency core-3K set as the WikiBigEdit history grows.

MethodT1 Acc. FinQAT2 Acc. FinQAT2 Acc. GSM8KT3 Acc. FinQAT3 Acc. GSM8KT3 pass@1 APPST4 Acc. FinQAT4 Acc. GSM8KT4 pass@1 APPST4 ROUGE-L SAMSum
Fine-tuning and parameter-space methods
Fine-Tuning (LoRA)30.5122.2382.4126.9480.8930.4022.23 (-8.28)70.05 (-12.36)30.60 (+0.20)43.79
Sequential Fine-Tuning (Full FT)23.3724.2475.0624.8573.6220.8023.54 (+0.17)70.66 (-4.40)22.80 (+2.00)42.25
O-LoRA31.5631.3982.9430.9582.6428.8030.43 (-1.13)83.55 (+0.61)29.10 (+0.30)44.59
Adam-NSCL7.157.1575.667.1575.4436.107.06 (-0.09)76.04 (+0.38)36.10 (+0.00)25.46
LoRA-Merge64.2564.1782.4964.1783.7033.5063.30 (-0.95)83.32 (+0.83)32.60 (-0.90)41.17
Knowledge-editing methods
LocFT74.0267.5783.6267.5779.6132.2068.09 (-5.93)81.27 (-2.35)32.80 (+0.60)43.82
MEMIT4.806.6380.676.7180.5923.806.19 (+1.39)80.74 (+0.07)24.70 (+0.90)32.47
AlphaEdit6.546.8967.026.9766.9432.606.97 (+0.43)67.85 (+0.83)32.60 (+0.00)26.19
NAS7.507.3274.377.5974.0735.207.41 (-0.09)75.36 (+0.99)35.60 (+0.40)25.72
MEMIT + NAS7.327.5978.857.4178.8534.807.67 (+0.35)78.77 (-0.08)35.90 (+1.10)25.68
CrispEdit50.2216.7481.8820.9278.2425.6021.10 (-29.12)48.37 (-33.51)7.50 (-18.10)37.96
UltraEdit8.028.2080.528.0278.6234.508.11 (+0.09)80.21 (-0.31)34.10 (-0.40)26.27
StableEdit17.8717.5283.5517.8782.8716.7017.52 (-0.35)82.56 (-0.99)14.90 (-1.80)42.58
WISE-Retrieve2.092.0947.382.1859.891.701.92 (-0.17)58.98 (+11.60)2.00 (+0.30)12.96
Replay-based continual-learning methods
Random Replay (Full FT)75.1574.8081.8873.6778.6226.3073.41 (-1.74)76.12 (-5.76)21.40 (-4.90)41.67
Random Replay (LoRA)32.1735.1482.3435.2280.7430.7026.85 (-5.32)76.65 (-5.69)27.60 (-3.10)44.86
Semantic Replay (LoRA)28.8634.7080.0634.2680.0629.6030.95 (+2.09)77.94 (-2.12)29.20 (-0.40)43.75
Relation Oracle Replay (Full FT)27.7233.8382.5633.8382.1829.3029.64 (+1.92)78.77 (-3.79)27.70 (-1.60)43.43
TiC-style Replay (LoRA)36.7935.1483.0234.8781.4328.9034.18 (-2.61)81.20 (-1.82)30.80 (+1.90)44.94
Maximally Interfered Retrieval (LoRA)32.6132.6182.2631.1281.7327.9031.30 (-1.31)82.26 (+0.00)29.70 (+1.80)43.61
Transfer Selective Replay (LoRA)36.9736.0983.2435.2282.0330.8034.52 (-2.45)81.43 (-1.81)29.60 (-1.20)44.26
CAMR (Full FT, ours)75.2475.8581.5875.9482.1830.1076.11 (+0.87)81.58 (+0.00)30.50 (+0.40)45.10
CAMR (LoRA, ours)76.1076.3683.4777.1585.7532.8077.24 (+1.14)84.91 (+1.44)31.80 (-1.00)43.96

Table 3 (PDF p. 8). 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 shading marks the highest value in each column, these values are also bold.

KKMethodOriginalRephrasePersonaLocality
4CAMR (ours)93.98%86.56%69.98%18.34%
Random Replay93.62%86.08%70.74%19.58%
Semantic Replay80.40%73.36%63.21%11.91%
8CAMR (ours)96.70%89.26%72.62%19.86%
Random Replay96.62%89.08%70.92%19.30%
Semantic Replay82.62%74.73%65.70%13.67%
16CAMR (ours)98.10%90.42%71.72%19.16%
Random Replay97.52%88.16%68.74%18.98%
Semantic Replay87.96%79.42%71.78%14.06%

Table 4 (PDF p. 8). Replay strategies under different per-arrival replay caps KK. All methods use full-parameter fine-tuning. Best scores within each KK group are bold.

Online Feedback on NumGLUE-cm. Removing action selection or IGNORE degrades 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 under IGNORE, with substantial degradation when either component is removed. Online feedback improves three tasks, with the largest gain on NumGLUE-ds.

VariantFOMCNumGLUE-cmNumGLUE-dsPy150
CAMR (ours)72.3876.5477.5467.75
w/o Action Selection71.2574.0774.5766.89
w/o Online Feedback71.2576.5475.6967.58
w/o Memory Gate70.6374.0772.8566.65
w/o IGNORE71.8874.0776.6366.63
w/o Replay on IGNORE71.2572.8473.5466.49

Table 5 (PDF p. 8). Writer ablation results under full-parameter fine-tuning. The light peach shading marks the highest score in each column, including ties.

Replay Sample Selection Analysis

CAMR balances focused replay with historical coverage under a fixed budget. At 100K, its replay share for the high-frequency core-3K set is 2.42× that of Random Replay Table 10. Its replay concentrates on regions similar to Semantic Replay but covers more arrived facts: 90.4% versus 83.9% Appendix E. This pattern is consistent with its hybrid sampling: MERGE prioritizes compatible related history while reserving uniform slots, and ADD samples uniformly. CAMR also outperforms @page 8/14 starts_mid=0 ends_mid=1

MethodT1 Acc. FinQAT2 Acc. FinQAT2 Acc. GSM8KT3 Acc. FinQAT3 Acc. GSM8KT3 pass@1 APPST4 Acc. FinQAT4 Acc. GSM8KT4 pass@1 APPST4 ROUGE-L SAMSum
Fine-tuning and parameter-space methods
Fine-Tuning (LoRA)30.5122.2382.4126.9480.8930.4022.23 (-8.28)70.05 (-12.36)30.60 (+0.20)43.79
Sequential Fine-Tuning (Full FT)23.3724.2475.0624.8573.6220.8023.54 (+0.17)70.66 (-4.40)22.80 (+2.00)42.25
O-LoRA31.5631.3982.9430.9582.6428.8030.43 (-1.13)83.55 (+0.61)29.10 (+0.30)44.59
Adam-NSCL7.157.1575.667.1575.4436.107.06 (-0.09)76.04 (+0.38)36.10 (+0.00)25.46
LoRA-Merge64.2564.1782.4964.1783.7033.5063.30 (-0.95)83.32 (+0.83)32.60 (-0.90)41.17
Knowledge-editing methods
LocFT74.0267.5783.6267.5779.6132.2068.09 (-5.93)81.27 (-2.35)32.80 (+0.60)43.82
MEMIT4.806.6380.676.7180.5923.806.19 (+1.39)80.74 (+0.07)24.70 (+0.90)32.47
AlphaEdit6.546.8967.026.9766.9432.606.97 (+0.43)67.85 (+0.83)32.60 (+0.00)26.19
NAS7.507.3274.377.5974.0735.207.41 (-0.09)75.36 (+0.99)35.60 (+0.40)25.72
MEMIT + NAS7.327.5978.857.4178.8534.807.67 (+0.35)78.77 (-0.08)35.90 (+1.10)25.68
CrispEdit50.2216.7481.8820.9278.2425.6021.10 (-29.12)48.37 (-33.51)7.50 (-18.10)37.96
UltraEdit8.028.2080.528.0278.6234.508.11 (+0.09)80.21 (-0.31)34.10 (-0.40)26.27
StableEdit17.8717.5283.5517.8782.8716.7017.52 (-0.35)82.56 (-0.99)14.90 (-1.80)42.58
WISE-Retrieve2.092.0947.382.1859.891.701.92 (-0.17)58.98 (+11.60)2.00 (+0.30)12.96
Replay-based continual-learning methods
Random Replay (Full FT)75.1574.8081.8873.6778.6226.3073.41 (-1.74)76.12 (-5.76)21.40 (-4.90)41.67
Random Replay (LoRA)32.1735.1482.3435.2280.7430.7026.85 (-5.32)76.65 (-5.69)27.60 (-3.10)44.86
Semantic Replay (LoRA)28.8634.7080.0634.2680.0629.6030.95 (+2.09)77.94 (-2.12)29.20 (-0.40)43.75
Relation Oracle Replay (Full FT)27.7233.8382.5633.8382.1829.3029.64 (+1.92)78.77 (-3.79)27.70 (-1.60)43.43
TiC-style Replay (LoRA)36.7935.1483.0234.8781.4328.9034.18 (-2.61)81.20 (-1.82)30.80 (+1.90)44.94
Maximally Interfered Retrieval (LoRA)32.6132.6182.2631.1281.7327.9031.30 (-1.31)82.26 (+0.00)29.70 (+1.80)43.61
Transfer Selective Replay (LoRA)36.9736.0983.2435.2282.0330.8034.52 (-2.45)81.43 (-1.81)29.60 (-1.20)44.26
CAMR (Full FT, ours)75.2475.8581.5875.9482.1830.1076.11 (+0.87)81.58 (+0.00)30.50 (+0.40)45.10
CAMR (LoRA, ours)76.1076.3683.4777.1585.7532.8077.24 (+1.14)84.91 (+1.44)31.80 (-1.00)43.96

Table 3 (PDF p. 8, second). 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 shading marks the highest value in each column, these values are also bold.

KKMethodOriginalRephrasePersonaLocality
4CAMR (ours)93.98%86.56%69.98%18.34%
Random Replay93.62%86.08%70.74%19.58%
Semantic Replay80.40%73.36%63.21%11.91%
8CAMR (ours)96.70%89.26%72.62%19.86%
Random Replay96.62%89.08%70.92%19.30%
Semantic Replay82.62%74.73%65.70%13.67%
16CAMR (ours)98.10%90.42%71.72%19.16%
Random Replay97.52%88.16%68.74%18.98%
Semantic Replay87.96%79.42%71.78%14.06%

Table 4 (PDF p. 8, second). Replay strategies under different per-arrival replay caps KK. All methods use full-parameter fine-tuning. Best scores within each KK group are bold.

Online Feedback on NumGLUE-cm. Removing action selection or IGNORE degrades 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 under IGNORE, with substantial degradation when either component is removed. Online feedback improves three tasks, with the largest gain on NumGLUE-ds.

VariantFOMCNumGLUE-cmNumGLUE-dsPy150
CAMR (ours)72.3876.5477.5467.75
w/o Action Selection71.2574.0774.5766.89
w/o Online Feedback71.2576.5475.6967.58
w/o Memory Gate70.6374.0772.8566.65
w/o IGNORE71.8874.0776.6366.63
w/o Replay on IGNORE71.2572.8473.5466.49

Table 5 (PDF p. 8, second). Writer ablation results under full-parameter fine-tuning. The light peach shading marks the highest score in each column, including ties.

Replay Sample Selection Analysis

CAMR balances focused replay with historical coverage under a fixed budget. At 100K, its replay share for the high-frequency core-3K set is 2.42× that of Random Replay Table 10. Its replay concentrates on regions similar to Semantic Replay but covers more arrived facts: 90.4% versus 83.9% Appendix E. This pattern is consistent with its hybrid sampling: MERGE prioritizes compatible related history while reserving uniform slots, and ADD samples uniformly. CAMR also outperforms Semantic Replay on Original and Rephrase Match at every tested KK (Table 4).

Conclusion

We introduced CAMR, 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; since CAMR is 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. IGNORE is not triggered on WikiBigEdit, which contains few repeated facts, but it accounted for 19.14% of decisions under the gate defined in § 4.2 on the APPS stream with repeated examples (Appendix § 9). Removing IGNORE lowers performance on all four ablation tasks, showing its benefit on redundant data. We will further evaluate it on streams with naturally occurring repetitions.

Additional 150K WikiBigEdit Evaluation

We compare CAMR (Full FT) with Full-history Replay (LoRA) at 150K using the same Match definitions as the 100K evaluation. CAMR exceeds 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).

MethodOriginalRephrasePersonaLocality
Full-history Replay (LoRA)93.7578.7145.3122.66
CAMR (Full FT, ours)97.5387.7767.5930.08

Table 6. WikiBigEdit Match accuracy (%) after 150,000 continual updates. The best result in each column is shown in bold.

WikiBigEdit Replay Volume

Table 7 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. CAMR and 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, where sbs_b is the number of previously observed facts at the start of block bb.

Method3K10K50K100K
Fact presentations (current + replay)
CAMR (Full FT)14,80149,516246,364494,424
Random Replay (Full FT)14,98449,984249,984499,984
Full-history Replay (LoRA)13,500141,6253,440,62513,682,125

Table 7. Cumulative WikiBigEdit fact presentations, including current facts and historical replay.

Writer Action Utilization

Table 8 reports a controlled action audit using the IGNORE gate defined in § 4.2 from the original experiments. Under this gate, IGNORE requires 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, so IGNORE was never selected.

StreamSizeADDMERGEIGNORE
WikiBigEdit3K67.8332.170.00
WikiBigEdit10K59.5540.450.00
WikiBigEdit50K71.7528.250.00
WikiBigEdit100K69.7330.270.00
APPS5K58.9421.9219.14

Table 8. Cumulative writer-action shares (%) under the IGNORE gate.

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 selected ADD 2,947 times (58.94%), MERGE 1,096 times (21.92%), and IGNORE 957 times (19.14%). This diagnostic shows that, under repeated exposure, the writer selectively skips direct supervision of examples that satisfy the mastery criteria.

Complete CAMR Hyperparameter Specification

Table 9 reports the complete set of hyperparameters introduced in the CAMR formulation, together with their values in the reference configuration. These values define the reference CAMR configuration. The choices P=4P = 4 and K=4K = 4 bound the per-arrival probe and replay loads, while τs=0.65\tau_s = 0.65 and τm=0.25\tau_m = 0.25 impose selective compatibility and mastery criteria. The 32-dimensional projection keeps the writer compact. Setting α=0.5\alpha= 0.5 gives equal weight to the current-example term and the aggregate replay term in Equation (5). The reward weights retain the historical-gain term at unit scale and apply a token-cost penalty in Equation (6), normalized by the dataset-specific CrefC_{\mathrm{ref}} values in Table 9. Specifically, letting Lmax⁡L_{\max} denote the maximum sequence length of a dataset, we set Cref=128C_{\mathrm{ref}} = 128 when Lmax⁡<128L_{\max} < 128 and Cref=1024C_{\mathrm{ref}} = 1024 otherwise. Finally, γ=0.95\gamma= 0.95 preserves credit within the four-event rollout, β=0.01\beta= 0.01 supplies a modest entropy bonus, and cv=0.5c_v = 0.5 gives the critic loss a moderate coefficient in Equations (7) and (8).

Table 9: Complete set of CAMR hyperparameters governing memory, replay, the writer architecture, and the learning objectives.

HyperparameterValue
Training and optimization
Base language modelQwen3-8B-Base
Language-model updateFull-parameter SFT
Language-model optimizerAdamW
Language-model learning rate2×10−62 \times10^{-6}
Writer optimizerAdam
Writer learning rate3×10−43 \times10^{-4}
Optimizer steps per arrival1
Logical batch size per arrival1+∣Rt∣≤51 + |\mathcal{R}_t| \le5 facts
Weight decay / gradient clip0 / 1.0
Memory and replay
Probe cap PP4
Retrieved-candidate cap64
Candidate similarity threshold τs\tau_s0.65
Mastery NLL threshold τm\tau_m0.25
Per-arrival replay cap KK4
MERGE uniform-replay quota2 of 4 slots
MERGE candidate quotaUp to 2 of 4 slots
MERGE candidate selectionWriter-selected from CtC_t, without replacement
Writer and learning objectives
Writer projection dimension dhd_h32
Writer rollout length ∣B∣|B|4 events
Current-example loss weight α\alpha0.5
Retention reward weight λh\lambda_h1.0
Cost penalty weight λc\lambda_c0.01
Cost reference CrefC_{\mathrm{ref}}128 tokens if Lmax⁡<128L_{\max} < 128; 1,024 tokens otherwise
Discount factor γ\gamma0.95
Entropy coefficient β\beta0.01
Critic-loss coefficient cvc_v0.5
Training arrivals and train/output token caps
DatasetArrivalsTrain/output caps
WikiBigEdit100,000512 / 64
WikiFactDiff36,000256 / 16
TRACE5,000/task9,216 / 1,024
Cross-domain5,000/task16,384 / 4,096
FOMC/NumGLUE5,000/task640 / 8–128
Py1505,0004,608 / 512

Table 9. Complete set of CAMR hyperparameters governing memory, replay, the writer architecture, and the learning objectives.

Semantic Replay Trajectory Analysis

We compare the cumulative replay allocations of CAMR, 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 match CAMR’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 § 8.

Figure 4 removes the cumulative advantage of earlier-arriving facts and the event-wise variation in eligible history. Random Replay remains close to the neutral 1× level across regions and checkpoints. CAMR forms 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 shows both semantic coverage and repeated selection. Under the matched budget, CAMR maintains 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 that CAMR combines broad semantic support with selective allocation of a bounded replay budget.

Figure 4. Age- and eligibility-corrected semantic replay allocation across the WikiBigEdit stream. Rows show CAMR, count-matched Random Replay from CAMR’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× expectation, red denotes over-allocation, and blue denotes under-allocation on the shared log₂ scale. All checkpoints use the same frozen representation and PCA projection.

Figure 5. Unnormalized cumulative replay counts in the same semantic space. Rows and checkpoints follow Figure 4. 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.

Core-knowledge replay under stream growth.

Table 10 reports the share of replay slots assigned to a fixed high-frequency core-3K set at each WikiBigEdit checkpoint.

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. When MERGE is selected, CAMR reserves 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, CAMR assigns 2.42× the replay share of Random Replay to the core-3K set, reducing the dilution of core knowledge as the replay pool grows.

References

  1. [1]Rahaf Aljundi, Eugene Belilovsky, Tinne Tuytelaars, Laurent Charlin, Massimo Caccia, Min Lin, and Lucas Page-Caccia. 2019. Online continual learning with maximal interfered retrieval. In Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc.
  2. [2]Hichem Ammar Khodja, Frédéric Béchet, Quentin Brabant, Alexis Nasr, and Gwénolé Lecorvé. 2024. Wik-iFactDiff: A large, realistic, and temporally adaptable dataset for atomic factual knowledge update in causal language models. In Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024), pages 17614–17624. ELRA and ICCL.
  3. [3]Moses S. Charikar. 2002. Similarity estimation techniques from rounding algorithms. In Proceedings of the 34th Annual ACM Symposium on Theory of Computing, pages 380–388. ACM.
  4. [4]Zhiyu Chen, Wenhu Chen, Charese Smiley, Sameena Shah, Iana Borova, Dylan Langdon, Reema Moussa, Matt Beane, Ting-Hao Huang, Bryan Routledge, and William Yang Wang. 2021. Finqa: A dataset of numerical reasoning over financial data. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 3697–3711. ACL.arxiv.org/abs/2109.00122
  5. [5]Xin Cheng, Rui Tian, Wangding Zeng, Damai Dai, Qinyu Chen, Bingxuan Wang, Zhenda Xie, Kezhao Huang, Xingkai Yu, Chengqi Deng, Shangyan Zhou, Chenggang Zhao, Zhewen Hao, Yukun Li, Han Zhang, Zhengyan Zhang, Yixuan Wei, M.Y. Xu, Huishuai Zhang, and 2 others. 2026. Conditional memory via scalable lookup: A new axis of sparsity for large language models. arXiv preprint arXiv:2601.07372.arxiv.org/abs/2601.07372
  6. [6]Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reichiro Nakano, Christopher Hesse, and John Schulman. 2021. Training verifiers to solve math word problems. In arXiv preprint arXiv:2110.14168.arxiv.org/abs/2110.14168
  7. [7]Matthias De Lange, Rahaf Aljundi, Marc Masana, Sarah Parisot, Xu Jia, Ales Leonardis, Gregory Slabaugh, and Tinne Tuytelaars. 2022. A continual learning survey: Defying forgetting in classification tasks. IEEE Transactions on Pattern Analysis and Machine Intelligence, 44(7):3366–3385.DOI
  8. [8]Yang Fan, Fei Tian, Tao Qin, Xiang-Yang Li, and Tie-Yan Liu. 2018. Learning to teach. In International Conference on Learning Representations.arxiv.org/abs/1805.03643
  9. [9]Junfeng Fang, Houcheng Jiang, Kun Wang, Yunshan Ma, Shi Jie, Xiang Wang, Xiangnan He, and Tat-Seng Chua. 2025. AlphaEdit: Null-space constrained knowledge editing for language models. In International Conference on Learning Representations. Oral presentation.arxiv.org/abs/2410.02355
  10. [10]Bogdan Gliwa, Iwona Mochol, Maciej Biesek, and Aleksander Wawer. 2019. SAMSum corpus: A human-annotated dialogue dataset for abstractive summarization. In Proceedings of the 2nd Workshop on New Frontiers in Summarization, pages 70–79. ACL.DOI
  11. [11]Alex Graves, Marc G. Bellemare, Jacob Menick, Rémi Munos, and Koray Kavukcuoglu. 2017. Automated curriculum learning for neural networks. In Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pages 1311–1320. PMLR.arxiv.org/abs/1704.03003
  12. [12]Xiaojie Gu, Ziying Huang, Jia-Chen Gu, and Kai Zhang. 2026. Ultratrain: Training-, subject-, and memory-free lifelong editing in language models. Preprint, arXiv:2505.14679. TMLR 2026; arXiv:2505.14679.arxiv.org/abs/2505.14679
  13. [13]Akshat Gupta, Sidharth Baskaran, and Gopal Anumanchipalli. 2024. Rebuilding ROME: Resolving model collapse during sequential model editing. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 21738–21744. Association for Computational Linguistics.arxiv.org/abs/2403.07175
  14. [14]Dan Hendrycks, Steven Basart, Saurav Kadavath, Mantas Mazeika, Akul Arora, Ethan Guo, Collin Burns, Samir Puranik, Horace He, Dawn Song, and Jacob Steinhardt. 2021. Measuring coding challenge competence with apps. In arXiv preprint arXiv:2105.09938.
  15. [15]Edward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. 2022. LoRA: Low-rank adaptation of large language models. In International Conference on Learning Representations.arxiv.org/abs/2106.09685
  16. [16]Yebowen Hu, Timothy Ganter, Hanieh Deilamsalehy, Hendrik Dernoncourt, Hassan Foroosh, and Fei Liu. 2023. MeetingBank: A benchmark dataset for meeting summarization. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 16409–16423. ACL.arxiv.org/abs/2305.17529
  17. [17]Zarif Ikram, Arad Firouzkouhi, Stephen Tu, Mahdi Soltanolkotabi, and Paria Rashidinejad. 2026. Crispedit: Low-curvature projections for scalable non-destructive LLM editing. Preprint, arXiv:2602.15823. ICML 2026; arXiv:2602.15823.arxiv.org/abs/2602.15823
  18. [18]James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A. Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska, Demis Hassabis, Claudia Clopath, Dharshan Kumaran, and Raia Hadsell. 2017. Overcoming catastrophic forgetting in neural networks. Proceedings of the National Academy of Sciences, 114(13):3521–3526.DOI
  19. [19]Jeffrey Li, Mohammadreza Armandpour, Seyed Iman Mirzadeh, Sachin Mehta, Vaishaal Shankar, Raviteja Vemulapalli, Samy Bengio, Oncel Tuzel, Mehrdad Farajtabar, Hadi Pouransari, and Fartash Faghri. 2025. TiC-LM: A web-scale benchmark for time-continual LLM pretraining.arxiv.org/abs/2504.02107
  20. [20]Mingda Liu, Zhenghan Zhu, Ze’an Miao, and Katsuki Fujisawa. 2026. Norm anchors make model edits last. Preprint, arXiv:2602.02543. ArXiv:2602.02543.arxiv.org/abs/2602.02543
  21. [21]Ilya Loshchilov and Frank Hutter. 2019. Decoupled weight decay regularization. In International Conference on Learning Representations. ArXiv:1711.05101.arxiv.org/abs/1711.05101
  22. [22]Pan Lu, Swaroop Mishra, Tanglin Xia, Liang Qiu, Kai-Wei Chang, Song-Chun Zhu, Oyvind Tafjord, Peter Clark, and Ashwin Kalyan. 2022. Learn to explain: Multimodal reasoning via thought chains for science question answering. In Advances in Neural Information Processing Systems, volume 35, pages 2507–2521.arxiv.org/abs/2209.09513
  23. [23]Xin Ma, Wei Chen, Qi Liu, Derong Xu, Zhi Zheng, Tong Xu, and Enhong Chen. 2026. More edits, more stable: Understanding the lifelong normalization in sequential model editing. Preprint, arXiv:2605.11836. ICML 2026; arXiv:2605.11836.arxiv.org/abs/2605.11836
  24. [24]Michael McCloskey and Neal J. Cohen. 1989. Catastrophic interference in connectionist networks: The sequential learning problem. In Psychology of Learning and Motivation, volume 24, pages 109–165. Academic Press.DOI
  25. [25]Kevin Meng, David Bau, Alex Andonian, and Yonatan Belinkov. 2022. Locating and editing factual associations in GPT. In Advances in Neural Information Processing Systems, volume 35, pages 17359–17372. Curran Associates, Inc.arxiv.org/abs/2202.05262
  26. [26]Kevin Meng, Arnab Sen Sharma, Alex Andonian, Yonatan Belinkov, and David Bau. 2023. Mass-editing memory in a transformer. In International Conference on Learning Representations.arxiv.org/abs/2210.07229
  27. [27]Yang Meng, Zhenya Liu, Zhuokai Zhao, and Yuxin Chen. 2026. Rethinking transfer in continual learning: A replay-based realisation. Preprint, arXiv:2607.15587. ArXiv:2607.15587.arxiv.org/abs/2607.15587
  28. [28]Swaroop Mishra, Arindam Mitra, Neeraj Varshney, Bhavdeep Sachdeva, Peter Clark, Chitta Baral, and Ashwin Kalyan. 2022. NumGLUE: A suite of fundamental yet challenging mathematical reasoning tasks. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 3505–3523. ACL.arxiv.org/abs/2204.05660
  29. [29]Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. 2016. Asynchronous methods for deep reinforcement learning. In Proceedings of the 33rd International Conference on Machine Learning, volume 48 of Proceedings of Machine Learning Research, pages 1928–1937. PMLR.arxiv.org/abs/1602.01783
  30. [30]Veselin Raychev, Pavol Bielik, and Martin Vechev. 2016. Probabilistic model for code with decision trees. In Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 731–747. ACM.
  31. [31]David Rolnick, Arun Ahuja, Jonathan Schwarz, Timothy Lillicrap, and Greg Wayne. 2019. Experience replay for continual learning. In Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc.
  32. [32]Agam Shah, Suvan Paturi, and Sudheer Chava. 2023. Trillion dollar words: A new financial dataset, task and market analysis. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 6664–6679. ACL.arxiv.org/abs/2305.07972

Paper details

vlnc:W_y8du9fc2
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents