arXiv:2610.36734cs.CLOct 2026

Manuscript Offprint

arXiv:2610.36734

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

Jingpu Yang, Tianhao Li, Fengxian Ji, Yufeng Wang, Shuxin Zheng, Xiaoqing Zhang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

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. Github.

1 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 (McCloskey and Cohen, 1989; De Lange et al., 2022).

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 (Meng et al., 2022, 2023; Fang et al., 2025; Liu et al., 2026). 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). 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) and TSR (Meng et al., 2026). 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

∗^{*}Corresponding author.

Figure

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.

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.

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 → GSM8K → APPS → 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.

References (18)