CMSC 838B · Student Lecture · November 17, 2026

Understanding catastrophic forgetting during sequential fine-tuning

Why a network that learns a new task loses an old one, what decides how much it loses, and how to prevent it, read through the gradients that training already computes.

Continual Learning Fine-Tuning Gradient Alignment EWC LoRA

P present · ← → move · F full screen · T restart timer · Esc exit

Motivation

Every round of fine-tuning can undo an earlier one


Each round of adaptation moves weights that earlier rounds relied on. When it damages what they taught, that is catastrophic forgetting.

01 Pretrained model broad knowledge
02 Domain fine-tune code, math, medicine
03 Instruction tuning follow requests
04 Safety fix refuse harmful requests
Question After the last round, how much of the earlier rounds is still there?
Alignment tax

RLHF instruction tuning lowered scores on public NLP benchmarks.

Ouyang et al. 2022
Domain fine-tuning

Training Llama-2-7B on code or math lowered its commonsense scores.

Biderman et al. 2024
Safety

Fine-tuning an aligned model on a harmless instruction dataset weakened its refusals.

Qi et al. 2024
Roadmap

Five questions and one running example


  1. The phenomenonWhat is forgetting, and how do we measure it?
  2. Why it happensWhat does the chain rule say about it?
  3. Task similarityWhich pairs of tasks interfere the most?
  4. Preventing itProtect, project, replay, isolate
  5. Fine-tuning todayLoRA, and what two 2026 papers add
Running example

Two tasks, two parameters

Each task is one linear constraint, so its solutions form a line in the plane. The model is small enough to draw, and it already shows every effect in this lecture: forgetting, the role of similarity, and what each fix does.

01 · The phenomenon

1989: a network learns the twos and forgets the ones


  • A backprop network learned single-digit addition facts with a 1 (1+1, 2+1, …), then was trained only on facts with a 2.
  • It learned the twos easily, but after a few training passes on them it got most of the ones wrong.
  • People in similar list-learning experiments forget gradually. The network forgot far more, far faster: catastrophic interference.
  • The underlying tension is the stability–plasticity dilemma: weights that are free to learn are also free to forget.
McCloskey & Cohen 1989 · Ratcliff 1990 · French 1999
TRAIN TASK A TRAIN TASK B 100% 0% accuracy on task A training time → people network
Schematic, not data: accuracy on the first task while the second is trained.
01 · The phenomenon

The setup, and how forgetting is measured


$$\theta_0 \xrightarrow{\ \text{task 1}\ } \theta^\star \xrightarrow{\ \text{task 2},\ T\text{ steps}\ } \theta_T$$
$$F(T) = \mathcal{L}_1(\theta_T) - \mathcal{L}_1(\theta^\star)$$

Forgetting is the rise in the old task's loss (or the drop in its accuracy) caused by the new training.

Accuracy matrix, three tasks in sequence

after training on ↓ / tested on → task 1 task 2 task 3
task 1 95 – –
task 2 61 94 –
task 3 48 70 96
  • Average accuracy \(\mathrm{ACC} = \tfrac1T\sum_j R_{T,j}\) = 71.3
  • Backward transfer \(\mathrm{BWT} = \tfrac{1}{T-1}\sum_{j<T}(R_{T,j}-R_{j,j})\) = −35.5; negative means forgetting
Illustrative numbers · metrics from Lopez-Paz & Ranzato 2017

Keep in mind

  • Three settings: task-, domain- and class-incremental; the last is hardest.
  • In LLM fine-tuning task 1 is everything the model already knew, measured on held-out benchmarks.
  • Report learning with forgetting. A model that never moves never forgets, so compare on a learning–forgetting frontier.
  • Upper bound: joint training on all tasks at once.
van de Ven & Tolias 2019
02 · Why it happens

Not a capacity problem: the toy model


Task \(k\): \(\mathcal{L}_k(\theta) = \tfrac12(u_k^\top\theta - 1)^2\), so its solutions form a line. Joint training would find the crossing, which solves both tasks. Fine-tuning stops elsewhere.

02 · Why it happens

Forgetting is accumulated gradient conflict


Fine-tune by gradient flow, \(\dot\theta = -\nabla\mathcal{L}_2(\theta)\), and apply the chain rule to task 1's loss:

$$\frac{d}{dt}\,\mathcal{L}_1(\theta_t) = \nabla\mathcal{L}_1^{\top}\dot\theta_t = -\big\langle \nabla\mathcal{L}_1,\ \nabla\mathcal{L}_2 \big\rangle$$
$$F(T) = -\int_0^T \big\langle \nabla\mathcal{L}_1(\theta_t),\ \nabla\mathcal{L}_2(\theta_t) \big\rangle\, dt$$

Forgetting is the negative alignment of the two tasks' gradients, accumulated along the fine-tuning path.

∇L₁ ∇L₂ Aligned · \(\langle\cdot,\cdot\rangle > 0\)

Task 1 improves too: positive transfer.

∇L₁ ∇L₂ Orthogonal · \(\langle\cdot,\cdot\rangle = 0\)

No first-order effect on task 1.

∇L₁ ∇L₂ Conflicting · \(\langle\cdot,\cdot\rangle < 0\)

Task 1's loss rises: forgetting.

Cost: two backward passes and a dot product. Split per weight, the terms \(-\partial_i\mathcal{L}_1\,\partial_i\mathcal{L}_2\) say where forgetting happens; Synaptic Intelligence (Zenke et al. 2017) accumulates the same path integral per weight.

In more detail

Discrete steps and other optimizers

With SGD at step size \(\eta\), a Taylor expansion of \(\mathcal{L}_1\) around the current point gives

$$\Delta\mathcal{L}_1 = -\eta\,\langle \nabla\mathcal{L}_1, \nabla\mathcal{L}_2 \rangle + \tfrac{\eta^2}{2}\,\nabla\mathcal{L}_2^{\top} H_1 \nabla\mathcal{L}_2 + O(\eta^3),$$

so the identity holds up to a curvature correction that grows with the step size. With a preconditioned optimizer whose update is \(-\eta P\nabla\mathcal{L}_2\) (Adam is approximately diagonal \(P\)), the first-order term becomes \(-\eta\,\nabla\mathcal{L}_1^{\top} P\, \nabla\mathcal{L}_2\): the alignment is measured in the optimizer's metric.

The sign of the integrand is exactly what gradient-projection methods control. GEM keeps it non-negative for every stored task, and OGD makes it zero to first order (part 4).

02 · Why it happens

Near the old optimum, curvature decides


Right after task 1, \(\nabla\mathcal{L}_1(\theta^\star) \approx 0\), so the integrand starts at zero. Expand to second order in \(\Delta\theta = \theta_T - \theta^\star\):

$$F \approx \tfrac12\,\Delta\theta^{\top} H_1\, \Delta\theta = \tfrac12 \sum_k \lambda_k\,\big(v_k^{\top}\Delta\theta\big)^2$$
  • Direction matters more than distance. Sharp directions (large \(\lambda_k\)) are expensive; flat ones are nearly free.
  • Network Hessians have a few large eigenvalues and a bulk near zero, so most directions are flat.
  • \(F \le \tfrac12\lambda_{\max}\|\Delta\theta\|^2\): flatter minima and smaller updates forget less.
  • Autodiff gives \(H_1 v\) for about the cost of two gradients. The Fisher information is a cheap stand-in for \(H_1\), which is where EWC comes from.
Sagun et al. 2017 · Mirzadeh et al. 2020 · Pearlmutter 1994
θ* flat direction little forgetting sharp direction much forgetting TASK-1 LOSS CONTOURS
Two moves of the same length from \(\theta^\star\). Only the one across the contours costs task 1.
02 · Why it happens

Step size shapes how costly it is to move


Real optimizers take finite steps. One step of size \(\eta\) on task 2 changes task 1's loss by

$$\Delta\mathcal{L}_1 = -\eta\,\langle g_1, g_2\rangle + \tfrac{\eta^2}{2}\,g_2^{\top}H_1\,g_2 + O(\eta^3)$$
  • Relative to the gradient, bigger steps let curvature win. The second term grows like \(\eta^2\), so even orthogonal gradients forget.
  • The step size also shapes the landscape. Full-batch gradient descent raises the sharpness until \(\lambda_{\max}\approx 2/\eta\): the edge of stability.
  • So step size enters twice. Larger task-1 steps leave a flatter \(\theta^\star\); larger task-2 steps move further from it.
  • Landscape views: continual and multitask solutions are often joined by a straight low-loss path, and LLMs sit in basins that fine-tuning can stay inside.
Cohen et al. 2021 · Mirzadeh et al. 2021 · Chen et al. 2025
0 1.0 task-1 loss θ* 0.3 away distance moved from θ* by fine-tuning 0.90 0.23 η₁ = 0.1 λmax ≈ 20 η₁ = 0.4 λmax ≈ 5
Quadratic model with the edge-of-stability sharpness \(\lambda_{\max} = 2/\eta_1\). The same move costs four times more at the minimum trained with a four-times-smaller step.

In more detail

Where the \(\eta^2\) term comes from

One step on task 2 moves \(\Delta\theta = -\eta g_2\). Expanding \(\mathcal{L}_1\) to second order around the current point gives the formula on the slide. The ratio \(\eta\,g_2^\top H_1 g_2 / (2\,|g_1^\top g_2|)\) says which term decides: below 1 the gradient alignment does, above 1 the curvature does. Projection methods such as OGD zero only the first term, so at large steps they still forget. With Adam, \(\eta\) is replaced by the optimizer's per-parameter effective step.

The edge of stability

On a quadratic with curvature \(\lambda\), gradient descent with step \(\eta\) is stable only if \(\eta < 2/\lambda\). Cohen et al. (2021) found that full-batch training of real networks keeps sharpening until \(\lambda_{\max}\) reaches about \(2/\eta\), then hovers there; SGD settles somewhat lower, and adaptive optimizers show the same effect for their preconditioned sharpness. Kalra et al. (2023) describe these sharpness dynamics as universal across architectures. For forgetting, this means the step size used to train task 1 sets the sharpness of \(\theta^\star\), and with it the bound \(\tfrac12\lambda_{\max}\|\Delta\theta\|^2\). Rofin et al. (2026) find the same link in LLMs: pretraining that ends with a decayed learning rate leaves a sharper model that forgets more during fine-tuning.

Looking at the landscape directly

Two-dimensional slices of the loss through chosen points, with filter-normalized directions (Li et al. 2018), show the geometry behind these numbers. Mirzadeh et al. (2021) found that, from a shared initialization, continual and multitask solutions are connected by a straight low-loss path, and built a continual-learning method (MC-SGD) on it. For LLMs, Chen et al. (2025) find basin-shaped landscapes: inside a basin the model's abilities barely change, while the worst-case direction is sharp, so a small move along it can destroy them.

03 · Task similarity

Forgetting peaks at intermediate similarity


In the toy model, put the two tasks at angle \(\varphi\) and call \(c = \cos\varphi\) their similarity. Fine-tuning to convergence gives

$$F(c) = \tfrac12\,\underbrace{(1-c)^2}_{\text{movement}}\;\underbrace{c^2}_{\text{sensitivity}}$$
  • Identical tasks (\(c=1\)): nothing new to learn, so no movement.
  • Unrelated tasks (\(c=0\)): you move only where task 1 is blind.
  • In between, real movement along a direction task 1 depends on. The peak is at \(c=\tfrac12\).
  • The same shape appears in exact linear-regression theory, teacher–student networks and CIFAR classifiers.
Evron et al. 2022 · Lee et al. 2021 · Ramasesh et al. 2021
0 1 0 0.5 1 unrelated identical task similarity c = cos φ forgetting (scaled to peak 1) movement (1−c)² sensitivity c²
Forgetting is the product of two opposing trends, so it vanishes at both ends and peaks in the middle.

In more detail

Deriving the curve

Take \(u_1 = (1,0)\) and \(u_2 = (\cos\varphi, \sin\varphi)\). Gradient descent on task 1 from \(\theta_0 = 0\) moves only along \(u_1\) and stops at \(\theta^\star = u_1\). Gradient descent on task 2 from there moves only along \(u_2\) and stops at \(\theta_T = u_1 + (1-c)\,u_2\), the nearest point of the task-2 line. Then \(u_1^\top\theta_T - 1 = (1-c)\,c\), so \(F = \tfrac12 (1-c)^2 c^2\). Because the task loss is quadratic, the second-order formula \(\tfrac12\Delta\theta^\top H_1\Delta\theta\) with \(H_1 = u_1u_1^\top\) is exact here.

03 · Task similarity

Teacher–student theory: similarity is not one number


Teacher A Teacher B defines task 1 defines task 2 READOUT similarity of v FEATURE similarity of W
Two teacher networks define two tasks. Their input-to-hidden weights \(W\) (features) and hidden-to-output weights \(v\) (readouts) can be made similar independently.
  • Setup. A two-layer student learns teacher A, then teacher B, by online SGD. In the high-dimensional limit its learning curves follow exact ODEs.
  • Features: forgetting is worst for intermediately similar teachers and small for aligned or orthogonal ones. Orthogonal teachers can live in separate hidden units; correlated ones are hard to separate.
  • Readouts act differently: high readout similarity makes forgetting start faster, and orthogonal features with aligned readouts give the smallest peak forgetting.
  • When you measure matters: initial, peak and long-run forgetting can rank the same task pairs differently.
  • Real networks agree: in image classifiers, forgetting peaks at intermediate similarity and sits mostly in the deeper layers.
Lee, Goldt & Saxe, ICML 2021 · Ramasesh et al., ICLR 2021
04 · Preventing it

Four families of fixes, compared


Family Protects task 1 by Works well when Struggles when
ProtectEWC, SI penalizing moves of the weights task 1 is sensitive to there are few tasks, and no old data may be kept many tasks (penalties pile up); new classes arrive without task labels; long fine-tunes
ProjectGEM, A-GEM, OGD removing the conflicting part of each step gradients conflict, and a small memory is allowed tasks are very similar, so little is left to learn in; many tasks
Replaybuffer, data mixing training on some old data alongside the new any old data can be kept; it works in every setting data can't be stored (privacy, licensing); the buffer is too small
Isolateadapters, LoRA limiting which weights can change the task is known at test time one model must serve every task without labels; it learns less

EWC: Elastic Weight Consolidation (next slide) · SI: Synaptic Intelligence · GEM: Gradient Episodic Memory · A-GEM: Averaged GEM · OGD: Orthogonal Gradient Descent (slide 14) · LoRA: Low-Rank Adaptation (slide 16)

Every family buys remembering with some learning: the update is smaller, slower or restricted.

In more detail

Which term of the forgetting identity each family acts on

Protect methods shrink the second-order term \(\tfrac12\Delta\theta^\top H_1\Delta\theta\) by making moves along sensitive directions expensive. Project methods control the sign of the first-order integrand \(\langle\nabla\mathcal{L}_1,\nabla\mathcal{L}_2\rangle\). Replay changes the objective itself: adding old data puts \(\nabla\mathcal{L}_1\) back into every step, which approximates joint training. Isolate methods restrict which directions can move at all. Other members of each family include MAS (Memory Aware Synapses) and LwF (Learning without Forgetting, which distills the old model's outputs) for protect, GPM (Gradient Projection Memory) for project, generative replay for replay, and progressive networks and PackNet for isolate.

What each family costs

Protect: one importance value per weight, per task. Project: stored examples or gradient directions, and extra backward passes each step. Replay: storage for the buffer and extra compute every step. Isolate: parameters that grow with the number of tasks.

The "works well" and "struggles" columns summarize the methods' own assumptions and the comparisons cited in this lecture: regularization methods break down when new classes arrive without task labels while replay does not (van de Ven & Tolias 2019), even tiny replay buffers are strong (Chaudhry et al. 2019), and LoRA learns less as well as forgetting less (Biderman et al. 2024).

04 · Preventing it

Elastic Weight Consolidation (EWC)


Bayes: everything about task 1 sits in its posterior,

$$\log p(\theta\mid\mathcal{D}_1,\mathcal{D}_2) = \log p(\mathcal{D}_2\mid\theta) + \log p(\theta\mid\mathcal{D}_1) + \text{const}$$

Laplace: \(p(\theta\mid\mathcal{D}_1)\approx\mathcal{N}(\theta^\star, F^{-1})\), \(F\) = diagonal Fisher.

$$\mathcal{L}(\theta) = \mathcal{L}_2(\theta) + \sum_i \frac{\lambda}{2}\,F_i\,\big(\theta_i-\theta^\star_i\big)^2$$

A spring on every weight, as stiff as task 1 is sensitive to it.

  • The Fisher approximates \(H_1\) at \(\theta^\star\): the penalty is the second-order forgetting estimate.
  • Permuted MNIST: SGD forgets, uniform L2 cannot learn, EWC keeps both. Atari games in sequence, too.
  • Limits: diagonal approximation, a \(\lambda\) to tune, springs that pile up over many tasks.
Kirkpatrick et al., PNAS 2017
θ* SGD uniform L2 EWC LOW ERROR FOR TASK 1 LOW ERROR FOR TASK 2
EWC moves along task 1's flat direction into the overlap. Redrawn after Kirkpatrick et al. 2017, Fig. 1.

In more detail

Why the Fisher, and why it works

The diagonal Fisher is \(F_i = \mathbb{E}_{x,\,y\sim p(y\mid x,\theta^\star)}\big[(\partial_{\theta_i}\log p(y\mid x,\theta^\star))^2\big]\): the average squared gradient of the model's log-likelihood, one number per weight.

For a model trained with negative log-likelihood, the Fisher information equals the expected Hessian of the loss under the model's own predictive distribution. Near a good fit it is a close, always positive semi-definite approximation to \(H_1\), and its diagonal needs only per-example gradients, which autodiff provides. With more than two tasks, one keeps a penalty per old task or a running sum of Fishers (online EWC); the anchors then accumulate and the model gradually loses plasticity.

04 · Preventing it

Projection: GEM, A-GEM and OGD


Each keeps something from task 1, then edits every task-2 gradient \(g\) before the step.

GEM Gradient Episodic Memory
Keeps a few examples per old task. If \(g\) conflicts with an old task's gradient \(g_k\), meaning \(\langle g, g_k\rangle < 0\), it uses the closest gradient that conflicts with none.
A-GEM Averaged GEM
One check against the average gradient on the memory, \(g_{\text{ref}}\). On conflict it removes the conflicting part: \(g - \frac{\langle g, g_{\text{ref}}\rangle}{\|g_{\text{ref}}\|^2}\,g_{\text{ref}}\).
OGD Orthogonal Gradient Descent
Stores gradients of the model's outputs on old examples, and always removes those directions from \(g\).

In the identity's terms: GEM and A-GEM keep the integrand \(\ge 0\); OGD makes it zero to first order.

Lopez-Paz & Ranzato 2017 · Chaudhry et al. 2019 · Farajtabar et al. 2020

In more detail

What the toy model shows

The demo runs the three rules on the two-parameter model for 40 steps each. Plain fine-tuning falls off task 1's line. OGD's stored direction is the gradient of task 1's output, \(u_1\), so it slides along task 1's line straight to the joint solution. A-GEM's reference is the gradient of task 1's loss on its memory, which is zero at \(\theta^\star\) because task 1 is at its optimum. Its first step therefore goes through unchanged, and the forgetting from that step stays; after that it behaves like OGD. With one old task, GEM's quadratic program has a single constraint and gives the same step as A-GEM.

GEM's quadratic program

GEM solves \(\min_{\tilde g}\tfrac12\|g-\tilde g\|^2\) subject to \(\langle\tilde g, g_k\rangle\ge 0\) for every old task \(k\), in its dual, which has one variable per old task. A-GEM replaces the constraints with a single one on the averaged memory gradient, which has the closed-form projection on the slide.

04 · Preventing it

Which fix should you use?


If you see Try Why
Some old data can be kept: a small buffer, or general pretraining data for an LLM Replay puts \(\nabla\mathcal{L}_1\) back into every step, close to joint training
The task is known at test time Isolate: an adapter or LoRA per task the old task's weights never change
Indicator 1, at \(\theta^\star\). The gradients conflict: \(\cos(\nabla\mathcal{L}_1,\nabla\mathcal{L}_2) < 0\) over a few batches Project: OGD, or A‑GEM with a memory removes the first-order term of forgetting
Indicator 2, at \(\theta^\star\). Task 1 is sharp: large \(\lambda_{\max}\), or Fisher mass on few weights Protect: EWC, plus a smaller step shrinks the second-order term \(\tfrac12\Delta\theta^\top H_1\Delta\theta\)
Gradients roughly orthogonal or aligned, and a flat \(\theta^\star\) Plain fine-tuning, a modest step both terms are small; keep checking old-task scores

Check from the top and combine rows that apply. These are rules of thumb from the methods' assumptions and the results in this lecture, not guarantees. Intermediate task similarity is the riskiest case (slide 10). For LLMs, a common combination is LoRA plus a little replay of general data.

05 · Fine-tuning today

LoRA: train a low-rank update, freeze the rest


W0 d × k · FROZEN + B d × r A r × k only B and A train B = 0 at start, A random update scaled by α/r
Rank \(r \ll \min(d,k)\). After training, the product is merged into the frozen weights, so inference costs nothing extra.
  • On GPT-3 175B: about 10,000× fewer trainable parameters and 3× less GPU memory, at full fine-tuning quality.
  • The same chain rule, now through the factorization:
$$\frac{d}{dt}\mathcal{L}_1 = -\big\langle G_1,\ BB^{\top}G_2 + G_2A^{\top}A \big\rangle$$

\(G_i = \partial\mathcal{L}_i/\partial W\). Task 2 can interfere only through rank-\(r\) projections.

  • At the start \(B = 0\), so only \(G_2A^\top A\) acts: alignment is measured inside the row space of a random \(A\).
Hu et al., ICLR 2022 (arXiv 2021)

In more detail

Deriving the LoRA expression

With \(W = W_0 + BA\), the chain rule gives \(\partial\mathcal{L}/\partial B = G A^{\top}\) and \(\partial\mathcal{L}/\partial A = B^{\top} G\). Under gradient flow on task 2, \(\dot B = -G_2A^\top\) and \(\dot A = -B^\top G_2\), so \(\dot W = \dot B A + B\dot A = -(G_2A^{\top}A + BB^{\top}G_2)\). Then \(\tfrac{d}{dt}\mathcal{L}_1 = \langle G_1, \dot W\rangle\) gives the formula on the slide. Compared with full fine-tuning, where \(\dot W = -G_2\), the task-2 gradient is filtered through the projections \(A^\top A\) (rank \(r\), acting on inputs) and \(BB^\top\) (rank \(r\), acting on outputs). The \(\alpha/r\) scale only rescales time.

05 · Fine-tuning today

LoRA learns less, and forgets less


  • Llama-2-7B trained on code and math, by continued pretraining and by instruction tuning. Learning: HumanEval, GSM8K. Forgetting: HellaSwag, ARC-Challenge, WinoGrande.
  • LoRA learned less than full fine-tuning, most clearly in continued pretraining, but kept more of the base model.
  • It forgot less than weight decay or dropout, and higher rank moved it toward full fine-tuning.
  • Full fine-tuning's weight change has 10–100× the rank of typical LoRA settings.

"Forgets less" is partly "moves less". Fair comparisons need the whole frontier.

Biderman et al., TMLR 2024
learned on the new task → kept from the old tasks → SCHEMATIC compare at equal learning base model LoRA r=16 r=64 r=256 full fine-tuning
Schematic. Rank moves LoRA along the trade-off; whether it beats full fine-tuning at equal learning depended on the domain.
05 · Fine-tuning today

2026: two views of the mechanism


Per parameter · Yang et al. 2026

Freeze the weights that conflict

Injecting new facts \(\mathcal{I}\) into an LLM that has mastered facts \(\mathcal{M}\). One step changes the mastered loss by \(-\eta\sum_j s_j\), with

$$s_j = \frac{\partial\mathcal{L}_{\mathcal{M}}}{\partial\theta_j}\,\frac{\partial\mathcal{L}_{\mathcal{I}}}{\partial\theta_j}$$
  • 50–75% of weights conflict (\(s_j < 0\)); the rest collaborate.
  • Update only weights with \(s_j \ge 0\). On Qwen2.5 and Llama-3.2 (1–7B), this learned 20–48% more new facts than baselines, with negligible forgetting.
  • It is the first-order identity, applied one weight at a time.
In attention dynamics · Koubbi et al., ICML 2026

LoRA as a perturbation of token flow

  • Toy transformer: tokens are particles on a sphere, moved by self-attention layer after layer. They form clusters that stand for the model's representations.
  • LoRA perturbs the value matrix; forgetting is drift away from the pretrained clusters.
  • Phase transitions: small perturbations stay near the clusters, larger ones escape, and drift appears beyond a critical depth. The spectral gap of the value matrix sets the threshold.
  • On Qwen3-0.6B, base-task loss jumps once the perturbation norm passes a threshold, and trained LoRA updates lock onto the dominant value directions.

Both say what EWC says: forgetting is how far you move, weighted by how sensitive that direction is.

06 · Open questions

What is still open, and where my project fits


Open questions

  • Which similarity? Input overlap, representation similarity (CKA), gradient alignment and Fisher overlap can disagree, and none is an agreed predictor.
  • Fair comparisons. "Forgets less" is confounded with "learns less"; few papers report frontiers.
  • Prediction, not post-mortem. Estimate before fine-tuning how much will be forgotten, and where.
  • Beyond one step. Long chains of fine-tunes, Adam's preconditioning, and LLM scale.
My course project

Predicting forgetting from gradients

  • At \(\theta^\star\), compute gradient alignment, sensitivity (diagonal Fisher, Hutchinson) and LoRA's projected alignment with torch.func.
  • Fine-tune along similarity ladders: teacher–student networks and a small pretrained LM, full fine-tuning vs. LoRA \(r \in \{4, 16, 64\}\).
  • Score each predictor against measured forgetting, on the learning–forgetting frontier.
  • Make the predictors step-size aware, and check them against slices of the loss landscape.
semihakkoc.github.io/cmsc838b
Takeaways

Five things to remember


  1. Forgetting comes from the optimization path, not from missing capacity. A joint solution usually exists; fine-tuning does not look for it.
  2. By the chain rule, forgetting is accumulated gradient conflict, \(-\int\langle\nabla\mathcal{L}_1,\nabla\mathcal{L}_2\rangle\,dt\). Near the old optimum it is curvature-weighted movement, \(\tfrac12\Delta\theta^\top H_1\Delta\theta\), and the step size sets both the curvature and the movement.
  3. Similarity is non-monotonic. Identical and unrelated tasks are safe; related but different tasks forget most.
  4. Every fix constrains the update. Penalize sensitive directions (EWC), remove conflicting components (GEM, OGD), replay old data, or restrict the update (LoRA). Each trades learning for remembering.
  5. All of these quantities are derivatives: gradient inner products and Hessian–vector products, which autodiff computes at the scale of real models.
Discussion

Questions for the class


  1. If a solution that is good for both tasks exists, why does SGD not find it, and what would make it? Think about the toy model: what information about task 1 does the fine-tuning gradient carry?
  2. Is forgetting always bad? Unlearning and safety patches want targeted forgetting; benign fine-tuning that erodes safety is forgetting nobody wanted.
  3. EWC and the curvature view assume we stay near \(\theta^\star\). After a long fine-tune, should we still trust them? What would you measure to check?
Reading list

Where to start


Core readings

  • Kirkpatrick et al. Overcoming catastrophic forgetting in neural networks. PNAS 2017
  • Lee, Goldt & Saxe. Continual learning in the teacher–student setup: impact of task similarity. ICML 2021
  • Hu et al. LoRA: low-rank adaptation of large language models. ICLR 2022
  • Yang et al. Collaborative parameter learning: mitigating forgetting via parameter-level gradient analysis. arXiv 2601.21577, 2026
  • Koubbi, Hernandez & Boussard. Understanding catastrophic forgetting in LoRA via mean-field attention dynamics. ICML 2026

Going further

  • McCloskey & Cohen 1989; French 1999. origins and review
  • Biderman et al. LoRA learns less and forgets less. TMLR 2024
  • Lopez-Paz & Ranzato 2017 (GEM); Farajtabar et al. 2020 (OGD). projection
  • Ramasesh et al. 2021; Evron et al. 2022. similarity
  • Mirzadeh et al. 2020, 2021. curvature, training regimes, mode connectivity
  • Cohen et al. 2021; Chen et al. 2025. step size and loss landscapes
  • van de Ven & Tolias 2019. three continual-learning scenarios

Thank you

Questions?

References

Works cited


  1. J. Kirkpatrick et al. Overcoming Catastrophic Forgetting in Neural Networks. PNAS 2017. Core reading
  2. S. Lee, S. Goldt, A. Saxe. Continual Learning in the Teacher-Student Setup: Impact of Task Similarity. ICML 2021. Core reading
  3. E. J. Hu et al. LoRA: Low-Rank Adaptation of Large Language Models. ICLR 2022 (arXiv 2021). Core reading
  4. M. Yang et al. Collaborative Parameter Learning: Mitigating Forgetting via Parameter-Level Gradient Analysis. arXiv:2601.21577, 2026 (v1 titled "Learning the Mechanism of Catastrophic Forgetting: A Perspective from Gradient Similarity"). Core reading
  5. H. Koubbi, L. Hernandez, M. Boussard. Understanding Catastrophic Forgetting in LoRA via Mean-Field Attention Dynamics. ICML 2026 (arXiv:2402.15415). Core reading
  6. M. McCloskey, N. J. Cohen. Catastrophic Interference in Connectionist Networks: The Sequential Learning Problem. Psychology of Learning and Motivation 24, 1989.
  7. R. Ratcliff. Connectionist Models of Recognition Memory: Constraints Imposed by Learning and Forgetting Functions. Psychological Review, 1990.
  8. R. M. French. Catastrophic Forgetting in Connectionist Networks. Trends in Cognitive Sciences, 1999.
  9. D. Lopez-Paz, M. Ranzato. Gradient Episodic Memory for Continual Learning. NeurIPS 2017.
  10. A. Chaudhry et al. Efficient Lifelong Learning with A-GEM. ICLR 2019.
  11. A. Chaudhry et al. On Tiny Episodic Memories in Continual Learning. arXiv 2019.
  12. M. Farajtabar, N. Azizan, A. Mott, A. Li. Orthogonal Gradient Descent for Continual Learning. AISTATS 2020.
  13. F. Zenke, B. Poole, S. Ganguli. Continual Learning Through Synaptic Intelligence. ICML 2017.
  14. V. Ramasesh, E. Dyer, M. Raghu. Anatomy of Catastrophic Forgetting: Hidden Representations and Task Semantics. ICLR 2021.
  15. I. Evron, E. Moroshko, R. Ward, N. Srebro, D. Soudry. How Catastrophic can Catastrophic Forgetting be in Linear Regression? COLT 2022.
  16. S. I. Mirzadeh, M. Farajtabar, R. Pascanu, H. Ghasemzadeh. Understanding the Role of Training Regimes in Continual Learning. NeurIPS 2020.
  17. L. Sagun et al. Empirical Analysis of the Hessian of Over-Parametrized Neural Networks. 2017.
  18. B. A. Pearlmutter. Fast Exact Multiplication by the Hessian. Neural Computation, 1994.
  19. G. M. van de Ven, A. S. Tolias. Three Scenarios for Continual Learning. arXiv 2019.
  20. D. Biderman et al. LoRA Learns Less and Forgets Less. TMLR 2024.
  21. L. Ouyang et al. Training Language Models to Follow Instructions with Human Feedback. NeurIPS 2022.
  22. X. Qi et al. Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To! ICLR 2024.
  23. J. Cohen, S. Kaur, Y. Li, J. Z. Kolter, A. Talwalkar. Gradient Descent on Neural Networks Typically Occurs at the Edge of Stability. ICLR 2021.
  24. D. S. Kalra, T. He, M. Barkeshli. Universal Sharpness Dynamics in Neural Network Training: Fixed Point Analysis, Edge of Stability, and Route to Chaos. arXiv 2023.
  25. M. Rofin, A. Varre, N. Flammarion. (How) Learning Rates Regulate Catastrophic Overtraining. COLM 2026.
  26. H. Li, Z. Xu, G. Taylor, C. Studer, T. Goldstein. Visualizing the Loss Landscape of Neural Nets. NeurIPS 2018.
  27. S. I. Mirzadeh, M. Farajtabar, D. Gorur, R. Pascanu, H. Ghasemzadeh. Linear Mode Connectivity in Multitask and Continual Learning. ICLR 2021.
  28. H. Chen et al. Unveiling the Basin-Like Loss Landscape in Large Language Models. arXiv 2025.