Does an LSTM forget more than a CNN? An empirical study of catastrophic forgetting in NLP
Paper · 2019 · Gaurav Arora, Afshin Rahimi and Timothy Baldwin
Summary
A neural network can learn to classify questions, then lose much of that ability while learning to judge the sentiment of a review. This is catastrophic forgetting. It matters when training data arrive a task at a time and examples from earlier tasks are unavailable for rehearsal. Arora and colleagues study what makes forgetting more or less severe under those conditions. They train networks on different orderings of the same four English text classification tasks and evaluate each task on held-out examples. Their measure asks how much of the performance above a majority-class baseline survives from the end of a task’s own training to the end of the sequence.
With ordinary learned embeddings, the best convolutional neural network, or CNN, retained more than the best long short-term memory network, or LSTM, on the paper’s main comparison. On the sequence TREC → SUBJ → SST → CoLA, the lowest sequence forgetting scores for those configurations were 0.71 for the CNN and 1.52 for the LSTM. Lower scores mean better retention. Replacing max pooling with average pooling raised forgetting in all the single-layer CNN comparisons shown for that sequence. Max pooling sends the gradient through the locations that produced the strongest features, which gives the authors a possible explanation for the effect. The single-layer average-pooling CNN still retained more than the corresponding LSTM, so pooling accounts for part of the observed difference.
The ranking changed when the authors supplied fixed, pretrained ELMo word embeddings. On the same sequence, a single-layer LSTM with hidden dimensionality 400 had a forgetting score of 0.58 with ELMo frozen and 2.57 when ELMo was updated for each task. The paper calls this updating fine-tuning. Frozen ELMo helped both encoder families and gave the LSTM the lowest forgetting score in the architecture comparison. Greater capacity offered no consistent protection. Adding layers was particularly costly for the CNN, while the effect of making a layer wider depended on the order of the tasks.
Order mattered even though every full sequence contained the same datasets. In the paper’s ranking of task orders, the leading sequences ended with sentiment or grammatical acceptability, the harder tasks by the authors’ definition. The lowest-ranked sequences ended with question classification, a task on which a simple CNN came relatively close to the published benchmark. Question classification also generally took more epochs when trained second in the two-task runs. The study therefore connects retention to choices about both the network and its training schedule. Its evidence about difficulty applies to these tasks and stopping rules, where a task that is easy to score well on can still be disruptive to learn late.
Deep dive: Does an LSTM forget more than a CNN? An empirical study of catastrophic forgetting in NLP
An empirical study of when LSTMs and CNNs forget earlier text classification tasks, and how pooling, frozen embeddings, and task order affect retention. · about 34 minutes to read
The problem and its context
What survives a change of task?
In transfer learning, an earlier training stage supplies parameters that can help with a later task. Continual learning adds a requirement. The system must remain useful on tasks it has already learned even as the data available for training change. A network that adapts quickly to the current task can still be a poor continual learner if each adaptation damages the representations needed by earlier classifiers. The paper studies this tension by giving a network access to the training data for its current task while withholding the training data for earlier ones.
The separation between a shared encoder and a task-specific classifier makes the problem concrete. The encoder turns a text into features. Each classifier reads those features and selects a label from its own task’s label set. After switching from subjectivity classification to question classification, for example, the network has a reason to change which features it produces. Its old subjectivity classifier can retain its learned weights and still lose accuracy. It now reads an encoder whose outputs have moved in response to a different objective. Keeping the old classifier is therefore only one part of keeping the old capability.
The experiment distinguishes what can be used for a training update from what can be measured. Earlier training examples are unavailable during adaptation, but the researchers can still evaluate earlier tasks on their held-out data. Without that distinction, the current task’s score could look satisfactory while the loss of earlier abilities went unnoticed. It also clarifies what the authors mean by forgetting. They track a change in task performance across training stages. The object of measurement is the behavior of the earlier classifier when attached to the current shared encoder.
Where the question came from
The paper traces the problem to earlier studies of sequential training that looked at factors such as network width and the amount of new learning. The studies found that making further gains on a new task could hurt performance on earlier tasks. Another finding was that a lower learning rate could protect performance on earlier tasks but make it harder to learn the new task. This creates a tradeoff whenever retention is the only number in view. A network can change little and preserve its previous behavior, but the point of the new training stage is to learn something useful.
The transfer-learning literature supplied a related motivation. The authors describe earlier work in which transfer was easier for similar tasks and less dependable when the source and target diverged. Overwriting shared features during adaptation is one reason to examine how far that transfer can go. The earlier study they cite on task similarity examines how transferable neural networks are in NLP.
Several lines of prior work suggested that the form of an update mattered as much as its size. Sharp activation functions were proposed as a way of letting different tasks use different parts of a network. Other empirical work found a retention benefit from dropout and treated the choice of activation as something to validate for the task. A study using a maximum operation also reported less forgetting. The natural question for Arora and colleagues was whether an ordinary architectural difference could produce some of the same effect. A CNN with max pooling already routes learning through a selected set of activations, making it a practical comparison with a standard LSTM encoder.
There were also methods designed specifically to limit interference. The paper discusses knowledge distillation as a way of constraining changes to a shared representation while adapting to a new classification problem. The idea is to use the earlier system’s behavior as a training signal, so the new task’s labels are only part of what guides adaptation. The current paper uses the risk of encoder drift to motivate its experiments. Its primary comparisons vary the architecture and which parameters may change. The work it cites for distillation is Distilling the Knowledge in a Neural Network.
ULMFit supplied an example from LSTM transfer learning. As the authors describe it, ULMFit used layer-wise training choices and a text representation combining the last hidden state with maximum and mean summaries of the sequence of states. It also used strategies such as gradual unfreezing and different fine-tuning settings across layers. Arora and colleagues isolate a narrower question suggested by that combination. If pooling helps control interference, changing the pooling operator while leaving the general CNN design in place should reveal some of its contribution. Comparing the original CNN and LSTM alone would leave that question entangled with the rest of their architectures.
Pretrained contextual representations raised a separate issue. They can bring information learned from a large corpus to a new classification task, with a vector for a word that reflects its context. The paper discusses prior evidence of forgetting while updating ELMo and BERT and mentions an experiment in which sampling across tasks improved joint performance. Sampling requires continued access to the other tasks during training. The authors’ protocol creates a different condition by letting each new task train in isolation. The work they cite for that contrast is Learning and Evaluating General Linguistic Intelligence.
The paper also distinguishes its question about pretrained representations from the earlier comparison of fixed and adapted features across diverse tasks by Peters and colleagues. In a sequential experiment, the decision to update a representation persists beyond the task that prompted it. A useful change for the current classifier can alter the inputs of every earlier classifier. The earlier study supplies the question of when to tune, and the continual setting supplies a different outcome to measure. That earlier comparison is To Tune or Not to Tune? Adapting Pretrained Representations to Diverse Tasks.
Why vary the order as well as the network?
Earlier empirical studies discussed in the paper examined sequential interference with pairs of tasks. A pair tells the researchers what happens to a particular earlier task when a specific next task is learned. Longer sequences allow several rounds of changes to accumulate. The effect of adding sentiment classification, for example, can depend on whether the shared encoder has already been trained for subjectivity or grammatical acceptability. Training the same tasks in different orders produces different learning histories while keeping the set of problems constant.
The authors also draw on earlier work on task complexity and variation across a sequence. They distinguish the difficulty of achieving a strong score on a task from the interference that task creates when it is learned. The practical question is whether a task that is hard for a simple architecture should be presented early, giving it the first opportunity to shape the shared features, or late, after other tasks have been learned. Changing the order makes this a testable question. The paper measures the consequences for earlier capabilities while keeping each task’s evaluation benchmark fixed.
These threads lead to four experimental comparisons. The authors ask whether recurrent and convolutional encoders differ in retention, whether pretrained contextual features should remain fixed, whether more depth or width helps, and whether difficult tasks cause greater interference when they arrive. The questions are related but distinguishable. Adding a layer changes the encoder’s capacity. Freezing a representation changes which parameters can move. Moving a task changes the data and objective that produce an update at a particular stage. The experiments use these different levers to examine the same outcome.
The method, step by step
Train a task, keep its classifier, and move on
A run starts with an ordered list of tasks. For each task in turn, the network trains on that task’s data and uses its own classifier to predict its labels. When the training stage ends, the shared encoder carries its learned parameters into the next stage. Each earlier task keeps its classifier, so it can be evaluated again after later training. The authors compare the score when a task has just been learned with its score after the full sequence. They also show trajectories for selected runs to make the intermediate changes visible.
Training and measuring retention across a task sequence
The steps in order.
The shared encoder creates continuity across tasks. If each task received an independent encoder, subsequent training would have no direct path to modify the earlier task’s features. Here the feature extractor is precisely the part reused. The new classifier receives supervision from the new task, and the loss updates the trainable components that feed it. An earlier classifier receives no corresponding supervision with which to adapt to those changes. At evaluation, the appropriate classifier supplies a prediction using the features the shared network produces at that point.
The stage boundaries give each task a reference point. For a sequence such as TREC → SUBJ → SST → CoLA, the reference for TREC is the network just after learning question classification. The reference for SST is later, when sentiment training has finished. Both are evaluated again after CoLA. Their reference networks have different training histories, so a forgetting score measures a change from the state reached in that run. A task’s score in an independent single-task experiment plays a different role. It helps characterize the task, while the sequence’s own score supplies the baseline for calculating forgetting.
The datasets and their roles in the sequence
TREC asks the network to assign a question to one of 6 coarse categories. The output is a question type. In this paper’s setup, that makes TREC a classification problem despite its origins in a question answering benchmark. Its published reference accuracy and the accuracy of a simple CNN are relatively close. The paper uses that relationship to place TREC among the easier tasks for these architectures. The benchmark background comes from the TREC question answering track.
SUBJ is a binary classification task drawn from IMDB reviews. It asks whether a passage expresses a subjective viewpoint or is objective. This distinction gives the network a different target from sentiment. A text can express an opinion, which is what the subjectivity classifier needs to notice, while the sentiment classifier must decide what kind of evaluation the text conveys. The dataset is associated with the paper A Sentimental Education.
SST, the Stanford Sentiment Treebank, assigns sentiment across five classes. The authors regard SST as the hardest task in their setup. They point to stronger results from approaches that use contextual representations and to earlier work that designed a recursive architecture around an explicit constituency tree. Their own sequential experiment places SST in the same general encoder-and-classifier framework as the other tasks. The contrast with the earlier tree-based approach helps explain why the benchmark score and the simple CNN score can be far apart. The dataset comes from the work on recursive networks and the Sentiment Treebank.
CoLA, the Corpus of Linguistic Acceptability, asks whether a sentence is grammatical. The authors consider it moderately difficult for their setup and use Matthews correlation to score its predictions because the dataset is unbalanced. Matthews correlation relates the predicted labels to the true labels. The other tasks use accuracy, the share of predictions that match the target. This difference is one reason the authors need a common scale before combining results across tasks.
The main experiment covers all 24 orders of the four tasks. Each order contains each task once. Moving a task therefore changes the training history leading into it, the updates that follow it, or both. The pairwise experiment takes a complementary view. The authors run all twelve ordered pairs and measure what happens to the first task after training on the second. Reversing a pair changes the direction of the test. Learning question types after subjectivity and learning subjectivity after question types expose different classifiers to different updates.
The encoders and trainable representations
The LSTM is a recurrent encoder. It builds a hidden state as it processes the sequence, carrying information forward through successive text positions. The width of that state is the LSTM’s hidden dimensionality. The experiments use the standard implementation from the software library the authors chose for building their networks. They also tried bidirectional LSTMs, which process the sequence in both directions. The reported architecture comparisons use the standard LSTM. The implementation library is AllenNLP.
A CNN forms features by applying learned filters over local spans. The authors use a filter width of two, so a convolution can respond to patterns across neighboring positions. The number of output channels gives the CNN’s hidden dimensionality. Each channel can respond at multiple positions, and pooling turns those responses into a fixed set of features that the classifier can read. The authors extend the originally single-layer CNN encoder to allow more layers and apply pooling after the final convolutional layer.
Max pooling keeps the largest response for a feature across the positions of the input. Average pooling combines responses across those positions by taking their mean. The forward computation changes which evidence is visible to the classifier. The backward computation changes which intermediate responses receive a learning signal. A maximum directs that signal through the selected response. An average distributes it across the responses that formed the mean. The authors change that operation within the CNN to test whether it contributes to retention.
The embedding experiments introduce ELMo as a contextual feature source feeding either kind of encoder. In the fixed condition, its pretrained parameters are held constant during every stage. The encoder above ELMo and the current classifier can still learn. In the fine-tuned condition, updates for each successive task can change ELMo itself. Thus the downstream classifier may have to operate with changes at both the contextual embedding and encoder levels. The comparison is with the CNN and LSTM settings that use ordinary randomly initialized embeddings, with additional regularized variants reported separately. The contextual representation is introduced in Deep Contextualized Word Representations.
The distinction between representation and encoder is important for interpreting these conditions. A fixed ELMo LSTM still has a trainable recurrent encoder. Freezing ELMo preserves a common source of features, while the layers above it remain a route for interference. Fine-tuning ELMo expands the set of trainable parameters that previous tasks depend on. It also provides more freedom to adapt those features to the current task. The experiment compares the retention consequences of those choices under the same sequential access to data.
Optimization, stopping, and capacity
The training settings specify Adam as the optimizer and 0.001 as the learning rate. The batch size is 128, dropout is 0.5, and patience is 10. The listed embedding dimension is 128 and the ELMo hidden size is 1024. To decide when to stop training early, the authors monitor Matthews correlation on CoLA and loss on all other tasks. Early stopping gives each stage a stopping point based on its progress. It means that how long the encoder is exposed to a task can vary with the task and its position in the sequence.
The capacity sweep goes up to four layers and considers hidden dimensionalities of 100, 400, 900, and 1400. The authors describe sixteen configurations formed from the depth and width choices. More channels let a CNN produce more features at a layer, while a wider LSTM has a larger hidden state. Added depth gives either encoder additional transformations through which features and gradients can pass. Because width and depth change different parts of the computation, the authors analyze their effects separately.
To test a further training choice, the authors run L2-regularized variants with weight decay set to 0.0001. Weight decay applies a common pressure on parameter magnitudes through training. In this setup it neither freezes selected weights nor gives special protection to the features an earlier classifier already uses. This distinction matters when translating a regularization result into a claim about retention. The comparison concerns the chosen weight decay with the paper’s training settings, which already include dropout.
The authors average results over five runs with different random seeds. This reduces the influence of any single initialization or training trajectory on the reported averages. The paper also makes the code for the experiments available. The main architecture comparison, the pooling substitution, the width analysis, and the task-order analysis report particular slices of the full set of training runs. The captions and setting labels matter when comparing their numerical results.
Turning task scores into retention scores
A raw drop in accuracy can have a different meaning across tasks. A task with a strong majority baseline starts with a different amount of room above that baseline from a task whose majority label is rarely sufficient. CoLA also uses a different raw metric from the accuracy tasks. To put the outcomes on a common scale, the paper anchors performance for each task to the result of always predicting the majority class and to a published state-of-the-art result for that task.
P[i,j] = (PER[i,j] − PERₘₐⱼ) / (PERₛₒₜₐ − PERₘₐⱼ), for i ≤ j
Here i is the position of the task being evaluated and j is the position of the task whose training has just finished. The condition i ≤ j restricts the measure to tasks that have already been trained. PER[i,j] is the raw held-out performance of task i at that point. PERₘₐⱼ is the majority-class score for task i, and PERₛₒₜₐ is the published state-of-the-art score for that task. The baseline symbols suppress the index i because the relevant task is understood from the score being normalized. The minus signs denote subtraction. The slash divides the performance above the majority baseline by the gap between the two anchors. P[i,j] is the normalized score. A negative value for P[i,i] means the newly trained classifier scored below its task’s majority baseline.
Normalization provides a way to describe the score at any evaluated point in the sequence. To measure forgetting, the authors take the proportional change between the point when the task had just been trained and the point when the entire sequence was complete. This choice makes the task’s own attained performance the immediate reference. The starting point incorporates whatever effects the preceding stages already had by the time that task finished training.
Fᵢ = (P[i,i] − P[i,T]) / P[i,i]
Fᵢ is the forgetting score of the task at position i. T is the position of the last task. P[i,i] is the normalized performance immediately after training task i, and P[i,T] is the normalized performance of that same task at the end. Subtraction measures how far the task’s score has fallen. Dividing by P[i,i] expresses that change relative to the task’s own starting score. With a positive starting score, a lower final score gives positive forgetting and an improved final score gives negative forgetting. The authors sometimes use the task name as the subscript when discussing a particular sequence, so Fₜᵣₑ꜀ refers to the forgetting of TREC at whichever position it occupies.
The final task has its immediate and final evaluations at the same stage. Its contribution is therefore zero whenever the fractional score is defined. The measure can register the consequences of learning that task through the earlier classifiers. It says nothing further about how the final task would fare if training continued and introduced another task.
Fₛₑq = Σᵢ₌₁ᵀ Fᵢ
Fₛₑq is the forgetting score for the full sequence. Σ means to add the terms, with i running from the first position, 1, through the terminal position, T. Each Fᵢ is the relative drop just defined. A lower Fₛₑq means better retention according to this measure. The authors describe it as an adaptation of backward transfer, which asks how later training changes performance on previous tasks. Their aggregate adds relative changes, so its value reflects both losses and any gains among the previously learned tasks.
Experiments and results
How to read the benchmark scores
The authors give three points of reference for each dataset. The published state-of-the-art result supplies the upper normalization anchor. The majority-class score supplies the lower anchor. A single-layer CNN trained on that dataset alone gives a separate indication of what the authors’ basic architecture can achieve without a sequence of task changes. The values below are those benchmark references. The sequence comparisons that follow calculate their retention scores using held-out test performance.
| Dataset | Metric | Published benchmark | Majority class | Single-task CNN |
|---|---|---|---|---|
| TREC | Accuracy | 0.98 | 0.19 | 0.91 |
| SUBJ | Accuracy | 0.96 | 0.50 | 0.92 |
| CoLA | Matthews correlation | 0.34 | 0.00 | 0.25 |
| SST | Accuracy | 0.55 | 0.25 | 0.38 |
The individual-task CNN is reasonably close to the published score on TREC and SUBJ in the authors’ assessment. They view SST as a stronger challenge for a simple CNN or LSTM and discuss CoLA as a task that also benefits from specialized techniques. The benchmark table gives substance to their use of difficulty. It is based on what a simple architecture can attain relative to a reference result for that dataset. A large or small raw score on its own would tell a reader less, especially across accuracy and correlation.
The main retention results use another unit. A sequence forgetting score is a sum of relative changes in task performance. A score such as 0.71 describes the aggregate loss relative to the tasks’ own starting scores. It is distinct from the accuracy of an individual classifier or the accuracy of the network averaged across datasets. The ability to return to the raw benchmark for each task is useful because similar forgetting scores can arise from different levels of original performance.
The architecture comparison
The headline architecture table uses TREC → SUBJ → SST → CoLA. Its ordinary CNN and LSTM columns let the reader compare encoders before introducing ELMo. For the single-layer networks, the CNN has a clear retention advantage at both of the hidden widths shown. The best ordinary CNN entry is 0.71 and the best ordinary LSTM entry is 1.52. Both are the scores for hidden dimensionality 100. The comparison across depth shows where this separation narrows.
Ordinary CNN and LSTM sequence forgetting on held-out TREC → SUBJ → SST → CoLA
The shallow CNN has the lowest sequence forgetting and the encoder gap narrows with greater depth.
The numbers
| System or setting | Sequence forgetting |
|---|---|
| CNN, 1 layer, hidden size 100 (this paper) | 0.71 |
| LSTM, 1 layer, hidden size 100 | 1.52 |
| CNN, 1 layer, hidden size 400 | 0.76 |
| LSTM, 1 layer, hidden size 400 | 2.24 |
| CNN, 2 layers, hidden size 100 | 1.51 |
| LSTM, 2 layers, hidden size 100 | 2.23 |
| CNN, 3 layers, hidden size 100 | 2.03 |
| LSTM, 3 layers, hidden size 100 | 2.04 |
At hidden dimensionality 100, the CNN begins with a sizable lead as a single-layer encoder and is nearly tied with the LSTM at 3 layers. The wider configurations qualify a broad architecture ranking further. At 3 layers and hidden dimensionality 400, the ordinary CNN records 2.04 and the ordinary LSTM records 1.81 for the same held-out sequence. The best shallow settings support the paper’s headline answer. The deeper comparison shows that the answer depends on how the encoders are built.
The paper’s first figure follows the sequence for a single layer and hidden size 100, the best ordinary setting for each architecture in the main table. A trajectory serves a different purpose from the endpoint total. The total tells the reader how much forgetting persists at the end. Scores plotted over training stages show when a learned capability comes under pressure. The authors also report that their bidirectional LSTM trials produced only small reductions in forgetting and leave those results out of the detailed comparison.
Fixed and adapted ELMo
The ELMo columns use the same task order and retention metric. The sharpest comparison is within the single-layer LSTM with hidden dimensionality 400. Its forgetting score is 0.58 with fixed ELMo and 2.57 with fine-tuned ELMo. Its ordinary entry is 2.24. Within this configuration, allowing the contextual representation to change loses the retention advantage associated with having it fixed. For the corresponding CNN, fixed ELMo gives 0.63 and fine-tuned ELMo gives 1.46, compared with 0.76 in the ordinary setting.
Fixed and fine-tuned ELMo versus ordinary embeddings on held-out TREC → SUBJ → SST → CoLA
Freezing ELMo gives the lowest forgetting for both shallow encoders and puts the LSTM ahead.
The numbers
| System or setting | Sequence forgetting |
|---|---|
| Ordinary CNN, 1 layer, hidden size 400 | 0.76 |
| Ordinary LSTM, 1 layer, hidden size 400 | 2.24 |
| CNN with fixed ELMo, 1 layer, hidden size 400 | 0.63 |
| LSTM with fixed ELMo, 1 layer, hidden size 400 (this paper) | 0.58 |
| CNN with fine-tuned ELMo, 1 layer, hidden size 400 | 1.46 |
| LSTM with fine-tuned ELMo, 1 layer, hidden size 400 | 2.57 |
The same comparison shows a change in which encoder is ahead. In the ordinary settings, the shallow CNN retains more, and it also has the lower forgetting score with fine-tuned ELMo. In the fixed condition, the LSTM has the lower score at the single-layer widths shown. At hidden dimensionality 100, the fixed CNN scores 0.77 and the fixed LSTM scores 0.71. At this width the ordinary CNN’s 0.71 is already a little lower than its fixed-ELMo result. The fixed condition’s benefit is strongest and clearest when comparing it with the fine-tuned condition, and the change from ordinary embeddings depends on the individual setting.
The fixed-embedding comparison addresses the behavior of the whole classifier stack. A score of 0.58 establishes that the earlier held-out tasks collectively retained more of their attained performance in that run condition. It leaves open which ELMo features the downstream LSTM preserved or reused. The authors suggest that the similarity between the recurrent structure of ELMo and the recurrent encoder above it might explain the especially favorable LSTM results. That is an interpretation of the reversal rather than a measurement of feature compatibility.
The pooling substitution
The pooling experiment keeps the task order and compares versions of the CNN with max and average pooling. Across the single-layer runs shown, max pooling gives lower sequence forgetting at every reported width. For hidden dimensionality 100, the max setting scores 0.71 and the average setting scores 0.97. The second figure follows this comparison across the sequence at that shallow setting. The separate pooling table also gives a contrast at greater depth.
Max and average CNN pooling on held-out TREC → SUBJ → SST → CoLA
Max pooling gives the lowest forgetting in shallow CNNs, while the comparison varies at greater depth.
The numbers
| System or setting | Sequence forgetting |
|---|---|
| Max pooling, 1 layer, hidden size 100 (this paper) | 0.71 |
| Average pooling, 1 layer, hidden size 100 | 0.97 |
| Max pooling, 1 layer, hidden size 400 | 0.75 |
| Average pooling, 1 layer, hidden size 400 | 0.97 |
| Max pooling, 1 layer, hidden size 900 | 0.72 |
| Average pooling, 1 layer, hidden size 900 | 0.90 |
| Max pooling, 2 layers, hidden size 100 | 1.66 |
| Average pooling, 2 layers, hidden size 100 | 1.61 |
| Max pooling, 2 layers, hidden size 900 | 1.58 |
| Average pooling, 2 layers, hidden size 900 | 2.18 |
The evidence for max pooling is cleanest in the single-layer comparison. In the 2-layer CNN with hidden dimensionality 100, average pooling instead gives the lower score, 1.61. At hidden dimensionality 400 in the 2-layer pooling experiment, the max score is 1.72 and the average score is 1.83, restoring the shallow ordering. The chart uses the values from the dedicated pooling comparison. In particular, the main architecture table separately reports an ordinary 2-layer CNN score of 1.51 at hidden dimensionality 100 for the same named sequence. The paper shows both results under their respective comparisons, so the scores are best cited with their table contexts.
The shallow average-pooling result also puts the proposed mechanism in proportion. At hidden dimensionality 100, its 0.97 is above the shallow max-pooling CNN’s 0.71 but below the ordinary LSTM’s 1.52. The substitution therefore reproduces only part of the separation between the two encoder types in this setting. Convolution and recurrence still build the features that are summarized in different ways. This experiment identifies a contribution from pooling while leaving the remaining difference open.
Where task order changes the outcome
For the full-length sequences, the authors report observed sequence forgetting ranging from 0.63 to 1.81 across different orders. They also rank orders for a single-layer network by taking each order’s minimum forgetting across hidden dimensionalities 100, 400, and 900. The ranking answers which orders attained better retention somewhere among those widths. Its entries are minima over configurations, so they describe the order comparison on that basis.
In that ranking, TREC → SUBJ → CoLA → SST has a minimum held-out sequence forgetting score of 0.63. TREC → SUBJ → SST → CoLA has 0.78, and SST → TREC → SUBJ → CoLA has 0.81. The orders at the other end are CoLA → SUBJ → SST → TREC at 1.3, SST → CoLA → SUBJ → TREC at 1.4, and CoLA → SST → SUBJ → TREC at 1.4. The authors’ main pattern is visible in the final positions. The leading orders finish with either SST or CoLA, and the bottom orders all finish with TREC. The score of 0.78 is the entry in this order ranking. The ordinary CNN score of 0.71 for the same order belongs to the separate architecture table, and the paper gives no reconciliation of those entries.
The two-task experiment makes the direction of interference easier to inspect. In a single-layer network of hidden dimensionality 100, learning TREC after SUBJ results in held-out forgetting of 0.46 for SUBJ. Learning SST after SUBJ gives 0.17 for the same earlier task. Learning CoLA after SUBJ gives 0.35. The pairwise setup keeps the first task fixed while changing the second, so these numbers describe how one previously learned capability responds to different later objectives.
The reverse directions answer different questions. TREC’s forgetting is 0.08 when SST follows it and 0.09 when CoLA follows it, compared with 0.15 when SUBJ follows it. Those differences help explain why the position of TREC can matter at both ends of a full sequence. TREC is fairly well retained when learned before SST or CoLA in the pairwise setup, while learning TREC after SUBJ creates substantial interference for subjectivity. The early and late positions thus expose different roles for the same task.
The authors recorded how many epochs, or passes over the task’s training data, the second stage used. With SUBJ first, the second stage averaged 14.6 epochs for TREC and 10.6 for SST. With CoLA first, TREC as the second task used 16.4 epochs. With SST first, the TREC stage used 16.2 epochs. These are training durations for the two-task configuration, alongside the held-out forgetting results. TREC generally trains longer as the later task. This gives the authors a candidate explanation for its greater interference, since the shared encoder is repeatedly updated for TREC before the earlier task is evaluated again.
What the ablations show
Pooling changes which activations carry an update
The architectural comparison provides an observation to explain. In the best ordinary shallow settings, CNNs forget less than LSTMs. A comparison of complete encoders leaves many possible sources for that difference. The pooling substitution changes one operation inside the CNN, retaining the convolutional design and comparing matched depths and widths within the pooling experiment. When the average-pooling version forgets more in the shallow settings, it shows that the operator affects retention even within a single encoder family.
Consider a channel whose strongest response comes from one span under a question classification objective. Max pooling uses that selected response to form the feature presented to the classifier. During training the loss sends the learning signal through that selected location for the channel. For a different input, another span may win. Across examples and tasks, different selected locations can create different paths for the gradient. Average pooling gives every response in the average a route to the classifier, distributing the signal across more positions. The authors propose that this difference lets max pooling reduce competition between tasks at the level of their encoder updates.
For a convolution, the same filter is reused across positions. As a consequence, selecting an activation route describes where a learning signal enters the convolutional computation. It does not identify a permanent set of weights reserved for one classification task. A selected response in different texts can still depend on the same learned filter, and subsequent tasks can still alter that filter. Sparsity at the pooling operation therefore supplies a plausible mechanism for reduced interference. The experiment measures forgetting after changing pooling, while parameter overlap and task-specific routes remain unmeasured.
The average-pooling CNN’s continued advantage over the shallow LSTM is equally informative. It suggests that the CNN has retention properties beyond the presence of a maximum operation. The exception at greater depth likewise sets a boundary on the mechanism. With the maximum at the end of a deeper stack, gradients from a selected final response still pass through the intermediate transformations that produced it. The authors suggest experimenting with pooling after more layers. Their reported substitution establishes the effect of the two operators at the final layer, under the given depth and width settings.
Depth and width answer different capacity questions
A larger encoder could make more features available to different tasks. It could also change more extensively while fitting the current training data. The depth results give little support to a simple expectation that extra representational capacity protects past capabilities. The best scores in the ordinary CNN and LSTM columns occur at a single layer. The increase in forgetting is particularly visible when the CNN moves from a single layer to 2 layers. In the ordinary CNN column at hidden dimensionality 100, the scores for the main sequence are 0.71 at a single layer, 1.51 at 2 layers, and 2.03 at 3 layers.
The LSTM results vary with width and depth together. At hidden dimensionality 400 the ordinary LSTM scores 2.24 at a single layer, 2.11 at 2 layers, and 1.81 at 3 layers for the same task sequence. This is compatible with the best LSTM score overall coming from the shallower, narrower configuration. It also shows why claims about the best setting and claims about changing a single factor need separate support. A change that looks unfavorable when comparing the best of each depth can behave differently with width fixed.
The width analysis uses a single-layer CNN without pretrained embeddings. It contrasts dimensionalities 100 and 900 and reports the values for 100 together with increases or decreases at 900. For CoLA → SST → TREC → SUBJ, the narrower configuration has a held-out sequence forgetting score of 0.99. At width 900, the paper reports an increase of +0.23 in the sequence score. CoLA, learned first, has an increase in forgetting of +0.61, while SST, learned next, has a change of −0.33. The shared encoder responds to widening in a way that harms retention for one task and helps it for another.
For SST → CoLA → TREC → SUBJ, the held-out total at width 100 is 1.36 and the reported change at 900 is −0.41. For SUBJ → CoLA → SST → TREC, the total at width 100 is 1.81 and the change at 900 is −0.59. Those cases show that additional channels sometimes help. In the orders beginning with TREC or CoLA highlighted in the width analysis, the narrower setting has less sequence forgetting. Across all 24 orders, the authors say only four have an absolute difference greater than 0.3 between the two widths. The results support treating width as a choice whose effect depends on the task history.
This analysis also exposes a limitation of a single aggregate when diagnosing capacity. A new feature can help the old sentiment classifier while the altered representation makes the acceptability classifier less accurate. The total sums those changes. The individual scores reveal which learned capabilities are affected. That detail is especially useful here because the width change leaves the order intact, so the opposite changes for CoLA and SST occur within the same run condition.
Weight decay and freezing protect different things
The authors add L2 regularization to test whether controlling parameter magnitudes helps with the possible overfitting of networks with greater capacity. The ordinary and regularized variants provide a direct comparison. On TREC → SUBJ → SST → CoLA, the single-layer CNN of hidden dimensionality 100 gives 0.71 without the added weight decay and 0.97 with it. The corresponding LSTM entries are 1.52 and 1.78. Other entries vary, and the authors conclude that weight decay offered no consistent reduction in forgetting. The paper distinguishes this result from earlier studies of dropout, which intervene differently in training.
Freezing ELMo is a far more specific constraint. It preserves the mapping from input text to the pretrained contextual representation throughout the sequence. The network can still change how it uses that representation, but every earlier classifier continues to depend on the same ELMo features through the encoder above them. With ordinary weight decay, shared features can move at each task transition. The direct fixed-versus-fine-tuned comparison therefore answers a different question from the regularization sweep. Its results show that preserving the contextual feature source is associated with better retention under the tested updates.
The favorable fixed-ELMo setting also cautions against attributing all of the CNN–LSTM difference to recurrence. The downstream encoder remains recurrent in the best fixed-ELMo result. What has changed is the representation supplied to it and the freedom the training process has to alter that representation. Likewise, the better retention of the fine-tuned CNN relative to the fine-tuned LSTM establishes an ordering within that adaptation regime. The authors suggest specialized update schedules because unrestricted changes performed poorly here. The reported experiments establish the size of the effect for freezing and ordinary fine-tuning, with those specialized schedules left to be tested.
Pairwise comparisons separate direction from history
A full sequence can reveal which orders work well, but it combines multiple ways for interference to arise. The early task has more subsequent training stages during which its features can change. Tasks in the middle begin from an encoder already shaped by training on something else. The final task creates the last update to the common encoder, and its own forgetting is zero by construction. The two-task comparison removes the intervening stages. It asks what changes for one specific classifier after one specific transition.
The contrast between TREC and SST after SUBJ is a good example. The same earlier capability is being measured, and the later task changes. The observed forgetting of 0.46 after TREC versus 0.17 after SST puts a concrete scale on the idea that the authors’ easier task can create more interference. Given the corresponding training durations of 14.6 and 10.6 epochs, the authors suggest that more training on the later task helps explain this result. Task identity, training duration, and the change requested of the encoder vary together in this comparison. The run is informative about what happened under the stopping protocol, while the causal role of duration remains open.
The longer histories add something the pairwise design cannot capture by itself. The authors report that CoLA’s held-out score improves after SST in TREC → SUBJ → CoLA → SST at hidden dimensionality 900, giving CoLA a negative forgetting contribution. In the direct pair CoLA → SST, CoLA’s forgetting is 0.16 under the pairwise setting of a single layer and hidden dimensionality 100. The longer sequence begins CoLA training from features already shaped by TREC and SUBJ, and the width differs across those comparisons. The authors point to the earlier tasks as a possible explanation for the improvement. The available tests establish that the outcome can change with the setup and leave the source of that beneficial transfer unresolved.
Limitations
Limits the authors identify
The authors describe their definition of difficulty as loose. They compare what a simple CNN or LSTM can achieve with the published benchmark for a task. On that definition, SST is hard for this setup, while TREC and SUBJ are easier. Changing the encoder, representations, or published reference could change those judgments. Establishing a definition of difficulty specifically for continual learning would require a wider variety of tasks and more extensive experiments. The sequence findings show the importance of the order for these datasets and this measure of difficulty.
The authors leave open the mechanism behind the unusual improvement on CoLA. They report it for the TREC → SUBJ → CoLA → SST sequence at hidden dimensionality 900 and identify it as the only negative task-level forgetting they observed. Their suggestion that prior TREC or SUBJ training contributed is plausible within their setup. The test combines that preceding history with the given width and the final SST training stage. The experiment that isolates which of those choices creates the improvement remains to be done.
They also identify architectural questions for future study. Their multilayer CNN pools after the final layer. The larger forgetting scores at greater depth prompt the suggestion that intervening pooling could help, but the reported experiments use the final-layer design. Likewise, the large gap between fixed and fine-tuned ELMo motivates specialized techniques that control which layers are updated and when. The paper refers to ULMFit as an example of that direction. Its own results cover the freezing and fine-tuning regimes it tested.
Limits visible in the design
The benchmark is broad in task order and narrow in task type. All tasks are English text classification, with a task-specific classifier selected when the network is evaluated. A system that must infer which task it is solving at test time faces an additional problem. So does one whose previous and current work must share a label space or an output layer. This experiment focuses on interference through a shared encoder, and the separate heads make that mechanism easier to see.
The absence of old training data is central to the setup. It answers a useful question about learning when past examples are unavailable. Rehearsal, simultaneous training, and methods that constrain updates using stored information would create different comparisons. The retention ranking of an LSTM and a CNN could depend on how such a method shapes their updates. The experiment likewise leaves generalization to much longer learning histories open. Exhausting the orders of a particular collection of tasks gives good coverage of that collection, while the interaction of depth, width, and task order elsewhere requires separate evidence.
The architecture comparison also changes many things at once. A standard LSTM and a width-two convolution followed by pooling process text differently. Matching hidden dimensionality does not match parameter counts or the transformations available to each architecture. The controlled pooling comparison is valuable because it narrows that gap in interpretation. Its scope stays within the tested CNN design. In particular, the paper’s hypothesis about sparse gradient routes is supported indirectly by the outcome of changing pooling. The experiments do not trace how much the updated parameters overlap across tasks.
The duration observation has a similar scope. The authors record the number of epochs and find that TREC generally trains longer as a second task. The stopping rule for CoLA uses Matthews correlation, while the other tasks use loss. A comparison at matched training duration or under a common stopping intervention would address whether the number of updates itself accounts for the order effect. The available results support an association under the paper’s training protocol. They leave open how much of the effect follows from the gradient directions needed for a particular task, how much follows from the duration, and how much follows from their interaction.
The forgetting score favors retention of whatever performance was attained when a task finished training. A reader assessing practical usefulness also needs to know how good each task was at that starting point and how well it performs at the end. Two configurations could have similar relative drops while achieving different levels of final usefulness. The order ranking has another built-in feature. Because it takes a minimum over several widths for each order, a high rank indicates a good attainable result among the tested choices. An order that is consistently favorable under a fixed width is a different claim.
There are mathematical consequences to the normalization as well. For a given task, both normalized scores in the individual forgetting fraction have the same state-of-the-art-to-majority divisor. That common factor cancels in the fraction. The state-of-the-art anchor affects the reported normalized performance, while the individual forgetting ratio depends on how much performance above the majority baseline was retained. If the task initially lands on that baseline, the ratio has a zero denominator. If it begins below the baseline, the denominator becomes negative and changes the interpretation of the sign. The authors mention that negative normalized starting scores can occur. Their reported comparison does not specify a convention for a zero denominator.
The total can also hide the direction of individual outcomes. An improvement on an earlier task offsets some loss on another because the signed scores are added. The reported improvement on CoLA exemplifies what that means for a real sequence. The underlying task scores and stage trajectories give the fuller picture when the concern is whether every capability survives. The resulting averages represent five seeds, but the main numerical comparisons give no spread across those runs. Small differences, especially those between close CNN configurations, should be read as reported averages with their variability unresolved.
Finally, exact values should travel with their experimental comparison. As reported, some entries in the architecture, pooling, width, and order tables differ even when the task order and some settings look alike. The tables serve different analyses, and the paper does not supply enough detail to reconcile every such entry. The largest patterns are visible within the relevant comparisons, such as fixed versus fine-tuned ELMo and max versus average pooling in shallow CNNs. Cross-table substitutions would make a more precise claim than the paper’s reporting supports.
What came after
The later citing work takes the question of forgetting into several related settings. One paper addresses the adaptation of deep pretrained language systems with the explicit goal of reducing forgetting. This takes up the tension exposed by the ELMo experiment. A useful starting representation gives subsequent classifiers features to work with, while updates to that representation can undermine earlier capabilities. The later paper’s stated focus is fine-tuning with less forgetting. Its citation places that work in conversation with the earlier empirical comparison. The connection concerns the objective of preserving learned behavior during adaptation, with the particular relationship between their experimental procedures left open. Recall and Learn
Another citing study examines the effectiveness of adapter-based tuning for pretrained language adaptation. Its point of contact with Arora and colleagues is the choice of where adaptation happens. The ELMo comparison tests the effect of keeping the contextual component fixed or letting task training update it. An adapter-based approach makes the components used for adaptation an explicit design choice and gives researchers another way to frame the question of which parameters should absorb task-specific changes. The citation connects the two studies at that level. Their reported topics alone give no basis for assigning a particular forgetting result to the adapter study. On the Effectiveness of Adapter-based Tuning
The third citing work puts continual learning in text generation for task-oriented dialogue systems. The setting changes what a retained skill looks like. In Arora and colleagues’ experiment, the system must continue assigning the right label to an input after additional training. In dialogue generation, the task concerns producing language. The shared concern is that a system trained sequentially should remain capable of earlier work as it learns new tasks. The citation establishes that the classification study is part of the later work’s background. How the later work measures retention and which parts of the earlier design it adopts remain unspecified. Continual Learning for Natural Language Generation in Task-oriented Dialog Systems
Cite
Cite as Gaurav Arora, Afshin Rahimi and Timothy Baldwin. 2019. Does an LSTM forget more than a CNN? An empirical study of catastrophic forgetting in NLP. Proceedings of the 17th Annual Workshop of the Australasian Language Technology Association.
@inproceedings{arora2019does,
title = {{Does an LSTM forget more than a CNN? An empirical study of catastrophic forgetting in NLP}},
author = {Gaurav Arora, Afshin Rahimi and Timothy Baldwin},
booktitle = {Proceedings of the 17th Annual Workshop of the Australasian Language Technology Association},
year = {2019},
url = {https://aclanthology.org/U19-1011/}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/arora-2019-does-lstm-forget-more-than/