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.
Figures & tables
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.
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.
Method
3K
10K
50K
100K (change vs. 3K)
Original
Rephrase
Persona
Locality
Original
Rephrase
Persona
Locality
Original
Rephrase
Persona
Locality
Original
Rephrase
Persona
Locality
Unmodified base models
Qwen3-8B-Base
14.67
13.71
11.20
5.88
13.16
12.51
9.33
9.62
12.04
11.90
8.76
10.55
12.88 (-1.79)
12.33 (-1.38)
9.08 (-2.12)
13.09 (+7.21)
Qwen3-14B-Base
21.63
20.20
11.53
29.41
20.42
19.69
9.99
21.15
17.26
16.55
8.72
17.58
17.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.40
47.83
38.57
21.97
56.83
52.34
44.61
21.95
48.27
43.10
34.70
24.62
41.08 (-10.32)
37.40 (-10.43)
28.23 (-10.34)
23.21 (+1.24)
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=8 and a learning rate of 2×10−4 through 50K updates and 10−4 thereafter, continuing the same model and optimizer.
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.
Method
T1
T2
T3
T4 (change from post-acquisition)
Acc.
Acc.
ROUGE-L
Acc.
ROUGE-L
Edit
Acc.
ROUGE-L
Edit
Acc.
C-STANCE
C-STANCE
MeetingBank
C-STANCE
MeetingBank
Py150
C-STANCE
MeetingBank
Py150
ScienceQA
Fine-tuning and parameter-space methods
Fine-Tuning (LoRA)
50.55
50.10
58.91
53.70
56.06
67.88
53.85 (+3.30)
56.30 (-2.61)
67.30 (-0.58)
94.25
Sequential Fine-Tuning (LoRA)
56.60
56.75
65.30
56.80
58.66
67.69
55.00 (-1.60)
53.85 (-11.45)
66.25 (-1.44)
91.95
Sequential Fine-Tuning (Full FT)
49.30
46.05
69.20
46.75
68.14
63.39
47.70 (-1.60)
68.97 (-0.23)
62.76 (-0.63)
92.60
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.
Method
T1
T2
T3
T4 (change from post-acquisition)
Acc.
Acc.
Acc.
Acc.
Acc.
pass@1
Acc.
Acc.
pass@1
ROUGE-L
FinQA
FinQA
GSM8K
FinQA
GSM8K
APPS
FinQA
GSM8K
APPS
SAMSum
Fine-tuning and parameter-space methods
Fine-Tuning (LoRA)
30.51
22.23
82.41
26.94
80.89
30.40
22.23 (-8.28)
70.05 (-12.36)
30.60 (+0.20)
43.79
Sequential Fine-Tuning (Full FT)
23.37
24.24
75.06
24.85
73.62
20.80
23.54 (+0.17)
70.66 (-4.40)
22.80 (+2.00)
42.25
O-LoRA
31.56
31.39
82.94
30.95
82.64
28.80
30.43 (-1.13)
83.55 (+0.61)
29.10 (+0.30)
44.59
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.
K
Method
Original
Rephrase
Persona
Locality
4
CAMR (ours)
93.98%
86.56%
69.98%
18.34%
Random Replay
93.62%
86.08%
70.74%
19.58%
Semantic Replay
80.40%
73.36%
63.21%
11.91%
8
CAMR (ours)
96.70%
89.26%
72.62%
19.86%
Random Replay
96.62%
89.08%
70.92%
19.30%
Semantic Replay
82.62%
74.73%
65.70%
13.67%
Table 4: Replay strategies under different per-arrival replay caps K . All methods use full-parameter fine-tuning. Best scores within each K group are bold.
Variant
FOMC
NumGLUE-cm
NumGLUE-ds
Py150
CAMR (ours)
72.38
76.54
77.54
67.75
w/o Action Selection
71.25
74.07
74.57
66.89
w/o Online Feedback
71.25
76.54
75.69
67.58
w/o Memory Gate
70.63
74.07
72.85
66.65
w/o Ignore
71.88
74.07
76.63
66.63
w/o Replay on Ignore
71.25
72.84
73.54
66.49
Table 5: Writer ablation results under full-parameter fine-tuning. The light peach shading marks the highest score in each column, including ties.
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
Method
Original
Rephrase
Persona
Locality
Full-history Replay (LoRA)
93.75
78.71
45.31
22.66
CAMR (Full FT, ours)
97.53
87.77
67.59
30.08
Appendix
Table 6: WikiBigEdit Match accuracy (%) after 150,000 continual updates. The best result in each column is shown in bold.
Method
3K
10K
50K
100K
Fact presentations (current + replay)
CAMR (Full FT)
14,801
49,516
246,364
494,424
Random Replay (Full FT)
14,984
49,984
249,984
499,984
Full-history Replay (LoRA)
13,500
141,625
3,440,625
13,682,125
Appendix
Table 7: Cumulative WikiBigEdit fact presentations, including current facts and historical replay.
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 2 scale. All checkpoints use the same frozen representation and PCA projection.
Stream
Size
Add
Merge
Ignore
WikiBigEdit
3K
67.83
32.17
0.00
10K
59.55
40.45
0.00
50K
71.75
28.25
0.00
100K
69.73
30.27
0.00
APPS
5K
58.94
21.92
19.14
Appendix
Table 8: Cumulative writer-action shares (%) under the Ignore gate.
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.
Hyperparameter
Value
Training and optimization
Base language model
Qwen3-8B-Base
Language-model update
Full-parameter SFT
Language-model optimizer
AdamW
Language-model learning rate
2×10−6
Writer optimizer
Adam
Appendix
Table 9: Complete set of CAMR hyperparameters governing memory, replay, the writer architecture, and the learning objectives.
Method
3K
10K
50K
100K
CAMR
25.54
20.93
9.74
7.30
Random Replay
19.49
13.56
5.94
3.02
Appendix
Table 10: Share (%) of replay slots allocated to the fixed high-frequency core-3K set as the WikiBigEdit history grows.
Gaoling School of Artificial Intelligence, Renmin University of China, Beijing, China · School of Artificial Intelligence and Data Science, University of International Business and Economics, Beijing, China