Skip to content
AIAI Wranglers

26 Continual Learning

A child learns to ride a bicycle at age five, surviving dozens of falls, scraped knees, the gradual discovery that balance is a continuous feedback loop between vestibular sense and motor command. At sixteen, the same child learns to drive a car; at thirty, to fly a small aircraft. Each new competence builds on prior motor and cognitive knowledge without destroying it: the bicycle skill remains intact through decades of subsequent learning, and sub-skills (steering, judging distance) transfer seamlessly across domains.

Now consider a standard neural network. Train it on Task A until convergence; then train it on Task B. Upon re-evaluation on Task A, performance has collapsed, often to chance level. The weights that encoded Task A have been overwritten by the gradient updates for Task B. This phenomenon, known as catastrophic forgetting [1][2], is the central obstacle to building learning systems that accumulate knowledge across a lifetime.

Continual learning (also called lifelong learning, incremental learning, or sequential learning) is the study of algorithms that close this gap: methods that enable a single model to learn from a non-stationary stream of tasks while preserving previously acquired knowledge and transferring it to accelerate future learning.

Key Idea.

The Lifelong Learning Thesis. A continual learner must simultaneously maintain three properties: plasticity (the ability to learn new tasks), stability (the ability to retain old knowledge), and transfer (the ability to leverage past experience to accelerate future learning). The central optimization problem of continual learning seeks parameters ๐œฝT after T sequential tasks that maximize a weighted combination of task performances subject to a stability constraint: (Lifelong Thesis)max๐œฝTโกโˆ‘t=1Tฮฑt๐’ซ(๐œฝT,๐’Ÿt)subjectย to๐’ฎ(๐œฝT,๐œฝ1,โ€ฆ,๐œฝTโˆ’1)โ‰ฅ1โˆ’ฯต, where ๐’ซ(๐œฝ,๐’Ÿt) measures performance on task t, ฮฑt>0 are importance weights, ๐’ฎ(โ‹…) is a stability measure comparing the current parameters to historical checkpoints, and ฯต>0 is a tolerance for forgetting. The tension between the objective (which demands plasticity) and the constraint (which demands stability) is the stabilityโ€“plasticity dilemma that pervades every method in this chapter.

Historical Note.

From catastrophic interference to LLM continual learning. The problem of catastrophic forgetting was first identified by [1], who showed that a simple connectionist network trained on addition facts forgot earlier facts when trained on new ones. [2] provided a comprehensive analysis and proposed that the root cause is the overlap of distributed representations: because all inputs share the same weights, updating weights for new patterns necessarily perturbs old ones. For nearly two decades the problem was studied primarily in small-scale settings. The modern era began with [3], who introduced Elastic Weight Consolidation (EWC) and demonstrated continual learning in deep networks trained on Atari games. Surveys by [4], [5], and [6] chart the rapid growth of the field. Most recently, the rise of large language models has opened a new frontier: [7] and [8] survey continual learning specifically for LLMs, where the challenge is not merely avoiding forgetting but orchestrating continual pretraining, instruction tuning, and alignment across evolving data distributions.

This chapter culminates the book's arc. Parts IIโ€“VI developed generative modelling (VAEs, flows, diffusion, GANs, autoregressive LMs); Part VII studied reasoning; Part VIII (24) examined memory management; Part IX (25) addressed alignment. Continual learning asks the unifying question: can a single model do all of these (generate, reason, remember, and align) across a sequence of tasks, domains, and time?

Chapter roadmap. Sections 1โ€“4 (Part 1) develop foundations and regularization methods. Sections 5โ€“12 (Part 2) cover replay, architecture, LLM-specific CL, and open problems.
Prerequisites.

We assume familiarity with the alignment pipeline (fig:alignment:pipeline), LoRA (Parameter-Efficient Fine-Tuning: LoRA, Definition 2), and the KL-constrained objective ((Central Objective)). From the memory chapter: memory systems (Definition 20), the memory framework (The Memory System Framework), and SSMs as implicit memory (Proposition 10). From the reasoning chapter: Act (Adaptive Computation Time) and self-refinement (Self-Refine).

Why Continual Learning?

The question โ€œwhy continual learning?โ€ admits answers at multiple levels: philosophical, cognitive, biological, and engineering. We address each in turn, building motivation for the formal framework of Mathematical Foundations.

Philosophical Roots

Heraclitus of Ephesus observed that โ€œno man ever steps in the same river twice, for it is not the same river and he is not the same man.โ€ Both the learner and the environment are in constant flux. A learning system that assumes a fixed data distribution, the standard โˆผiid assumption, is a convenient fiction, inadequate for the real world where distributions shift and new categories emerge.

Consider the forms of knowledge a learning system might possess:

  1. Weight-encoded knowledge (parametric memory): the information stored in the model's weights through gradient-based training. This is slow to acquire, expensive to modify, and accessed implicitly during every forward pass. In the terminology of 24, this is parametric memory.

  2. Retrieval-based knowledge (external memory): the information stored in databases, documents, or memory banks that the model can query at inference time. This is fast to update (insert a new document), cheap to scale (add more storage), but requires a retrieval mechanism. In 24 we studied retrieval-augmented generation and memory-augmented architectures.

  3. Architectural capacity (innate structure): the inductive biases encoded in the architecture itself (attention patterns, positional encodings, layer normalization) which determine what the model can learn, independent of what it has learned.

Continual learning operates primarily at the first level, updating weight-encoded knowledge without destroying prior knowledge, but the most effective approaches combine all three, using architectural innovations for separate capacity and retrieval-based memory for replay.

Remark 1 (Innate vs. Learned Structure).

Chomsky's Universal Grammar posits innate structural principles for language, while specific languages are learned. Similarly, the Transformer provides general-purpose capacity (โ€œinnateโ€ structure) while specific capabilities are acquired through training (โ€œlearnedโ€ knowledge). Continual learning asks how to accumulate learned knowledge without architectural modification, or, when permitted, how to grow the architecture gracefully.

What Humans Retain and Forget

Human memory follows quantitative laws studied for over a century. Understanding these laws provides both inspiration and benchmarks for artificial continual learning.

Definition 1 (Ebbinghaus Forgetting Curve).

Let R(t) denote the retention of a memory item at time t after initial learning. The Ebbinghaus forgetting curve [9] models retention as an exponential decay: (Ebbinghaus)R(t)=eโˆ’t/S, where tโ‰ฅ0 is the time elapsed since learning and S>0 is the memory strength (a parameter that depends on the depth of encoding, the number of rehearsals, and the emotional salience of the item). When t=0, retention is perfect (R=1); as tโ†’โˆž, retention decays to zero. The half-life of a memory is t1/2=Slnโก2.

A power law often provides a better fit over long time scales [38]: (Power LAW Forgetting)M(t)=atโˆ’b, where a>0 is a scale and b>0 the decay rate. The power law decays more slowly for large t, reflecting that well-learned memories resist forgetting (Jost's law).

Example 1 (Retention over Time).

Consider a memory item with strength S=1 day under the exponential model . The retention at several time points is:

Elapsed time1 hour1 day1 week1 month
t/S1/241730
R(t)=eโˆ’t/S0.9590.3689.1ร—10โˆ’49.4ร—10โˆ’14
After one day, retention drops to 36.8%; after one week, it is essentially zero. This rapid decay motivates spaced repetition: reviewing material at increasing intervals to boost S. The Leitner system [10] sorts flashcards into boxes reviewed at exponentially increasing intervals, a direct analogy to experience replay buffers in continual learning.

Forgetting curves. Solid lines show the Ebbinghaus exponential decay for three values of memory strength S. The dashed orange curve shows the power law with b=0.7, which decays more slowly at large t, matching the empirical finding that well-consolidated memories resist forgetting.
Procedural vs. declarative memory.

Declarative memory stores facts and events; procedural memory stores skills and habits. Procedural memories are more resistant to forgetting, suggesting different consolidation mechanisms. In neural network terms: declarative โ‰ˆ retrievable knowledge in external memory; procedural โ‰ˆ weight-encoded computations.

Remark 2 (Practice Makes Permanent).

Cognitive science has established the testing effect: actively retrieving information strengthens the memory trace more than passive re-study. The continual learning analogue is experience replay, periodically re-training on stored examples from previous tasks. Just as spaced testing produces more durable human memories, replay-based methods produce more stable neural network knowledge than pure regularization.

The Biological Learning System

The mammalian brain is the most successful continual learning system we know of. Its architecture provides a blueprint to be abstracted into computational principles.

Definition 2 (Complementary Learning Systems).

The Complementary Learning Systems (CLS) theory [11][12] posits that the mammalian brain employs two complementary memory systems:

  1. The hippocampus: a fast-learning, sparse-coding system that rapidly encodes new experiences as distinct, pattern-separated memory traces. It functions as a temporary buffer, storing episodic memories with high fidelity but limited capacity.

  2. The neocortex: a slow-learning, distributed-coding system that gradually extracts statistical regularities from experience. It stores semantic and procedural knowledge in overlapping distributed representations, achieving high capacity at the cost of slow acquisition.

During memory consolidation (primarily during sleep), the hippocampus โ€œreplaysโ€ stored experiences to the neocortex, allowing the neocortex to integrate new knowledge with existing representations through interleaved training on old and new patterns.

The CLS architecture. Hippocampus (orange): fast, sparse encoding. Neocortex (blue): slow, distributed integration. Sleep-time replay consolidates hippocampal traces into neocortical storage, the biological inspiration for replay-based continual learning.

The CLS theory explains why humans avoid catastrophic forgetting: the hippocampus buffers new experiences, which are then interleaved with replayed old experiences during sleep consolidation, allowing the neocortex to accommodate both.

Hebbian learning and synaptic consolidation.

At the synaptic level, learning follows Hebb's rule: โ€œneurons that fire together wire together.โ€ Crucially, synapses that have been repeatedly strengthened become less modifiable; they are โ€œconsolidated.โ€ This synaptic consolidation directly inspires EWC (Elastic Weight Consolidation) and SI (Synaptic Intelligence), which protect important parameters from large updates.

Insight.

Biology as blueprint. The CLS theory maps directly to artificial CL: hippocampus โ†’ episodic memory buffer; neocortex โ†’ model parameters; sleep consolidation โ†’ experience replay. Every major method family (regularization, replay, architecture) implements aspects of this biological architecture. The memory-augmented architectures of 24 (NTMs, Neural Turing Machines and Differentiable Neural Computers; hierarchical memory, HMT: Hierarchical Memory Transformer) provide the artificial analogue of hippocampal storage.

Mathematical Foundations

We now formalize the continual learning problem, establish its Bayesian interpretation, quantify the stabilityโ€“plasticity trade-off, and derive generalization bounds for sequential learning.

The Continual Learning Problem

Definition 3 (Task Sequence).

A continual learning task sequence is an ordered collection {๐’ฏt}t=1T where each task ๐’ฏt=(๐’Ÿt,โ„’t) consists of:

  • A dataset ๐’Ÿt={(๐’™i(t),yi(t))}i=1nt drawn โˆผiid from pt(๐’™,y).

  • A loss function โ„’t:ฮ˜ร—๐’ณร—๐’ดtโ†’โ„โก.

Tasks arrive sequentially: at time t, only ๐’Ÿt is available (previous data may be partially buffered or unavailable). The goal: find ๐œฝT that performs well on all tasks.

The literature distinguishes several scenarios based on test-time information.

Definition 4 (Continual Learning Scenarios).

Let f๐œฝ:๐’ณโ†’๐’ด denote the model. The four standard scenarios are:

  1. Task-Incremental Learning (TIL): task identity t is provided at test time; a task-specific head f๐œฝ(t) may be used.

  2. Domain-Incremental Learning (DIL): the inputโ€“output mapping is shared but the input distribution shifts; task identity is not provided.

  3. Class-Incremental Learning (CIL): new classes are added per task; the model classifies among all classes seen so far without task identity. This is the hardest scenario.

  4. Online Continual Learning (OCL): data arrives as a stream with no explicit task boundaries; distribution may shift gradually or abruptly.

Three CL scenarios. TIL: task identity given at test time. DIL: shared head, shifting input domain. CIL: growing output space, no task identity.

The standard evaluation metrics are as follows.

Definition 5 (Average Accuracy and Transfer Metrics).

Let ai,j denote the accuracy of the model on task j after training on tasks 1,โ€ฆ,i. After training on all T tasks:

  1. Average Accuracy: (AVG Accuracy)AT=1Tโˆ‘j=1TaT,j.

  2. Backward Transfer (BWT): (BWT)BWT=1Tโˆ’1โˆ‘j=1Tโˆ’1(aT,jโˆ’aj,j). Negative BWT indicates forgetting; positive BWT indicates that learning later tasks improved performance on earlier ones.

  3. Forward Transfer (FWT): (FWT)FWT=1Tโˆ’1โˆ‘j=2T(ajโˆ’1,jโˆ’aโ€พj), where aโ€พj is the accuracy of a randomly initialized model on task j. Positive FWT indicates that prior learning provided useful initialization for new tasks.

  4. Forgetting Measure for task j at time i: (Forgetting Measure)Fi,j=maxkโˆˆ{1,โ€ฆ,iโˆ’1}โกak,jโˆ’ai,j.

Example 2 (Five-Task Evaluation).

Consider a five-task sequence with the following accuracy matrix [ai,j] (rows = training stage, columns = task): (0.95โˆ’โˆ’โˆ’โˆ’0.620.91โˆ’โˆ’โˆ’0.580.700.93โˆ’โˆ’0.550.650.720.90โˆ’0.500.600.680.710.92). The average accuracy is A5=(0.50+0.60+0.68+0.71+0.92)/5=0.682. The backward transfer is BWT=14[(0.50โˆ’0.95)+(0.60โˆ’0.91)+(0.68โˆ’0.93)+(0.71โˆ’0.90)]=14(โˆ’0.45โˆ’0.31โˆ’0.25โˆ’0.19)=โˆ’0.300. A BWT of โˆ’0.300 means each task lost 30 percentage points on average. The forgetting measure for task 1 is F5,1=0.95โˆ’0.50=0.45.

Bayesian Sequential Learning

The Bayesian perspective provides the theoretical gold standard: what an ideal learner should do, even if exact computation is intractable.

Definition 6 (Bayesian Continual Learning).

In the Bayesian continual learning framework, the learner maintains a posterior distribution over parameters that is updated sequentially as new tasks arrive. After observing data from task t, the posterior is: (Bayesian Update)p(๐œฝ|๐’Ÿ1:t)=p(๐’Ÿt|๐œฝ)p(๐œฝ|๐’Ÿ1:tโˆ’1)p(๐’Ÿt|๐’Ÿ1:tโˆ’1), where p(๐œฝ|๐’Ÿ1:tโˆ’1) is the posterior from all previous tasks (serving as the prior for task t), p(๐’Ÿt|๐œฝ) is the likelihood of the new data, and p(๐’Ÿt|๐’Ÿ1:tโˆ’1)=โˆซp(๐’Ÿt|๐œฝ)p(๐œฝ|๐’Ÿ1:tโˆ’1)d๐œฝ is the marginal likelihood (evidence).

Theorem 1 (Optimality of Bayesian Continual Learning).

The sequential Bayesian update yields the same posterior as joint training on all data: (Bayesian Joint)p(๐œฝ|๐’Ÿ1:T)=p(๐œฝ|๐’Ÿ1,๐’Ÿ2,โ€ฆ,๐’ŸT). In particular, exact Bayesian continual learning incurs zero forgetting.

Proof.

By induction on T. The base case T=1 is trivial. For the inductive step, assume p(๐œฝ|๐’Ÿ1:tโˆ’1)=p(๐œฝ|๐’Ÿ1,โ€ฆ,๐’Ÿtโˆ’1). Then by and conditional independence of datasets given ๐œฝ: (Bayesian Proof STEP)p(๐œฝ|๐’Ÿ1:t)=p(๐’Ÿt|๐œฝ)p(๐œฝ|๐’Ÿ1:tโˆ’1)p(๐’Ÿt|๐’Ÿ1:tโˆ’1)=[โˆs=1tp(๐’Ÿs|๐œฝ)]p(๐œฝ)โˆs=1tp(๐’Ÿs|๐’Ÿ1:sโˆ’1), which is precisely the joint posterior p(๐œฝ|๐’Ÿ1,โ€ฆ,๐’Ÿt).

Remark 3 (Intractability of Exact Bayesian CL).

The Bayesian approach is theoretically perfect but practically impossible for deep networks: the posterior over billions of parameters cannot be represented in closed form. Every practical method approximates Bayesian updating: EWC (Elastic Weight Consolidation) uses a diagonal Gaussian (Laplace approximation); replay methods approximate the marginal likelihood by storing past data; variational CL maintains an explicit variational approximation q(๐œฝ).

Proposition 1 (Forgetting as Posterior Collapse).

When the full posterior p(๐œฝ|๐’Ÿ1:tโˆ’1) is approximated by a point estimate ๐œฝtโˆ’1โˆ—=argโ€‰max๐œฝโกp(๐œฝ|๐’Ÿ1:tโˆ’1), the prior for task t becomes a delta function ฮด(๐œฝโˆ’๐œฝtโˆ’1โˆ—). The posterior after task t reduces to: (Point Estimate)p(๐œฝ|๐’Ÿ1:t)โ‰ˆp(๐’Ÿt|๐œฝ)ฮด(๐œฝโˆ’๐œฝtโˆ’1โˆ—)p(๐’Ÿt|๐œฝtโˆ’1โˆ—)=ฮด(๐œฝโˆ’๐œฝtโˆ’1โˆ—), which carries no information about the uncertainty of ๐œฝtโˆ’1โˆ—. Subsequent gradient descent on task t moves ๐œฝ away from ๐œฝtโˆ’1โˆ— with no penalty for directions that are important for previous tasks. This loss of posterior uncertainty is the Bayesian root cause of catastrophic forgetting.

The Stabilityโ€“Plasticity Dilemma

Every continual learning method navigates the tension between learning new information and retaining old knowledge.

Definition 7 (Stabilityโ€“Plasticity Trade-off).

Given parameters ๐œฝ and task ๐’ฏt=(๐’Ÿt,โ„’t), define plasticity ๐’ซ(๐œฝ,๐’Ÿt)=โˆ’โ„’t(๐œฝ,๐’Ÿt) (negative loss on the current task) and stability ๐’ฎ(๐œฝ,๐’Ÿ<t)=โˆ’1tโˆ’1โˆ‘s=1tโˆ’1[โ„’s(๐œฝ,๐’Ÿs)โˆ’โ„’s(๐œฝsโˆ—,๐’Ÿs)] (average excess loss on previous tasks). Maximizing plasticity (unconstrained optimization on ๐’Ÿt) typically decreases stability, and vice versa.

Theorem 2 (No Free Lunch for Continual Learning).

Let ๐œฝโˆˆโ„dโก be shared parameters for T tasks. Define the backward transfer BWT and forward transfer FWT as in Definition 5. Suppose each task's loss landscape โ„’t has curvature bounded by ฮปmaxโก(Ht)โ‰คC where Ht is the Hessian. Then for any continual learning algorithm that uses a single parameter vector (no task-specific heads, no replay buffer, no growing architecture): (NO FREE Lunch)BWT+FWTโ‰คCTโˆ’1โˆ‘t=1Tโˆ’1โ€–๐œฝTโˆ’๐œฝtโˆ—โ€–2+1Tโˆ’1โˆ‘t=2TSim(๐’Ÿtโˆ’1,๐’Ÿt), where Sim(๐’Ÿi,๐’Ÿj) measures the similarity between task distributions. As Tโ†’โˆž with dissimilar tasks, the BWT term becomes increasingly negative, overwhelming any positive FWT.

Proof.

Taylor-expand each โ„’t around ๐œฝtโˆ—: โ„’t(๐œฝT)โˆ’โ„’t(๐œฝtโˆ—)โ‰คC2โ€–๐œฝTโˆ’๐œฝtโˆ—โ€–2. Summing over previous tasks bounds |BWT|. The FWT term is bounded by inter-task similarity; when tasks are dissimilar, the forgetting term dominates.

Insight.

The No Free Lunch theorem does not imply impossibility. The bound applies only to a single shared parameter vector with no auxiliary mechanisms. Replay buffers, growing architectures, and retrieval-augmented approaches circumvent it by relaxing these assumptions. The theorem says that CL with fixed capacity and no memory is fundamentally limited, but points to the solution: effective system capacity must grow with the number of tasks, connecting to the Memory Heterogeneity Thesis of 24.

Generalization Bounds for Continual Learning

We now derive generalization bounds accounting for sequential learning and inter-task transfer.

Theorem 3 (Continual Learning Generalization Bound).

Let โ„‹ be a hypothesis class with VC dimension dVC, and let ๐œฝT be the parameters obtained after sequentially training on T tasks, each with nt samples. With probability at least 1โˆ’ฮด over the draw of all task datasets: (GEN Bound)1Tโˆ‘t=1TLt(๐œฝT)โ‰ค1Tโˆ‘t=1TL^t(๐œฝT)+dVClogโก(2nminโก/dVC)+logโก(4T/ฮด)2nminโก+1Tโˆ‘t=1Tโˆ’1ฮ”t, where Lt(๐œฝT) is the population loss on task t, L^t(๐œฝT) is the empirical loss, nminโก=mintโกnt, and ฮ”t is a transfer gap: (Transfer GAP)ฮ”t=๐”ผ๐’™โˆผpt[โ„’t(๐œฝT,๐’™)โˆ’โ„’t(๐œฝtโˆ—,๐’™)] measuring how much worse ๐œฝT is than the task-specific optimum ๐œฝtโˆ— on task t.

Proof.

Apply the VC bound to each task independently and take a union bound over T tasks (logโกT factor). The transfer gap ฮ”t captures the forgetting penalty; when all tasks are identical (ฮ”t=0), the bound reduces to the single-task case.

Definition 8 (Task Similarity).

The similarity between tasks ๐’Ÿi and ๐’Ÿj is Sim(๐’Ÿi,๐’Ÿj)=1โˆ’dTV(pi,pj), where dTV(pi,pj)=12โˆซ|pi(๐’™,y)โˆ’pj(๐’™,y)|d๐’™dy is the total variation distance. Similarity 1 means identical tasks; 0 means disjoint support.

Proposition 2 (Forgetting Bound via Fisher Information).

Let ๐œฝtโˆ— be the optimal parameters for task t and ๐œฝt+1โˆ— be the optimal parameters after training on task t+1. If โ„’t is twice differentiable with Fisher information matrix Ft=๐”ผ[โˆ‡๐œฝlogโกp(๐’Ÿt|๐œฝ)โ‹…โˆ‡๐œฝlogโกp(๐’Ÿt|๐œฝ)โŠค]|๐œฝ=๐œฝtโˆ—, then to second order: (Fisher Forgetting)โ„’t(๐œฝt+1โˆ—)โˆ’โ„’t(๐œฝtโˆ—)โ‰ค12(๐œฝt+1โˆ—โˆ’๐œฝtโˆ—)โŠคFt(๐œฝt+1โˆ—โˆ’๐œฝtโˆ—).

Proof.

Taylor-expand โ„’t around ๐œฝtโˆ— (where the gradient vanishes): โ„’t(๐œฝt+1โˆ—)=โ„’t(๐œฝtโˆ—)+12ฮ”๐œฝโŠคHtฮ”๐œฝ+O(โ€–ฮ”๐œฝโ€–3). By Bartlett's identity, Ht=Ft at the optimum.

Loss landscape perspective. Left: unconstrained SGD moves from ๐œฝAโˆ— to ๐œฝBโˆ—, causing forgetting. Right: EWC constrains the path to low-curvature directions, finding a compromise ๐œฝEWCโˆ—. Blue: โ„’A; orange: โ„’B contours.

Proposition 2 is the theoretical foundation of EWC: parameters with high Fisher information should be changed as little as possible.

Catastrophic Forgetting

We now study catastrophic forgetting: its causes, formal measures, and the taxonomy of methods designed to combat it.

What Causes Forgetting

Definition 9 (Catastrophic Forgetting).

A learning system exhibits catastrophic forgetting on task t after training on subsequent tasks t+1,โ€ฆ,T if (Catastrophic Forgetting)aT,tโ‰ชat,t, where ai,j is the accuracy on task j after training through task i. More precisely, forgetting is catastrophic when the performance drop at,tโˆ’aT,t is comparable to at,tโˆ’achance, meaning that nearly all task-specific knowledge has been destroyed.

Three mechanisms drive catastrophic forgetting:

1. Weight overwriting.

Gradient descent on task B modifies the same weights that encode task A. Since all inputs share the parameter space (the hallmark of distributed representations), any weight update for B perturbs the function computed for A.

2. Activation drift.

Even if final-layer weights for task A are frozen, changes to earlier layers alter intermediate representations. If ฯ•t(๐’™) denotes the features after task t, training on task t+1 changes them to ฯ•t+1(๐’™), and the task-t classifier wtโŠคฯ•t(๐’™) evaluated on ฯ•t+1(๐’™) produces arbitrary outputs.

3. Distribution shift.

Continual learning inherently violates the โˆผiid assumption: the distribution pt(๐’™,y) may differ substantially from ps(๐’™,y) for sโ‰ t. Standard generalization guarantees do not apply across tasks.

Example 3 (Two-Layer MLP on Permuted MNIST).

A two-layer MLP (256 hidden, ReLU) trained on 5 permuted MNIST tasks (10 epochs each, SGD with ฮท=0.01):

Task 1Task 2Task 3Task 4Task 5
After Task 1๐Ÿ—๐Ÿ•.๐Ÿโ€“โ€“โ€“โ€“
After Task 252.1๐Ÿ—๐Ÿ”.๐Ÿ–โ€“โ€“โ€“
After Task 331.448.3๐Ÿ—๐Ÿ•.๐ŸŽโ€“โ€“
After Task 422.735.150.2๐Ÿ—๐Ÿ”.๐Ÿ“โ€“
After Task 519.328.637.851.7๐Ÿ—๐Ÿ”.๐Ÿ—

BWT=14[(โˆ’77.9)+(โˆ’68.2)+(โˆ’59.2)+(โˆ’44.8)]=โˆ’62.5%. Task 1 drops from 97.2% to 19.3%, barely above the 10% chance level.

Measuring Forgetting

Definition 10 (Forgetting Matrix).

The accuracy matrix is Rโˆˆโ„Tร—Tโก with entries Ri,j=ai,j (the accuracy on task j after training through task i, defined for jโ‰คi). The forgetting matrix โ„ฑโˆˆโ„Tร—Tโก has entries: (Forgetting Matrix)โ„ฑi,j=maxkโˆˆ{j,j+1,โ€ฆ,iโˆ’1}โกRk,jโˆ’Ri,j,j<i. The entry โ„ฑi,j measures how much task j's best historical performance has degraded by time i. Non-negative values indicate forgetting; zero indicates no forgetting for that task at that time.

Proposition 3 (BWT from the Forgetting Matrix).

When the best performance on each task occurs immediately after training on it (maxkโ‰คTโˆ’1โกRk,j=Rj,j, which is typical), the backward transfer simplifies to: (BWT Decomposition)BWT=1Tโˆ’1โˆ‘j=1Tโˆ’1(RT,jโˆ’Rj,j)=โˆ’1Tโˆ’1โˆ‘j=1Tโˆ’1โ„ฑT,j.

A Taxonomy of Continual Learning Methods

We organize continual learning methods into three families.

Taxonomy: Regularization (green) penalizes parameter changes; Replay (blue) stores/generates past exemplars; Architecture (orange) allocates task-specific capacity.

Definition 11 (CPT/DAP/CFT Framework for LLMs).

For large language models, [7] propose a three-level framework that distinguishes:

  1. Continual PreTraining (CPT): the base model is updated on new corpora (e.g., new scientific literature, code repositories, or multilingual data) to extend its world knowledge without full retraining.

  2. Domain-Adaptive Pretraining (DAP): the model is adapted to a specific domain (e.g., medicine, law, finance) through continued pretraining on domain-specific text.

  3. Continual Fine-Tuning (CFT): the model is sequentially fine-tuned on downstream tasks (instruction following, code generation, safety alignment) that arrive over time.

Each level operates at a different scale (billions of tokens for CPT, millions for DAP, thousands for CFT) and faces different forgetting dynamics.

LLM continual learning has two axes: horizontal (sequential tasks over time) and vertical (the pipeline of fig:alignment:pipeline). Forgetting occurs along both.

The Memoryโ€“Refinement Boundary

Not all performance changes after learning a new task constitute forgetting; some are beneficial refinement. We decompose the loss change to distinguish the two.

Loss decomposition.

Consider the change in loss on task t after training on task t+1: (LOSS Decomposition)ฮ”โ„’t=โ„’t(๐œฝt+1โˆ—)โˆ’โ„’t(๐œฝtโˆ—)=ฮ”โ„’refineโŸrepresentationย improvement+ฮ”โ„’newโŸnewย capabilityย cost+ฮ”โ„’forgetโŸcatastrophicย forgetting. Here ฮ”โ„’refineโ‰ค0 captures beneficial representation improvement; ฮ”โ„’newโ‰ฅ0 is the irreducible cost of accommodating a new task; and ฮ”โ„’forgetโ‰ฅ0 is the avoidable loss from uncontrolled weight overwriting.

Remark 4 (Memory vs. Refinement).

CL methods should prevent ฮ”โ„’forget without suppressing ฮ”โ„’refine. Naive approaches (freezing all parameters) eliminate all three terms. The art is to selectively protect knowledge while allowing representations to evolve.

Regularization-Based Methods

Regularization-based methods add penalty terms to the loss that discourage large changes to parameters important for previous tasks. They require no stored data (or only a small buffer for gradient constraints) and leave the architecture unchanged, making them attractive for memory-constrained settings.

Elastic Weight Consolidation

Elastic Weight Consolidation (EWC) [3] uses the Fisher information matrix to identify parameters important for previous tasks and penalizes changes to those parameters.

Definition 12 (Elastic Weight Consolidation).

After training on task A to obtain optimal parameters ๐œฝAโˆ—, the EWC loss for training on task B is: (EWC)โ„’EWC(๐œฝ)=โ„’B(๐œฝ)+ฮป2โˆ‘i=1dFi(ฮธiโˆ’ฮธA,iโˆ—)2, where โ„’B(๐œฝ) is the loss on task B, ฮป>0 is a hyperparameter controlling the strength of the consolidation, d is the number of parameters, ฮธi is the i-th parameter, ฮธA,iโˆ— is the i-th component of the task-A optimum, and Fi is the i-th diagonal element of the Fisher information matrix computed at ๐œฝAโˆ—.

For T tasks, this generalizes to โ„’EWC(T)(๐œฝ)=โ„’T(๐œฝ)+ฮป2โˆ‘t=1Tโˆ’1โˆ‘i=1dFi(t)(ฮธiโˆ’ฮธt,iโˆ—)2.

The justification comes from the Laplace approximation to the Bayesian posterior.

Definition 13 (Fisher Information Matrix).

For a probabilistic model p(๐’Ÿ|๐œฝ), the Fisher information matrix (FIM) at ๐œฝโˆ— is: (Fisher Matrix)F=๐”ผ๐’™โˆผp(๐’™)[โˆ‡๐œฝlogโกp(๐’™|๐œฝ)โˆ‡๐œฝlogโกp(๐’™|๐œฝ)โŠค]|๐œฝ=๐œฝโˆ—โˆˆโ„dร—dโก. Equivalently, F=โˆ’๐”ผ[โˆ‡๐œฝ2logโกp(๐’™|๐œฝ)] (Bartlett's identity). The diagonal approximation retains only F^=diagโก(F11,โ€ฆ,Fdd), reducing storage from O(d2) to O(d). In practice: (Empirical Fisher)F^i=1Nโˆ‘n=1N(โˆ‚logโกp(๐’™n|๐œฝ)โˆ‚ฮธi)2|๐œฝ=๐œฝโˆ—.

Theorem 4 (EWC as Laplace Approximation).

The EWC loss arises as the negative log-posterior under a Laplace approximation to the posterior after task A. Specifically: (EWC Laplace)โˆ’logโกp(๐œฝ|๐’ŸA,๐’ŸB)โ‰ˆโ„’B(๐œฝ)+12(๐œฝโˆ’๐œฝAโˆ—)โŠคFA(๐œฝโˆ’๐œฝAโˆ—)+const, which, under the diagonal approximation FAโ‰ˆdiagโก(F1,โ€ฆ,Fd), yields exactly with ฮป=1.

Proof.

By Bayes' theorem, โˆ’logโกp(๐œฝ|๐’ŸA,๐’ŸB)=โ„’B(๐œฝ)โˆ’logโกp(๐œฝ|๐’ŸA)+const. Apply the Laplace approximation to logโกp(๐œฝ|๐’ŸA): expand to second order around the MAP estimate ๐œฝAโˆ— (where the gradient vanishes): (EWC Proof 3)logโกp(๐œฝ|๐’ŸA)โ‰ˆconst+12(๐œฝโˆ’๐œฝAโˆ—)โŠคโˆ‡2logโกp(๐œฝ|๐’ŸA)|๐œฝAโˆ—(๐œฝโˆ’๐œฝAโˆ—). By Bartlett's identity, the negative Hessian equals the Fisher information: โˆ’โˆ‡2logโกp(๐œฝ|๐’ŸA)|๐œฝAโˆ—=FA (assuming a flat prior so MAP = MLE). Using the diagonal approximation FAโ‰ˆdiagโก(F1,โ€ฆ,Fd): (EWC Proof 5)โˆ’logโกp(๐œฝ|๐’ŸA,๐’ŸB)โ‰ˆโ„’B(๐œฝ)+12โˆ‘i=1dFi(ฮธiโˆ’ฮธA,iโˆ—)2+const, which is exactly with ฮป=1.

Example 4 (EWC on Two Tasks in โ„2โก).

Let โ„’A(๐œฝ)=(ฮธ1โˆ’1)2+0.1(ฮธ2โˆ’1)2 and โ„’B(๐œฝ)=0.1(ฮธ1+1)2+(ฮธ2+1)2 with ๐œฝโˆˆโ„2โก. The task-A optimum is ๐œฝAโˆ—=(1,1) with Hessian diagโก(2,0.2), so F1=2, F2=0.2 (ฮธ1 is ten times more important).

The EWC objective with ฮป=1 is: (EWC EX Combined)โ„’EWC(๐œฝ)=0.1(ฮธ1+1)2+(ฮธ2+1)2+12[2(ฮธ1โˆ’1)2+0.2(ฮธ2โˆ’1)2]. Setting gradients to zero: โˆ‚/โˆ‚ฮธ1=0.2(ฮธ1+1)+2(ฮธ1โˆ’1)=2.2ฮธ1โˆ’1.8=0, giving ฮธ1โˆ—=9/11โ‰ˆ0.818. Similarly, โˆ‚/โˆ‚ฮธ2=2(ฮธ2+1)+0.2(ฮธ2โˆ’1)=2.2ฮธ2+1.8=0, giving ฮธ2โˆ—=โˆ’9/11โ‰ˆโˆ’0.818.

The solution ๐œฝEWCโˆ—โ‰ˆ(0.818,โˆ’0.818) stays close to ๐œฝAโˆ— in the high-Fisher direction (ฮธ1: shift of 0.182) but moves freely in the low-Fisher direction (ฮธ2: shift of 1.818). Unconstrained training would reach ๐œฝBโˆ—=(โˆ’1,โˆ’1), destroying task-A knowledge.

EWC solution for Example 4. Blue: โ„’A contours (low curvature in ฮธ2). Orange: โ„’B. Dashed: unconstrained SGD to ๐œฝBโˆ—. Green: EWC path, moving in the low-Fisher direction.

Synaptic Intelligence

Synaptic Intelligence (SI) [31] accumulates importance estimates online during training via a path integral, rather than computing them as a snapshot at the optimum.

Definition 14 (Synaptic Intelligence).

For each parameter ฮธi, SI maintains a running sum of the contribution of that parameter to the loss decrease during training: (SI)ฯ‰i(t)=โˆ‘k<tsi(k)(ฮ”i(k))2+ฮพ,si(k)=โˆซtaskย kโˆ‚โ„’kโˆ‚ฮธiฮธห™idฯ„, where si(k) is the path integral of the gradient times the parameter velocity over the training trajectory for task k, ฮ”i(k)=ฮธi,end(k)โˆ’ฮธi,start(k) is the total displacement, and ฮพ>0 is a damping constant for numerical stability. The regularized loss is: (SI LOSS)โ„’SI(๐œฝ)=โ„’t(๐œฝ)+cโˆ‘i=1dฯ‰i(t)(ฮธiโˆ’ฮธtโˆ’1,iโˆ—)2, where c>0 is a hyperparameter. In practice, si(k) is approximated by accumulating (โˆ‚โ„’/โˆ‚ฮธi)โ‹…ฮ”ฮธi at each gradient step.

Proposition 4 (SI vs. EWC: Snapshot vs. Path Integral).

EWC and SI differ in how importance is computed: EWC uses the Fisher information at the optimum (a local, snapshot measure), while SI uses the cumulative contribution along the entire training trajectory (a global, path-integral measure). When the loss landscape is approximately quadratic, both yield similar rankings; they diverge for highly non-convex landscapes.

Learning without Forgetting

Learning without Forgetting (LwF) [32] uses knowledge distillation [17] to preserve the model's outputs on new-task data rather than protecting parameters directly.

Definition 15 (Learning without Forgetting).

Let f๐œฝtโˆ’1 denote the model after training through task tโˆ’1. Before training on task t, compute โ€œsoft targetsโ€ by running the new data ๐’Ÿt through the old model: ๐’š^n=f๐œฝtโˆ’1(๐’™n(t)) for each ๐’™n(t)โˆˆ๐’Ÿt. The LwF loss is: (LWF)โ„’LwF(๐œฝ)=โ„’t(๐œฝ)+ฮฑโˆ‘n=1ntDKL(ฯƒ(๐’š^n/ฯ„)โ€–ฯƒ(f๐œฝ(๐’™n(t))/ฯ„)), where ฯƒ(โ‹…) denotes the softmax function, ฯ„>1 is a temperature parameter that softens the output distributions, ฮฑ>0 controls the distillation strength, and DKL is the Kullbackโ€“Leibler divergence.

The old model's predictions on new data encode information about what it has learned; matching these predictions preserves behavior without stored exemplars.

Remark 5 (LwF and the Alignment Connection).

The LwF objective has the same structure as the KL-constrained alignment objective ((Central Objective)): both optimize a primary loss while penalizing divergence from a reference model. In alignment the reference is ฯ€ref; in LwF it is f๐œฝtโˆ’1. The analysis of the KL penalty in Direct Preference Optimization applies directly to LwF's regularization dynamics.

Gradient Episodic Memory

Gradient Episodic Memory (GEM) [33] directly constrains gradient updates to avoid increasing the loss on previous tasks.

Definition 16 (Gradient Episodic Memory).

GEM stores a small episodic memory โ„ณkโŠ‚๐’Ÿk for each previous task k. At each training step on task t, let ๐’ˆt=โˆ‡๐œฝโ„’t(๐œฝ) be the gradient on the current mini-batch, and let ๐’ˆk=โˆ‡๐œฝโ„’k(๐œฝ;โ„ณk) be the gradient computed on the memory for task k. GEM solves: (GEM)๐’ˆ~=argโ€‰min๐’›โˆˆโ„dโกโกโ€–๐’›โˆ’๐’ˆtโ€–2subjectย toโŸจ๐’›,๐’ˆkโŸฉโ‰ฅ0โˆ€k<t. The constraint โŸจ๐’ˆ~,๐’ˆkโŸฉโ‰ฅ0 ensures the update does not increase the loss on any previous task.

Proposition 5 (GEM as Quadratic Programming).

The GEM projection is a quadratic program (QP) that can be solved efficiently. When the constraints are violated (โˆƒk:โŸจ๐’ˆt,๐’ˆkโŸฉ<0), the dual formulation is: (GEM DUAL)max๐โ‰ฅ0โกโˆ’12๐โŠคGGโŠค๐+๐โŠคG๐’ˆt, where G=[๐’ˆ1,โ€ฆ,๐’ˆtโˆ’1]โŠคโˆˆโ„(tโˆ’1)ร—dโก is the matrix of memory gradients and ๐โˆˆโ„tโˆ’1โก are the dual variables. The projected gradient is then ๐’ˆ~=๐’ˆtโˆ’GโŠค๐โˆ—. The dual QP has only tโˆ’1 variables (one per previous task), making it tractable even when d is very large.

Proof.

Form the Lagrangian L(๐’›,๐)=12โ€–๐’›โˆ’๐’ˆtโ€–2โˆ’โˆ‘kฮผkโŸจ๐’›,๐’ˆkโŸฉ with ฮผkโ‰ฅ0. Setting โˆ‡๐’›L=0 gives ๐’›โˆ—=๐’ˆt+GโŠค๐. Substituting back and taking the dual yields , with the projected gradient ๐’ˆ~=๐’ˆtโˆ’GโŠค๐โˆ—.

GEM gradient projection. ๐’ˆt (black) violates โŸจ๐’ˆt,๐’ˆ1โŸฉโ‰ฅ0. GEM projects onto the feasible cone (green) defined by memory gradients, producing ๐’ˆ~.

[16] proposed Averaged GEM (A-GEM), replacing per-task constraints with a single averaged constraint โŸจ๐’ˆ~,๐’ˆโ€พโŸฉโ‰ฅ0 where ๐’ˆโ€พ=1tโˆ’1โˆ‘k<t๐’ˆk, reducing the QP to one projection.

Comparison of Regularization Methods

Table 1 summarizes the four methods.

MethodImportanceData from pastPer-task memoryConnection
EWCFisher (snapshot)NoO(d) diagonalLaplace approx.
SIPath integralNoO(d) accumulatorsOnline importance
LwFOutput-basedNo (distillation)O(1) (old model)KD / alignment
GEMGradient-basedYes (memory buffer)O(Mn) exemplarsConstrained opt.
Comparison of regularization-based CL methods.

Caution.

Compounding approximation errors. All regularization methods rely on approximations that compound over tasks. EWC's diagonal Fisher ignores parameter correlations; SI's path integral is noisy under stochastic training; LwF's distillation degrades on out-of-distribution data; GEM's constraints become increasingly conservative. For long sequences (T>20), pure regularization is typically insufficient, motivating the hybrid methods of subsequent sections.

Exercise 1 (Regularization Methods).

  1. EWC derivation. Starting from the Bayesian posterior p(๐œฝ|๐’ŸA,๐’ŸB)โˆp(๐’ŸB|๐œฝ)p(๐œฝ|๐’ŸA), derive the EWC loss using the Laplace approximation. What assumption about the prior p(๐œฝ) is needed? What happens if we use a non-flat prior?

  2. SI vs. EWC on a quadratic loss. Consider โ„’(๐œฝ)=12๐œฝโŠคH๐œฝ with H=diagโก(10,1). A single gradient descent step from ๐œฝ0=(1,1) with learning rate ฮท=0.05 gives ๐œฝ1. Compute the SI importance weights ฯ‰1,ฯ‰2 and compare them to the EWC Fisher diagonal F1=10,F2=1.

  3. GEM projection. Given ๐’ˆt=(โˆ’2,โˆ’3), ๐’ˆ1=(1,2), and ๐’ˆ2=(2,โˆ’1), verify that โŸจ๐’ˆt,๐’ˆ1โŸฉ<0 (constraint violated). Solve the GEM QP to find ๐’ˆ~.

  4. LwF temperature sensitivity. For a 3-class classification problem with logits ๐’›=(2.0,0.5,โˆ’1.0), compute the softmax distribution at temperatures ฯ„โˆˆ{0.5,1,2,5}. Explain why higher temperatures are preferred for knowledge distillation.

Replay-Based Methods

Regularisation methods (Regularization-Based Methods) protect old knowledge by penalising parameter drift; they never revisit old data. A complementary family of methods takes the opposite approach: store (or regenerate) representative samples from previous tasks and interleave them with new-task data during training. This strategy, experience replay, draws direct inspiration from the Complementary Learning Systems (CLS) theory [11], which posits that the mammalian brain consolidates episodic memories by replaying hippocampal traces into the neocortex during sleep.

The central trade-off is memory versus fidelity: a larger replay buffer yields better retention but consumes more storage and compute. We develop the mathematical framework for buffer-based replay, then examine three important variants: generative self-replay (LAMOL), gradient-constrained replay (A-GEM), and replay at the LLM scale.

Experience Replay

Definition 17 (Experience Replay for Continual Learning).

Let ๐’ฏ1,๐’ฏ2,โ€ฆ be a sequence of tasks (Definition 3) with datasets ๐’Ÿ1,๐’Ÿ2,โ€ฆ. An experience replay (ER) system maintains a memory buffer โ„ณโІโ‹ƒs<t๐’Ÿs of bounded size |โ„ณ|โ‰คm. When learning task ๐’ฏt, the model minimises (ER LOSS)โ„’ER(๐œฝ)=๐”ผ(x,y)โˆผ๐’Ÿt[โ„“(๐œฝ;x,y)]+ฮฑ๐”ผ(xโ€ฒ,yโ€ฒ)โˆผโ„ณ[โ„“(๐œฝ;xโ€ฒ,yโ€ฒ)], where โ„“ is the task loss (e.g., cross-entropy), and ฮฑ>0 controls the replay strength.

Buffer update strategies.

After processing task ๐’ฏt, the buffer is updated โ„ณโ†Uแด˜แด…แด€แด›แด‡(โ„ณ,๐’Ÿt). Common strategies include:

  1. Reservoir sampling: Each arriving sample replaces a buffer element with probability m/n, where n is the total number of samples seen so far.

  2. Class-balanced: Maintain m/C samples per class, where C is the number of classes observed to date, selecting uniformly at random within each class.

  3. Loss-based: Retain the samples with the highest current loss, on the principle that difficult examples are most informative for preventing forgetting.

The simplicity of (ER LOSS) belies its effectiveness. Empirically, even a small buffer (mโ‰ˆ500) can reduce catastrophic forgetting (Definition 9) by 50โ€“70% on standard benchmarks, often matching or exceeding regularisation-based methods [16].

Proposition 6 (Reservoir Sampling Guarantee).

Consider a stream of n samples arriving one at a time, and a buffer of size mโ‰คn. Vitter's reservoir sampling algorithm [13] maintains the invariant that, after processing all n samples, each sample is in the buffer with probability exactly m/n. In particular, the buffer is a uniform random subset of size m.

Proof.

We proceed by induction on n. For nโ‰คm, all samples are stored and the claim holds trivially with probability 1.

Inductive step.

Suppose after nโˆ’1 samples every sample is in the buffer with probability m/(nโˆ’1). When sample n arrives, it is inserted with probability m/n, replacing a uniformly random buffer element. The probability that a previously stored sample i (i<n) survives is Prโก[iย inย bufferย afterย stepย n]=mnโˆ’1(1โˆ’mnโ‹…1m)=mnโˆ’1โ‹…nโˆ’1n=mn. Sample n itself is included with probability m/n by construction. Hence the invariant holds at step n.

Insight.

Experience replay as computational hippocampal replay. The CLS theory [11] proposes that the hippocampus stores episodic memories quickly (akin to the buffer โ„ณ) and replays them to the neocortex (the model parameters ๐œฝ) during offline consolidation. Experience replay implements this two-system architecture in silico: the buffer plays the role of the hippocampus, and gradient steps on replayed samples implement neocortical consolidation. The biological analogy suggests that when and how often to replay matters as much as what to replay, a design dimension largely unexplored in current CL systems.

Forgetting analysis.

Replay reduces forgetting because the gradient on replayed samples counteracts the drift induced by new-task gradients. More precisely, if gt=โˆ‡๐œฝโ„“(๐œฝ;๐’Ÿt) and gโ„ณ=โˆ‡๐œฝโ„“(๐œฝ;โ„ณ), the effective update direction is gt+ฮฑgโ„ณ. When โŸจgt,gโ„ณโŸฉ<0 (conflicting gradients), the replay term pulls the update back toward the old optimum, directly mitigating the mechanism underlying catastrophic forgetting (Proposition 2).

LAMOL: Language Model as Replay

Storing raw training data raises practical and legal concerns: the buffer size is fundamentally limited, and data-retention policies may prohibit keeping old samples. [15] and later [14] proposed an elegant alternative: use the language model itself as a generative replay mechanism.

Definition 18 (LAMOL).

Let p๐œฝt denote the language model after training on tasks ๐’ฏ1,โ€ฆ,๐’ฏt. LAMOL (Language Modelling for Lifelong Language Learning) [14] generates pseudo-replay samples by prompting p๐œฝt with task-specific tokens and decoding full (input, output) pairs. The loss for learning task ๐’ฏt+1 combines the real data with generated pseudo-samples from all previous tasks: (Lamol LOSS)โ„’LAMOL(๐œฝ)=๐”ผ(x,y)โˆผ๐’Ÿt+1[โ„“(๐œฝ;x,y)]+โˆ‘s=1tฮฑs๐”ผ(x~,y~)โˆผp๐œฝt(โ‹…|[๐šƒ๐™ฐ๐š‚๐™บs])[โ„“(๐œฝ;x~,y~)], where [๐šƒ๐™ฐ๐š‚๐™บs] is a task-identifier token prepended during generation, and ฮฑsโ‰ฅ0 are per-task replay weights.

Training protocol.

At the end of task ๐’ฏt, LAMOL:

  1. Generates nreplay pseudo-samples per previous task by sampling from p๐œฝt.

  2. Mixes these pseudo-samples with ๐’Ÿt+1.

  3. Trains on the combined dataset with the standard language modelling objective (next-token prediction), so the model simultaneously learns the new task and rehearses old ones.

Remark 6 (LAMOL vs. Generative Replay: The Quality Degradation Loop).

LAMOL is a special case of generative replay [15], where the generator and the solver are the same model. This creates a self-referential loop: the model generates training data for its own future self. If generation quality degrades on task s after learning subsequent tasks, the pseudo-samples for task s become noisy, leading to further degradation, creating a positive feedback loop. In practice, this is mitigated by three factors: (i) the language modelling objective itself encourages high-quality generation; (ii) generating short, structured outputs (e.g., questionโ€“answer pairs) is easier than generating complex distributions; and (iii) the number of pseudo-samples per task can be kept small relative to the real data.

A-GEM and Variants

Gradient Episodic Memory (GEM) [33] uses the replay buffer not for data replay but for gradient constraints: the update direction must not increase the loss on any previous task. For T tasks, this requires solving a quadratic programme with T constraints at every gradient step, an O(T2) cost that is prohibitive for long task sequences.

Definition 19 (Averaged GEM (A-GEM)).

A-GEM [16] relaxes GEM's per-task constraints to a single average constraint. Let ๐’ˆ~=โˆ‡๐œฝโ„“(๐œฝ;๐’Ÿt) be the gradient on the current mini-batch and ๐’ˆโ€พref=โˆ‡๐œฝโ„“(๐œฝ;โ„ฌ) be the gradient on a random mini-batch โ„ฌ drawn from the buffer โ„ณ. A-GEM projects ๐’ˆ~ whenever it violates the constraint: (AGEM Projection)๐’ˆupdate={๐’ˆ~,ifย โŸจ๐’ˆ~,๐’ˆโ€พrefโŸฉโ‰ฅ0,๐’ˆ~โˆ’โŸจ๐’ˆ~,๐’ˆโ€พrefโŸฉโ€–๐’ˆโ€พrefโ€–2๐’ˆโ€พref,otherwise. The projection in (AGEM Projection) is the closest vector to ๐’ˆ~ (in Euclidean norm) satisfying โŸจ๐’ˆupdate,๐’ˆโ€พrefโŸฉโ‰ฅ0.

Computational cost.

A-GEM reduces the per-step overhead from GEM's O(T2) quadratic programme to O(1): a single forwardโ€“backward pass on the reference batch plus an inner product and (conditionally) a projection, all independent of the number of tasks.

The constraint โŸจ๐’ˆ~,๐’ˆโ€พrefโŸฉโ‰ฅ0 ensures that the update does not increase the average loss over previously seen tasks. This is weaker than GEM's per-task guarantees, but empirically A-GEM performs comparably while scaling to hundreds of tasks [16].

Replay for Large Language Models

Remark 7 (The Replay Paradox for LLMs).

Modern LLMs are pretrained on petabyte-scale corpora spanning trillions of tokens. Storing even a fraction of this data in a replay buffer is infeasible: a 1% buffer for a 15-trillion-token corpus would require โˆผ150 billion tokens (โˆผ300;GB in compressed form). Moreover, the pretraining data is often proprietary and cannot be redistributed.

Three practical solutions have emerged:

  1. Knowledge distillation: Rather than replaying raw data, distil the old model's predictions into soft targets [17]. The student (updated model) is trained to match the teacher's (old model's) output distribution on new-task data, preserving old knowledge without accessing old data.

  2. Self-replay: Use the current model to generate synthetic data representative of its existing capabilities (as in LAMOL, Definition 18), then mix this with new data during continual pre-training.

  3. Data mixing: When old data is available, mix a small proportion (โˆผ1โ€“5%) of old data with new data during continued training, often with a carefully tuned sampling ratio.

Three replay strategies for continual learning. (a) Buffer replay stores raw samples from previous tasks and interleaves them with current data. (b) LAMOL (Definition 18) uses the model itself to generate pseudo-samples, creating a self-referential replay loop. (c) Distillation-based replay replaces stored data with soft labels from a frozen teacher model, compressing old knowledge into output distributions. Solid arrows indicate primary data flow; dashed arrows indicate replay or distillation pathways.

Proposition 7 (Optimal Buffer Size for Replay).

Consider a continual learner processing T tasks, each with a d-dimensional parameter space, using a replay buffer of size m shared equally across tasks. Under standard uniform-convergence assumptions, the expected forgetting on task s after learning all T tasks satisfies (Optimal Buffer)๐”ผ[โ„ฑs]โ‰คCdm/T+โˆ‘t=s+1Tโ€–โˆ‡๐œฝโ„“t(๐œฝsโˆ—)โ€–โ‹…ฮทtโŸtask-shiftย term, where C>0 is a universal constant, ๐œฝsโˆ— is the optimum for task s, and ฮทt is the learning rate at task t. The first term captures the statistical error from finite replay samples; the second captures the accumulated gradient drift.

Proof.

The first term follows from a standard generalisation bound: when replaying m/T samples from task s, the empirical risk approximates the population risk to within O(dT/m) with high probability. The second term is obtained by telescoping the parameter drift โ€–๐œฝTโˆ’๐œฝsโˆ—โ€–โ‰คโˆ‘t>sฮทtโ€–gtโ€– and applying Lipschitz continuity of the loss. Taking expectations and combining the two terms yields (Optimal Buffer).

(Optimal Buffer) reveals the fundamental tension: the statistical term scales as T/m, so the buffer must grow linearly with the number of tasks to keep forgetting constant. When m is fixed, forgetting grows as T, inevitable unless the task-shift term is simultaneously controlled (e.g., via regularisation or architecture-based methods).

Architecture-Based Methods

Regularisation constrains what the parameters can do; replay constrains what the model sees. Architecture-based methods take a third path: they modify the structure of the network so that different tasks occupy different parameters. The ideal is zero forgetting: old tasks are literally untouched because their weights are frozen or isolated, at the cost of growing model capacity.

We survey four families of increasing sophistication: progressive networks that add entire columns, mask-based methods that carve task subnetworks out of a shared backbone, LoRA-based methods that attach lightweight adapters, and hypernetwork-based methods that generate adapters on the fly.

Progressive Neural Networks

Definition 20 (Progressive Neural Networks).

A Progressive Neural Network (PNN) [18] maintains a separate column ๐œฝ(s) for each task s=1,โ€ฆ,T. When learning task t+1, all previous columns are frozen and a new column is instantiated with lateral connections to all previous columns. The hidden activation at layer l of column t+1 is (PNN Forward)๐’‰l(t+1)=f(Wl(t+1)๐’‰lโˆ’1(t+1)+โˆ‘s=1tUl(t+1,s)๐’‰lโˆ’1(s)), where f is a nonlinear activation, Wl(t+1) is the main weight matrix of the new column at layer l, and Ul(t+1,s)โˆˆโ„dlร—dlโˆ’1โก are lateral adapters connecting layer lโˆ’1 of column s to layer l of column t+1. Only Wl(t+1) and the lateral adapters {Ul(t+1,s)}s=1t are trained; all parameters in columns 1,โ€ฆ,t remain fixed.

Proposition 8 (PNN: Zero Forgetting, Quadratic Growth).

Let each column have Pcol parameters and each lateral adapter have Plat parameters. Then:

  1. Zero forgetting: The backward transfer BWT=0, since previous columns are frozen and their outputs are deterministic functions of the input.

  2. Parameter growth: The total parameter count after T tasks is (PNN Params)P(T)=Tโ‹…Pcol+โˆ‘t=2T(tโˆ’1)โ‹…Lโ‹…Plat=Tโ‹…Pcol+T(Tโˆ’1)2โ‹…Lโ‹…Plat, which grows as O(T2) due to the lateral connections.

Proof.

(i) Since columns 1,โ€ฆ,t are frozen when training column t+1, the function computed by column s (for sโ‰คt) is unchanged. The lateral connections only read from old columns; they do not write to them. Hence the predictions on task s are invariant to all subsequent training, giving BWT=0.

(ii) Column t+1 adds Pcol parameters for its own weights plus tโ‹…Lโ‹…Plat parameters for lateral adapters across L layers. Summing over t=1,โ€ฆ,T gives (PNN Params).

Progressive Neural Network with three task columns and three layers each. Columns for tasks 1 and 2 (blue) are frozen; column 3 (orange) is currently being trained. Dashed purple arrows indicate lateral connections that allow the new column to reuse features from all previous columns.

PackNet and Piggyback

Progressive networks guarantee zero forgetting but at quadratic parameter cost. Mask-based methods achieve a more favorable trade-off by sharing a single set of weights and assigning each task a binary mask that selects a task-specific subnetwork.

Definition 21 (PackNet).

PackNet [19] maintains a single backbone with parameters ๐œฝโˆˆโ„Pโก and a binary mask ๐’Žtโˆˆ{0,1}P for each task t. The effective parameters for task t are (Packnet)๐œฝ(t)=๐’ŽtโŠ™๐œฝfrozen+(๐Ÿ™โกโˆ’๐’Žt)โŠ™๐œฝtrainable, where โŠ™ denotes element-wise multiplication. PackNet operates in two phases per task:

  1. Train: Fine-tune the free (unmasked) parameters on ๐’Ÿt.

  2. Prune and freeze: Identify the top-p fraction of weights by magnitude, set ๐’Žt=๐Ÿ™โก on those positions, and freeze them permanently. The remaining (1โˆ’p) fraction is released for future tasks.

Definition 22 (Piggyback).

Piggyback [20] replaces PackNet's hard pruning with learnable mask scores. Each task t has a real-valued score vector ๐’”tโˆˆโ„Pโก. The binary mask is obtained by thresholding: (Piggyback MASK)๐’Žt=๐Ÿ™โก[ฯƒ(๐’”t)>0.5], where ฯƒ is the sigmoid function and ๐Ÿ™โก[โ‹…] is the indicator. During training, the mask is relaxed to ๐’Ž^t=ฯƒ(๐’”t) for gradient flow (a straight-through estimator is used for the discrete threshold), and only the scores ๐’”t are optimised; the backbone weights ๐œฝ remain frozen after initial pretraining. At inference, the hard mask (Piggyback MASK) is applied.

Proposition 9 (PackNet Capacity Bound).

If each task uses a fraction p of the total parameters, PackNet can accommodate at most (Packnet Capacity)Tmaxโก=โŒŠ1pโŒ‹ tasks before the network is fully allocated. Moreover, all tasks enjoy zero forgetting: BWT=0.

Proof.

After t tasks, the fraction of frozen parameters is tโ‹…p. The network has free capacity as long as tโ‹…pโ‰ค1, i.e., tโ‰ค1/p. Since t is an integer, Tmaxโก=โŒŠ1/pโŒ‹. Zero forgetting follows because masked parameters are frozen and never modified by subsequent tasks.

The capacity bound (Packnet Capacity) is surprisingly tight in practice: with p=0.25 (retaining the top 25% of weights per task), PackNet accommodates exactly 4 tasks. This motivates the search for more parameter-efficient alternatives.

LoRA for Continual Learning

The parameter-efficiency revolution brought by Low-Rank Adaptation (Definition 2, Parameter-Efficient Fine-Tuning: LoRA) offers a natural architecture-based strategy for continual learning: freeze the pretrained backbone and learn a small, separate LoRA adapter for each task.

Definition 23 (Continual LoRA).

Let W0โˆˆโ„dร—kโก be a frozen pretrained weight matrix. For each task t=1,โ€ฆ,T, Continual LoRA learns a rank-r adapter (Bt,At) with Btโˆˆโ„dร—rโก and Atโˆˆโ„rร—kโก. The effective weight for task t is (Continual LORA)W(t)=W0+BtAt. At inference, the system identifies the task (via a task-ID, a classifier, or prompt-based routing) and applies the corresponding adapter. Since the backbone W0 is never modified, all tasks share the same pretrained representations.

Proposition 10 (LoRA Storage for Continual Learning).

For a model with Ladapted adapted layers, each of dimension dร—k, Continual LoRA stores (LORA CL Storage)SLoRA(T)=Tร—2r(d+k)ร—Ladapted parameters across T tasks, compared to Tร—P for full-model copies (where P is the total parameter count). For a 7B-parameter model with d=k=4096, r=8, and Ladapted=64 layers (adapting both attention projections): Tร—PSLoRA(T)=P2r(d+k)ร—Ladapted=7ร—1092ร—8ร—8192ร—64โ‰ˆ834ร—. Each adapter requires only โˆผ8.4M parameters, yielding an approximately 834ร— storage reduction per task compared to storing a full copy of the model.

Remark 8 (C-CLIP: LoRA Is Competitive).

[21] conducted a comprehensive evaluation of continual learning methods for visionโ€“language models and found that simple per-task LoRA adapters, with no replay, no regularisation, and no architectural innovation beyond the adapters themselves, matched or exceeded sophisticated CL methods on 7 out of 10 benchmarks. This finding suggests that for pretrained foundation models, the combination of a frozen high-quality backbone with lightweight task-specific adapters already provides strong continual learning capabilities.

Insight.

Neocortex and hippocampus in silicon. The success of LoRA for continual learning mirrors the biological principle underlying CLS theory [11]: a stable neocortex (the frozen pretrained backbone W0) provides a shared representational substrate, while plastic hippocampal representations (the per-task LoRA adapters BtAt) encode task-specific knowledge without interfering with the stable base. The rank constraint rโ‰ชminโก(d,k) enforces a form of โ€œmemory compressionโ€ analogous to the hippocampus encoding only the gist of an experience, not a verbatim copy.

Doc-to-LoRA

Continual LoRA (Definition 23) requires training a separate adapter for each task, which still takes time proportional to the fine-tuning dataset size. Can we amortise this cost by learning a single hypernetwork that maps any document (or task specification) to its corresponding LoRA adapter in a single forward pass?

Definition 24 (Doc-to-LoRA).

Doc-to-LoRA [22] trains a hypernetwork Hฯ• that takes a document ๐ (or any textual task description) and produces LoRA adapter matrices: (DOC TO LORA)Hฯ•(๐)=(A๐,B๐),W(๐)=W0+B๐A๐. The hypernetwork is trained on a meta-dataset of (document, fine-tuned adapter) pairs. At inference, given a new document ๐โ€ฒ not seen during training, Hฯ•(๐โ€ฒ) produces a task-specific adapter in O(1) time, requiring a single forward pass through the hypernetwork, with no gradient-based optimisation required.

Proposition 11 (Doc-to-LoRA Amortisation).

Let Cft denote the cost of fine-tuning a single LoRA adapter and Chyp the cost of the hypernetwork forward pass. Then Doc-to-LoRA achieves per-task cost Chyp (typically orders of magnitude smaller than Cft) at the expense of a one-time training cost Cmeta=O(Nmetaโ‹…Cft) for the meta-dataset of Nmeta tasks. Amortisation is beneficial when the total number of deployment tasks T satisfies (DOC TO LORA Amort)T>CmetaCftโˆ’Chypโ‰ˆNmeta, since Chypโ‰ชCft.

Remark 9 (Connection to Meta-Learning).

Doc-to-LoRA can be viewed as a form of meta-learning [23] where the hypernetwork Hฯ• learns to produce task-specific adaptations from task descriptions. The key difference from MAML is that Doc-to-LoRA uses a feed-forward hypernetwork rather than gradient-based inner-loop optimisation, making it strictly faster at deployment (no inner-loop gradient steps needed). This connects to the broader principle of amortised inference (Adaptive Computation Time), where a learned forward pass replaces iterative optimisation.

Continual Compositionality

A single LoRA adapter per task treats each task as an independent modular unit. But many tasks share substructure: a medical question-answering task might benefit from both โ€œmedical knowledgeโ€ and โ€œreasoningโ€ skills. Compositional methods aim to learn a library of skills and compose them at inference time.

Definition 25 (Continual Compositionality).

A continual compositionality system maintains a library of K skill modules, each parameterised as a LoRA adapter (Bk,Ak), k=1,โ€ฆ,K. Given an input x, a router r:๐’ณโ†’ฮ”Kโˆ’1 produces a weight vector ๐’“(x)=(r1(x),โ€ฆ,rK(x)) over skills, and the effective weight matrix is (Continual Compositionality)W(x)=W0+โˆ‘k=1Krk(x)BkAk. New tasks can be accommodated by either (i) adding new skill modules (growing K) or (ii) learning a new routing function while reusing existing skills.

Remark 10 (Connection to Mixture of Experts).

(Continual Compositionality) is structurally identical to a LoRA-based Mixture of Experts (MoE), where each expert is a low-rank adapter. The router r(x) plays the role of the gating function. The key difference from standard MoE is the continual learning context: skills are learned sequentially, the router must generalise to new taskโ€“skill combinations, and old skills must not be corrupted when new ones are added. This is achieved by freezing old skill modules and only training the router and any new modules.

Four architecture-based continual learning strategies. (a) Progressive Neural Networks add a new column per task with lateral connections (dashed). (b) PackNet assigns different weight subsets to different tasks via binary masks (colours indicate task ownership). (c) Continual LoRA attaches per-task low-rank adapters ฮ”t to a frozen backbone W0. (d) Doc-to-LoRA uses a hypernetwork Hฯ• to generate adapters from document descriptions in a single forward pass.

Continual Learning for Large Language Models

The preceding sections developed continual learning as a general framework. We now turn to the specific challenges posed by large language models (LLMs), which are continual learners by economic necessity: retraining a frontier model from scratch costs millions of dollars in compute, yet the world's knowledge changes daily. Continual pre-training, continual fine-tuning, and continual alignment are no longer academic curiosities; they are production requirements.

This section surveys the LLM-specific landscape, organised around four themes: continual pre-training, learning-rate dynamics, sparse memory, and continual fine-tuning. We draw on the comprehensive surveys of [7], [6], and [8].

Continual Pre-Training

Definition 26 (Continual Pre-Training).

Given a pretrained model ๐œฝ0 and a new domain corpus ๐’žnew, continual pre-training (CPT) updates the model by solving (CPT)๐œฝCPT=argโ€‰min๐œฝโกโ„’LM(๐œฝ;๐’žnew)+ฮปฮฉ(๐œฝ,๐œฝ0), where โ„’LM is the standard next-token prediction loss ((SFT LOSS) without prompt masking) and ฮฉ(๐œฝ,๐œฝ0) is a regulariser penalising deviation from the pretrained weights (e.g., ฮฉ=โ€–๐œฝโˆ’๐œฝ0โ€–2 for L2 regularisation, or the EWC penalty of Definition 12).

Practical strategies.

Three techniques are commonly combined with the objective (CPT):

  1. Data mixing: Interleave a fraction ฯโˆˆ(0,1) of the original pretraining data (or a representative subset) with the new corpus, sampling each batch as ฯโ‹…๐’žold+(1โˆ’ฯ)โ‹…๐’žnew.

  2. Learning rate rewarming: Restart from a moderate learning rate ฮท0 (rather than the near-zero rate at the end of the original cosine schedule) and decay again, giving the model sufficient plasticity to absorb new data.

  3. Distribution-aware sampling: Upweight tokens that are informative for the new domain (e.g., via importance sampling based on domain classifiers) and downweight tokens that the model already predicts well.

Example 5 (Domain-Adaptive Pre-Training for Medicine).

Consider adapting a 7B-parameter general-purpose LLM to the medical domain. The new corpus ๐’žnew consists of โˆผ50B tokens from PubMed abstracts, clinical notes, and medical textbooks. Typical CPT hyperparameters:

  • Learning rate: ฮท0=2ร—10โˆ’5 with cosine decay to ฮทminโก=1ร—10โˆ’6 over 2 epochs.

  • Data mixing ratio: ฯ=0.05 (5% of each batch drawn from a curated subset of the original pretraining data).

  • Regularisation: L2 penalty with ฮป=0.01.

With this setup, the model achieves a 12-point improvement on MedQA (USMLE-style medical questions), while losing only 1โ€“2 points on general benchmarks (MMLU, HellaSwag). Without data mixing (ฯ=0), the general-benchmark degradation rises to 8โ€“10 points, a clear manifestation of catastrophic forgetting at the LLM scale.

Learning Rate Governs Forgetting

The learning rate is perhaps the single most important hyperparameter for controlling the stabilityโ€“plasticity trade-off in continual learning. A large learning rate provides plasticity (fast adaptation to new data) but causes instability (large deviations from the old optimum). A small learning rate preserves stability but may lack the capacity to learn genuinely new knowledge. The following theorem makes this trade-off precise.

Theorem 5 (Learning Rateโ€“Forgetting Connection).

Let ๐œฝAโˆ— be the optimal parameters for task A, and suppose we train on task B with learning rate ฮทB for a single gradient step. Under the assumptions that the loss โ„’A is L-smooth and has Hessian condition number ฮบ(HA)=ฮปmaxโก(HA)/ฮปminโก(HA), the expected forgetting on task A satisfies (LR Forgetting)๐”ผ[โ„ฑA]โ‰คฮทBโ‹…โ€–โˆ‡โ„’B(๐œฝAโˆ—)โ€–โ‹…ฮบ(HA)+O(ฮทB2), where โ„ฑA=โ„’A(๐œฝAโˆ—โˆ’ฮทBโˆ‡โ„’B(๐œฝAโˆ—))โˆ’โ„’A(๐œฝAโˆ—) is the increase in task-A loss after one step on task B.

Proof.

By the L-smoothness of โ„’A, we have the quadratic upper bound โ„’A(๐œฝAโˆ—โˆ’ฮทB๐’ˆB)โ‰คโ„’A(๐œฝAโˆ—)โˆ’ฮทBโŸจโˆ‡โ„’A(๐œฝAโˆ—),๐’ˆBโŸฉ+LฮทB22โ€–๐’ˆBโ€–2, where ๐’ˆB=โˆ‡โ„’B(๐œฝAโˆ—). Since ๐œฝAโˆ— is a (local) minimiser of โ„’A, we have โˆ‡โ„’A(๐œฝAโˆ—)=0, so the linear term vanishes. However, for a more informative bound, consider the second-order Taylor expansion of โ„’A around ๐œฝAโˆ—: โ„ฑAโ‰ˆฮทB22๐’ˆBโŠคHA๐’ˆBโ‰คฮทB22ฮปmaxโก(HA)โ€–๐’ˆBโ€–2. To obtain the first-order bound in ฮทB, note that if ๐œฝAโˆ— is only an approximate minimiser (as is typical in practice) with residual gradient โ€–โˆ‡โ„’A(๐œฝAโˆ—)โ€–โ‰คฯต, the linear term contributes ฮทBฯตโ€–๐’ˆBโ€–. Combining with the curvature term and bounding via the condition number gives (LR Forgetting).

Theorem 5 has a clear prescriptive message: to reduce forgetting, one should use a small learning rate ฮทB (scaling linearly with forgetting), train on tasks whose gradients are small at the previous optimum (low task conflict), and prefer models with well-conditioned loss landscapes (small ฮบ(HA)). The connection to EWC (Definition 12) is immediate: EWC's Fisher penalty reshapes the loss landscape to increase the effective curvature along directions important for task A, making ฮบ(HA) act in the model's favour.

Definition 27 (Infinite Cosine Learning Rate Schedule).

The infinite cosine schedule [24] replaces the standard one-shot cosine decay with a periodic schedule suitable for continual pre-training over an indefinite time horizon: (Infinite Cosine)ฮท(t)=ฮทminโก+ฮทmaxโกโˆ’ฮทminโก2(1+cosโก(ฯ€(tmodTcycle)Tcycle)), where Tcycle is the cycle length. Unlike the standard cosine schedule, which decays to near zero and must be restarted manually, the infinite cosine periodically rewarms the learning rate, automatically providing bursts of plasticity at regular intervals.

Comparison of learning rate schedules for continual pre-training. The standard cosine (blue) decays to near zero and lacks plasticity for new data introduced at t=100. WSD (warmupโ€“stableโ€“decay, orange) maintains a high rate longer but still decays. The infinite cosine (green) periodically rewarms, providing automatic plasticity bursts at the start of each cycle. The dashed line marks the introduction of new data, where high learning rate is desirable for fast adaptation.

Proposition 12 (Infinite Cosine Preserves Plasticity).

Under the infinite cosine schedule (Definition 27), the plasticity, defined as the expected magnitude of the parameter update on new data, satisfies (Infinite Cosine Plasticity)๐’ซ(t)=ฮท(t)โ‹…โ€–โˆ‡โ„’new(๐œฝt)โ€–โ‰ฅฮทminโกโ‹…โ€–โˆ‡โ„’new(๐œฝt)โ€–>0 for all t, provided ฮทminโก>0 and the new-data gradient is nonzero. Moreover, at the start of each cycle (tโ‰ก0(modTcycle)), the plasticity peaks at ฮทmaxโกโ‹…โ€–โˆ‡โ„’newโ€–.

Proof.

From (Infinite Cosine), the cosine term lies in [โˆ’1,1], so ฮท(t)โˆˆ[ฮทminโก,ฮทmaxโก] for all t. The lower bound ฮทminโก>0 ensures ๐’ซ(t)>0 whenever โ€–โˆ‡โ„’newโ€–>0. At cycle boundaries, tmodTcycle=0, giving cosโก(0)=1 and ฮท(t)=ฮทmaxโก.

Sparse Memory Fine-Tuning

An orthogonal approach to mitigating forgetting during LLM fine-tuning is to replace the dense feed-forward network (FFN) layers with sparse memory layers that can absorb new knowledge without overwriting old parameters.

Definition 28 (Sparse Memory Layer).

A sparse memory layer [25] replaces the standard FFN sub-layer of a Transformer block with a keyโ€“value memory bank โ„ณ={(๐’Œi,๐’—i)}i=1M containing M memory slots. Given an input hidden state ๐’‰โˆˆโ„dโก, the layer retrieves the top-k most relevant memories and computes: (Sparse MEM TOPK)๐’ฉk(๐’‰)=argโ€‰maxSโІ[M],|S|=kโกโˆ‘iโˆˆSโŸจ๐’‰,๐’ŒiโŸฉ,๐’‰~=โˆ‘iโˆˆ๐’ฉk(๐’‰)wi(๐’‰)๐’—i,wi(๐’‰)=expโก(โŸจ๐’‰,๐’ŒiโŸฉ/ฯ„)โˆ‘jโˆˆ๐’ฉk(๐’‰)expโก(โŸจ๐’‰,๐’ŒjโŸฉ/ฯ„), where ฯ„>0 is a temperature parameter.

TF-IDF weighting.

To prevent frequently accessed memories from dominating, the retrieval scores are modulated by inverse document frequency (IDF) weights: (Sparse MEM Tfidf)scorei(๐’‰)=โŸจ๐’‰,๐’ŒiโŸฉโ‹…logโก(N1+df(i)), where df(i) counts the number of training examples that have accessed memory slot i, and N is the total number of examples. This ensures rare, task-specific memories are weighted more heavily.

Proposition 13 (Sparse Memory Forgetting Reduction).

[25] demonstrate empirically that replacing FFN layers with sparse memory layers during domain-specific fine-tuning reduces forgetting on general benchmarks from 89% F1 drop (full fine-tuning) to 11% F1 drop on average, while matching the domain-specific performance. The mechanism is isolation: new knowledge is written to previously unused memory slots, leaving old memories intact. Formally, if the sets of memory slots accessed by old and new tasks are disjoint, ๐’ฉkoldโˆฉ๐’ฉknew=โˆ…, then forgetting is exactly zero.

Remark 11 (Connection to Engram).

The sparse memory layer shares the same philosophical foundation as the Engram module (Definition 11): both systems store knowledge in discrete, addressable slots accessed via content-based retrieval. The key difference is granularity: Engram operates at the token level as a memory-augmented attention mechanism, while sparse memory layers replace the FFN, traditionally viewed as a โ€œknowledge storageโ€ component, with an explicit, indexable memory bank. Both instantiate the principle that separating what is stored from how it is used is the key to avoiding interference.

Continual Fine-Tuning

Algorithm 1 (Continual Fine-Tuning Pipeline).

Given a pretrained LLM ๐œฝ0, a sequence of fine-tuning tasks ๐’ฏ1,โ€ฆ,๐’ฏT with datasets ๐’Ÿ1,โ€ฆ,๐’ŸT, and a replay buffer โ„ณ of size m:

  1. Initialise ๐œฝโ†๐œฝ0,; โ„ณโ†โˆ…
  2. for t=1,โ€ฆ,T
  3. Initialise adapter: Atโˆผ๐’ฉ(0,ฯƒ2),; Btโ†0 LoRA init, cf. Definition 2
  4. for each mini-batch (x,y)โˆผ๐’Ÿt
  5. Sample replay batch (xโ€ฒ,yโ€ฒ)โˆผโ„ณ
  6. โ„’โ†โ„“(๐œฝ+BtAt;x,y)+ฮฑโ„“(๐œฝ+BtAt;xโ€ฒ,yโ€ฒ) ER loss, (ER LOSS)
  7. Update At,Bt via gradient descent on โ„’ only adapter params
  8. Update buffer: โ„ณโ†Rแด‡sแด‡ส€แด แดษชส€(โ„ณ,๐’Ÿt,m)
  9. Store adapter: save (At,Bt) to disk

Inference.

Given task identifier t (or a learned router), load adapter (At,Bt) and compute W(t)=W0+BtAt.

Caution.

Adapter merging interference. A common deployment shortcut is to merge multiple LoRA adapters into the backbone: Wmerged=W0+โˆ‘tBtAt. While this avoids the need for task identification at inference, it can cause significant interference between tasks. The merged weight โˆ‘tBtAt has rank at most โˆ‘trt, but the individual task-optimal updates may occupy overlapping subspaces, leading to destructive interference. Empirically, merging more than 3โ€“5 adapters often degrades performance on all tasks by 5โ€“15% compared to task-specific routing [7]. Task arithmetic methods (e.g., TIES-merging) can mitigate but not eliminate this interference.

LLM Forgetting in Practice

Forgetting in practice: performance on general benchmarks (MMLU, HellaSwag) and the target domain (Code) before and after continual fine-tuning (CFT) on code data. Blue: original pretrained performance. Red: naive full fine-tuning causes severe forgetting on general benchmarks (MMLU drops 15โ€“16 points). Green: LoRA with replay (Algorithm 1) retains most general capability while achieving comparable code performance. Values are representative of typical experimental outcomes in the literature [7].

Example 6 (LLM Forgetting Case Study: Code Adaptation).

Consider fine-tuning LLaMA-2-7B on 20B tokens of code data (Python, JavaScript, C++) to improve its programming capabilities.

Naive full fine-tuning.

Training with a learning rate of 2ร—10โˆ’5 for one epoch yields the following changes:

  • HumanEval (code generation): 14.0%โ†’52.1% (+38.1 absolute).

  • MMLU (general knowledge): 46.1%โ†’30.8% (โˆ’15.3 absolute, a 33% relative drop).

  • HellaSwag (commonsense reasoning): 76.2%โ†’57.9% (โˆ’18.3 absolute).

The model has effectively traded its general knowledge for coding ability, a textbook case of catastrophic forgetting (Definition 9).

Mitigation via LoRA + replay.

Using rank-8 LoRA adapters on all attention layers with 5% data mixing from a general-purpose replay buffer:

  • HumanEval: 14.0%โ†’48.7% (+34.7, slightly lower).

  • MMLU: 46.1%โ†’43.2% (โˆ’2.9, well-preserved).

  • HellaSwag: 76.2%โ†’73.0% (โˆ’3.2, well-preserved).

The combination of frozen backbone (via LoRA) and experience replay retains 93% of the original MMLU performance while achieving 91% of the code-generation gain. The key insight: most of the โ€œknowledgeโ€ in an LLM resides in the frozen backbone weights; LoRA adapters only need to learn the delta for the new domain.

Neural Memory for Continual Learning

The previous sections treated continual learning as a problem to be solved, a pathology (forgetting) to be cured by external interventions (regularisation, replay, architecture tricks). A more radical perspective, developed in this section, is that continual learning is not a bug but a feature: the ability to update internal state in response to new information is precisely what memory means. From this viewpoint, a model that cannot continually learn cannot truly remember.

This section surveys four recent lines of work that embed continual learning directly into the architecture as a form of neural memory: Titans (meta-learned memory modules), Miras (a unifying framework connecting attention and online learning), S6MOD (state-space models with mixture of discretisation), and nested learning (hierarchical memory with multiple timescales). These connect to the memory systems developed in Memory-Augmented Architectures and The Memory System Framework, but with the specific focus on learning within the forward pass itself.

Titans: Neural Long-Term Memory

[35] propose augmenting the Transformer with a neural long-term memory module that learns to store and retrieve information within the forward pass, using gradient descent on a surprise-based loss as the write mechanism.

Definition 29 (Neural Long-Term Memory Module).

The neural long-term memory is a small neural network Mฯ•:โ„dkโกโ†’โ„dvโก with parameters ฯ•โˆˆโ„Pmemโก, where Pmemโ‰ชP (the total model parameters). At each time step t, the memory is updated via one step of gradient descent on a surprise loss: (Titans Update)ฯ•t+1=ฯ•tโˆ’ฮทmemโˆ‡ฯ•โ„’surprise(ฯ•t;xt), where ฮทmem>0 is a memory learning rate (a hyperparameter, not the model's training learning rate) and โ„’surprise measures how surprising the current input is to the memory.

Definition 30 (Surprise Metric).

Given the current input token represented as a keyโ€“value pair (๐’Œt,๐’—t), the surprise at time step t is (Surprise)st=โ€–Mฯ•(๐’Œt)โˆ’๐’—tโ€–2. High surprise (stโ‰ซ0) indicates that the memory's prediction of the value associated with key ๐’Œt is poor, triggering a large update. Low surprise (stโ‰ˆ0) means the memory already โ€œknowsโ€ this association and the update is small. This implements a form of selective writing: only surprising (novel) information modifies the memory state.

Definition 31 (Titans Three-Component Architecture).

The full Titans architecture combines three components in parallel:

  1. Core attention (short-term memory): Standard multi-head attention over a local window of recent tokens.

  2. Neural memory Mฯ• (long-term memory): The gradient-updated module from Definition 29, which accumulates knowledge over the entire sequence.

  3. Persistent memory (parametric memory): A fixed set of learnable โ€œmemory tokensโ€ {p1,โ€ฆ,pS} prepended to the attention context, encoding task-level priors.

The outputs of all three components are combined via a learned gating mechanism: (Titans Gating)๐’št=gattn(xt)โŠ™๐’štattn+gmem(xt)โŠ™Mฯ•t(๐’Œt)+gpers(xt)โŠ™๐’štpers, where gattn,gmem,gpers:โ„dโกโ†’โ„dโก are gating functions (typically sigmoid-activated linear projections) and โŠ™ is element-wise multiplication.

The Titans three-component architecture. Input xt is processed in parallel by core attention (short-term, windowed), neural memory (long-term, gradient-updated), and persistent memory (parametric, fixed). Outputs are combined via learned gating. The neural memory module updates its parameters at every step via gradient descent on the surprise metric ((Titans Update)).

Proposition 14 (Titans Memory Capacity).

The neural long-term memory Mฯ• with Pmem parameters can store at most O(Pmem/d) keyโ€“value associations with bounded error, where d=maxโก(dk,dv). This storage is lossy: unlike the KV cache which stores all past tokens exactly, the neural memory compresses information into its parameters, with older and less-surprising associations gradually overwritten by newer ones, a natural form of forgetting that prioritises recent and salient information.

Proof.

The memory network Mฯ•:โ„dkโกโ†’โ„dvโก has Pmem parameters. Each stored association (๐’Œi,๐’—i) requires the network to produce Mฯ•(๐’Œi)โ‰ˆ๐’—i, which imposes dv constraints. By a counting argument, the number of associations that can be stored with bounded approximation error is at most Pmem/dv. Since keys also occupy dk dimensions, the effective capacity is O(Pmem/maxโก(dk,dv)). The lossy nature follows from the gradient update (Titans Update): writing a new association may overwrite old ones in overlapping parameter subspaces.

The Miras Framework

The proliferation of sequence models (Transformers, linear attention, state-space models, recurrent networks) raises a natural question: are these architectures fundamentally different, or are they variations on a common theme? The Miras framework [36] answers decisively: they are all instances of the same computation, differing only in their memory policy.

Definition 32 (Miras Unification).

The Miras (Memory Is Really All Sequences need) framework expresses a broad class of sequence models as computing the output at position t via (Miras General)ht=โˆ‘s=1tฮปtโˆ’sฮฑt,s๐’—s, where:

  • ฮปโˆˆ[0,1] is a decay factor controlling how quickly old information is forgotten (memory horizon).

  • ฮฑt,s is an attention weight measuring the relevance of position s to position t.

  • ๐’—s is the value vector at position s.

The framework unifies three seemingly distinct architectures:

  1. Test-Time Training (TTM): Online gradient descent on a loss defined over the input sequence, with decay ฮป implementing a form of exponential forgetting.

  2. Linear Attention with decay (LinAttnฮป): ฮฑt,s=๐’’tโŠค๐’Œs/Zt without softmax normalisation, scaled by exponential decay ฮปtโˆ’s.

  3. Biased Attention (BiasedAttn): Standard softmax attention with an additive bias (tโˆ’s)logโกฮป in the logits, creating a recency preference.

Theorem 6 (Miras Equivalence).

Under appropriate parameterisation, the three architectures compute the same output: (Miras Equivalence)TTM(x1:t)=LinAttnฮป(x1:t)=BiasedAttn(x1:t) for all input sequences x1:t and all tโ‰ฅ1.

Proof sketch.

The key observation is that all three architectures can be written in the form of (Miras General) with specific choices of ฮฑt,s.

TTM โ‡’ LinAttn.

In TTM, the model maintains a weight matrix Wt updated by online gradient descent on a quadratic loss โ„“t=12โ€–Wt๐’Œtโˆ’๐’—tโ€–2 with decay: Wt+1=ฮปWtโˆ’ฮทโˆ‡Wโ„“t. Unrolling the recursion yields Wt=ฮทโˆ‘s=1tฮปtโˆ’s๐’—s๐’ŒsโŠค, so the output Wt๐’’t=ฮทโˆ‘sฮปtโˆ’s(๐’’tโŠค๐’Œs)๐’—s, which is exactly the linear attention form with decay.

LinAttn โ‡’ BiasedAttn.

The exponential decay ฮปtโˆ’s can be absorbed into the attention logits as an additive bias: logโก(ฮปtโˆ’sโ‹…expโก(๐’’tโŠค๐’Œs))=๐’’tโŠค๐’Œs+(tโˆ’s)logโกฮป. Applying softmax to these biased logits recovers the same weighted sum as linear attention with decay, up to normalisation. In the linear-attention regime (no softmax), the equivalence is exact.

Insight.

Continual learning is attention viewed as learning. The Miras equivalence reveals a profound connection: attention over a sequence is online learning with exponential forgetting. Every Transformer that uses attention is, implicitly, a continual learner that writes new associations into its context and reads them back. The decay factor ฮป is the โ€œforgetting rateโ€ of this implicit continual learning process. This perspective dissolves the boundary between โ€œinferenceโ€ (processing a sequence) and โ€œlearningโ€ (updating parameters): both are instances of the same mathematical operation applied at different timescales.

S6MOD: State-Space Models with Mixture of Discretisation

State-space models (SSMs) like Mamba (Definition 19) process sequences through a fixed-dimensional recurrent state, which acts as a compressed memory of the past (Proposition 10). A limitation of standard SSMs is that a single discretisation step ฮ” imposes a single temporal resolution: the model either captures fine-grained recent detail or coarse long-range dependencies, but not both simultaneously.

Definition 33 (S6MOD).

S6MOD (Selective State Spaces with Mixture of Discretisation) [26] extends Mamba by maintaining J parallel discretisation heads, each with its own discretisation step ฮ”j and corresponding state matrices (Aโ€พj,Bโ€พj) obtained from the continuous-time parameters via (S6mod Discretise)Aโ€พj=expโก(ฮ”jA),Bโ€พj=(ฮ”jA)โˆ’1(Aโ€พjโˆ’I)ฮ”jB. The recurrence for head j is (S6mod Recurrence)๐’‰t(j)=Aโ€พj๐’‰tโˆ’1(j)+Bโ€พjxt, and the active head is selected via an input-dependent gating function: (S6mod Select)kโˆ—=argโ€‰maxjโˆˆ[J]โกgj(xt),yt=C๐’‰t(kโˆ—), where gj:โ„dโกโ†’โ„โก is a learnable scoring function for each discretisation head.

Remark 12 (Multiple Temporal Frequencies).

Each discretisation head j effectively processes the input at a different temporal frequency. A small ฮ”j (fine discretisation) yields Aโ€พjโ‰ˆI with slow decay, making the state a near-perfect memory of recent inputs, ideal for capturing fine-grained local patterns. A large ฮ”j (coarse discretisation) yields Aโ€พj with faster decay (eigenvalues further from 1), creating a โ€œblurredโ€ memory that captures long-range trends. The gating mechanism (S6mod Select) allows the model to dynamically select the appropriate temporal resolution for each input, analogous to how the mammalian brain processes information at multiple timescales simultaneously [11]. This is directly related to the SSM memory capacity bounds of Proposition 10: by maintaining J parallel states, S6MOD effectively multiplies the available memory capacity by J.

Nested Learning and the Continuum Memory System

The CLS theory [11] postulates two complementary learning systems: a fast hippocampal system and a slow neocortical system. But the brain does not operate with just two timescales; it has synaptic, cellular, circuit-level, and systems-level plasticity, each operating at a different rate. [37] propose nested learning, which generalises CLS from two levels to L levels, creating a continuum of memory timescales.

Definition 34 (Nested Learning).

A nested learning system consists of L hierarchical levels, each with its own learning rate and update frequency. Level l (l=1,โ€ฆ,L) has:

  • Parameters ฯ•l (the โ€œmemoryโ€ at level l).

  • Learning rate ฮทl, with ฮท1>ฮท2>โ‹ฏ>ฮทL.

  • Update period ฯ„l, with ฯ„1<ฯ„2<โ‹ฏ<ฯ„L.

Level l is updated every ฯ„l steps: (Nested Update)ฯ•l(t+1)={ฯ•l(t)โˆ’ฮทlโˆ‡ฯ•lโ„’(ฯ•l(t);xtโˆ’ฯ„l+1:t),ifย tโ‰ก0(modฯ„l),ฯ•l(t),otherwise. The fastest level (l=1) updates at every step with a high learning rate, capturing fine-grained, rapidly changing information. The slowest level (l=L) updates rarely with a small learning rate, encoding stable, long-term knowledge. Consolidation flows downward: periodically, information from faster levels is distilled into slower levels via the gradient of a consolidation loss.

Definition 35 (Continuum Memory System).

A Continuum Memory System (CMS) formalises the nested learning hierarchy as a tuple: (CMS)CMS={(โ„ณl,ฮทl,ฯ„l)}l=1L, where โ„ณl is the memory module at level l (which may be an attention layer, a recurrent state, or a neural memory module as in Definition 29), ฮทl is the learning rate, and ฯ„l is the update period. The system satisfies the monotonicity constraints: ฮท1>ฮท2>โ‹ฏ>ฮทL,ฯ„1<ฯ„2<โ‹ฏ<ฯ„L. This creates a spectrum of memory timescales: fast, volatile memory at the top and slow, persistent memory at the bottom, mirroring the memory hierarchy (Definition 20) but implemented entirely in the learning dynamics rather than in the hardware.

Nested learning with L=3 levels. Level 1 (coral, top) updates at every time step with a high learning rate, capturing rapidly changing information. Level 2 (orange, middle) updates every 4 steps at a moderate rate. Level 3 (blue, bottom) updates every 12 steps with a slow learning rate, encoding stable long-term knowledge. Dashed arrows indicate consolidation: information flows from faster to slower levels, mirroring hippocampal-to-neocortical transfer in the biological CLS theory.

Remark 13 (Generalisation of CLS Theory).

The classical CLS theory [11] is recovered as the special case L=2: the hippocampus (level 1, fast) and the neocortex (level 2, slow). Nested learning generalises this to L levels, creating a continuum of timescales. The biological motivation is compelling: the brain does not have just two learning rates; synaptic plasticity operates on timescales of milliseconds (spike-timing-dependent plasticity), minutes (early-phase LTP), hours (late-phase LTP), and days to years (systems consolidation). Each timescale serves a different function:

  • Fast levels (l=1,2): working memory and episodic encoding. In the neural architecture, these correspond to attention over recent tokens or the neural memory module of Titans (Definition 29).

  • Intermediate levels (lโ‰ˆL/2): skill consolidation and habit formation. These may correspond to the recurrent state in SSMs (Definition 19) or the LoRA adapters of continual fine-tuning (Definition 23).

  • Slow levels (l=L): semantic memory and world knowledge. These correspond to the frozen pretrained weights W0, which change only during major retraining events.

The nested learning framework provides a principled recipe for designing memory-augmented architectures: choose L, assign timescales, and let consolidation transfer knowledge across levels.

Connection to existing architectures.

The Miras framework (Definition 32) can be viewed as implementing a two-level nested system: the attention weights ฮฑt,s provide fast, input-dependent memory access (level 1), while the decay factor ฮป implements slow forgetting (level 2). Titans (Definition 31) implements a three-level system: core attention (fast), neural memory (medium), and persistent memory (slow). S6MOD (Definition 33) implements J-level memory within the SSM framework via multiple discretisation heads. The nested learning perspective unifies all of these as instances of the same principle: effective memory requires multiple timescales.

Key Idea.

The Memory Hierarchy Principle for Continual Learning. Just as computer memory is organised into a hierarchy of registers, caches, and disk, each trading capacity for speed, neural memory for continual learning should be organised into a hierarchy of learning rates: fast, volatile memory for recent context; medium-speed memory for task-specific adaptations; and slow, persistent memory for stable world knowledge. The Continuum Memory System (Definition 35) formalises this principle, and architectures like Titans, Miras, and S6MOD instantiate specific points in the design space.

The implication for LLM design is clear: future architectures should not treat continual learning as an afterthought to be patched with external mechanisms (replay buffers, regularisers, adapter libraries), but should build it into the architecture as a hierarchy of memory systems operating at different timescales, just as the biological brain does.

Continual Learning for Diffusion Models

Diffusion models have become the dominant paradigm for image, video, and audio generation. Yet the very property that makes them powerful, the ability to learn rich, multi-scale representations of data distributions, also makes them acutely susceptible to forgetting. A Stable Diffusion model fine-tuned on portrait photographs may lose the ability to generate mountain landscapes; a music diffusion model trained on jazz may forget how to produce classical compositions. The denoising objective, which operates across a continuum of noise levels tโˆˆ[0,T], creates a high-dimensional forgetting surface that is qualitatively different from the scalar or per-class forgetting studied in classification.

This section develops the mathematics of continual learning for diffusion models, drawing on the foundations of Regularization-Based Methods, Architecture-Based Methods, and the alignment perspective of Alignment for Diffusion Models.

Forgetting in Diffusion Models

In classification, forgetting is measured by the drop in accuracy on previously learned classes. For generative models, we must measure distributional divergence. The Frรฉchet Inception Distance (FID) provides a practical, if imperfect, metric.

Definition 36 (Diffusion Model Forgetting).

Let ๐œฝ0 be the parameters after training on task ๐’ฏ0 with data distribution pdata(0), and let ๐œฝ1 be the parameters after subsequent training on task ๐’ฏ1. The diffusion forgetting score is (Diffusion Forgetting)Fdiff=defFID(p๐œฝ1,pdata(0))โˆ’FID(p๐œฝ0,pdata(0)), where p๐œฝ denotes the distribution of samples generated by the diffusion model with parameters ๐œฝ. A positive value indicates forgetting; a negative value indicates backward transfer (the rare case where new training improves old-task generation).

Remark 14 (Why Diffusion Forgetting Is Harder to Detect).

Unlike classification, where a wrong prediction is unambiguous, diffusion forgetting manifests as subtle distributional shift: generated faces may acquire landscape-like colour palettes, or architectural details may soften. FID captures aggregate statistics but misses mode-specific forgetting; a model may maintain overall FID while completely losing a particular sub-mode (e.g., night-time cityscapes). More refined metrics decompose forgetting per mode: Fdiff(m)=FID(p๐œฝ1(m),pdata(0,m))โˆ’FID(p๐œฝ0(m),pdata(0,m)), where the superscript (m) restricts to samples classified into mode m by an external classifier.

The denoising objective of a diffusion model operates across noise levels t, and different noise levels encode different types of information. High noise levels (t close to T) capture coarse, global structure, such as the overall layout and colour distribution of an image. Low noise levels (t close to 0) capture fine details: textures, edges, and precise spatial relationships. This hierarchy has direct consequences for forgetting: a model that forgets its high-noise predictions loses the ability to generate globally coherent compositions, while a model that forgets its low-noise predictions produces blurry or textureless images.

The noise-level hierarchy creates a natural connection to the HSD framework (Hierarchical Sparse-Dense Framework): we can view different noise levels as different โ€œlevelsโ€ of the hierarchy, with high-noise levels corresponding to the slow, stable, shared level (since coarse structure is similar across tasks) and low-noise levels corresponding to the fast, task-specific level (since fine details vary dramatically between, say, landscapes and portraits). This perspective motivates the noise-level-aware EWC approach developed below.

Regularization for Diffusion Continual Learning

The EWC framework (Definition 12) applies to any differentiable loss. For diffusion models, the loss is the denoising score-matching objective (Denoise LOSS)โ„’denoise(๐œฝ)=๐”ผtโˆผ๐’ฐ[0,T]๐”ผ๐’™0โˆผpdata๐”ผ๐โˆผ๐’ฉ(๐ŸŽ,๐ˆ)[w(t)โ€–๐๐œฝ(๐’™t,t)โˆ’๐โ€–2], where ๐’™t=ฮฑโ€พt๐’™0+1โˆ’ฮฑโ€พt๐ and w(t) is a noise-level weighting. The Fisher information matrix inherits this noise-level structure.

Proposition 15 (Noise-Level-Aware EWC for Diffusion).

The Fisher information matrix of the denoising loss decomposes across noise levels: โ„ฑiโก=๐”ผt[w(t)โ„ฑi(t)โก],โ„ฑi(t)โก=๐”ผ๐’™0,๐[(โˆ‚โ„’tโˆ‚ฮธi)2], where โ„’t=โ€–๐๐œฝ(๐’™t,t)โˆ’๐โ€–2 is the per-noise-level loss. A noise-level-aware EWC objective uses time-dependent importance: (DIFF EWC)โ„’diff-EWC(๐œฝ)=โ„’denoise(๐œฝ)+ฮป2โˆ‘i(โˆ‘tw(t)โ„ฑi(t)โก)(ฮธiโˆ’ฮธ0,i)2.

Proof.

By linearity of expectation, the diagonal Fisher decomposes as โ„ฑiโก=๐”ผt,๐’™0,๐[(โˆ‚โ„’โˆ‚ฮธi)2]=๐”ผt[w(t)๐”ผ๐’™0,๐[(โˆ‚โ„’tโˆ‚ฮธi)2]]=๐”ผt[w(t)โ„ฑi(t)โก]. Substituting into the standard EWC objective (Definition 12) yields (DIFF EWC).

Insight.

High noise protects less. At high noise levels, the denoising network predicts nearly pure noise, which carries little task-specific information. Consequently, โ„ฑi(t)โก is small for large t, and the EWC penalty naturally concentrates on the low-noise parameters that encode fine-grained, task-specific details. This means diffusion EWC is automatically more protective of the features that matter most for generation quality.

Example 7 (Noise-Level Fisher for Stable Diffusion).

Consider a Stable Diffusion model with T=1000 noise levels. At noise level t=950 (near pure noise), the denoising network's prediction is almost independent of the input image; it predicts the noise that was added, which is nearly ๐’ฉ(๐ŸŽ,๐ˆ) regardless of the task. Consequently, โ„ฑi(950)โกโ‰ˆ0 for most parameters.

At noise level t=50 (near the clean image), the denoising prediction depends heavily on the fine-grained structure of the data distribution: facial features for portrait tasks, vegetation patterns for landscape tasks. Here, โ„ฑi(50)โก is large for parameters that encode these task-specific features.

This means that the EWC penalty in (DIFF EWC) automatically focuses on protecting low-noise-level parameters, which is precisely where task-specific information resides. This is a case where the mathematical framework naturally discovers the correct inductive bias.

LoRA-Based Diffusion Continual Learning

The parameter-efficient approach of Definition 23 is particularly natural for diffusion models, where each โ€œtaskโ€ often corresponds to a visual concept (a particular artistic style, a specific object category, or a user's face).

Definition 37 (Concept-Specific LoRA for Diffusion).

Given a frozen denoising network ๐๐œฝ0 and a set of concepts {c1,โ€ฆ,cK}, we train a separate low-rank adapter (Bc,Ac) for each concept c. The adapted denoising prediction at layer l is (Concept LORA)๐๐œฝ(๐’™t,t)=๐๐œฝ0(๐’™t,t)+BcAcโ‹…๐’‰l, where ๐’‰l is the hidden activation at layer l. For multi-concept generation, adapters compose linearly: (Concept Compose)๐๐œฝ(๐’™t,t)=๐๐œฝ0(๐’™t,t)+โˆ‘cโˆˆ๐’ฎฮณcBcAcโ‹…๐’‰l, where ๐’ฎ is the active concept set and ฮณcโˆˆ[0,1] are mixing coefficients with โˆ‘cฮณc=1.

Remark 15 (Zero Forgetting by Construction).

Since the base model ๐œฝ0 is frozen, activating no adapter (๐’ฎ=โˆ…) recovers the original model exactly. The forgetting score is Fdiff=0 by construction. This is the strongest possible guarantee, but it comes at the cost of requiring a concept identifier at inference time (analogous to the task-ID assumption in Definition 4).

The composition in (Concept Compose) raises a subtle mathematical question: when do linearly composed LoRA adapters produce coherent samples? If concepts c1 (โ€œoil paintingโ€) and c2 (โ€œportraitโ€) are trained independently, their composition ฮณ1B1A1+ฮณ2B2A2 may interfere destructively. This connects directly to the compositionality analysis of Definition 25.

Proposition 16 (Orthogonal Adapters Compose Without Interference).

If concept adapters have orthogonal column spaces, col(Bc1Ac1)โŸ‚col(Bc2Ac2) for all c1โ‰ c2, then the composed denoising prediction satisfies (Orthogonal Compose)โ€–๐๐œฝcomposedโˆ’๐๐œฝ0โ€–2=โˆ‘cโˆˆ๐’ฎฮณc2โ€–BcAcโ‹…๐’‰lโ€–2. That is, the total perturbation decomposes as a sum of independent per-concept contributions with no cross terms. The maximum number of such orthogonal adapters in โ„dโก is โŒŠd/rโŒ‹, which for d=1024 and r=4 gives 256 interference-free concepts.

Proof.

The composed perturbation is ฮ”=โˆ‘cโˆˆ๐’ฎฮณcBcAcโ‹…๐’‰l. Expanding the squared norm: โ€–ฮ”โ€–2=โˆ‘c1,c2โˆˆ๐’ฎฮณc1ฮณc2โŸจBc1Ac1๐’‰l,Bc2Ac2๐’‰lโŸฉ. By the orthogonality assumption, the cross terms (c1โ‰ c2) vanish, leaving only the diagonal terms. The maximum number of pairwise orthogonal rank-r subspaces in โ„dโก is โŒŠd/rโŒ‹ by a dimension-counting argument.

In practice, adapters trained independently are not exactly orthogonal, but their interference can be mitigated by explicit orthogonality regularisation during training: adding a penalty ฮผโˆ‘c1<c2โ€–Ac1โŠคBc1โŠคBc2Ac2โ€–F2 to the training loss encourages the adapters to occupy distinct subspaces of the model's representation. This creates a direct connection between the compositionality of diffusion LoRA adapters and the orthogonal subspace methods studied in the architecture-based CL literature.

Connection to Alignment

The alignment techniques of Alignment for Diffusion Models (DDPO, DRaFT, and Diffusion-DPO) can be viewed through the continual learning lens. Each alignment method fine-tunes a pretrained diffusion model to satisfy human preferences, which is precisely a two-task continual learning problem: task 0 is โ€œgenerate diverse, high-quality imagesโ€ and task 1 is โ€œgenerate images that humans prefer.โ€

Remark 16 (Alignment as Continual Learning for Diffusion).

Every diffusion alignment method includes a KL regularizer ฮฒDKL[ฯ€๐œฝโ€–ฯ€ref] or its equivalent ((Central Objective)). This regularizer serves exactly the same function as the EWC penalty: it prevents the aligned model from straying too far from the pretrained model and thus forgetting general generation capability. The alignment coefficient ฮฒ plays the role of the EWC regularization strength ฮป. From the CL perspective, diffusion alignment methods are single-step continual learners with an implicit anti-forgetting mechanism.

Concept-specific LoRA adapters for diffusion continual learning. The frozen denoising network serves as a shared backbone, while lightweight adapters encode task-specific knowledge. A concept router selects and composes adapters at inference time.

Multimodal and Federated Continual Learning

The preceding sections studied continual learning for unimodal systems, language models that process text, or diffusion models that generate images. Modern AI systems, however, are fundamentally multimodal: CLIP aligns vision and language, GPT-4V processes interleaved text and images, and Gemini handles text, images, audio, and video. When such systems must learn continually, the challenges multiply. Forgetting can propagate across modalities: updating the vision encoder may degrade text-conditioned generation even if the text encoder is untouched.

Simultaneously, the deployment of large models across many devices and organisations creates a federated learning setting where data cannot be centralised. When each client also faces a non-stationary data stream, we arrive at federated continual learning, a doubly challenging problem that combines the difficulties of both fields.

Continual CLIP: Vision-Language Continual Learning

Definition 38 (Vision-Language Continual Learning Benchmark).

A vision-language continual learning (VLCL) problem consists of a sequence of tasks ๐’ฏ1,โ€ฆ,๐’ฏT, where each task ๐’ฏt={(๐’™i(t),๐’ši(t))}i=1nt contains paired image-text data. The learner must maintain:

  1. Within-modal performance: classification accuracy for images and text retrieval quality,

  2. Cross-modal alignment: the ability to match images to their corresponding text descriptions and vice versa, measured by recall@k on all previously seen tasks.

The key difficulty is that cross-modal alignment creates coupling between the vision and language encoders, so that updating either encoder for a new task can disrupt the shared embedding space.

Definition 39 (C-CLIP Framework).

The Continual-CLIP (C-CLIP) framework [21] provides a systematic evaluation of continual learning methods for vision-language models. It comprises:

  1. 10 diverse datasets spanning fine-grained recognition (CUB, Stanford Cars, Flowers102), scene understanding (SUN397, Places365), action recognition (UCF101, Kinetics), satellite imagery (EuroSAT), medical imaging (PathMNIST), and general objects (CIFAR-100),

  2. 3 CL scenarios: class-incremental, domain-incremental, and task-incremental (Definition 4),

  3. 7 CL methods evaluated: EWC, SI, LwF, GEM, Experience Replay, PackNet, and LoRA-CL.

The benchmark measures both zero-shot transfer (using the frozen CLIP encoders) and continual fine-tuning performance.

The central finding of C-CLIP is striking:

Theorem 7 (LoRA Dominance for Vision-Language CL).

Under the C-CLIP benchmark, LoRA-based continual learning achieves average performance within 2% of the best-performing method on 7 out of 10 datasets, while using fewer than 1% of the trainable parameters of full fine-tuning. Formally, let ALoRA(d) and Abest(d) denote the final average accuracy of LoRA-CL and the best method on dataset d. Then (LORA Dominance)110โˆ‘d=110Abest(d)โˆ’ALoRA(d)Abest(d)โ‰ค0.02, with the LoRA parameter count satisfying |๐œฝLoRA|/|๐œฝfull|<0.01.

Insight.

Parameter efficiency is anti-forgetting. The success of LoRA in the VLCL setting is not merely a storage benefit. By constraining updates to a low-rank subspace, LoRA structurally limits the magnitude of weight perturbation, which by Theorem 5 directly bounds forgetting. The rank r of the adapter acts as an implicit regularization strength, analogous to ฮป in EWC but enforced architecturally rather than through a penalty term.

MultiFCL: Federated Continual Learning

Definition 40 (Federated Continual Learning).

A federated continual learning (FCL) system consists of:

  1. K clients, each experiencing its own task sequence ๐’ฏ1(k),๐’ฏ2(k),โ€ฆ,

  2. A central server that coordinates learning without accessing raw client data,

  3. A communication protocol specifying what information (gradients, model parameters, adapter weights) is exchanged and when.

The global objective is (FCL Objective)min๐œฝโกโˆ‘k=1Kโˆ‘t=1Tknt(k)Nโ„’(๐œฝ;๐’Ÿt(k)), where N=โˆ‘k,tnt(k) is the total data count, subject to the constraint that client k only accesses its own data {๐’Ÿt(k)}t=1Tk. The challenge is triple forgetting: (i) within-client temporal forgetting, (ii) cross-client interference during aggregation, and (iii) server-level forgetting as the global model evolves.

Definition 41 (Multi-Scale Expertise).

The MultiFCL framework [27] addresses federated continual learning through multi-scale parameter decomposition: (Multifcl)๐œฝ(k)=๐œฝglobal+โˆ‘s=1Sฮ”๐œฝs(k), where:

  • ๐œฝglobal captures knowledge shared across all clients and all tasks (updated via federated averaging),

  • ฮ”๐œฝs(k) at scale s=1 captures client-specific but task-general knowledge (updated locally, shared periodically),

  • ฮ”๐œฝs(k) at scale s=S captures task-specific knowledge (updated locally, never shared).

Each scale operates at a different update frequency: global parameters change slowly (every communication round), while task-specific parameters change rapidly (every local step).

Remark 17 (The Triple Forgetting Challenge).

The three types of forgetting in FCL interact in subtle ways:

  1. Within-client forgetting: client k trains on ๐’ฏ1(k)โ†’๐’ฏ2(k)โ†’โ‹ฏ and may forget earlier tasks. This is standard CL.

  2. Cross-client interference: when the server aggregates updates from clients with different task distributions, the averaged gradient may not be useful for any individual client. Mathematically, if client 1 has gradient ๐’ˆ1 pointing toward โ€œmedical knowledgeโ€ and client 2 has gradient ๐’ˆ2 pointing toward โ€œlegal knowledge,โ€ the average (๐’ˆ1+๐’ˆ2)/2 may point toward a region that is optimal for neither domain.

  3. Server-level forgetting: as the global model ๐œฝglobal evolves over communication rounds, it may lose knowledge consolidated in earlier rounds. This is a form of catastrophic forgetting at the federated level, operating at a slower timescale than within-client forgetting.

MultiFCL addresses all three through the multi-scale decomposition: scale 3 (local, task-specific) handles (i), scale 1 (global, shared) handles (ii) through selective aggregation, and the multi-timescale update schedule handles (iii) by consolidating global knowledge slowly.

Federated continual learning with K=4 clients. The server maintains global parameters ๐œฝglobal, while each client maintains multi-scale local expertise. Only parameter updates (not data) cross the network boundary. Each client's local task timeline may differ in length and content.

Cross-Modal Continual Learning

The most insidious form of multimodal forgetting is cross-modal: updating one modality's parameters causes degradation in another modality's performance, mediated by the shared embedding space.

Proposition 17 (Cross-Modal Forgetting Amplification).

Consider a vision-language model with vision encoder fv(โ‹…;๐œฝv) and language encoder fl(โ‹…;๐œฝl) connected through a shared embedding space of dimension d. Suppose only the vision encoder is updated by ฮ”๐œฝv for a new visual task. Then the cross-modal retrieval performance on previous text queries degrades by at most (Cross Modal Bound)Ftextโ‰คLalignโ‹…โ€–ฮ”๐œฝvโ€–, where Lalign is the Lipschitz constant of the alignment loss with respect to the vision encoder parameters.

Proof.

Let โ„’align(๐œฝv,๐œฝl) measure the cross-modal alignment quality (e.g., contrastive loss on image-text pairs from previous tasks). By the Lipschitz property, |โ„’align(๐œฝv+ฮ”๐œฝv,๐œฝl)โˆ’โ„’align(๐œฝv,๐œฝl)|โ‰คLalignโ‹…โ€–ฮ”๐œฝvโ€–. Since Ftext is the increase in alignment loss restricted to text-based retrieval, and this is bounded by the total alignment loss increase, the result follows.

Caution.

Cross-modal forgetting is invisible to unimodal metrics. A vision encoder that improves its classification accuracy on a new visual domain may simultaneously destroy its alignment with the language encoder. If one monitors only per-modality metrics, this degradation goes undetected until a cross-modal query fails. The lesson: continual learning evaluation for multimodal systems must include cross-modal retrieval metrics.

Example 8 (Cross-Modal Forgetting in CLIP).

Consider a CLIP model fine-tuned on medical X-ray images (๐’ฏ1). The vision encoder learns to represent rib fractures, lung opacities, and cardiomegaly. If only the vision encoder is updated (ฮ”๐œฝvโ‰ ๐ŸŽ, ฮ”๐œฝl=๐ŸŽ), the updated visual features fv(๐’™;๐œฝv+ฮ”๐œฝv) may drift in the embedding space. A previously aligned image-text pair like (chest X-ray image, โ€œnormal chest radiographโ€) may now have cosine similarity 0.3 instead of the original 0.85.

The bound of Proposition 17 quantifies this: if Lalign=2.5 and โ€–ฮ”๐œฝvโ€–=0.1, then Ftextโ‰ค0.25. In practice, the cross-modal forgetting is often larger than the within-modal forgetting, because the text encoder's representations were calibrated to the original vision features and have no opportunity to co-adapt.

Remark 18 (Towards Modality-Aware CL).

The asymmetry of cross-modal forgetting suggests a design principle for multimodal CL: update all encoders simultaneously, or update none. Half-measures, such as freezing one encoder while fine-tuning the other, create the worst possible outcome: the updated encoder drifts while the frozen encoder cannot adapt. This insight motivates the use of shared LoRA adapters that span both vision and language encoders, ensuring that the cross-modal alignment is maintained by construction.

Formally, if we parameterise the joint adapter as ฮ”๐œฝ=(ฮ”๐œฝv,ฮ”๐œฝl) and train it to minimise both task-specific loss and alignment preservation: (Joint Adapter)โ„’joint=โ„’task(ฮ”๐œฝ)+ฮผโ„’align(๐œฝv+ฮ”๐œฝv,๐œฝl+ฮ”๐œฝl), then the alignment loss directly regularises the adapter updates, preventing cross-modal drift. The parameter ฮผ>0 controls the trade-off between task performance and alignment preservation.

A Unified Mathematical Framework

We have now surveyed a wide landscape of continual learning methods: regularization-based approaches that penalize movement in parameter space (Regularization-Based Methods), replay-based methods that maintain a buffer of past experiences (Replay-Based Methods), architecture-based methods that allocate dedicated capacity per task (Architecture-Based Methods), and neural memory systems that blur the line between architecture and learning rule (Neural Memory for Continual Learning). These methods were developed by different communities with different motivations, yet they share deep structural similarities.

This section develops a unified mathematical framework that captures all known CL methods as special cases. The framework reveals why certain combinations of design choices succeed and others fail, and it points toward the design of future systems that may overcome the limitations of any single approach.

The Lifelong Learning System

We begin by defining the most general notion of a continual learner.

Definition 42 (Lifelong Learning System).

A lifelong learning system is a tuple ๐’ฎ=(๐’œ,โ„ณ,โ„›,๐’ฐ) where:

  1. ๐’œ={f(โ‹…;๐œฝ):๐œฝโˆˆฮ˜} is the architecture, a parameterized family of functions, potentially with dynamic topology (growing or pruning);

  2. โ„ณ=(M1,M2,โ€ฆ,ML) is a hierarchical memory with L levels, where Ml operates at timescale ฯ„l with ฯ„1<ฯ„2<โ‹ฏ<ฯ„L (fast to slow);

  3. โ„›:ฮ˜ร—๐’Ÿร—โ„ณโ†’ฮ˜ is the learning rule that maps current parameters, new data, and memory state to updated parameters;

  4. ๐’ฐ:โ„ณร—๐’Ÿร—ฮ˜โ†’โ„ณ is the memory update function that determines how memories are formed, consolidated, and forgotten.

The system processes a stream of data ๐’Ÿ1,๐’Ÿ2,โ€ฆ and evolves according to (Param Update)๐œฝt+1=โ„›(๐œฝt,๐’Ÿt+1,โ„ณt),โ„ณt+1=๐’ฐ(โ„ณt,๐’Ÿt+1,๐œฝt+1).

Insight.

All four components matter equally. The performance of a continual learner depends on the interaction between architecture, memory, learning rule, and memory update function. A brilliant learning rule paired with a degenerate memory (e.g., no buffer at all) will forget catastrophically. A vast memory paired with a naรฏve learning rule (e.g., SGD with no regularization) will accumulate data but fail to consolidate knowledge. The unified framework forces us to consider all four components jointly.

Information-Theoretic View

The fundamental tension of continual learning, fitting new tasks without forgetting old ones, is, at its core, a tension between information storage and information overwriting. We can make this precise using information theory.

Definition 43 (Knowledge Capacity).

The knowledge capacity of a model with P parameters, each stored at precision ฯต (bits per parameter), is (Knowledge Capacity)๐’ฆ(๐œฝ)=Pโ‹…log2โก(1ฯต)bits. For a model with P=7ร—109 parameters in fp16 (ฯต=2โˆ’16), the capacity is ๐’ฆ=7ร—109ร—16=1.12ร—1011 bits โ‰ˆ14GB of raw information.

Remark 19 (Effective vs. Raw Capacity).

The raw capacity ๐’ฆ vastly overstates usable knowledge storage. Not all parameter configurations correspond to useful functions; the effective capacity is reduced by correlations between parameters, the structure of the loss landscape, and the limited precision of gradient-based optimisation. Nevertheless, ๐’ฆ provides a useful upper bound for reasoning about CL limits.

Theorem 8 (Continual Learning Information Bound).

Let It denote the mutual information between the training data of task t and the model parameters after training on task t, and let Ftโˆˆ[0,1] denote the fraction of task-t information that is subsequently forgotten. Then the total retained knowledge is bounded by the model's capacity: (INFO Bound)โˆ‘t=1TIt(1โˆ’Ft)โ‰ค๐’ฆ(๐œฝ).

Proof.

After training on all T tasks, the model parameters ๐œฝT must encode all retained information. The mutual information between the model and the retained portion of task t is It(1โˆ’Ft). By the data processing inequality, the total information stored in ๐œฝT cannot exceed the entropy of the parameter space: ๐–งโก(๐œฝT)โ‰คPโ‹…log2โก(1/ฯต)=๐’ฆ(๐œฝ). Since the retained information from different tasks must coexist in the same parameter vector, and assuming the retained task information is non-redundant in the worst case, โˆ‘t=1TIt(1โˆ’Ft)โ‰ค๐–งโก(๐œฝT)โ‰ค๐’ฆ(๐œฝ).

Corollary 1 (Unbounded CL Requires Growing Capacity).

If each task contributes at least Iminโก bits of novel information and we require zero forgetting (Ft=0 for all t), then after (TASK Limit)Tโˆ—=โŒŠ๐’ฆ(๐œฝ)IminโกโŒ‹ tasks, some information must be lost. For a 7B-parameter model with ๐’ฆโ‰ˆ1011 bits and tasks requiring Iminโก=108 bits each, the limit is Tโˆ—=1000 tasks. Beyond this limit, three strategies are available:

  1. Grow parameters: expand the model (PNN, Definition 20),

  2. Grow memory: use external memory (Definition 20),

  3. Compress: increase effective capacity by removing redundancy (pruning + LoRA, Definition 21, Definition 23).

Example 9 (Capacity Calculation for LLaMA-2-7B).

The LLaMA-2-7B model has P=6.74ร—109 parameters stored in fp16 (16 bits per parameter). Its raw knowledge capacity is ๐’ฆ=6.74ร—109ร—16=1.078ร—1011bitsโ‰ˆ13.5GB. If each task requires It=108 bits (approximately the information content of a moderately complex domain like โ€œmedical terminologyโ€ or โ€œlegal reasoningโ€), the zero-forgetting limit is Tโˆ—=โŒŠ1.078ร—1011/108โŒ‹=1078 tasks.

However, this is a gross overestimate. The model's pretraining already occupies a substantial fraction of its capacity. If we assume 80% of capacity is used by pretrained knowledge, the remaining capacity for continual learning is ๐’ฆCL=0.2ร—1.078ร—1011=2.156ร—1010bits, supporting at most Tโˆ—=215 tasks before forgetting becomes inevitable. This calculation explains why 7B models typically show significant forgetting after 50โ€“100 continual training stages in practice; the information bound is approached well before the theoretical maximum due to inefficiencies in gradient-based storage.

Hierarchical Sparse-Dense Framework

The most powerful unifying abstraction for CL methods is the hierarchical sparse-dense (HSD) framework, which decomposes a continual learner into levels that differ in their density of update, speed of change, and degree of task-specificity.

Definition 44 (HSD Architecture).

A hierarchical sparse-dense (HSD) architecture with L levels computes its output as (HSD)๐’‰l=fldense(๐œฝl;๐’‰lโˆ’1)+glsparse(Ml;๐’‰lโˆ’1),l=1,โ€ฆ,L, where ๐’‰0 is the input, and each level l is characterised by:

  1. A density ratio ฯlโˆˆ[0,1]: the fraction of parameters updated per step, with ฯ1>ฯ2>โ‹ฏ>ฯL (lower levels are denser, higher levels are sparser),

  2. An update frequency ฮทl: how often the level is updated, with ฮท1>ฮท2>โ‹ฏ>ฮทL (lower levels update more frequently),

  3. A condition number ฮบl: the sensitivity of the level's output to parameter perturbation.

The dense component fldense captures slow-changing shared knowledge; the sparse component glsparse captures fast-changing, task-specific knowledge via a memory table Ml.

Theorem 9 (HSD Forgetting Bound).

For an HSD architecture with L levels, the total forgetting after learning a new task is bounded by (HSD Bound)Ftotalโ‰คโˆ‘l=1Lฯlฮทlฮบlโ€–ฮ”๐œฝlโ€–, where ฮ”๐œฝl is the parameter change at level l during new-task training.

Proof.

We proceed level by level. Let โ„’old(๐œฝ) be the loss on previously learned tasks. By a first-order Taylor expansion around the pre-update parameters ๐œฝ(0): (HSD Taylor)โ„’old(๐œฝ(0)+ฮ”๐œฝ)โˆ’โ„’old(๐œฝ(0))โ‰ˆโˆ‘l=1LโŸจโˆ‡๐œฝlโ„’old,ฮ”๐œฝlโŸฉ. At optimality for the old tasks, โˆ‡๐œฝlโ„’oldโ‰ˆ๐ŸŽ, so the dominant contribution comes from the second-order term: (HSD Second Order)โ„’old(๐œฝ(0)+ฮ”๐œฝ)โˆ’โ„’old(๐œฝ(0))โ‰ˆ12โˆ‘l=1Lฮ”๐œฝlโŠคHlฮ”๐œฝl, where Hl is the Hessian of โ„’old restricted to level-l parameters. Now, at level l:

Step 1 (Sparsity). Only a fraction ฯl of parameters are actually modified, so the effective dimensionality of ฮ”๐œฝl is ฯlโ‹…dl where dl=dimโก(๐œฝl).

Step 2 (Frequency). The parameter change accumulates over ฮทl update steps. Assuming independent gradient noise, the total change scales as โ€–ฮ”๐œฝlโ€–โˆฮทl for SGD. For the bound, we use the worst case โ€–ฮ”๐œฝlโ€– directly.

Step 3 (Conditioning). The spectral norm of Hl is bounded by ฮบl, yielding (HSD Spectral)ฮ”๐œฝlโŠคHlฮ”๐œฝlโ‰คฮบlโ€–ฮ”๐œฝlโ€–2.

Step 4 (Combining). Among the dl parameters at level l, only ฯldl are modified. The forgetting contribution of level l is therefore bounded by (HSD Level Bound)Flโ‰คฯlฮบlโ€–ฮ”๐œฝlโ€–2. Incorporating the update frequency ฮทl as a multiplicative factor (more frequent updates accumulate more forgetting), and summing over levels: (HSD Total)Ftotalโ‰คโˆ‘l=1Lฯlฮทlฮบlโ€–ฮ”๐œฝlโ€–. Here we use โ€–ฮ”๐œฝlโ€– (not โ€–ฮ”๐œฝlโ€–2) because the frequency factor already accounts for the accumulation effect, absorbing one power of the norm into the bound.

Key Idea.

The HSD principle. Forgetting is minimised when high-sensitivity (large ฮบl) parameters are updated sparsely (ฯlโ†’0) and infrequently (ฮทlโ†’0), while low-sensitivity parameters can absorb frequent, dense updates. This is precisely the design principle behind Titans (Definition 31), nested learning (Definition 34), and LoRA-based continual learning (Definition 23), each of which restricts updates to a subspace where ฮบl is small.

The hierarchical sparse-dense (HSD) architecture. Data flows upward through three levels of decreasing density and update frequency. Knowledge consolidation flows downward. Each level's forgetting contribution Fl=ฯlฮทlฮบlโ€–ฮ”๐œฝlโ€– decreases with depth.

Connecting Methods to the HSD Framework

The power of the HSD framework lies in its ability to represent every major CL method as a particular instantiation. Table 2 provides the complete mapping.

MethodLevelsDense/SparseUpdate RuleMemory
EWC1Denseฮธโˆ’ฮปF(ฮธโˆ’ฮธ0)Fisher diagonal
SI1Denseฮธโˆ’ฮปฮฉ(ฮธโˆ’ฮธ0)Path integral
PackNet1SparsePrune + freezeBinary mask
GEM/A-GEM1DenseProjected gradientEpisodic buffer
Experience Replay1DenseSGD on mixed batchReservoir buffer
LwF1DenseKD + task lossSoft labels
PNNTSparse per levelFreeze old columnsNone (grow)
LoRA-CL2Dense L1, Sparse L2SGD on adapterFrozen backbone
Doc-to-LoRA2Dense L1, Sparse L2HypernetworkDocument memory
Titans3Dense L1โ€“2, Sparse L3Surprise-gatedNeural memory
Nested Learning3ฯl decreasingMulti-rate SGDLevel buffers
Engram + TRM2Dense L1, Sparse L2Attention + writeExternal table
Mapping continual learning methods to the HSD framework. Each method corresponds to specific choices of levels, dense/sparse balance, update rule, and memory mechanism.

Insight.

Every CL method is an instantiation of HSD. The table reveals a clear trend: methods have evolved from single-level dense approaches (EWC, GEM) to multi-level sparse-dense architectures (Titans, Nested Learning). The most successful recent methods, those that scale to billions of parameters and thousands of tasks, invariably use at least two HSD levels. This is not coincidental: the HSD bound (Theorem 9) shows that multi-level architectures can achieve exponentially lower forgetting by concentrating updates in low-ฮบ subspaces.

Remark 20 (The Evolution Toward Multi-Level Designs).

A striking pattern emerges from Table 2: methods from every era began as single-level approaches and have progressively evolved toward multi-level designs.

In the regularisation lineage, EWC (2017) is single-level; Progress & Compress [28] (2018) introduced a two-level variant with an โ€œactiveโ€ column and a โ€œknowledge base.โ€ In the replay lineage, GEM (2017) is single-level; LAMOL (2020) implicitly creates a two-level system (the generator's memory + the task model). In the architecture lineage, PNN (2016) is multi-level by construction but with uniform treatment per level; LoRA-CL and Doc-to-LoRA differentiate between frozen and trainable levels. In the neural memory lineage, Titans (2025) is the first system explicitly designed with three hierarchically distinct memory timescales.

This convergence is not coincidental. The HSD bound (Theorem 9) shows mathematically that multi-level architectures achieve strictly lower forgetting than single-level ones when the condition numbers ฮบl vary across levels, which they invariably do in deep networks, where early layers capture universal features (low ฮบ) and later layers capture task-specific features (high ฮบ).

Example 10 (EWC as Single-Level HSD).

EWC (Definition 12) corresponds to L=1, ฯ1=1 (all parameters updated), ฮท1= every step. The dense component is the full network; there is no sparse component. The Fisher diagonal โ„ฑiโก modulates the effective update magnitude per parameter: high-Fisher parameters receive smaller effective updates, creating an implicit sparsity pattern without explicit masking. From the HSD perspective, EWC operates as a soft version of sparse updating.

Example 11 (Titans as Three-Level HSD).

Titans (Definition 31) naturally implements three HSD levels:

  1. Level 1 (attention, ฯ1=1, ฮท1= every token): the standard attention mechanism processes each token with full parameter involvement,

  2. Level 2 (short-term memory, ฯ2โ‰ˆ0.1, ฮท2= every segment): the persistent memory module updates sparsely based on surprise (Definition 30),

  3. Level 3 (long-term memory, ฯ3โ‰ˆ0.001, ฮท3= rare consolidation): the core Transformer weights, updated only during pretraining or rare fine-tuning.

The HSD bound gives Ftotalโ‰คฯ1ฮท1ฮบ1โ€–ฮ”๐œฝ1โ€–+ฯ2ฮท2ฮบ2โ€–ฮ”๐œฝ2โ€–+ฯ3ฮท3ฮบ3โ€–ฮ”๐œฝ3โ€–. Since level 3 has ฮท3โ‰ˆ0 during inference, its forgetting contribution vanishes, and the dominant term is level 1, which is acceptable because attention-level โ€œforgettingโ€ is simply the natural processing of new tokens.

The Ideal Continual Learner

Having established the HSD framework, we can now ask: what properties should an ideal continual learner possess?

Definition 45 (Ideal CL Properties).

An ideal continual learning system satisfies:

  1. Bounded forgetting: there exists a constant C>0 independent of T such that Ftโ‰คC for all tasks t and all T;

  2. Positive forward transfer: for each new task t, the learner achieves lower loss than training from scratch: โ„’t(๐œฝt)โ‰คโ„’t(๐œฝscratch);

  3. Sublinear growth: the total parameter count (including all memory and adapters) grows as o(T), sublinearly in the number of tasks;

  4. Constant-time inference: the computational cost of a forward pass is O(1) with respect to T (independent of how many tasks have been learned);

  5. Online capability: the system can learn from a single pass over each task's data without storing the full dataset.

Conjecture 1 (No Fixed Architecture Achieves All Five Properties).

For any fixed architecture ๐’œ and any learning rule โ„›, there exists a task sequence for which at least one of properties (P1)โ€“(P5) in Definition 45 is violated. More precisely:

  1. Achieving (P1) and (P3) simultaneously requires either external memory (violating constant-time inference under naive access) or lossy compression (risking forgetting under adversarial sequences);

  2. Achieving (P1) and (P2) requires sufficient model capacity to represent both old and new tasks, which for adversarial sequences forces linear growth (violating P3);

  3. Achieving (P4) and (P5) precludes consolidation passes that would strengthen memory retention.

The intuition behind Conjecture 1 is that the five properties create a system of constraints that over-determines the design space. Consider the tension between (P1) and (P3): bounded forgetting with sublinear parameter growth means the model must compress information about old tasks as new ones arrive. But compression is lossy, and an adversary can always construct a task sequence where the compressed representation of task t is destroyed by task t+1 (exploiting the pigeonhole principle on the finite parameter space).

Similarly, (P4) and (P5) are in tension: constant-time inference requires a fixed-size model (no growing memory to search), while online capability precludes the multi-pass consolidation that would allow efficient packing of information into a fixed-size model. The brain appears to resolve this tension through sleep consolidation, a mechanism that violates (P5) by performing offline processing.

Remark 21 (Why the Conjecture Matters).

Conjecture 1 is the continual learning analogue of the no-free-lunch theorem (Theorem 2). If true, it implies that every practical CL system must make trade-offs, and the design question reduces to choosing which property to sacrifice for a given application. A robot in a factory (fixed, repetitive tasks) may sacrifice (P5) in favour of consolidation; a personal assistant (unbounded novel tasks) may sacrifice (P1) and allow graceful forgetting of rarely-used knowledge.

The Continual Learning Landscape

We can visualise the trade-offs of Conjecture 1 by plotting CL methods in a two-dimensional space defined by their stability (resistance to forgetting) and plasticity (ability to learn new tasks).

The continual learning landscape. Each method is plotted by its stability (resistance to forgetting) and plasticity (ability to learn new tasks). The Pareto frontier traces the optimal trade-off; the green region marks the ideal but potentially unattainable corner. Neural memory methods (Titans, Nested Learning) approach the frontier most closely.

Proposition 18 (Pareto Frontier Characterisation).

For a fixed architecture and a quadratic approximation to both the stability loss S(ฮป)=1โˆ’ฮป2โ€–ฮ”๐œฝโ€–2/CS and the plasticity gain P(ฮป)=1โˆ’(1โˆ’ฮป)2/CP, where ฮปโˆˆ[0,1] is the regularisation strength, the Pareto frontier (Pareto)๐’ซ={(P(ฮป),S(ฮป)):ฮปโˆˆ[0,1]} is a convex curve in the (P,S) plane, traced by varying ฮป from 0 (maximum plasticity, no stability) to 1 (maximum stability, no plasticity).

Proof.

Computing the second derivative of S with respect to P along the frontier (eliminating ฮป), we find d2SdP2=โˆ’CPCSโ‹…1(1โˆ’ฮป)3<0 for all ฮปโˆˆ[0,1), confirming concavity of S as a function of P. Equivalently, the frontier is a convex set when viewed as the region below the curve.

Example 12 (Quadratic Pareto Example).

For a concrete illustration, let CS=4 and CP=1, so S(ฮป)=1โˆ’ฮป2/4 and P(ฮป)=1โˆ’(1โˆ’ฮป)2. At ฮป=0 (pure plasticity): S=1, P=0. At ฮป=1 (pure stability): S=3/4, P=1. At ฮป=1/2 (balanced): S=15/16, P=3/4.

The balanced point achieves S+P=15/16+3/4=27/16=1.6875, compared to 1.0 for pure plasticity and 1.75 for pure stability. The sum is maximised at ฮปโˆ—=CS/(CS+CP)=4/5, giving S=1โˆ’16/100=0.84 and P=1โˆ’1/25=0.96, with sum 1.80. This shows that the optimal operating point is not the midpoint but is skewed toward the side with larger capacity constant.

Connections and Synthesis

Continual learning does not exist in isolation. It intersects deeply with memory management (24), alignment and fine-tuning (25), and reasoning (Adaptive Computation Time, Self-Refine). These connections are not superficial analogies; they are mathematical equivalences that allow us to transfer techniques, theorems, and intuitions across domains. This section makes these connections precise.

Continual Learning Meets Memory

The relationship between continual learning and memory management is the deepest of the three connections. At a high level, memory provides the mechanism by which a system resists forgetting, and continual learning provides the dynamics by which memory is tested.

CL ConceptMemory ConceptMathematical Link
Replay bufferHippocampal replayโ„ฌโ†” episodic memory
Weight consolidationNeocortical consolidationโ„ฑโกโ†” synaptic strength
Task-specific adaptersContext-dependent retrievalLoRA โ†” memory addressing
Catastrophic forgettingRetroactive interferenceFtโ†” overwriting
Progressive networksNeurogenesisNew columns โ†” new neurons
Experience replayMemory reconsolidationRehearsal โ†” reactivation
Knowledge distillationTeaching consolidationSoft labels โ†” schema formation
Sparse memory updatesSparse coding in cortexk-hot โ†” population coding
Surprise-gated learningNovelty detectionStโ†” dopamine signal
Concept mapping between continual learning and memory management. Each CL mechanism has a direct memory counterpart, revealing the deep structural correspondence between the two fields.

The correspondences in Table 3 are not merely poetic analogies; they reflect genuine mathematical equivalences. For instance, the correspondence between replay buffers and hippocampal replay is grounded in the fact that both implement the same operation: sampling from a stored distribution of past experiences and interleaving these samples with new data during learning. The Widrowโ€“Hoff update rule used by Titans' neural memory (Definition 31) is the same learning rule that computational neuroscience models attribute to hippocampal place cells. Even the surprise-gated learning of Titans has a biological counterpart in the dopaminergic novelty signal that gates learning in the hippocampus.

Remark 22 (Memoryโ€“CL Duality).

Memory management and continual learning are dual perspectives on the same underlying problem. Memory management takes a static view: given a fixed computational budget, how should we organise storage to support retrieval? Continual learning takes a dynamic view: given a stream of experiences, how should we update our system to retain useful knowledge?

Formally, a memory system (Definition 20) with read/write operations is equivalent to a lifelong learning system (Definition 42) where:

  • The architecture ๐’œ includes the memory's addressing mechanism,

  • The hierarchical memory โ„ณ is the memory bank itself,

  • The learning rule โ„› is the write operation,

  • The memory update ๐’ฐ is the consolidation/eviction policy.

This duality explains why advances in one field immediately transfer to the other: the Titans architecture (Definition 31) is simultaneously a memory system and a continual learner.

Example 13 (CLS Theory as HSD).

McClelland et al.'s Complementary Learning Systems (CLS) theory [11] posits that the brain uses two complementary systems:

  1. The hippocampus: fast-learning, episodic, sparse encoding. New experiences are stored rapidly with minimal interference.

  2. The neocortex: slow-learning, semantic, distributed encoding. Knowledge is gradually consolidated through interleaved replay (during sleep).

In HSD terms, the hippocampus is level 1 (ฯ1โ‰ˆ0.1, ฮท1= every experience, low ฮบ1 due to sparse coding) and the neocortex is level 2 (ฯ2โ‰ˆ1, ฮท2= periodic consolidation, high ฮบ2 due to distributed representations). The memory update function ๐’ฐ is sleep consolidation, which transfers information from level 1 to level 2 through replay.

This mapping reveals why CLS theory is so successful: it naturally minimises the HSD forgetting bound. The hippocampus's sparse coding gives small ฯ1; the neocortex's slow learning gives small ฮท2; and the replay-based consolidation ensures that the large ฮบ2 of the neocortex does not cause catastrophic forgetting because updates are small and interleaved with old patterns.

Continual Learning Meets Alignment

The standard alignment pipeline (fig:alignment:pipeline) consists of three stages: pretraining, supervised fine-tuning (SFT), and reinforcement learning from human feedback (RLHF). From the continual learning perspective, this is a three-task CL problem.

Proposition 19 (Alignment Is Continual Learning).

The alignment pipeline constitutes a three-task continual learning problem ๐’ฏ1โ†’๐’ฏ2โ†’๐’ฏ3:

  1. ๐’ฏ1: Pretraining on web text (โ„’1=โˆ’โˆ‘logโกp๐œฝ(xt|x<t)),

  2. ๐’ฏ2: SFT on instruction-response pairs (โ„’2=โˆ’โˆ‘logโกp๐œฝ(yt|x,y<t)),

  3. ๐’ฏ3: RLHF/DPO alignment (โ„’3=โˆ’๐”ผ[r(x,y)]+ฮฒDKL[ฯ€๐œฝโ€–ฯ€ref]).

The KL constraint in โ„’3 is an anti-forgetting mechanism: it prevents the aligned model from deviating too far from the SFT model, preserving the general capabilities acquired in tasks 1 and 2.

Proof.

We verify that the alignment pipeline satisfies the conditions of a CL problem (Definition 3). The three stages are trained sequentially on different data distributions (web text, instruction pairs, preference pairs). Each stage optimises a different loss function. The KL penalty in stage 3 has exactly the form of the EWC regulariser (Definition 12) with the Fisher replaced by the identity: (KL EWC)ฮฒDKL[ฯ€๐œฝโ€–ฯ€ref]=ฮฒโˆ‘xโˆ‘yฯ€๐œฝ(y|x)logโกฯ€๐œฝ(y|x)ฯ€ref(y|x)โ‰ˆฮฒ2โˆ‘iFi(KL)(ฮธiโˆ’ฮธref,i)2, where Fi(KL) is the Fisher information of the KL divergence, recovering the EWC objective with ฮป=ฮฒ.

Corollary 2 (ฮฒโ€“ฮป Correspondence).

The DPO temperature parameter ฮฒ (Direct Preference Optimization) and the EWC regularisation strength ฮป (Definition 12) play equivalent mathematical roles. Specifically:

  1. ฮฒโ†’0: maximum plasticity, the model ignores the reference and optimises reward freely (equivalent to ฮปโ†’0 in EWC);

  2. ฮฒโ†’โˆž: maximum stability, the model stays at the reference policy (equivalent to ฮปโ†’โˆž in EWC);

  3. The optimal ฮฒโˆ— balances reward improvement against capability preservation, analogous to the optimal ฮปโˆ— in EWC.

This correspondence suggests that techniques for tuning ฮป in CL (e.g., online cross-validation on a held-out buffer) can be directly applied to tuning ฮฒ in alignment, and vice versa.

The alignment pipeline viewed as a three-task continual learning problem. โ€œSpringsโ€ represent anti-forgetting mechanisms: weight initialisation connects pretraining to SFT, and the KL penalty connects SFT to RLHF. The correspondence ฮฒโ†”ฮป unifies alignment and CL theory.

The ฮฒโ€“ฮป correspondence of Corollary 2 has immediate practical implications. In the alignment literature, there is extensive work on tuning ฮฒ: too small leads to reward hacking, too large leads to insufficient alignment. In the CL literature, there is parallel work on tuning ฮป: too small leads to catastrophic forgetting, too large leads to intransigence. The correspondence means that any technique for tuning one parameter can be directly translated to the other. For example, the โ€œwarm-upโ€ strategy common in RLHF (starting with large ฮฒ and gradually decreasing) corresponds to starting with strong regularisation and gradually relaxing it, precisely the schedule proposed by [28] in the CL context.

Conversely, the CL insight that ฮป should be adaptive (different for different parameters, based on their Fisher information) suggests that ฮฒ in DPO should also be parameter-dependent: parameters that are more important for maintaining pretrained capabilities should be regularised more strongly, while parameters that can safely change should be regularised less. This idea, parameter-adaptive DPO, is a direct prediction of the CLโ€“alignment connection that has not yet been explored in the alignment literature.

Continual Learning Meets Reasoning

The connection between continual learning and reasoning is more subtle but equally important.

Remark 23 (Reasoning as Intra-Task Continual Learning).

Adaptive Computation Time (ACT, Adaptive Computation Time) and self-refinement (Self-Refine) can be viewed as intra-task continual learning: the model iteratively refines its answer, and each refinement step is a โ€œmicro-taskโ€ where the model must improve on its previous output without losing the useful information already gathered.

More formally, consider a chain-of-thought reasoning process that generates intermediate states s1,s2,โ€ฆ,sK. At each step, the model must:

  1. Remember relevant facts and intermediate conclusions (stability),

  2. Incorporate new reasoning steps (plasticity),

  3. Not regress on previously correct sub-conclusions (bounded forgetting).

This is precisely the stabilityโ€“plasticity dilemma (Definition 7) operating at the timescale of a single inference, rather than across training epochs.

Test-Time Training (TTT) makes this connection explicit by literally performing gradient-based learning during inference, updating a subset of model parameters to adapt to the current input. From the CL perspective, TTT is a single-task continual learner that operates at inference time.

Key Idea.

The CLโ€“Reasoning bridge. The connection between CL and reasoning suggests a powerful transfer of ideas. CL techniques designed to prevent forgetting across training epochs (EWC, replay) could be adapted to prevent โ€œreasoning forgettingโ€ within a single inference chain. Conversely, reasoning techniques designed to maintain coherence across steps (chain-of-thought verification, self-consistency) could inspire new CL methods that verify old-task performance during new-task learning. This bidirectional transfer is largely unexplored.

Open Problems

Despite the rapid progress surveyed in this chapter, fundamental questions remain unanswered. We highlight five that we consider most pressing.

  1. Optimal CL architecture at 100B+ scale. Current CL methods have been validated at the 7Bโ€“13B parameter scale. How do they behave at 100B+? Does the increased capacity of larger models provide natural resistance to forgetting (as suggested by the capacity bound of Theorem 8), or do new failure modes emerge?

  2. Forgetting in reasoning chains. When a continually-trained model loses knowledge, how does this affect multi-step reasoning? A forgotten fact at step 3 of a 10-step chain may cause cascading errors. Formal analysis of reasoning-chain fragility under forgetting is needed.

  3. Theoretical limits of LoRA-based CL. LoRA-CL (Definition 23) has emerged as the dominant practical approach, yet its theoretical properties are poorly understood. What is the maximum number of tasks representable by rank-r adapters before interference dominates? How does composition quality degrade with the number of composed adapters?

  4. Continual RLHF. Human preferences evolve over time. A deployed model must continually align to shifting preferences without forgetting previously learned safety constraints. The interaction between reward model drift and policy forgetting is largely unexplored.

  5. Multi-modal CL at scale. As shown in Multimodal and Federated Continual Learning, cross-modal forgetting amplifies the challenge. Scaling multimodal CL to systems with >2 modalities (text, image, audio, video, code) introduces combinatorial cross-modal interference that current frameworks cannot address.

Conjecture 2 (CL Scaling Law).

The expected loss of a continually-trained model follows a power-law scaling relation: (Scaling LAW)โ„’(P,T)โ‰ˆaPโˆ’ฮฑ+bTฮฒPโˆ’ฮณ, where P is the parameter count, T is the number of tasks, a,b>0 are constants, ฮฑ>0 captures the standard scaling benefit, and ฮฒ,ฮณ>0 capture the forgetting overhead. The first term is the standard neural scaling law; the second term is the CL tax, the additional loss due to sequential training. For the CL tax to vanish as Pโ†’โˆž, we need ฮณ>0, i.e., larger models must be more resistant to forgetting per task.

The critical insight is the exponent relationship: if ฮณ>ฮฑฮฒ, then the CL tax grows slower than the scaling benefit, and sufficiently large models can absorb an arbitrary number of tasks. If ฮณโ‰คฮฑฮฒ, forgetting eventually dominates regardless of scale.

Remark 24 (The Practitioner's Dilemma).

For the practitioner facing a concrete CL problem today, the open problems above may seem abstract. A more immediate question is: which method should I use? Based on the analysis in this chapter, we offer the following decision tree:

  1. If task identity is available at inference time and storage is ample: use LoRA-CL (Definition 23). It provides zero forgetting by construction and is the simplest to implement.

  2. If task identity is unavailable: use LoRA-CL with a learned router (combining Definition 23 and Definition 25).

  3. If the task sequence is long (T>100) and storage is limited: consider CPT with replay (Definition 26) for domain adaptation or experience replay (Definition 17) for classification.

  4. If online, streaming data with no task boundaries: use infinite cosine schedule (Definition 27) with replay.

  5. If building a new architecture from scratch: incorporate neural memory (Definition 31 or Definition 34) to achieve CL as an emergent property rather than an add-on.

Full Taxonomy

We conclude the synthesis with a comprehensive taxonomy of all CL methods discussed in this chapter, visualised as a mind map that highlights both the categorical structure and the cross-connections.

Complete taxonomy of continual learning methods. The four main categories, regularisation (green), replay (orange), architecture (blue), and neural memory (purple), each contain specific methods. Dashed lines indicate cross-category connections: many modern methods combine elements from multiple categories.

Historical Timeline

The story of continual learning is, in many ways, the story of how science repeatedly discovers, forgets, and rediscovers the problem of forgetting. The phenomenon was first documented rigorously in the 1880s, forgotten by the machine learning community for a century, rediscovered with alarm in the 1980s, and has since oscillated between periods of intense activity and relative neglect. We are currently in the most sustained period of progress, driven by the practical necessity of updating large language models without retraining from scratch.

Historical Note.

The Ebbinghaus inheritance (1885โ€“1975). Hermann Ebbinghaus published รœber das Gedรคchtnis in 1885 [9], establishing the exponential forgetting curve through meticulous self-experimentation with nonsense syllables. His key insight, that forgetting follows a predictable mathematical law, would not be fully appreciated by the machine learning community for over a century. Meanwhile, the psychologist Sebastian Leitner developed his spaced-repetition system in 1972 [10], showing that strategically timed rehearsal could dramatically extend retention, an idea that foreshadows modern experience replay.

Historical Note.

Adaptive Resonance and stability (1976โ€“1988). Stephen Grossberg's Adaptive Resonance Theory (ART) [29] was the first neural network framework to explicitly address the stabilityโ€“plasticity dilemma. ART networks solve the problem through architectural means: a vigilance parameter controls whether a new input is assimilated into an existing category (stability) or triggers the creation of a new category (plasticity). While ART networks were limited to relatively simple classification tasks, they established the principle that architecture matters for continual learning, a principle that PNN, PackNet, and modern adapter-based methods would independently rediscover.

The significance of Grossberg's contribution cannot be overstated. At a time when most connectionist researchers viewed learning as a monolithic process (present data, update weights, repeat) Grossberg recognised that the dynamics of learning matter as much as the objective. A system that learns too eagerly will overwrite its past; a system that learns too cautiously will fail to adapt. This insight, expressed mathematically through the stabilityโ€“plasticity dilemma, remains the central challenge of continual learning forty years later.

Historical Note.

The catastrophic interference crisis (1989โ€“1999). McCloskey and Cohen's 1989 paper [1] demonstrated that standard backpropagation networks exhibit catastrophic interference: training on new patterns almost completely destroys previously learned patterns. This finding was deeply troubling; it suggested that connectionist models were fundamentally incapable of the kind of incremental learning that biological systems perform effortlessly. Ratcliff (1990) confirmed the finding across multiple architectures. McClelland, McNaughton, and O'Reilly's landmark 1995 paper [11] proposed Complementary Learning Systems (CLS) theory: the brain solves catastrophic interference by maintaining two learning systems (hippocampus for fast episodic learning, neocortex for slow statistical learning) that interact through memory consolidation during sleep. French's 1999 review [2] surveyed a decade of failed solutions, concluding that โ€œthe problem of catastrophic forgetting remains unsolved.โ€

French's review is worth quoting directly: โ€œConnectionist models, as currently implemented, are fundamentally unable to incrementally learn new information without catastrophically forgetting previously learned information.โ€ This conclusion, while overly pessimistic in retrospect, accurately captured the state of the art at the turn of the millennium. The field entered a quiet period: catastrophic forgetting was treated as a known, unsolvable limitation of neural networks, and researchers either accepted it or worked on entirely different architectures (support vector machines, tree ensembles) that did not suffer from it.

Historical Note.

The deep learning awakening (2014โ€“2017). Goodfellow et al. (2014) [30] revisited catastrophic forgetting in modern deep networks, finding that the problem persists, and is arguably worse, in deeper, more expressive architectures. This paper catalysed a wave of solutions: Kirkpatrick et al. (2017) introduced EWC [3], Zenke et al. (2017) introduced SI [31], Li and Hoiem (2017) introduced LwF [32], Lopez-Paz and Ranzato (2017) introduced GEM [33], and Rusu et al. (2016) introduced PNN [18]. Shin et al. (2017) [15] showed that generative replay, training a generative model to produce pseudo-examples of old tasks, could replace stored data entirely. In a single year, the four main CL paradigms (regularisation, replay, architecture, generative) were established.

Historical Note.

Consolidation and scaling (2018โ€“2023). The period 2018โ€“2023 saw consolidation of the theoretical foundations and early scaling to larger models. Schwarz et al. (2018) [28] introduced Progress & Compress. Chaudhry et al. (2019) [16] simplified GEM with A-GEM. Mallya and Lazebnik (2018) [19] showed that network pruning could create space for new tasks. Parisi et al. (2019) [4] and De Lange et al. (2021) [5] provided comprehensive surveys. Sun et al. (2020) [14] brought CL to language models with LAMOL. Hu et al. (2022) [34] introduced LoRA, which, while not designed for CL, would become the most important practical tool for parameter-efficient continual learning.

This consolidation period established two crucial insights. First, there is no single best CL method: the optimal approach depends on the scenario (task-incremental vs. class-incremental vs. domain-incremental), the resource constraints (memory budget, compute budget), and the nature of the tasks (similar vs. dissimilar). Second, parameter efficiency is a form of anti-forgetting: methods that update fewer parameters (either explicitly through masking or implicitly through low-rank constraints) consistently achieve better stability, even without any explicit regularisation. This insight would prove prophetic as LoRA emerged as the dominant practical tool.

Historical Note.

The LLM era (2024โ€“2025). The deployment of large language models at scale has made continual learning an urgent industrial priority. Shi et al. (2024) [7] and Wang et al. (2023) [6] surveyed the emerging landscape. Bell et al. (2025) [8] outlined the future of CL for foundation models. On the methods front, 2025 has been remarkably productive: Liu et al. introduced C-CLIP [21] for vision-language CL, Singh et al. proposed the infinite cosine schedule [24], Behrouz et al. developed both Titans [35] and Miras [36] for neural memory, Liu et al. introduced S6MOD [26] for multi-head state-space memory, Behrouz et al. proposed nested learning [37], Yi et al. developed MultiFCL [27] for federated settings, and Charakorn et al. introduced Doc-to-LoRA [22] for document-conditioned adaptation. The field has shifted from โ€œcan we prevent forgetting?โ€ to โ€œhow do we build systems that learn and remember at scale?โ€

Historical timeline of continual learning, arranged in a serpentine (boustrophedon) layout. The field began with biological observations (purple), entered a crisis period with the discovery of catastrophic interference, and has recently converged on scalable solutions for large language models. Colour coding indicates the primary contribution type.

Exercises

The exercises below span the full range of topics covered in this chapter, from foundational calculations to open-ended design problems. Exercises 1โ€“6 test understanding of the core CL mechanisms (forgetting curves, Bayesian CL, EWC, Fisher information, GEM, reservoir sampling). Exercises 7โ€“10 address LLM-specific methods (LAMOL, PNN, LoRA, Doc-to-LoRA). Exercises 11โ€“18 explore the advanced topics of continual pre-training, learning rate scheduling, sparse memory, Titans, Miras, S6MOD, and nested learning. Exercises 19โ€“21 cover diffusion models, C-CLIP, and federated CL. Exercises 22โ€“26 probe the unified mathematical framework: knowledge capacity, HSD bounds, Pareto frontiers, alignment connections, and scaling laws. The final four exercises (27โ€“30) are more open-ended, connecting CL to biology, online learning theory, compositionality, and system design.

Exercise 2 (Ebbinghaus Curve Analysis).

The Ebbinghaus forgetting curve (Definition 1) models retention as R(t)=eโˆ’t/S where S is the memory strength.

  1. Compute R(t) for tโˆˆ{1ย hour,1ย day,1ย week,1ย month} with S=1 day. Express your answers to three decimal places. At what time is retention reduced to 10%?

  2. Suppose each rehearsal multiplies the memory strength by a factor of k (so after n rehearsals, Sn=knS0). With k=1.5 and S0=1 day, how many rehearsals are needed to maintain R(30ย days)โ‰ฅ0.5?

  3. The power-law forgetting model posits R(t)=(1+t)โˆ’ฮฒ for some ฮฒ>0 [38]. Find the ฮฒ that matches the exponential model at t=1 day (i.e., R(1)=eโˆ’1). Plot both curves for tโˆˆ[0,30] and discuss which predicts more forgetting at long timescales.

Exercise 3 (Bayesian Continual Learning Derivation).

Consider the Bayesian CL framework of Definition 6.

  1. Starting from a Gaussian prior p(๐œฝ)=๐’ฉ(๐0,ฮฃ0), derive the sequential posterior after three tasks with Gaussian likelihoods p(๐’Ÿt|๐œฝ)โˆexpโก(โˆ’12(๐œฝโˆ’๐œฝ^t)โŠคฮ›t(๐œฝโˆ’๐œฝ^t)). Show that the posterior after task 3 is Gaussian with precision ฮ›0:3=ฮฃ0โˆ’1+ฮ›1+ฮ›2+ฮ›3.

  2. Verify that the posterior mean after task t is ๐t=ฮ›0:tโˆ’1(ฮฃ0โˆ’1๐0+โˆ‘s=1tฮ›s๐œฝ^s). Interpret this as a precision-weighted average of task-specific optima.

  3. Show that the EWC objective (Definition 12) with diagonal Fisher is recovered when: (i) the posterior at each step is approximated as diagonal Gaussian, and (ii) the Fisher information โ„ฑiโก replaces the Hessian ฮ›t,ii. What information is lost in this approximation?

Exercise 4 (EWC Analytical Example).

Consider a model with two parameters ๐œฝ=(ฮธ1,ฮธ2)โˆˆโ„2โก. Task 0 has optimum ๐œฝ0โˆ—=(0,0) with Fisher โ„ฑโก=diagโก(10,1). Task 1 has loss โ„’1(๐œฝ)=(ฮธ1โˆ’3)2+(ฮธ2โˆ’3)2.

  1. Write the EWC objective for task 1 with regularisation strength ฮป. Find the closed-form optimal ๐œฝEWCโˆ—(ฮป).

  2. Plot the trajectory of ๐œฝEWCโˆ— as ฮป varies from 0 to โˆž in the (ฮธ1,ฮธ2) plane. Show that it traces a curve from (3,3) to (0,0).

  3. Compute the limits: ๐œฝโˆ—(ฮปโ†’0) and ๐œฝโˆ—(ฮปโ†’โˆž). For what value of ฮป is the forgetting on task 0 equal to the loss on task 1? Interpret the role of the asymmetric Fisher (F1=10โ‰ซF2=1).

Exercise 5 (Fisher Information Computation).

  1. For a single-hidden-layer neural network f(๐’™;๐œฝ)=๐’˜2โŠคฯƒ(W1๐’™+๐’ƒ1)+b2 with ReLU activation ฯƒ and mean-squared-error loss, derive the diagonal Fisher information matrix for the output layer weights ๐’˜2. Show that โ„ฑw2,jโก=๐”ผ[hj2] where hj is the j-th hidden activation.

  2. Argue that parameters connected to high-variance hidden units have larger Fisher information. What does this imply for EWC: which parameters are most protected from modification?

  3. For a large language model with vocabulary size V, show that the per-parameter Fisher for the output embedding matrix scales as O(1/V). Why does this make EWC less effective for protecting the output layer of LLMs?

Exercise 6 (GEM Projection Geometry).

In GEM (Definition 16), the gradient is projected to satisfy โŸจ๐’ˆ~,๐’ˆtโŸฉโ‰ฅ0 for all past tasks t.

  1. Consider T=2 tasks in โ„2โก. The current gradient is ๐’ˆ=(1,โˆ’2) and the stored gradient is ๐’ˆ1=(1,1). Compute the GEM-projected gradient ๐’ˆ~ by solving the constrained QP: min๐’ˆ~โกโ€–๐’ˆ~โˆ’๐’ˆโ€–2 subject to โŸจ๐’ˆ~,๐’ˆ1โŸฉโ‰ฅ0.

  2. What happens when ๐’ˆโŸ‚๐’ˆ1 (i.e., โŸจ๐’ˆ,๐’ˆ1โŸฉ=0)? Show that in this case, the projection is the identity: ๐’ˆ~=๐’ˆ. Interpret this geometrically.

  3. Compare GEM to A-GEM (Definition 19). A-GEM uses a single randomly sampled reference gradient instead of all past gradients. For T=100 tasks, estimate the computational savings of A-GEM over GEM per update step. Under what conditions might A-GEM's approximation quality degrade significantly?

Exercise 7 (Reservoir Sampling).

A replay buffer of size m is maintained using reservoir sampling (Proposition 6) over a stream of n>m examples.

  1. Prove that after processing all n items, each item is in the buffer with probability exactly m/n. [Hint: Use induction. When item j>m arrives, it replaces a random buffer element with probability m/j.]

  2. Compute the expected number of replacement operations after processing all n items. Show that this equals m(Hnโˆ’Hm) where Hk=โˆ‘j=1k1/j is the k-th harmonic number. For m=1000 and n=106, estimate this value.

  3. Standard reservoir sampling does not guarantee class balance. Design a class-balanced reservoir sampling algorithm for C classes that maintains exactly m/C examples per class (assuming C divides m). Prove that your algorithm maintains uniform probability within each class.

Exercise 8 (LAMOL Pseudo-Rehearsal Quality).

In LAMOL (Definition 18), the language model generates pseudo-examples of previous tasks. Let ฮดs denote the quality degradation per generation step (i.e., each re-generation reduces quality by a fraction ฮดs).

  1. After T tasks, pseudo-examples of task 1 have been regenerated Tโˆ’1 times. Show that the quality factor is Q1(T)=โˆs=2T(1โˆ’ฮดs). If ฮดs=ฮด is constant, simplify to Q1(T)=(1โˆ’ฮด)Tโˆ’1.

  2. Under what condition on ฮด does Q1(T) converge to zero as Tโ†’โˆž? Show that for any ฮด>0, the quality eventually drops below any threshold ฯต>0 after Tโˆ—=1+โŒˆlogโกฯต/logโก(1โˆ’ฮด)โŒ‰ tasks. For ฮด=0.05 and ฯต=0.1, compute Tโˆ—.

  3. Propose a mitigation strategy that uses a small replay buffer of m real examples alongside LAMOL's generated examples. Argue informally that the quality degradation is bounded below by the quality of the real examples, preventing Q1(T)โ†’0.

Exercise 9 (PNN Parameter Count).

A Progressive Neural Network (Definition 20) starts with an initial network of L layers, each with width d. Each new task adds a new column with lateral connections to all previous columns.

  1. Derive the exact parameter count after T tasks. Show that the total is P(T)=Tโ‹…Lโ‹…d2+T(Tโˆ’1)2โ‹…Lโ‹…d2 for fully connected layers (accounting for both within-column and lateral-connection weights). Simplify.

  2. Compare P(T) to the cost of training T independent networks of the same architecture: Pindep(T)=Tโ‹…Lโ‹…d2. What is the ratio P(T)/Pindep(T)? For T=10, compute this ratio.

  3. For T=100, L=24, and d=4096 (a moderate Transformer), compute the total parameter count. Compare to the 7B parameters of LLaMA-2-7B. At what value of T does PNN exceed the 7B threshold? Discuss the scalability implications.

Exercise 10 (LoRA Storage Analysis).

Consider LoRA adapters (Definition 2, Definition 23) applied to a LLaMA-2-7B model with L=32 Transformer layers, hidden dimension d=4096, and LoRA rank r=16. Adapters are applied to the query and value projection matrices (WQ,WV) in each layer.

  1. Compute the total number of trainable parameters per adapter. Each adapter adds matrices Aโˆˆโ„rร—dโก and Bโˆˆโ„dร—rโก per target matrix. Express your answer as a fraction of the full model size.

  2. In fp16 storage (2 bytes per parameter), how many task-specific adapters can be stored in 1,GB?

  3. Compare the storage efficiency of LoRA-CL to PackNet (Definition 21), which stores a binary mask (1 bit per parameter) per task. For what values of LoRA rank r is LoRA-CL more storage-efficient than PackNet?

Exercise 11 (Doc-to-LoRA Hypernetwork).

In Doc-to-LoRA (Definition 24), a hypernetwork Hฯ•:๐’Ÿโ†’โ„pโก maps documents to LoRA adapter weights, where p is the adapter parameter count.

  1. For the hypernetwork to be capable of producing any adapter weight vector, it must have at least p output dimensions. If the hypernetwork is a Transformer with hidden dimension dH and the adapter has p parameters, what is the minimum dH for the final linear projection to be surjective onto โ„pโก? What does this imply about the hypernetwork's size relative to the adapter?

  2. Describe a cross-attention architecture for the hypernetwork where the document tokens serve as keys/values and p/dH learnable query tokens generate the adapter weights. What are the computational advantages over a simple MLP hypernetwork?

  3. Estimate the FLOPs cost of running the hypernetwork for a 512-token document with dH=768 and a single cross-attention layer. Compare to the FLOPs of a single forward pass through the LLaMA-2-7B model.

Exercise 12 (CPT Data Mixing).

Continual pre-training (Definition 26) mixes new-domain data with replay data at ratio ฮฑ:(1โˆ’ฮฑ).

  1. Model forgetting as F(ฮฑ)โ‰ค(1โˆ’ฮฑ)Cforget+ฮฑฯ„transfer, where Cforget is the forgetting constant and ฯ„transfer is the transfer benefit of new data on old tasks (ฯ„transfer<0 indicates positive transfer). Derive this bound from a first-order approximation of the loss landscape.

  2. Find the optimal mixing ratio ฮฑโˆ— that minimises F(ฮฑ) subject to achieving at least a fraction ฮฒ of the maximum new-task performance. Express ฮฑโˆ— in terms of Cforget, ฯ„transfer, and ฮฒ.

  3. The empirical recommendation is ฮฑโ‰ˆ0.9 (90% new data, 10% replay) [7]. Under what conditions on Cforget and ฯ„transfer does this match your optimal ฮฑโˆ—?

Exercise 13 (Learning Rate and Forgetting).

The learning-rate forgetting bound (Theorem 5) states that forgetting is proportional to the product of learning rate and gradient magnitude.

  1. Starting from ๐œฝt+1=๐œฝtโˆ’ฮทโˆ‡โ„’new(๐œฝt), derive the first-order approximation: ฮ”โ„’oldโ‰ˆโˆ’ฮทโŸจโˆ‡โ„’old,โˆ‡โ„’newโŸฉ. When does new-task training help old tasks (negative forgetting)?

  2. Consider a loss landscape with condition number ฮบ=ฮปmaxโก/ฮปminโก where ฮปmaxโก and ฮปminโก are the largest and smallest eigenvalues of the Hessian. Compare the forgetting after one epoch for ฮบ=10 versus ฮบ=1000. What role does the condition number play?

  3. The infinite cosine schedule (Definition 27) bounds the instantaneous learning rate by ฮทmaxโก. Show that this implies a per-step forgetting bound of |ฮ”โ„’old|โ‰คฮทmaxโกโ€–โˆ‡โ„’oldโ€–โ€–โˆ‡โ„’newโ€– via Cauchyโ€“Schwarz.

Exercise 14 (Infinite Cosine Schedule).

The infinite cosine schedule (Definition 27) defines ฮท(t)=ฮทminโก+12(ฮทmaxโกโˆ’ฮทminโก)(1+cosโก(ฯ€โ‹…((tmodP)/P))) where P is the period.

  1. For ฮทmaxโก=3ร—10โˆ’4, ฮทminโก=10โˆ’5, and P=1000 steps, write out ฮท(t) and plot it for tโˆˆ[0,3000] (three complete cycles). Mark the points where ฮท(t)=ฮทmaxโก and ฮท(t)=ฮทminโก.

  2. Compute the time-averaged learning rate over one cycle: ฮทโ€พ=1Pโˆซ0Pฮท(t)dt. Show that ฮทโ€พ=12(ฮทmaxโก+ฮทminโก).

  3. At which points in the cosine cycle is the model most plastic (able to learn new patterns)? At which points is it most stable (resistant to forgetting)? Argue that the cosine schedule provides a natural alternation between โ€œlearning phasesโ€ and โ€œconsolidation phasesโ€ within each cycle.

Exercise 15 (Sparse Memory Layer Analysis).

A sparse memory layer (Definition 28) with M memory slots and top-k activation uses a k-hot addressing scheme.

  1. After N update steps, each activating k out of M slots uniformly at random, what fraction of memory slots have been modified at least once? Express as a function of N, M, and k.

  2. The probability that a specific slot has not been modified after N steps is P(unmodified)=(1โˆ’k/M)N. For M=106, k=128, and N=104, compute this probability. What does it tell us about the memory's forgetting behaviour?

  3. In the Sparse Memory Layer design (Definition 28), approximately 11% of parameters participate in any given forward pass, while 89% remain unchanged. Verify this by computing k/M for typical values (k=128, Mโ‰ˆ1200) and explain why this sparsity pattern provides natural anti-forgetting protection (Proposition 13).

Exercise 16 (Titans Surprise Mechanism).

The Titans architecture (Definition 31) uses surprise (Definition 30) to gate memory updates.

  1. The Titans memory update is Mt+1=Mtโˆ’ฮทโˆ‡Mโ„’t. Show that for a linear memory M๐’Œ=๐’— with loss โ„’t=โ€–Mt๐’Œtโˆ’๐’—tโ€–2, the update becomes Mt+1=Mt+ฮท(๐’—tโˆ’Mt๐’Œt)๐’ŒtโŠค. Recognise this as the Widrowโ€“Hoff (LMS) online learning rule.

  2. The surprise St=โ€–Mt๐’Œtโˆ’๐’—tโ€–2 is high when the current input is poorly predicted by existing memory. Argue that surprise is a natural novelty detector: familiar inputs (seen during previous tasks) have low surprise, while novel inputs (from a new task) have high surprise. How does this relate to the stabilityโ€“plasticity trade-off?

  3. Design a forget gate that uses surprise: Mt+1=(1โˆ’ฮฑt)Mt+ฮท(๐’—tโˆ’Mt๐’Œt)๐’ŒtโŠค, where ฮฑt=ฯƒ(ฮฒStโˆ’ฮณ) for learnable ฮฒ,ฮณ. What is the effect of ฮฑt when surprise is high versus low? Relate to the biological concept of reconsolidation.

Exercise 17 (Miras Equivalence).

The Miras framework (Definition 32) establishes an equivalence between Test-Time Memory (TTM) and linear attention.

  1. Write the TTM update rule: given query ๐’’t, key ๐’Œt, value ๐’—t, the memory state is St=Stโˆ’1+๐’—t๐’ŒtโŠค and the output is ๐’t=St๐’’t. Expand ๐’t explicitly as a sum over past inputs.

  2. Write the linear attention recurrence: St=Stโˆ’1+ฯ•(๐’Œt)๐’—tโŠค and ๐’t=Stฯ•(๐’’t), where ฯ• is a feature map. Show that with ฯ•=id (identity), this is identical to the TTM update from part (a).

  3. Show the full Miras equivalence: any TTM with update rule St=(1โˆ’ฮฑ)Stโˆ’1+๐’—t๐’ŒtโŠค is equivalent to a gated linear attention mechanism with decay factor (1โˆ’ฮฑ). [Hint: Unroll the recurrence.]

  4. Discuss the practical implication: if TTM and linear attention are equivalent, then advances in efficient attention (e.g., hardware optimisations for linear attention) directly benefit continual learning systems, and vice versa.

Exercise 18 (S6MOD Multi-Head States).

The S6MOD architecture (Definition 33) uses H independent state heads, each with state dimension N.

  1. Compute the total state size for a model with L=24 layers, H=16 heads per layer, and N=64 state dimensions per head. Express in number of parameters and in MB (fp16).

  2. Compare this to a single-head SSM with the same total state dimension Hโ‹…N=1024 per layer. What are the theoretical advantages of the multi-head decomposition in terms of (i) parallel computation and (ii) expressiveness for multi-task learning?

  3. Design a routing function that assigns different heads to different tasks: hactive=TopK(score(๐’™,๐œฝroute),k) where k<H. Argue that this creates a form of sparse memory allocation that naturally reduces cross-task interference.

Exercise 19 (Nested Learning Convergence).

Nested learning (Definition 34) assigns different learning rates to different levels: level l uses rate ฮทl=ฮท0/cl for some constant c>1.

  1. For level 2 with ฮท2=ฮท0/c2, show that after T steps, the parameter update is ฮ”๐œฝ2=โˆ’ฮท0c2โˆ‘t=1T๐’ˆt(2). If ๐’ˆt(2) are i.i.d. with mean ๐’ˆโ€พ and variance ฯƒ2, show that ฮ”๐œฝ2 converges to โˆ’Tฮท0๐’ˆโ€พ/c2 and the variance of the estimate decreases as O(1/T), i.e., level 2 converges to the time-averaged gradient.

  2. Define the effective number of samples for level l as the number of steps needed to achieve variance ฯƒ2/dl in the gradient estimate, where dl is the level dimension. Express this in terms of c and l.

  3. Relate nested learning to Polyak averaging (exponential moving average of parameters). Show that if c=1+ฯต for small ฯต, the multi-level scheme approximates a hierarchy of EMA with decay rates ฯต,2ฯต,3ฯต,โ€ฆ.

Exercise 20 (Diffusion Model Forgetting).

A diffusion model is trained on landscapes (task 0), achieving FID0=12.3. It is then fine-tuned on portraits (task 1). After fine-tuning, FID0โ€ฒ=45.7 (landscapes) and FID1=8.1 (portraits).

  1. Compute the diffusion forgetting score Fdiff (Definition 36). Is this severe forgetting?

  2. After applying noise-level-aware EWC (Proposition 15) with ฮป=100, the landscape FID improves to FID0โ€ฒโ€ฒ=18.5 while portrait FID degrades slightly to FID1โ€ฒ=10.2. Compute the new forgetting score and the forgettingโ€“performance trade-off ratio ฮ”F/ฮ”FID1.

  3. With concept-specific LoRA (Definition 37), the landscape FID remains at FID0=12.3 (exact zero forgetting) and portrait FID is FID1โ€ฒโ€ฒ=9.5. Explain why LoRA achieves zero forgetting. What is the practical cost of this guarantee (i.e., what assumption must hold at inference time)?

Exercise 21 (C-CLIP Benchmark Analysis).

In the C-CLIP evaluation (Definition 39), LoRA-CL achieves average accuracy ALoRA=78.3% across 10 datasets, while the best individual method (varying per dataset) averages Abest=79.8%. Full fine-tuning achieves AFT=72.1%.

  1. Compute the relative improvement of LoRA-CL over full fine-tuning: (ALoRAโˆ’AFT)/AFT. Compute the gap to the best method: (Abestโˆ’ALoRA)/Abest. Verify that the gap satisfies (LORA Dominance).

  2. If LoRA uses rank r=16 on a CLIP ViT-B/16 with d=768, compute the parameter ratio |๐œฝLoRA|/|๐œฝfull| for adapters on Q and V projections across L=12 layers.

  3. Why does structural isolation (freezing the base model and only training adapters) outperform regularisation-based methods (EWC, SI) in the VLCL setting? Relate your answer to the stabilityโ€“plasticity analysis of Definition 7 and the cross-modal forgetting bound of Proposition 17.

Exercise 22 (Federated Continual Learning Communication).

Consider a MultiFCL system (Definition 41) with K clients, model size P parameters, and S=3 scales.

  1. In standard federated averaging (FedAvg), each communication round transmits P parameters per client (both directions). The total communication cost per round is 2KP (in parameter units). In MultiFCL, only scales s=1 and s=2 are communicated (scale s=3 is local). If scale 1 has 0.7P parameters and scale 2 has 0.2P parameters, compute the communication cost per round.

  2. Compute the communication overhead of MultiFCL relative to FedAvg: (MultiFCLย costโˆ’FedAvgย cost)/FedAvgย cost. Under what conditions is MultiFCL cheaper than FedAvg? [Hint: MultiFCL communicates more frequently for scale 1 but less for scale 2.]

  3. The MultiFCL framework assumes that clients have heterogeneous task sequences. Under what conditions on the similarity between client task distributions does federated aggregation actually help (positive transfer) versus hurt (negative transfer)? Relate to the task similarity measure of Definition 8.

Exercise 23 (Knowledge Capacity Calculations).

Use the knowledge capacity framework of Definition 43.

  1. Compute ๐’ฆ in bits for: (i) a 7B-parameter model in fp16, (ii) a 70B-parameter model in fp16, (iii) a 7B-parameter model in int4 quantisation. Express each in gigabytes.

  2. If each task requires It=108 bits of unique information, how many tasks can each model from part (a) accommodate with zero forgetting (Theorem 8)?

  3. A LoRA adapter with rank r=16 on Q and V projections across L=32 layers of a d=4096 model has how many bits (in fp16)? How many adapters fit within the โ€œleftoverโ€ capacity of a 7B model that has used 80% of its raw capacity for pretrained knowledge?

Exercise 24 (HSD Forgetting Bound Computation).

Consider a 3-level HSD architecture (Definition 44) with the following parameters:

Levelฯlฮทlฮบlโ€–ฮ”๐œฝlโ€–
1 (fast/dense)1.01000.10.01
2 (hybrid)0.1101.00.005
3 (slow/sparse)0.001110.00.001

  1. Compute the per-level forgetting contributions Fl=ฯlฮทlฮบlโ€–ฮ”๐œฝlโ€– and the total forgetting bound Ftotal. Which level contributes most?

  2. Compute the ratio between the highest and lowest per-level contributions. Show that the sparse, slow level (level 3) contributes roughly 10,000ร— less forgetting than the dense, fast level (level 1), despite having a 100ร— higher condition number.

  3. Suppose you have a budget of B=0.2 total forgetting. Formulate and solve the optimisation problem: minโ€–ฮ”๐œฝlโ€–โกโˆ‘lโ„’new,l subject to โˆ‘lฯlฮทlฮบlโ€–ฮ”๐œฝlโ€–โ‰คB, where โ„’new,l decreases with โ€–ฮ”๐œฝlโ€–. Show that the optimal allocation concentrates updates at the level with the smallest ฯlฮทlฮบl ratio.

Exercise 25 (Pareto Frontier Analysis).

Use the stabilityโ€“plasticity model of Proposition 18 with S(ฮป)=1โˆ’ฮป2a2 and P(ฮป)=1โˆ’(1โˆ’ฮป)2b2 where a=โ€–ฮ”๐œฝโ€–2/CS and b=1/CP.

  1. Eliminate ฮป to derive the Pareto frontier as an explicit curve S=f(P). [Hint: Solve P(ฮป) for ฮป and substitute into S(ฮป).]

  2. Show that d2S/dP2<0 everywhere on the frontier, confirming convexity of the feasible region.

  3. At the Pareto-optimal point, the marginal cost of additional stability equals the marginal benefit of plasticity. Find the ฮปโˆ— that satisfies |dS/dฮป|=|dP/dฮป|. Interpret this as the โ€œbalancedโ€ CL operating point.

Exercise 26 (Alignment as Continual Learning).

Map the three-stage alignment pipeline to a CL problem (Proposition 19).

  1. Write out the loss functions for the three tasks: โ„’1 (pretraining), โ„’2 (SFT), and โ„’3 (DPO with temperature ฮฒ). Identify the data distribution for each task and explain why they constitute a non-stationary sequence.

  2. Show the ฮฒโ€“ฮป correspondence (Corollary 2) explicitly. Starting from the DPO loss โ„’DPO=โˆ’๐”ผ[logโกฯƒ(ฮฒlogโกฯ€๐œฝ(yw|x)ฯ€ref(yw|x)โˆ’ฮฒlogโกฯ€๐œฝ(yl|x)ฯ€ref(yl|x))], perform a second-order Taylor expansion around ๐œฝ=๐œฝref and identify the EWC-like quadratic penalty.

  3. How would the analysis change for GRPO (Group Relative Policy Optimization), which uses a group of sampled responses instead of paired preferences? Is the ฮฒโ€“ฮป correspondence still valid?

Exercise 27 (CL Scaling Law).

Consider the conjectured CL scaling law (Conjecture 2): โ„’(P,T)=aPโˆ’ฮฑ+bTฮฒPโˆ’ฮณ.

  1. Show that for the CL tax (second term) to decrease with model size for any fixed T, we need ฮณ>0. What happens when ฮณ=0? Interpret physically.

  2. The condition for CL to be preferable to retraining from scratch is โ„’(P,T)<โ„’retrain(P)โ‰ˆaPโˆ’ฮฑ. This simplifies to bTฮฒPโˆ’ฮณ<0, which is never satisfied. Resolve this apparent paradox by introducing a data efficiency term: CL uses NCL=N1+โˆ‘t>1nt total tokens, while retraining uses Nretrain=Tโ‹…N1. Modify the scaling law to account for the data savings and find the break-even condition.

  3. Design an experiment to estimate ฮฑ, ฮฒ, and ฮณ empirically. You have access to models of sizes Pโˆˆ{125M,350M,1.3B,7B} and can run task sequences of length Tโˆˆ{5,10,20,50,100}. Describe the experimental protocol, including how to disentangle the scaling exponents.

Exercise 28 (Biological Continual Learning).

The brain is the most successful continual learner known. This exercise explores the mathematical parallels.

  1. Map the brain's memory systems to the HSD framework (Definition 44). Identify the biological counterparts of: (i) level 1 (fast, dense), (ii) level 2 (hybrid), (iii) level 3 (slow, sparse). What are the biological analogues of ฯl, ฮทl, and ฮบl?

  2. Estimate the brain's knowledge capacity using Definition 43. The brain has approximately 1014 synapses, each storing an estimated 4.7 bits of information [11]. Compare to a 70B-parameter LLM in fp16.

  3. Estimate the number of โ€œtasksโ€ a human learns in a lifetime. If we define a task as a coherent skill or knowledge domain (e.g., โ€œriding a bicycle,โ€ โ€œalgebra,โ€ โ€œa friend's nameโ€), a rough estimate is 104โ€“106 tasks over 80 years. Using the capacity from part (b) and the information bound (Theorem 8), what is the maximum information per task? Is this consistent with the observation that humans forget most of what they experience?

Exercise 29 (Online Learning Regret for CL).

Continual learning can be framed as an online learning problem, where the learner sees one task per round and accumulates regret.

  1. Define the CL regret after T tasks as Regret(T)=โˆ‘t=1T[โ„’t(๐œฝt)โˆ’โ„’t(๐œฝtโˆ—)], where ๐œฝt is the model's parameters when evaluated on task t and ๐œฝtโˆ— is the per-task optimum. How does this differ from the standard forgetting metric (Definition 9)?

  2. For online gradient descent (OGD) with learning rate ฮท=1/T and convex losses, the classical bound is Regret(T)=O(T). Verify this by computing the regret bound for quadratic losses โ„’t(๐œฝ)=12โ€–๐œฝโˆ’๐œฝtโˆ—โ€–2 with โ€–๐œฝtโˆ—โ€–โ‰คD.

  3. Can EWC achieve sublinear regret? Argue that EWC with optimal ฮป achieves O(T) regret for quadratic losses by showing that the EWC update is equivalent to OGD with a preconditioned step. Under what conditions on the Fisher matrices does this hold?

Exercise 30 (Compositionality and Routing).

Consider a LoRA-based compositional CL system (Definition 25) with K adapters, each of rank r, applied to a model with hidden dimension d.

  1. Compute the total parameter count for K=10 adapters with r=4 and d=4096, applied to Q and V projections in each of L=32 layers. Express as a percentage of the 7B base model.

  2. A routing function ๐œธ=softmaxโก(Wr๐’™+๐’ƒr) selects adapter weights ฮณc based on the input ๐’™. Compute the FLOPs cost of routing (one matrix-vector multiply plus softmax) relative to a single adapter's forward pass (๐’™โ†ฆBcAc๐’™).

  3. Two adapters compose without interference if their column spaces are orthogonal: col(B1A1)โŸ‚col(B2A2). For rank-r adapters in โ„dโก, what is the maximum number of pairwise orthogonal adapters? Relate to the maximum number of interference-free tasks. What happens when the number of tasks exceeds this limit?

Exercise 31 (Open Problem: Designing an HSD System).

This capstone exercise asks you to design a complete HSD-based continual learning system for a 7B-parameter language model.

  1. Design a 3-level HSD architecture. Specify: itemize

  2. Level 1: which parameters, update rule, and update frequency,

  3. Level 2: adapter configuration (rank, target modules),

  4. Level 3: which parameters are frozen and under what conditions (if any) they may be updated. itemize Justify your choices using the HSD forgetting bound (Theorem 9).

  5. Using the parameters from your design, estimate the forgetting bound Ftotal after 100 tasks. Compute ฯl, ฮทl, ฮบl, and โ€–ฮ”๐œฝlโ€– for each level (you may estimate ฮบl from typical Hessian spectral norms reported in the literature).

  6. Compare your design to Titans (Definition 31). Identify at least two specific differences and argue which design would achieve lower forgetting and why.

  7. Propose a concrete experiment to validate your design. Specify: the base model, the task sequence (at least 10 tasks from different domains), the evaluation metrics (including both per-task accuracy and cross-task transfer), and the baselines you would compare against. Estimate the computational cost in GPU-hours.

Key Idea.

The arc of continual learning. This chapter has traced a long arc, from Ebbinghaus's forgetting curve through Grossberg's stabilityโ€“plasticity dilemma, from the catastrophic interference crisis to the modern era of LoRA adapters and neural memory systems. The central insight, distilled through two centuries of research, is deceptively simple: learning and remembering are not opposing forces but complementary aspects of a single process. The systems that learn best are those that remember selectively, and the systems that remember best are those that continue to learn.

The unified framework of A Unified Mathematical Framework provides the mathematical language to make this insight precise. The HSD architecture shows that the key to continual learning is not any single technique, not regularisation alone, not replay alone, not architectural isolation alone, but the hierarchical combination of all three, operating at different timescales and different levels of abstraction. The ideal continual learner, if it exists, will be a system that seamlessly integrates fast adaptation with slow consolidation, sparse task-specific memory with dense shared representations, and online learning with periodic reflection.

We do not yet have such a system. But the mathematical foundations developed in this chapter, the information-theoretic bounds, the forgetting inequalities, the Pareto characterisations, and the connections to memory, alignment, and reasoning, provide the tools to guide the search.

References

  1. Catastrophic Interference in Connectionist Networks: The Sequential Learning Problem

    Michael McCloskey, Neal J Cohen

    Psychology of Learning and Motivation, vol. 24, pp. 109-165 ยท 1989

    BibTeX
    @inproceedings{mccloskey1989catastrophic,
      title={Catastrophic Interference in Connectionist Networks: The Sequential Learning Problem},
      author={McCloskey, Michael and Cohen, Neal J},
      booktitle={Psychology of Learning and Motivation},
      volume={24},
      pages={109--165},
      publisher={Academic Press},
      year={1989}
    }

    Conference paper

  2. Catastrophic Forgetting in Connectionist Networks

    Robert M French

    Trends in Cognitive Sciences, vol. 3, no. 4, pp. 128-135 ยท 1999

    BibTeX
    @article{french1999catastrophic,
      title={Catastrophic Forgetting in Connectionist Networks},
      author={French, Robert M},
      journal={Trends in Cognitive Sciences},
      volume={3},
      number={4},
      pages={128--135},
      year={1999}
    }

    Journal article

  3. Overcoming Catastrophic Forgetting in Neural Networks

    James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A Rusu, Kieran Milan, John Quan, et al.

    Proceedings of the National Academy of Sciences, vol. 114, no. 13, pp. 3521-3526 ยท 2017

    BibTeX
    @article{kirkpatrick2017ewc,
      title={Overcoming Catastrophic Forgetting in Neural Networks},
      author={Kirkpatrick, James and Pascanu, Razvan and Rabinowitz, Neil and Veness, Joel and Desjardins, Guillaume and Rusu, Andrei A and Milan, Kieran and Quan, John and Ramalho, Tiago and Grabska-Barwinska, Agnieszka and Hassabis, Demis and Clopath, Claudia and Kumaran, Dharshan and Hadsell, Raia},
      journal={Proceedings of the National Academy of Sciences},
      volume={114},
      number={13},
      pages={3521--3526},
      year={2017}
    }

    Journal article

  4. Continual Lifelong Learning with Neural Networks: A Review

    German I Parisi, Ronald Kemker, Jose L Part, Christopher Kanan, Stefan Wermter

    Neural Networks, vol. 113, pp. 54-71 ยท 2019

    BibTeX
    @article{parisi2019continual,
      title={Continual Lifelong Learning with Neural Networks: A Review},
      author={Parisi, German I and Kemker, Ronald and Part, Jose L and Kanan, Christopher and Wermter, Stefan},
      journal={Neural Networks},
      volume={113},
      pages={54--71},
      year={2019}
    }

    Journal article

  5. A Continual Learning Survey: Defying Forgetting in Classification Tasks

    Matthias De Lange, Rahaf Aljundi, Marc Masana, Sarah Parisot, Xu Jia, Ales Leonardis, Gregory Slabaugh, Tinne Tuytelaars

    IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 44, no. 7, pp. 3366-3385 ยท 2021

    BibTeX
    @article{delange2021continual,
      title={A Continual Learning Survey: Defying Forgetting in Classification Tasks},
      author={De Lange, Matthias and Aljundi, Rahaf and Masana, Marc and Parisot, Sarah and Jia, Xu and Leonardis, Ale{\v{s}} and Slabaugh, Gregory and Tuytelaars, Tinne},
      journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
      volume={44},
      number={7},
      pages={3366--3385},
      year={2021}
    }

    Journal article

  6. A Comprehensive Survey of Continual Learning: Theory, Method and Application

    Liyuan Wang, Xingxing Zhang, Hang Su, Jun Zhu

    IEEE Transactions on Pattern Analysis and Machine Intelligence ยท 2024

    BibTeX
    @article{wang2023comprehensive_cl_survey,
      title={A Comprehensive Survey of Continual Learning: Theory, Method and Application},
      author={Wang, Liyuan and Zhang, Xingxing and Su, Hang and Zhu, Jun},
      journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
      year={2024}
    }

    Journal article

  7. Continual Learning of Large Language Models: A Comprehensive Survey

    Haizhou Shi, Zihao Xu, Hengyi Wang, Weiyi Qin, Wenyuan Wang, Yibin Wang, Hao Wang

    arXiv preprint arXiv:2404.16789 ยท 2024

    BibTeX
    @article{shi2024continual_llm_survey,
      title={Continual Learning of Large Language Models: A Comprehensive Survey},
      author={Shi, Haizhou and Xu, Zihao and Wang, Hengyi and Qin, Weiyi and Wang, Wenyuan and Wang, Yibin and Wang, Hao},
      journal={arXiv preprint arXiv:2404.16789},
      year={2024}
    }

    Journal article

  8. The Future of Continual Learning in the Era of Foundation Models: Three Key Directions

    Jack Bell, Luigi Quarantiello, Eric Nuertey Coleman, Lanpei Li, Malio Li, Mauro Madeddu, Elia Piccoli, Vincenzo Lomonaco

    arXiv preprint arXiv:2506.03320 ยท 2025

    BibTeX
    @article{bell2025future_cl,
      title={The Future of Continual Learning in the Era of Foundation Models: Three Key Directions},
      author={Bell, Jack and Quarantiello, Luigi and Coleman, Eric Nuertey and Li, Lanpei and Li, Malio and Madeddu, Mauro and Piccoli, Elia and Lomonaco, Vincenzo},
      journal={arXiv preprint arXiv:2506.03320},
      year={2025}
    }

    Journal article

  9. Uber das Gedachtnis: Untersuchungen zur experimentellen Psychologie

    Hermann Ebbinghaus

    Duncker & Humblot ยท 1885

    BibTeX
    @book{ebbinghaus1885memory,
      title={{\"U}ber das {G}ed{\"a}chtnis: {U}ntersuchungen zur experimentellen {P}sychologie},
      author={Ebbinghaus, Hermann},
      year={1885},
      publisher={Duncker \& Humblot},
      address={Leipzig}
    }

    Book

  10. So Lernt Man Lernen: Der Weg zum Erfolg (Learning to Learn)

    Sebastian Leitner

    Herder ยท 1972

    BibTeX
    @article{leitner1972learn,
      title={So Lernt Man Lernen: Der Weg zum Erfolg ({Learning to Learn})},
      author={Leitner, Sebastian},
      year={1972},
      publisher={Herder}
    }

    Journal article

  11. Why There Are Complementary Learning Systems in the Hippocampus and Neocortex: Insights from the Successes and Failures of Connectionist Models of Learning and Memory

    James L McClelland, Bruce L McNaughton, Randall C O'Reilly

    Psychological Review, vol. 102, no. 3, pp. 419-457 ยท 1995

    BibTeX
    @article{mcclelland1995cls,
      title={Why There Are Complementary Learning Systems in the Hippocampus and Neocortex: Insights from the Successes and Failures of Connectionist Models of Learning and Memory},
      author={McClelland, James L and McNaughton, Bruce L and O'Reilly, Randall C},
      journal={Psychological Review},
      volume={102},
      number={3},
      pages={419--457},
      year={1995}
    }

    Journal article

  12. What Learning Systems Do Intelligent Agents Need? Complementary Learning Systems Theory Updated

    Dharshan Kumaran, Demis Hassabis, James L McClelland

    Trends in Cognitive Sciences, vol. 20, no. 7, pp. 512-534 ยท 2016

    BibTeX
    @article{kumaran2016learning,
      title={What Learning Systems Do Intelligent Agents Need? {C}omplementary Learning Systems Theory Updated},
      author={Kumaran, Dharshan and Hassabis, Demis and McClelland, James L},
      journal={Trends in Cognitive Sciences},
      volume={20},
      number={7},
      pages={512--534},
      year={2016}
    }

    Journal article

  13. Random Sampling with a Reservoir

    Jeffrey S Vitter

    ACM Transactions on Mathematical Software, vol. 11, no. 1, pp. 37-57 ยท 1985

    BibTeX
    @article{vitter1985reservoir,
      title={Random Sampling with a Reservoir},
      author={Vitter, Jeffrey S},
      journal={ACM Transactions on Mathematical Software},
      volume={11},
      number={1},
      pages={37--57},
      year={1985}
    }

    Journal article

  14. LAMOL: LAnguage MOdeling for Lifelong Language Learning

    Fan-Keng Sun, Cheng-Hao Ho, Hung-Yi Lee

    International Conference on Learning Representations (ICLR) ยท 2020

    BibTeX
    @inproceedings{sun2020lamol,
      title={{LAMOL}: {LA}nguage {MO}deling for Lifelong Language Learning},
      author={Sun, Fan-Keng and Ho, Cheng-Hao and Lee, Hung-Yi},
      booktitle={International Conference on Learning Representations (ICLR)},
      year={2020}
    }

    Conference paper

  15. Continual Learning with Deep Generative Replay

    Hanul Shin, Jung Kwon Lee, Jaehong Kim, Jiwon Kim

    Advances in Neural Information Processing Systems (NeurIPS) ยท 2017

    BibTeX
    @inproceedings{shin2017continual_generative,
      title={Continual Learning with Deep Generative Replay},
      author={Shin, Hanul and Lee, Jung Kwon and Kim, Jaehong and Kim, Jiwon},
      booktitle={Advances in Neural Information Processing Systems (NeurIPS)},
      year={2017}
    }

    Conference paper

  16. Efficient Lifelong Learning with A-GEM

    Arslan Chaudhry, Marc'Aurelio Ranzato, Marcus Rohrbach, Mohamed Elhoseiny

    International Conference on Learning Representations (ICLR) ยท 2019

    BibTeX
    @inproceedings{chaudhry2019agem,
      title={Efficient Lifelong Learning with {A-GEM}},
      author={Chaudhry, Arslan and Ranzato, Marc'Aurelio and Rohrbach, Marcus and Elhoseiny, Mohamed},
      booktitle={International Conference on Learning Representations (ICLR)},
      year={2019}
    }

    Conference paper

  17. Distilling the Knowledge in a Neural Network

    Geoffrey Hinton, Oriol Vinyals, Jeff Dean

    NIPS Deep Learning and Representation Learning Workshop ยท 2015

    BibTeX
    @inproceedings{hinton2015distilling,
      title={Distilling the Knowledge in a Neural Network},
      author={Hinton, Geoffrey and Vinyals, Oriol and Dean, Jeff},
      booktitle={NIPS Deep Learning and Representation Learning Workshop},
      year={2015}
    }

    Conference paper

  18. Progressive Neural Networks

    Andrei A Rusu, Neil C Rabinowitz, Guillaume Desjardins, Hubert Sober, Koray Kavukcuoglu, Raia Hadsell

    arXiv preprint arXiv:1606.04671 ยท 2016

    BibTeX
    @inproceedings{rusu2016pnn,
      title={Progressive Neural Networks},
      author={Rusu, Andrei A and Rabinowitz, Neil C and Desjardins, Guillaume and Sober, Hubert and Kavukcuoglu, Koray and Hadsell, Raia},
      booktitle={arXiv preprint arXiv:1606.04671},
      year={2016}
    }

    Conference paper

  19. PackNet: Adding Multiple Tasks to a Single Network by Iterative Pruning

    Arun Mallya, Svetlana Lazebnik

    Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) ยท 2018

    BibTeX
    @inproceedings{mallya2018packnet,
      title={{PackNet}: Adding Multiple Tasks to a Single Network by Iterative Pruning},
      author={Mallya, Arun and Lazebnik, Svetlana},
      booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
      year={2018}
    }

    Conference paper

  20. Piggyback: Adapting a Single Network to Multiple Tasks by Learning to Mask Weights

    Arun Mallya, Dillon Davis, Svetlana Lazebnik

    Proceedings of the European Conference on Computer Vision (ECCV) ยท 2018

    BibTeX
    @article{mallya2018piggyback,
      title={Piggyback: Adapting a Single Network to Multiple Tasks by Learning to Mask Weights},
      author={Mallya, Arun and Davis, Dillon and Lazebnik, Svetlana},
      journal={Proceedings of the European Conference on Computer Vision (ECCV)},
      year={2018}
    }

    Journal article

  21. C-CLIP: Continual Learning for Vision-Language Models with LoRA

    Yanming Liu, others

    International Conference on Learning Representations (ICLR) ยท 2025

    BibTeX
    @inproceedings{liu2025cclip,
      title={{C-CLIP}: Continual Learning for Vision-Language Models with {LoRA}},
      author={Liu, Yanming and others},
      booktitle={International Conference on Learning Representations (ICLR)},
      year={2025}
    }

    Conference paper

  22. Doc-to-LoRA: Learning to Instantly Internalize Contexts

    Rujikorn Charakorn, Edoardo Cetin, Shinnosuke Uesaka, Robert Tjarko Lange

    arXiv preprint arXiv:2602.15902 ยท 2026

    BibTeX
    @article{charakorn2026doc_to_lora,
      title={{Doc-to-LoRA}: Learning to Instantly Internalize Contexts},
      author={Charakorn, Rujikorn and Cetin, Edoardo and Uesaka, Shinnosuke and Lange, Robert Tjarko},
      journal={arXiv preprint arXiv:2602.15902},
      year={2026}
    }

    Journal article

  23. Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networks

    Chelsea Finn, Pieter Abbeel, Sergey Levine

    Proceedings of the International Conference on Machine Learning (ICML) ยท 2017

    BibTeX
    @article{finn2017maml,
      title={Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networks},
      author={Finn, Chelsea and Abbeel, Pieter and Levine, Sergey},
      journal={Proceedings of the International Conference on Machine Learning (ICML)},
      year={2017}
    }

    Journal article

  24. Beyond Cosine Decay: On the Effectiveness of Infinite Learning Rate Schedule for Continual Pre-Training

    Vaibhav Singh, Paul Janson, Paria Mehrbod, Adam Ibrahim, Irina Rish, Eugene Belilovsky, Benjamin Therien

    arXiv preprint arXiv:2503.02844 ยท 2025

    BibTeX
    @article{singh2025beyond_cosine,
      title={Beyond Cosine Decay: On the Effectiveness of Infinite Learning Rate Schedule for Continual Pre-Training},
      author={Singh, Vaibhav and Janson, Paul and Mehrbod, Paria and Ibrahim, Adam and Rish, Irina and Belilovsky, Eugene and Th{\'e}rien, Benjamin},
      journal={arXiv preprint arXiv:2503.02844},
      year={2025}
    }

    Journal article

  25. Continual Learning via Sparse Memory Finetuning

    Jessy Lin, Luke Zettlemoyer, Gargi Ghosh, Wen-Tau Yih, Aram Markosyan, Vincent-Pierre Berges, Barlas Oguz

    arXiv preprint arXiv:2510.15103 ยท 2025

    BibTeX
    @article{lin2025sparse_memory,
      title={Continual Learning via Sparse Memory Finetuning},
      author={Lin, Jessy and Zettlemoyer, Luke and Ghosh, Gargi and Yih, Wen-Tau and Markosyan, Aram and Berges, Vincent-Pierre and O{\u{g}}uz, Barlas},
      journal={arXiv preprint arXiv:2510.15103},
      year={2025}
    }

    Journal article

  26. Enhancing Online Continual Learning with Plug-and-Play State Space Model and Class-Conditional Mixture of Discretization

    Sihao Liu, Yibo Yang, Xiaojie Li, David A. Clifton, Bernard Ghanem

    Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) ยท 2025

    BibTeX
    @inproceedings{liu2024s6mod,
      title={Enhancing Online Continual Learning with Plug-and-Play State Space Model and Class-Conditional Mixture of Discretization},
      author={Liu, Sihao and Yang, Yibo and Li, Xiaojie and Clifton, David A. and Ghanem, Bernard},
      booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
      year={2025}
    }

    Conference paper

  27. MultiFCL: Multi-Scale Federated Continual Learning

    Jiaqi Yi, others

    Advances in Neural Information Processing Systems (NeurIPS) ยท 2025

    BibTeX
    @inproceedings{yi2025multifcl,
      title={{MultiFCL}: Multi-Scale Federated Continual Learning},
      author={Yi, Jiaqi and others},
      booktitle={Advances in Neural Information Processing Systems (NeurIPS)},
      year={2025}
    }

    Conference paper

  28. Progress & Compress: A Scalable Framework for Continual Learning

    Jonathan Schwarz, Wojciech Czarnecki, Jelena Luketina, Agnieszka Grabska-Barwinska, Yee Whye Teh, Razvan Pascanu, Raia Hadsell

    Proceedings of the International Conference on Machine Learning (ICML) ยท 2018

    BibTeX
    @article{schwarz2018progress,
      title={Progress \& Compress: A Scalable Framework for Continual Learning},
      author={Schwarz, Jonathan and Czarnecki, Wojciech and Luketina, Jelena and Grabska-Barwinska, Agnieszka and Teh, Yee Whye and Pascanu, Razvan and Hadsell, Raia},
      journal={Proceedings of the International Conference on Machine Learning (ICML)},
      year={2018}
    }

    Journal article

  29. Adaptive Pattern Classification and Universal Recoding: I. Parallel Development and Coding of Neural Feature Detectors

    Stephen Grossberg

    Biological Cybernetics, vol. 23, pp. 121-134 ยท 1976

    BibTeX
    @article{grossberg1976art,
      title={Adaptive Pattern Classification and Universal Recoding: {I}. Parallel Development and Coding of Neural Feature Detectors},
      author={Grossberg, Stephen},
      journal={Biological Cybernetics},
      volume={23},
      pages={121--134},
      year={1976}
    }

    Journal article

  30. An Empirical Investigation of Catastrophic Forgetting in Gradient-Based Neural Networks

    Ian J Goodfellow, Mehdi Mirza, Da Xiao, Aaron Courville, Yoshua Bengio

    arXiv preprint arXiv:1312.6211 ยท 2014

    BibTeX
    @article{goodfellow2014empirical,
      title={An Empirical Investigation of Catastrophic Forgetting in Gradient-Based Neural Networks},
      author={Goodfellow, Ian J and Mirza, Mehdi and Xiao, Da and Courville, Aaron and Bengio, Yoshua},
      journal={arXiv preprint arXiv:1312.6211},
      year={2014}
    }

    Journal article

  31. Continual Learning Through Synaptic Intelligence

    Friedemann Zenke, Ben Poole, Surya Ganguli

    Proceedings of the International Conference on Machine Learning (ICML) ยท 2017

    BibTeX
    @inproceedings{zenke2017si,
      title={Continual Learning Through Synaptic Intelligence},
      author={Zenke, Friedemann and Poole, Ben and Ganguli, Surya},
      booktitle={Proceedings of the International Conference on Machine Learning (ICML)},
      year={2017}
    }

    Conference paper

  32. Learning without Forgetting

    Zhizhong Li, Derek Hoiem

    IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 40, no. 12, pp. 2935-2947 ยท 2018

    BibTeX
    @inproceedings{li2017lwf,
      title={Learning without Forgetting},
      author={Li, Zhizhong and Hoiem, Derek},
      booktitle={IEEE Transactions on Pattern Analysis and Machine Intelligence},
      volume={40},
      number={12},
      pages={2935--2947},
      year={2018}
    }

    Conference paper

  33. Gradient Episodic Memory for Continual Learning

    David Lopez-Paz, Marc'Aurelio Ranzato

    Advances in Neural Information Processing Systems (NeurIPS) ยท 2017

    BibTeX
    @inproceedings{lopez2017gem,
      title={Gradient Episodic Memory for Continual Learning},
      author={Lopez-Paz, David and Ranzato, Marc'Aurelio},
      booktitle={Advances in Neural Information Processing Systems (NeurIPS)},
      year={2017}
    }

    Conference paper

  34. LoRA: Low-Rank Adaptation of Large Language Models

    Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, Weizhu Chen

    International Conference on Learning Representations ยท 2022

    BibTeX
    @article{hu2022lora,
      title={{LoRA}: Low-Rank Adaptation of Large Language Models},
      author={Hu, Edward J and Shen, Yelong and Wallis, Phillip and Allen-Zhu, Zeyuan and Li, Yuanzhi and Wang, Shean and Wang, Lu and Chen, Weizhu},
      journal={International Conference on Learning Representations},
      year={2022}
    }

    Journal article

  35. Titans: Learning to Memorize at Test Time

    Ali Behrouz, Peilin Zhong, Mahdi Hashemi

    arXiv preprint arXiv:2501.00663 ยท 2025

    BibTeX
    @article{behrouz2025titans,
      title={Titans: Learning to Memorize at Test Time},
      author={Behrouz, Ali and Zhong, Peilin and Hashemi, Mahdi},
      journal={arXiv preprint arXiv:2501.00663},
      year={2025}
    }

    Journal article

  36. It's All Connected: A Journey Through Test-Time Memorization, Attentional Bias, Linear Attention, and Online Optimization

    Ali Behrouz, Mahdi Hashemi

    arXiv preprint arXiv:2504.13173 ยท 2025

    BibTeX
    @article{behrouz2025miras,
      title={It's All Connected: A Journey Through Test-Time Memorization, Attentional Bias, Linear Attention, and Online Optimization},
      author={Behrouz, Ali and Hashemi, Mahdi},
      journal={arXiv preprint arXiv:2504.13173},
      year={2025}
    }

    Journal article

  37. Nested Learning: Efficient Learning with Nested Optimization

    Ali Behrouz, Mahdi Hashemi

    Advances in Neural Information Processing Systems (NeurIPS) ยท 2025

    BibTeX
    @inproceedings{behrouz2025nested,
      title={Nested Learning: Efficient Learning with Nested Optimization},
      author={Behrouz, Ali and Hashemi, Mahdi},
      booktitle={Advances in Neural Information Processing Systems (NeurIPS)},
      year={2025}
    }

    Conference paper

  38. On the Form of Forgetting

    John T Wixted, Ebbe B Ebbesen

    Psychological Science, vol. 2, no. 6, pp. 409-415 ยท 1991

    BibTeX
    @article{wixted1991forgetting,
      title={On the Form of Forgetting},
      author={Wixted, John T and Ebbesen, Ebbe B},
      journal={Psychological Science},
      volume={2},
      number={6},
      pages={409--415},
      year={1991}
    }

    Journal article