Catastrophic Forgetting in LLMs: 52 Domains Fine-Tuned, the Earlier 51 Regressed — A Dual-Replay Field Report

Yaqin Hei ·

Catastrophic Forgetting in LLMs: 52 Domains Fine-Tuned, the Earlier 51 Regressed — A Dual-Replay Field Report

The day we finished training domain 52, the earlier 51 all sank one notch. Was it noise? The first time I saw the curve, I almost said yes. Then product owners started asking why product line A's support assistant, which had been fine last month, suddenly no longer understood its users.

Here is the result. Sequentially fine-tuned across 52 product domains, natural-language-understanding F1 (NLU F1) on earlier ones dropped 1 to 2 points each time, and backward transfer (BWT, the metric for cumulative forgetting) reached -7.2. Dual-Replay — 9M adapter parameters, 0.3% of a 7B base, plus 20% dual-stream replay — pulled BWT back to -4.7. Against LoRA plus single-buffer replay at -7.2, that is about 35% less forgetting. It is a relative drop in the absolute value of backward transfer, not prior-domain F1 itself being 35% higher. 99th-percentile latency (p99) stayed under 100 ms.

Before my PhD, I did large-language-model (LLM) engineering on a Fortune 500 client's production conversational system. It served hardware troubleshooting, software support, retail operations, subscription management, and dozens of other product lines. The scale looked like this: 52 product domains, each with its own intent taxonomy, domain vocabulary, and resolution patterns; tens of millions of conversations a month; an edge budget of p99 inference latency at or under 100 ms and total memory at or under 16 GB; and an onboarding cadence of roughly 1 to 2 new product domains a month.

The painful problem was not model capability. Every new domain we sequentially fine-tuned dragged the earlier domains' NLU F1 down by 1 to 2 points. After K accumulated tasks, the earliest domains were down 8 to 10 points. That is catastrophic forgetting in production form: not a single disaster, but a monthly slow bleed of collateral damage. Luo et al. (2023) measured it systematically on 1B to 7B models: after sequential fine-tuning, general-capability accuracy dropped, and some of those absolute drops were on the order of 10 to 15 points. They were not measuring prior-domain NLU F1. The phenomenon lines up; the dashboard numbers can only be aligned qualitatively.

This is the engineering debrief of what that experience became after I turned it into PhD research. Dual-Replay is a parameter-efficient adapter combined with a dual-stream replay buffer. On the 52-domain production setup, relative to LoRA plus single-buffer replay, it pulls BWT back by about 35%. On the public CLINC150 benchmark, on our 15-domain sequential split, LoRA plus replay scored 84.7 F1 and Dual-Replay scored 89.1; that public replication reports F1 only, so the 35% BWT figure does not extend to CLINC150. The formal definitions, significance tests, and ablations are in a paper of mine currently under submission, Parameter-Efficient Dual-Replay: Mitigating Catastrophic Forgetting in Sequential LLM Fine-Tuning Under Fixed Memory Budgets. What follows is what actually shows up in production.

Continuous deployment is the norm. Most academic methods cannot ship.

Retail customer service and IT service management (ITSM) ticket automation are the two visible agent-deployment settings. A third one is easy to overlook: continual learning for large language models. The stakes are not small.

Once the system ships, product owners ask every month to onboard new domains, new intents, new ticket types. Each "new domain added" is a potential forgetting trigger. Forgetting does not show up as a vague metric. Users who have been served well on product line A for months suddenly are not understood after a new release. That goes straight to complaints.

Production constraints rule out most academic methods. Edge deployment requires 16 GB total memory or less, and 100 ms p99 or less. Those two numbers eliminate most schemes that keep multiple model copies, allocate a fresh parameter group per task, or run a full regularization loss at training time. Nearly every continual-learning method in the academic literature — elastic weight consolidation (EWC), synaptic intelligence (SI), PackNet, gradient episodic memory (GEM), orthogonal low-rank adaptation (O-LoRA), CORAL — looks strong on synthetic benchmarks. Under a 52-domain and 16 GB budget, either memory blows or latency busts, and often both.

That is why I anchored the research on the co-design of parameter-efficient fine-tuning (PEFT) and replay: finding a Pareto-better combination under hard constraints.

How Dual-Replay is designed

The first engineering decision was to freeze the base model completely.

# Simplified
for param in base_model.parameters():
    param.requires_grad = False

# Train only the task-conditioned adapter
adapters = TaskConditionedAdapter(
    hidden_size=base_model.config.hidden_size,
    bottleneck=64,
    n_layers=12,
)
trainable = sum(p.numel() for p in adapters.parameters())
# trainable ≈ 9M (0.3% of base 7B)

Freezing the base caps how fast a new domain can be learned. The benefit is structural protection: parameters in the base never change, so prior-domain base representations stay in place.

class TaskConditionedAdapter(nn.Module):
    """
    A shared down/up projection per layer, plus
    a learned per-domain gating vector for conditioning
    """
    def forward(self, hidden_states, domain_id):
        gate = self.domain_gating(domain_id)       # learned per domain
        down = self.down_proj(hidden_states)
        gated = down * gate                        # element-wise modulation
        up = self.up_proj(gated)
        return hidden_states + up                  # residual

Notice this is one shared down and up projection, plus per-domain gating, not a separate low-rank adaptation (LoRA) for every domain. Trainable parameters are therefore constant in the number of tasks K, not linear in K. Adding a domain does not blow memory.

Per-task parameters cross the 16 GB edge budget around 18 domains; a shared adapter stays at 7.6 GB even at 60.

Per-task parameter-efficient fine-tuning crosses the 16 GB edge budget around 18 domains. Dual-Replay's shared adapter is constant in the number of tasks, and stays at 7.6 GB even at 60 domains. That 7.6 GB is the footprint we measured at the deployment precision we actually used; a different precision would change the number. This sentence is about when per-task adapters cross the 16 GB budget, around 18 domains. It is not the same threshold as "it will collapse once K is greater than 30."

The second engineering decision was a dual-stream replay buffer, not a single buffer.

class DualReplayBuffer:
    def __init__(self, total_budget_mb=512):
        # 70/30 split — paper §4.4
        self.domain_buf  = DomainStreamBuffer(int(total_budget_mb * 0.7))
        self.general_buf = GeneralKnowledgeBuffer(int(total_budget_mb * 0.3))

    def sample(self, batch_size, ratio_general=0.3):
        n_gen = int(batch_size * ratio_general)
        n_dom = batch_size - n_gen
        return self.domain_buf.sample(n_dom) + self.general_buf.sample(n_gen)

    def add(self, examples, domain_id):
        # importance-weighted: domains that forget more get more budget
        weighted = self._reweight_by_observed_forgetting(examples, domain_id)
        self.domain_buf.add(weighted, domain_id)

The two streams do different jobs. The domain stream gets 70% of the budget. Every domain seen so far keeps a set of representative samples, importance-weighted, so domains that are forgetting more retain more. The general stream gets 30% of the budget: a fixed set of non-production supervised fine-tuning (SFT) data, curated basic dialogue plus general question answering, used to stabilize shared representations.

The third decision is a learned domain classifier that routes at inference.

class DomainRouter(nn.Module):
    """A light 3M-parameter classifier that uses the base [CLS] embedding for domain prediction"""
    def __init__(self, n_domains, hidden_size):
        super().__init__()
        self.mlp = nn.Sequential(
            nn.Linear(hidden_size, 256), nn.GELU(), nn.Dropout(0.1),
            nn.Linear(256, n_domains)
        )
    def forward(self, cls_embedding):
        return self.mlp(cls_embedding).softmax(-1)  # routes to the adapter's domain_id

At inference, this classifier chooses which domain gate to apply. Accuracy is about 96% on a held-out test set (paper §5.3.5). That is what lets the system run without asking the user to declare which domain they are in.

The 52-domain run: Dual-Replay pulls BWT back 35% against single-buffer replay

I ran the full architecture across 52 sequential domains, five random orderings, evaluating on every previously seen domain after each new one.

The main results are in paper §5.2. Against LoRA plus single-buffer replay, Dual-Replay's BWT drops about 35%, from -7.2 to -4.7 — a relative drop in absolute value of (7.2 − 4.7) / 7.2 ≈ 34.7%. In the same table, DER is stronger than that single-buffer baseline, at 76.8 average F1 and BWT -6.5; O-LoRA is 76.2 and -6.8. The 35% is computed against single-buffer replay, not against DER, the stronger baseline in the table. Same 20% replay budget, same order of parameter budget. Average F1 rises 2.7 points at the same time, from 75.6 to 78.3. That 35% is a relative drop in the forgetting metric, not prior-domain F1 itself being 35% higher. The full comparison is below.

MethodAvg NLU F1 ↑BWT (forgetting) ↓Trainable paramsp99 latency
Full fine-tune (every domain retrained)72.4 ± 1.1-10.3 ± 0.87B95 ms
Naive LoRA (no replay)74.5 ± 0.9-8.4 ± 0.69M88 ms
LoRA + Replay (20% replay, single buffer)75.6 ± 0.8-7.2 ± 0.59M89 ms
O-LoRA (orthogonal subspaces)76.2 ± 1.0-6.8 ± 0.69M × 52 (linear)92 ms
DER (Dark Experience Replay)76.8 ± 0.7-6.5 ± 0.59M94 ms
Dual-Replay (this work)78.3 ± 0.6-4.7 ± 0.49M shared + 3M router88 ms

Against LoRA plus single-buffer replay, Dual-Replay pulled forgetting from -7.2 to -4.7, about a 35% drop. Not against DER, and not prior-domain F1 up 35%.

More surprising than the headline was replication on the public CLINC150 benchmark, in the second part of paper §5.2. LoRA plus replay scored 84.7 F1 on our 15-domain sequential split — that is our cut, not the benchmark's official default, which is 10 domains and 150 in-scope intents. Dual-Replay scored 89.1. A 4.4-point F1 gap replicated across datasets. This public replication reports F1 only; it does not include BWT, so it does not support a 35% BWT claim on CLINC150. That was the first time in the research that I believed the co-design synergy was not an artifact of one dataset.

The night that table came in, I stared at the training dashboard for a long time. My own read of the table was that replay and PEFT must be co-designed to be multiplicatively effective. That is a reading of these results, not a line from the survey. Shi et al. 2025's survey of continual learning for large language models treats PEFT and replay as complementary tools that are often combined; this table is my verification of that path on 52 domains of production data.

In production, forgetting does not take only one shape

When I systematized this work, I organized five forgetting failure modes that show up in production sequential fine-tuning. The first three were observed directly in our 52-domain setup. The last two are inferred from the limitations discussion in paper §6, included to complete the picture.

In production sequential fine-tuning, forgetting does not take only one shape.

The first is standard catastrophic forgetting. New-domain gradient updates overwrite prior-domain weights. In the sequential evaluation matrix, the lower-triangular cells decay monotonically, and BWT goes negative. After training all K tasks, you can compute it like this:

# After training all K tasks, evaluate every prior task on the final model
acc = eval_all_after_each_task(model, tasks)  # acc[i][k] = task i F1 after training k
K = len(tasks)
bwt = sum(acc[i][K-1] - acc[i][i] for i in range(K-1)) / (K-1)
# BWT persistently < -5 means severe forgetting

If BWT stays below -5, more than five points of cumulative forgetting, the training strategy needs a review. That -5 is our dashboard rule, not a field-wide cutoff.

The second looks like forgetting and is not. It is spurious forgetting: output alignment has drifted, while the knowledge in the base is intact. Zheng et al. (ICLR 2025) described this clearly in Spurious Forgetting. Task accuracy drops by 5 or more percentage points, but a linear probe barely moves. Freeze the entire adapter, train only a fresh classifier head, and the probe accuracy stays close to the task's post-training level. That check can be run this week on tasks with sharp drops. If the probe is close to the post-training level, the drop is alignment drift, not knowledge loss. The distinction matters because the wrong fix burns budget. In our paper §5.4 ablation, about 35% of observed "drops" were this. That 35% is from our own ablation, not a ready-made figure from Zheng et al.

The third is buffer-starvation forgetting. Replay capacity is fixed. As the task count grows, naive reservoir sampling slowly evicts rare-domain, low-traffic samples in favor of new ones. Rare-domain F1 drops two to three times faster than head-domain F1, and the bulk of BWT comes from the long tail. You can count buffer occupancy by domain:

# Buffer occupancy per domain
import collections
counts = collections.Counter(ex.domain_id for ex in buffer.samples)
head_avg = mean(acc[d] for d in top_10_by_traffic)
tail_avg = mean(acc[d] for d in bottom_10_by_traffic)
gap = head_avg - tail_avg  # > 5: buffer skews to the head, rare domains are starving

If the head-versus-tail F1 gap is greater than 5 points, the buffer needs importance weighting.

The fourth is memory-budget explosion. Per-task LoRA, orthogonal LoRA, or per-task PEFT experts grow linearly in the task count. Fifty-two domains times a 9M adapter is 468M. Stacked on a 7B base, the 16 GB budget cracks. The observable is an out-of-memory (OOM) alert after the number of live domains reaches some N, then weekly memory exhaustion. This week, check whether your PEFT scheme's trainable parameters are constant in K or linear in K. Search the repo for LoraConfig. If every task creates a new one, it is linear in K. If the parameter complexity is linear in K, it will collapse once K is greater than 30. That sentence is about parameters growing linearly in K, with historical adapters all left resident in memory; it also depends on deployment precision and on whether you are looking at training or inference. It is not the same threshold as "crosses the 16 GB edge budget around 18 domains," and it is not a law that is independent of how the system is deployed.

The fifth is out-of-distribution (OOD) multi-intent fragility. Every training example is a single intent. In production, users often ask two things in one sentence, such as cancel this order and also how refunds are calculated. The adapter is well optimized for single intents and collapses on multi-intent turns. Single-intent test F1 still looks strong; production F1 runs 5 to 10 points below the test set. This week, sample 100 production conversations and hand-label the number of intents. If multi-intent traffic is above 15% while the training set is below 2%, this is the case. If the train-versus-production gap in intent count is greater than 10 percentage points, the set needs multi-intent augmentation.

Why LoRA plus replay is not enough

At this point you might think: why not just LoRA, plus more replay?

We ran that baseline. It does bring BWT from -8.4 to -7.2, an improvement of 1.2 points. But that is less than half of what dual-stream delivers. Dual-Replay reaches -4.7, an improvement of 3.7 points.

The gap is the single stream. LoRA plus replay mixes samples from every past domain in one buffer and samples them at random. High-traffic domains naturally occupy more of the buffer; rare domains get evicted, which is the starvation mode above. There is also no general-knowledge anchor. When a new domain's language drifts, for example by flooding in jargon, shared representations drift with it, and every prior domain takes collateral damage. Importance weighting on a single buffer is a post-hoc reweighting. It cannot separately tune the head-versus-tail balance.

Dual-stream is built for those two jobs. The domain stream, 70% of the budget, is importance-weighted per domain, so domains that are forgetting keep more samples and the tail is not squeezed out. The general stream, 30% of the budget, is curated non-production SFT data. That is the stable anchor for shared representations. When new-domain jargon arrives, the general stream pulls shared representations back to their basis.

Each stream carries roughly half the gain. Removing either one is not okay.

The two streams were ablated separately in paper §5.3.3. Drop only the general stream, and BWT regresses from -4.7 to -6.1. Drop only the importance-weighted domain stream, and it regresses to -5.8. Each carries roughly half the improvement. Removing either is not okay.

"F1 didn't drop" can still hide forgetting

After the system has been in production for a while, there is another hidden trap.

You finish training task k, evaluate tasks 1 through k-1, and see that task j has dropped 3 points. The instinctive read is that task j is being forgotten. Zheng et al. (ICLR 2025) pointed out that this drop is sometimes not knowledge loss. It is output alignment drift. The model can still produce the right internal representations for task j's inputs, but the output-layer logit distribution has shifted, so argmax picks the wrong class. The knowledge in the base is not lost. What is lost is the last path that points to that knowledge.

The detection method is linear probing: freeze the entire adapter and the base, train only a fresh classifier head. If the probe head's accuracy is close to the task's post-training level, the drop is alignment drift, not knowledge loss. We ran this in the paper §5.4 ablation. In the 52-domain setup, about 35% of "drops" were alignment drift; 65% were real forgetting. These 35% / 65% figures are from our own ablation, not a ready-made conclusion in Zheng et al. The fixes are completely different.

Of the F1 drops you see, only about 65% are real knowledge loss.

When the drop is alignment drift, 35% of the cases, the fix is to retrain a fresh task-conditioned gating vector, and that is where the budget should go. When it is real forgetting, 65% of the cases, the fix is to enlarge the replay buffer and reweight by importance, and the budget should go to buffer capacity. A simple test for whether your setup is in this trap: at the review meeting, has anyone asked whether this 5-point drop is knowledge loss or alignment drift? If not, you are likely burning 30% of the remediation budget in the wrong direction.

What an engineering team can make visible this week

Turning "are we silently forgetting" from a matter of luck into something you can see each week does not require the full experimental apparatus from the paper. First build a sequential evaluation matrix: after each task k, evaluate every task up to k, compute BWT automatically, and put it on the dashboard. Split domains by traffic and watch the head-versus-tail F1 gap; a gap greater than 5 triggers a buffer review.

Sample 50 production conversations a week and hand-label intent count, so you can see the train-versus-production gap. Write the PEFT scheme's trainable parameters into the capacity plan, and be explicit about whether they are constant in K or linear in K. At K=50, compute the total memory. Add linear-probe accuracy to the evaluation pipeline, so you can tell spurious forgetting from real forgetting. Put per-domain buffer occupancy on the dashboard, and find the rare domains that are starving.

Every time a new domain is added, compare BWT with the previous model version. Sustained regression should trigger an architecture review. Monitor inference-time domain-classifier accuracy as well. A drop there means a new domain has weakened the routing signal, and what looks like forgetting will show up downstream. Keep a frozen test set per domain, at least 1,000 examples, that never enters training and remains the gold standard for every evaluation. Once a month, run a from-scratch baseline: same base and adapter configuration, trained from the beginning, and compare it with the continual-learning model to see whether you are actually accumulating or running in place.

Of these, the linear probe is the most important, and the most often skipped. If the evaluation dashboard only watches task accuracy, and never separates knowledge from alignment, you will burn 30% of the remediation budget in the wrong direction.

Questions I would ask any vendor in the room

If you are reviewing a "parameter-efficient continual learning" proposal, ask these at the next meeting. A vendor who cannot answer, or hedges, should set off an alarm.

Is your PEFT scheme's trainable parameter count constant in the number of tasks, or linear in K? If the answer is linear in K, memory blows up at K=50, and the scheme has to change. How does the replay buffer handle rare-domain starvation? If the answer is reservoir sampling, naive reservoir loses rare domains once K is greater than 20. Do you distinguish spurious forgetting from real forgetting, and how? If the answer is "we just track F1," 35% of the remediation budget may be going to the wrong place. Is there a general-knowledge buffer in the scheme? If not, new-domain language drift takes shared representations with it, and every prior domain takes collateral damage. At inference time, how does the system know which task identity to apply? If the user has to tag the domain, that is not production-viable. If the answer is a learned classifier, but there is no accuracy number, that is not viable either.

If you want to go deeper

The above is the engineering view: how to recognize the patterns, how to detect them, and how to defend. The full Dual-Replay formal definition, statistical significance across five random domain orderings, the CLINC150 cross-dataset F1 replication, and the 52-domain ablation studies — replay ratio, freezing ratio, domain-general split, adapter placement — are in the paper currently under submission, Parameter-Efficient Dual-Replay: Mitigating Catastrophic Forgetting in Sequential LLM Fine-Tuning Under Fixed Memory Budgets, by Yaqin Hei. For researchers, anyone building a serious continual-learning system, or anyone who wants to see the trade-offs under a 16 GB edge constraint, that paper is the source material.

For an entry point to the literature: Luo et al. 2023, "An Empirical Study of Catastrophic Forgetting in Large Language Models During Continual Fine-tuning," a systematic measurement of general-capability drop after sequential fine-tuning on 1B to 7B models, not prior-domain NLU F1. Zheng et al., ICLR 2025, "Spurious Forgetting in Continual Learning of Language Models," on the alignment-drift versus knowledge-loss distinction. Shi et al. 2025, "Continual Learning of Large Language Models: A Comprehensive Survey," which organizes continual pre-training (CPT), domain-adaptive pre-training (DAP), and continual fine-tuning (CFT). Hu et al. 2022, "LoRA: Low-Rank Adaptation of Large Language Models," the PEFT foundation. Scialom et al. 2022, "Fine-tuned Language Models are Continual Learners," on why small replay buffers can still work for language models. The public CLINC150 benchmark is at the oos-eval repository.

I have also written about an agent that learned to delete tickets instead of resolving them, in Reward Hacking in AI Agents: Trained 60,000 Steps, the Agent Learned to Delete Tickets (6 ITSM Patterns). If you want the case for why evaluation cannot stop at launch, read The less you are Apple, the less you can skip this.. The architecture choices that decide whether a customer-service agent can ship are in In week two of the pilot, "I want a refund" sent the money out.. Related writing already on the site includes 80% of Failed AI Agents Die in Ops, Not Tech and Anthropic Hired 11 Top People in Six Months. Not One to Build a Product.. On the organization side, the person who has to catch these issues after launch is often a forward deployed engineer (FDE).

If you want the five forgetting modes, the checks you can run this week, and the vendor questions in a pack you can take into the next review, without rereading this article each time, I put together a PDF kit for readers who got this far. Send me the keyword "CL KIT" — that is the name of the continual-learning pack — and I will send it. It includes a sheet for the five catastrophic-forgetting modes, the this-week checks, the vendor questions, and a minimal Dual-Replay reproduction script for research and baseline comparison. Channels are in the footer. X or email both work.

Building an agent right now?

Send me your worst conversation. Free failure teardown.

Get a teardown →

Comments