T OWARDS C ONTINUAL K NOWLEDGE L EARNING OF L ANGUAGE M ODELS
Anonymous authors
Paper under double-blind review
A BSTRACT
Large Language Models (LMs) are known to encode world knowledge in their parameters as they pretrain on a vast amount of web corpus, which is often utilized for performing knowledge-dependent downstream tasks such as question answering, fact-checking, and open dialogue.
In real-world scenarios, the world knowledge stored in the LMs can quickly become outdated as the world changes, but it is non-trivial to avoid catastrophic forgetting and reliably acquire new knowledge while preserving invariant knowledge.
To push the community towards better maintenance of ever-changing LMs, we formulate a new continual learning (CL) problem called Continual Knowledge Learning (CKL).
We construct a new benchmark and metric to quantify the retention of time-invariant world knowledge, the update of outdated knowledge, and the acquisition of new knowledge.
We adopt applicable recent methods from literature to create several strong baselines.
Through extensive experiments, we ﬁnd that CKL exhibits unique challenges that are not addressed in previous CL setups, where parameter expansion is necessary to reliably retain and learn knowledge simultaneously.
By highlighting the critical causes of knowledge forgetting, we show that CKL is a challenging and important problem that helps us better understand and train ever-changing LMs.
I NTRODUCTION
Recent works have shown that large Language Models (LM), such as T5 (Raffel et al., 2019) and
GPT-3 (Brown et al., 2020), have the capability of storing a tremendous amount of world knowledge in their parameters when pretrained on a vast corpus of text (Petroni et al., 2019).
These pretrained
LMs have shown potential to serve as knowledge bases when probed for world knowledge without any ﬁnetuning through the LAnguage Model Analysis (LAMA) task (Petroni et al., 2019), which requires probing LMs for world knowledge in a zero-shot manner through slot-ﬁlling, and promising results utilizing the encoded world knowledge when ﬁnetuned on various Knowledge Intensive Language Tasks (KILT)
(Petroni et al., 2021), e.g., question answering, knowledgeable open dialogues.
While the world knowledge stored in LMs has diverse use cases, it can quickly become outdated as the world changes fast, and LMs need to frequently renew their internal world knowledge accordingly.
For example, it is impossible to probe for new information such as “ won the US
Election 2020 ” from the original T5 (Raffel et al., 2019) which was pretrained on C4 web corpus from April 2019.
Also, information that may have once been considered accurate may no longer be valid because the information has been updated .
For instance, the answer to “ Which soccer team does Cristiano Ronaldo play for? ” has changed from Juventus to Manchester United in September 2021.
Meanwhile, time-invariant information learned from the original corpus such as “ Barack
Obama was born in Honolulu, Hawaii ” should not be altered within the LMs.
Despite its importance, the challenge of renewing the internal world knowledge stored in the parameters of LMs is nontrivial and has only been explored in rather speciﬁc settings.
For example, recent works have proposed to modify speciﬁc target knowledge such as individual facts (De Cao et al., 2021; Zhu et al., 2020), but the problem of renewing the world knowledge of LMs in a more
[Figure] [Figure]
I NVARIANT LAMA
U PDATED LAMA
N
[Figure]
general and scalable way, such as through continual pretraining on a corpus with the new knowledge, has not been formally formulated or explored by previous works.
Moreover, the community lacks a benchmark that can be used to systematically study how the internal world knowledge of
LMs changes through the training on new information.
Lastly, methodologies to effectively renew the world knowledge of LMs at scale have yet to be thoroughly explored.
In this work, we propose a novel continual learning (CL) formulation named C ONTINUAL K NOWLEDGE L EARNING (CKL), where we attempt to renew the internal world knowledge of LMs through continual pretraining on new corpora.
We systematically categorize world knowledge into three main categories and make benchmark datasets to measure each of them during CKL: (1) I NVARIANT LAMA for time-invariant world knowledge in LMs that should not be forgotten or altered, (2) U PDATED LAMA for outdated world knowledge that needs to be updated in the LMs, and (3)
N EW LAMA for new world knowledge that should be injected into the LMs.
We also propose a novel metric named FUAR ( F ORGOTTEN / ( U PDATED + A CQUIRED ) R ATIO ) that can measure the trade-off between forgetting, updating, and acquiring knowledge.
Finally, while one might think of implementing contemporary CL methods for this benchmark, we show that CKL has nontrivial differences to traditional CL formulations and require approaches speciﬁc to CKL.
We ﬁnd and compare model architectures and training methodologies (Chen et al., 2020; He et al., 2021;
Hu et al., 2021; Wang et al., 2021b) from the literature that have shown potential to mitigate forgetting of knowledge gained during pretraining, establishing them as baselines for the CKL benchmark.
In sum, while the challenge of renewing the internal world knowledge of LMs is essential in realworld scenarios, it has yet to be formulated or extensively explored.
Therefore, in this paper:
• We propose a novel CL formulation called C ONTINUAL K NOWLEDGE L EARNING (CKL) and construct a new benchmark to measure the amount of forgetting and amount of world knowledge gained by continued pretraining on a novel language modeling corpus that we construct, containing new knowledge.
• We explore LM architectures and training methodologies that are natural baselines for CKL in literature, denoting them as CKL methods, and performing extensive experiments on our CKL benchmark.
We categorize them into regularization, rehearsal, and parameterexpansion methods, same as in traditional CL literature, and compare the effectiveness of each type of method using a novel metric named FUAR that we propose to measure the trade-off between forgotten knowledge and updated or acquired knowledge.
• Towards creating an ever-changing LM, we perform extensive analysis in the CKL benchmark and highlight several important challenges and ﬁndings: parameter-expansion methods have the limitation of memory inefﬁciency despite performing the best in most of our experiments, the effectiveness of CKL methods decreases in multiple phases of CKL, and seeing the same data repeatedly during continued pretraining is a critical cause of forgetting.
Also, we show interesting results that need further exploration: learning rate can be varied to balance the forgetting and learning of new knowledge, CKL may help in performing previous-knowledge-intensive tasks after gaining new world knowledge, and CKL methods are transferable across LM architectures despite showing a different trend in performance.
An overview of the proposed CKL benchmark is shown in Figure 1.
R ELATED W ORK
Language Models (LMs) utilizing knowledge from external sources, such as Retrieval-Augmented
Generation (RAG) (Lewis et al., 2020a) and Blender Bot 2.0 (Xu et al., 2021; Komeili et al., 2021), cope with the changing world by updating the external sources during inference or searching the internet for retrieving recent information.
However, recent works have shown that these memoryaugmented models suffer from hallucination , which means that they present false information as if it were correct, despite being given updated knowledge during inference, which worsens as the size of the LM increases (Longpre et al., 2021), making it more so important for implicit parameters to be renewed as well.
In order to renew the internal knowledge of LMs, one might consider pretraining LMs from scratch with a newly updated text corpus of a scale similar to the one used during initial pretraining, such as a recent dump of the entire Wikipedia.
However, this approach is computationally demanding and also environmentally harmful (Patterson et al., 2021).
Another alternative approach is continuing the pretraining process on a much smaller corpus containing new world knowledge, but such a methodology is known to suffer from catastrophic forgetting (McCloskey & Cohen, 1989;
Kirkpatrick et al., 2017), where the models forget previously learned knowledge as they acquire new knowledge.
One might consider implementing Continual Learning (CL) methods (Sun et al., 2020; d’Autume et al., 2019) to address this problem.
However, it is important to note that there are nontrivial differences between traditional CL and the proposed Continual Knowledge Learning (CKL) formulation which make applying traditional CL methods inadequate.
In traditional CL, methods can be largely categorized into regularization , rehearsal , and parameter-expansion methods.
(1) While regularization methods (Kirkpatrick et al., 2017) require identifying important parameters used for previous tasks, exactly how and where the knowledge is stored in the parameters of an LM is currently extremely difﬁcult to identify and localize (Vig et al., 2020; De Cao et al., 2021).
(2) While prior rehearsal methods (Lopez-Paz & Ranzato, 2017) consider learning all of the streams of tasks at once (multi-task learning) as the performance upper-bound and replicate such a setting with samples stored in the episodic memory, a few samples from the pretraining corpus cannot represent the overall world knowledge from the corpus.
Moreover, if LMs are pretrained on a shufﬂed concatenation of stream of corpora, there is no guarantee that the LMs will acquire the correct, recent information from the recent corpora, especially in cases where the former corpora are much bigger than the latter ones, which is shown by experiments in Section 5.1.
(3) Lastly, prior parameterexpansion methods (Rusu et al., 2016; Yoon et al., 2018) focus on learning a stream of different tasks via strong supervision , while in CKL, the focus is constantly updating world knowledge from a stream of corpora via self-supervision .
Because of these fundamental differences, instead of contemporary CL methods mentioned above, we explore methodologies from the literature that are suitable for CKL (Chen et al., 2020;
He et al., 2021;
Hu et al., 2021; Wang et al., 2021b), modifying and adapting each method according to our needs as CKL methods.
Lastly, while it has been pointed out that some of the traditional CL formulations may have little practical importance in real-world scenarios by Prabhu et al.
, CKL is much closer to the initial motivation behind CL, which is that the “fundamental characteristic of natural intelligence is its ability to continually learn new knowledge while updating information about the old ones” (Prabhu et al., 2020).
Details of related works regarding the traditional CL methods and how CKL methods address the fundamental differences are provided in Appendix A.
C ONTINUAL K NOWLEDGE L EARNING (CKL)
In this section, we explain the formulation of the task, the data construction process, and the proposed metric measuring the trade-off between forgetting previous world knowledge and updating and learning of new world knowledge.
3. T ASK F ORMULATION
When viewing the task of renewing the internal knowledge of LMs as one of CL formulations, pretraining on the original corpus can be considered as a previous task , and continued pretraining on new corpus can be considered as the current task , the main objective becoming retaining the time-invariant world knowledge gained through initial pretraining while efﬁciently learning new and updated world knowledge through continued pretraining.
Throughout the paper, we let Drefer to the corpus used for initial pretraining and let D 1 denote the new corpus used for continued pretraining.
New Text Corpus for Language Modeling For LMs to renew their internal knowledge, they need to be continually pretrained on a new text corpus D 1 which has the updated and new information.
D 1 should ideally be much smaller than D 0 , as a large D 1 amounting to the size of D 0 will result in massive computational costs similar to pretraining the LMs from scratch.
For constructing D 1 , we crawl recently published news articles from the web making CC-R ECENT N EWS .
Probing LMs for World Knowledge The most widely used task for probing LMs for world knowledge is the LAnguage Model Analysis (LAMA)
(Petroni et al., 2019) task, which consists of cloze sentences created from a set of knowledge sources using manually deﬁned templates.
We deﬁne that an LM knows a fact if it can successfully predict in a zero-shot manner the masked entity in the cloze sentence, such as “ Dante was born in ” as Florence .
While there may be other alternatives for measuring the world knowledge encoded in LMs 4 , we construct our main datasets as LAMA tasks, while also additionally providing the corresponding question pairs to the cloze sentences for those who want to test on CBQA as well.
Measuring Retention of Time-invariant World Knowledge We deﬁne time-invariant world knowledge as the information present in D 0 that has no possibility of conﬂicting with information from D 1 .
For example, if the information of the birthplace of Barack Obama is present in D 0 , it is unlikely that D 1 contains information that contradicts that fact.
These time-invariant instances should not be changed as LMs are continually pretrained on D 1 .
In order to measure how much timeinvariant information is lost due to catastrophic forgetting during continued pretraining, we create
I NVARIANT LAMA, a subset of LAMA (Petroni et al., 2019), consisting of only time-invariant cloze sentences detailed in Appendix B.1.
Measuring Update of Outdated World Knowledge
In this work, we deﬁne outdated world knowledge as information that is conﬂicting between D 0 and D 1 .
For example, the President of the US may be Barack Obama in D 0 and Joe Biden in D 1 .
In this case, the LM should update its internal knowledge as Joe Biden as the US president.
If an LM is pretrained on both D 0 and Dsimultaneously, there is no guarantee that the LM will acquire the correct, recent information from
D 1 , especially in cases where D 0 is much bigger than D 1 , which is one of the biggest difference between the CKL and traditional CL setting.
For measuring update of outdated information, we construct U PDATED LAMA which is made up of cloze statements for which answers can be found in both D 0 and D 1 , but are conﬂicting.
Measuring Acquisition of New World Knowledge We deﬁne new world knowledge as the information present in D 1 , but not in D 0 .
To measure new knowledge acquired through continued pretraining on D 1 , we construct N EW LAMA which is made up of detailed cloze statements requiring new knowledge from D 1 to correctly answer.
We provide two datasets for measuring new world knowledge : N EW LAMA, for which each of the instances is veriﬁed that the answer does not exist in D 0 , but only in D 1 , and N EW LAMA-E ASY for which each of the instances does not perfectly comply with our strict deﬁnition of new world knowledge due to its creation process, but is used to generally measure the new knowledge acquired from continued pretraining on D 1 at a larger scale.
N EW LAMA-E ASY can be considered easier since each instance was constructed to be similar to the data distribution seen during continued pretraining.
Dataset Construction
The data for continual pretraining, CC-R ECENT N EWS , is constructed using news-please (Hamborg et al., 2017).
I NVARIANT LAMA is constructed by manually selectingtime-invariant relations from T-Rex (Elsahar et al., 2018).
For U PDATED LAMA and N EW LAMA, 3 CC-R ECENT N
[Table]
we use Amazon Mechanical Turk (mturk) 5 for crowd-sourcing Human Intelligent Tasks (HITs).
The process requires selecting answerable questions from a list of questions generated by the model introduced in Lewis et al.
and converting them into cloze sentences.
We have also separately hired 11 experts to verify the correctness and search the C4 database to categorize each instance following our deﬁnition of updated and new .
N EW LAMA-E ASY is constructed at a larger scale through a two-phase mturk process where sentences selected from articles containing new information are decontextualized and paraphrased 6 before being masked, veriﬁed and converted to corresponding questions.
The constructed dataset statistics are in Table 1.
Important details about the data construction pipeline, examples, and more ﬁne-grained statistics are provided in Appendix B.
3. C OMBINED M ETRIC FOR CKL
We propose a novel metric, FUAR ( F ORGOTTEN / ( U PDATED + A CQUIRED ) R ATIO ), that can compare the efﬁciency of each CKL method using the trade-off between forgotten time-invariant knowledge and updated or newly acquired knowledge.
FUAR represents relatively how many timeinvariant knowledge instances are forgotten in order to learn one new or updated knowledge instance.
We ﬁrst deﬁne FUAR for the general case where there can be multiple corpora used for training an ever-changing LM.
Let T be an arbitrary task and ( D i ) ni
= 0 be a sequence of corpora used for LM pretraining, where Dis the initial pretraining corpus.
We deﬁne Gap ( T , D a , D b ) =
Score ( T ) of LM a − Score ( T ) of LM b , where LM a represents the LM after being pretrained on D a .
Then, we denote T F =
( T Fi ) n − 1 i =
as a sequence of tasks from ( D i ) n − 1 i = 0 measuring the forgetting of invariant-knowledge from each corresponding corpous.
If there is no such task from corpus D i , the value of T Fi is set to n .
d . , which means not deﬁned .
Likewise, we denote T Un and T An as tasks from D n measuring the update and acquisition of new knowledge, respectively.
We deﬁne FUAR as follows:
[Equation]
The choice of benchmark tasks T F , T Un , and T An can differ according to each experimental setup.
FUAR value of 1.0 represents an equal trade-off scenario where one time-invariant knowledge instance of T F is forgotten on average to gain one new or updated knowledge instance of T Un and
T An .
The two terms in the denominators are summed because newly gained knowledge and updated knowledge are mutually exclusive by deﬁnition.
When the value is smaller than 1, it means that the model obtains more new or updated knowledge than the amount of forgotten knowledge, so methods that exhibit a low FUAR value can be considered suitable for CKL.
If the value is zero, then it is a case where no forgetting occurs at all and is the upper bound for performance.
If the denominator is 0, we denote the case as no gain and regard it as the worst possible case.
E XPERIMENTAL S ETUP
We perform extensive experiments with an encoder-decoder model, T5 (Raffel et al., 2019), a large LM ( ∼ 737M params) initially pretrained on April 2019 dump of C4 and May 2020 dump of Wikipedia (thus D 0 in our experiments) with salient span masking (SSM).
The details of the pretraining, continual pretraining, and evaluation conﬁgurations are in Appendix C.
We establish the following methods as the baselines for the CKL benchmark and categorize them into regularization , rehearsal , and parameter-expansion methods.
The speciﬁc hyperparamters used for the implementation of each method are detailed in Appendix D.
Initial refers to the setting where we evaluate the LM before any continued pretraining.
The performance of this model can be considered as the upper-bound for I NVARIANT LAMA and lower-bound on U PDATED LAMA and N EW LAMA.
Vanilla is a speciﬁc setting of further pretraining (Gururangan et al., 2020), where the domain is new knowledge, and the LM is further pretrained without any training strategies.
RecAdam (Chen et al., 2020) falls into the category of regularization methods.
It places a stronger independent assumption among the model parameters than the traditional regularization method (EWC (Kirkpatrick et al., 2017)) and does not access the initial pretraining corpus to regularize the model weights during continued pretraining.
The optimizer is annealed so that less regularization is applied as the training progresses.
Mix-Review (He et al., 2021) falls into the category of rehearsal methods, which assumes access to the initial pretraining corpus and mixes in random subsets of the initial pretraining data during continued pretraining, depending on the mix-ratio at the current time step.
As the training progresses, the mix-ratio decays towards 0, decreasing the amount of the mixed original data at each iteration.
LoRA (Hu et al., 2021) falls into the category of parameter-expansion methods.
It freezes the original parameters of the LM and adds trainable rank-decomposition matrices into each layer that are updated during continued pretraining.
Hu et al.
(2021) has implemented this approach with decoder-only models (GPT-2 (Radford et al., 2019) & GPT-3 (Brown et al., 2020)) while we apply it to an encoder-decoder model, denoting it as T5-LoRA.
K-Adapter (Wang et al., 2021b) is another parameter-expansion method that freezes the original parameters of the LM while adding k number of new layers, namely adapters , that are updated during continued pretraining.
Wang et al.
(2021b) have shown successful injection of factual and linguistic knowledge for encoder-only models, BERT (Devlin et al., 2019) & RoBERTa (Liu et al., 2019), while we also apply it to an encoder-decoder model, T5, and decoder-only model, GPT-2.
Modular is a newly proposed parameter-expansion method speciﬁcally for encoder-decoder models which freezes the original, pretrained encoder while adding a new, randomly initialized encoder that is updated during continued pretraining.
For the newly added encoder, we vary the size to T5-small while keeping the size of the original encoder and decoder to be T5-large .
E XPERIMENTAL R ESULTS
In this section, we ﬁrst show the main experimental results for the CKL Benchmark.
Then, since multiple steps of continual knowledge learning, i.e., CKL are needed for training a true, everchanging LM, we explore the effects of multiple CKL phases as well as how epochs, corpus size, and the total number of training steps affect CKL.
We further explore how learning rates affect CKL in Appendix E, how continual pretraining on D 1 affects the performance of KILT tasks which require knowledge from D 0 in Appendix F, how CKL methods transfer across LM architectures in
Appendix G, and how the prediction outputs change during CKL in Appendix H.
5. M AIN R ESULTS
Table 2 shows our main experimental result on the CKL benchmark.
The T5 models are originally pretrained on C4 (about 1 trillion token updates) and Wikipedia, which is considered as D 0 . 8 ,
[Table]
and then continually pretrained on CC-RecentNews (corpus D 1 ) for 4 epochs (25k global training steps, about 673 million token updates) using each of the CKL methods.
Each of IL, UL, NL, NLE stands for I NVARIANT LAMA, U PDATED LAMA, N EW LAMA, and N EW LAMA-E ASY , respectively.
Detailed descriptions about the setup for this experiment are included in the caption.
We ﬁrst ﬁnd
that all of the CKL methods except for T5-MixReview are more effective at forgetting less time-invariant knowledge while updating and acquiring new knowledge than using the na ¨ ıve approach of T5-Vanilla as shown by the FUAR.
This result also highlights the main difference between
CKL and CL; while rehearsal methods show strong performances in traditional CL settings (Prabhu et al., 2020; Bang et al., 2021), in CKL, it shows the worst performance since the update of outdated knowledge and acquisition of new knowledge is severely deterred as shown in the performance of
UL and NL while not showing competitive mitigation of forgetting as shown in the performance of
IL compared to other CKL methods.
Amongst the other CKL methods, we observe a rather consistent trend that the parameter-expansion methods achieve better results.
The ﬁrst and second-best results on all of UL, NL, and NLE are all from parameter-expansion methods.
Meanwhile, although
UL and NL are constructed following the same procedure, there is a huge difference between the
EM scores of UL and NL.
We analyze the source of this difference in Appendix I.
Figure 2 visualizes how the EM scores of each task change as T5-Kadapters, the CKL method with the most robust performance, and T5-Vanilla are continually pretrained on D 1 .
In all of the tasks, the performance of T5-Initial can be considered as the upper-bound for IL and lower-bound for UL,
NL, NLE.
Corresponding with our main observations, CKL allows considerable retention of timeinvariant world knowledge while improving updating and gaining new world knowledge compared to T5-Vanilla, mitigating the overall trade-off.
5. E XPLORING M ULTIPLE PHASES OF CKL
In order to show the potential for creating a truly ever-changing LM, we explore the effect of multiple
CKL phases by creating CC-R ECENT N EWS -S MALL , denoted as S MALL , which is a small variant of CC-R ECENT N EWS that consists of randomly sampled 10% of the original corpus.
We then split
CC-R ECENT N EWS -S MALL into two different splits by the published date of each article to simulate a setting where multiple CKL phases are needed, denoted as S MALL -P1 (05.2020 - 11.2020)) and
S MALL -P2 (11.2020 - 04.2021).
NLE 9 is also split into two different, smaller datasets, NLE P
Title
T5-Initial
T5-Vanilla
T5-Kadapters (k=2)
E M
Epochs (
[Figure]
) I NVARIANT LAMA
E M
Epochs (b) U PDATED LAMA 1.
E M
Epochs (
[Figure]
N
[Figure]
LAMA
E M
Epochs
[Figure]
[Table]
and NLE P2 , each comprising of instances constructed from articles in S MALL -P1 and S MALL -P2, respectively.
We compare how CKL methods for T5 perform on IL, NLE P1 , and NLE P2 when continually pretrained entirely on S MALL for 5k steps (8 epochs), and when sequentially pretrained on S MALL -P
and then on S MALL -P2 for 2.5k steps (8 epochs) each.
In the scenario S MALLP1 → S MALL -P2, there are two CKL phases where D 0 is C4 and Wikipedia, D 1 is S MALL -P1, and
D 2 is S MALL -P2.
The rest of the conﬁgurations are set identical with the main experiments.
[Figure]
Comparing the performance on IL of the two scenarios, S MALL and S MALL -P
→ S MALL -P2, results show that LMs are prone to more forgetting as they go through multiple CKL phases, despite having the same number of training steps.
One of the reasons may be due to the learning rate scheduling, which is initialized at the start of each phase.
Moreover, the effectiveness of CKL methods is much reduced in multi-phase CKL, shown by the decrease of the gap between the FUAR of
T5-Vanilla and the best performing CKL method in the scenario of two-phase and one phase, which is 0.92 and 0.46, respectively.
Furthermore, despite showing the best performance overall, the drawbacks of parameter-expansion methods are also highlighted in the S MALL -P
→ S MALL -P2 setting; they require new parameters to be added at every phase of the update.
For example, the number of total parameters of T5-Modular increases by 36M in every round of the continual pretraining phase.
Likewise, considering a large number of CKL phases introduces new problems that should be additionally studied.
Taking into account that LMs should be updated frequently with a small amount of data in real-world scenarios for gaining up-to-date world knowledge about the ever-changing world in a computation-effective manner, more research is needed to mitigate the amount of forgetting that follows the larger number of update phases.
Effects of Epochs, Corpus Size, and Total Number of Training Steps in CKL on Forgetting
Figure 3 shows the result of T5-Vanilla and T5-Kadapters during continued pretraining in different scenarios from Table 2 and 3, where each point in the graph represents the performance of IL after every epoch.
Comparing M AIN (4 epochs) and S MALL (8 epochs) in Figure 3 (a) T5-Vanilla, we can see that more forgetting occurs in S MALL , even though trained for ﬁve times less number of global training steps.
This phenomenon is further highlighted when comparing results from S MALL -P1 ( epochs) which shows the most amount of forgetting despite being trained for ten times less number of global training steps.
While the overall drop is much mitigated in Figure 3 (b) T5-Kadapters, we observe the same trend between each scenario which goes to show how critical observing the same data repeatedly during continued pretraining is for causing forgetting.
The results are in line with ﬁndings from Lee et al.
(2021) which suggest LMs should be pretrained with just a few epochs on less duplicating data for efﬁciency.
We add additional intuition to their ﬁndings and conjecture that the inefﬁciency of pretraining from duplicate data could have been caused by the forgetting of the rather long-tail knowledge in the pretraining corpus.
C ONCLUSION
In this paper, we propose C ONTINUAL K NOWLEDGE L EARNING (CKL), where we establish benchmark datasets and metrics, and explore methodologies towards continual knowledge learning of an ever-changing LM.
We ﬁnd that parameter-expansion methods show the most robust performance throughout all of the experimental settings, which nevertheless has severe memory inefﬁciency, that the effectiveness of CKL methods decreases in multi-phase CKL, and that seeing the same data often is a critical cause of forgetting.
We also discuss several other interesting results of which we leave further exploration to future studies.
To this end, we suggest the community to explore CKL for the better design of an ever-changing LM.
A E XTENSION OF R ELATED W ORKS
As mentioned in Section 2, there are fundamental differences between the traditional CL formulations and CKL which make the previous CL methods inadequate for the CKL setting.
In this section, we introduce the prior traditional continual learning methods in detail, explore the methods from the literature set as baselines for the CKL benchmark and how they address the identiﬁed limitations of CL methods, and provide descriptions about alternative methods making LMs cope with the changing world.
A. T RADITIONAL C ONTINUAL L EARNING
Traditional continual learning (CL) methods focus on addressing two aspects of transfer between sequentially incoming tasks: forward transfer and backward transfer (Lopez-Paz & Ranzato, 2017).
Forward transfer refers to how past tasks affect the performance of the current and future tasks.
Backward transfer refers to how current or future tasks affect the performance of previous tasks.
The general pretrain-ﬁnetune approach can be seen as an instance of positive forward transfer where a model performs better on a target task after being pretrained on a more general source task.
Moreover, catastrophic forgetting can be seen as an instance of negative backward transfer where previous tasks suffer performance due to continued training on different tasks.
With respect to these two aspects, CL approaches can be categorized into three main approaches: regularization, rehearsal, and parameter-expansion methods.
Regularization Elastic Weight Consolidation (EWC) (Kirkpatrick et al., 2017) is a method that regularizes important parameters of previous tasks while training for the current tasks, helping mitigate the negative backward transfer of previous tasks.
Important parameters are measured via a
Fisher information matrix computed by measuring the magnitude of the gradient update step of each parameter during training of previous tasks.
Rehearsal Gradient Episodic Memory (GEM) (Lopez-Paz & Ranzato, 2017) is one of the ﬁrst rehearsal methods that utilize samples from each task stored in episodic memory and places an inequality constraint with respect to the losses of the samples in order to prevent negative backward transfer as well as allow the positive backward transfer .
Other methods such as Experience replay and local adaptation (d’Autume et al., 2019) replay samples stored in the memory of previous tasks during training to mitigate forgetting.
Parameter-expansion Progressive Neural Networks (PNN) (Rusu et al., 2016) is one of the earliest parameter-expansion/sharing approaches that introduce new sets of parameters for each new task where previous parameters are frozen and can be connected via lateral connections allowing for positive forward transfer .
PNN not only prevents negative backward transfer but also surpassed the previous pretrain-ﬁnetune approach in terms of positive forward transfer in some tasks.
A. CKL M ETHODS FOR L ANGUAGE M ODELS
As mentioned in Section 2, we explore the methods from the literature that have addressed the limitations of CL methods and thus are applicable to CKL.
We also categorize these methods into the three main categories of CL.
Regularization Most CL methods that utilize regularization require computing important parameters of the previous task, which in this case is pretraining on the original text corpus.
Determining these parameters is oftentimes unrealistic since it requires large-scale pretraining which can hardly be replicated by most.
Also, exactly how and where the knowledge is stored in the parameters of an
LM is currently extremely difﬁcult to identify and localize (Vig et al., 2020; De Cao et al., 2021).
RecAdam (Chen et al., 2020) overcomes this limitation by following the same training objective as EWC (Kirkpatrick et al., 2017) with a stronger independent assumption and places a quadratic penalty, ridding the need to access the initial pretraining corpus.
Rehearsal Large LMs are usually pretrained on a vast amount of raw text corpus such as Common
Crawl 10 .
When treating pretraining as a CL task, limitations exist when trying to apply previous rehearsal methods since a few samples from the pretraining corpus cannot represent the overall world knowledge from the original pretraining corpus.
Mix-Review (He et al., 2021) solves this issue by performing preliminary experiments in a smaller pretraining setting by assuming access to the pretraining corpus during ﬁnetuning and mixing random subsets of pretraining corpus depending on a mix-ratio that anneals towards the target task as training progresses.
Mix-Review can be considered a mild version of multi-task learning.
Parameter-expansion K-Adapter (Wang et al., 2021b) shares and freezes the original parameters and adds new parameters through adapters for continued pretraining of factual and linguistic knowledge and improve performance on three different knowledge-driven downstream tasks.
More recently, LoRA (Hu et al., 2021) freezes the original parameters and injects trainable rankdecomposition matrices into each layer of the Transformer architecture, greatly reducing the number of trainable parameters and the computational hardware requirement while performing on-par or better than training all of the parameters.
Both methods hypothesize freezing the original parameters allows mitigation of catastrophic forgetting.
We test out the hypothesis through implementation in our CKL benchmark.
A. M ETHODS OF I NTEGRATING W ORLD K NOWLEDGE WITH L ANGUAGE M ODELS
Explicit Methods Facts-as-Experts (Verga et al., 2021) store representations of entities in the form of key-value pairs into external memory that can be modiﬁed during inference time.
RAG (Lewis et al., 2020a) accesses a dense vector index of Wikipedia with a retriever and swaps indexes for updating the behavior of the model as the world changes.
Blender Bot 2.0 (Xu et al., 2021; Komeili et al., 2021), is also one of the explicit methods that search the internet for recent knowledge and saves recent conversations in external long-term memory.
Explicit methods, such as swapping indexes, adding explicit entity-relation knowledge, or searching the internet are in need of manual intervention during inference or are bound to tasks that require retrieval.
In this paper, we focus only on implicit methods.
Implicit Methods Zhu et al.
(2020) proposed a new task of explicitly modifying speciﬁc facts without forgetting unmodiﬁed facts and provided several benchmark approaches without utilizing non-parametric memory, including constrained layer-wise ﬁnetuning.
Wang et al.
(2021b) proposed
K-Adapter, a method that adds adapters to frozen layers of pretrained LMs to inject factual and linguistic knowledge and improve performance on downstream tasks.
Chen et al.
(2020) proposed a new optimizer that simulates the pretraining optimization while ﬁnetuning on the target task without needing access to the pretraining corpus, improving performance on the GLUE benchmark.
De Cao et al.
(2021) propose using a hyper-network to edit factual knowledge.
Even though these implicit methods are efﬁcient methods of injecting or modifying knowledge from the implicit parameters of the LMs, they are all limited to injecting speciﬁc knowledge such as the case of (Wang et al., 2021b) or modifying past knowledge such as the case of (Zhu et al., 2020;
De Cao et al., 2021).
No work, to the best of our knowledge, has speciﬁcally addressed the catastrophic forgetting of world knowledge gained from the initial pretraining when continued pretraining on new text corpus for the gain of new world knowledge.
B D ATASET C ONSTRUCTION
In this section, we describe the dataset construction process we undergo in creating the benchmark datasets used in CKL.
For the construction, we use Amazon Mechanical Turk (mturk) 11 for crowdsourcing Human Intelligent Tasks (HITs) and separately hire 11 experts for annotation that requires extensive searching of the C4 corpus.
In addition, three more experts 12 who set up the data construction process and prepared the annotation guideline to ensure the quality of the data through
The ﬁrst three
[Figure]
CC-R ECENT N EWS
We ﬁrst construct CC-R ECENT N EWS , a novel text corpus containing relatively new knowledge as D 1 .
We use news-please (Hamborg et al., 2017), similar to the CCNEWS (Liu et al., 2019) and REALNEWS dataset (Zellers et al., 2019), to crawl 221,779 news articles published from May 2020 to April 2021.
LMs initially pretrained on D 0 constructed before May 2020 can be continually pretrained on CC-R ECENT N EWS to gain relatively recent world knowledge.
I NVARIANT LAMA
We create I NVARIANT LAMA, a subset of the LAMA (Petroni et al., 2019) task for measuring time-invariant knowledge which might be forgotten during CKL.
Among the 41 relations of the T-REx (Elsahar et al., 2018) subset of LAMA, we manually select 28 relation types that probe for time-invariant instances (a full list of time-invariant relations are provided in
Appendix B.1).
We also remove instances where the answer overlapped with the subject following
Poerner et al.
(2019) since the answers for these instances can be inferred from the cloze statement itself.
Lastly, we remove instances where the answer was a non-entity to leave only the instances that require world knowledge for prediction on their answers (Guu et al., 2020).
U PDATED LAMA and N EW LAMA
We construct U PDATED LAMA and N EW LAMA for measuring the update of outdated knowledge and acquisition of new knowledge during CKL.
The challenge of constructing U PDATED LAMA is that a knowledge instance can be only considered as the knowledge that requires update only if it is present in both D 0 and D 1 with changed details, and the challenge of constructing N EW LAMA is that the knowledge can be considered new only if it is in D 1 but not in D 0 .
Therefore we set up the data construction process carefully.
The pipeline for the creation of a single instance of U PDATED LAMA and N EW LAMA, is shown in Figure 4 (a).
Each potential instance starts off from a single article from CC-R ECENT N EWS and goes through the pipeline which will end up being (1) discarded (2) added to U PDATED LAMA or (3) added to
N EW LAMA in the end.
The procedure is as follows
: (1) First, a list of Probably-Asked Questions (Lewis et al., 2021) are generated using the PAQ question generator on a single news article from CC-R ECENT N EWS .
The list of PAQs and the news article is given to the crowd-sourced worker to select a question that asks for the most recent knowledge for which the answer (denoted as new answer ) can be found in the article.
The crowd-source
worker is instructed to convert the question into a cloze sentence so that it can be given as input to a pretrained T5 LM.
The predictions of the T5 LM are stored along with the questions and cloze sentences.
The expert annotator ensures the quality of the questions and cloze sentences by correcting them whenever necessary and checks whether the model prediction is correct by searching through the C4 corpus as a representative of D 013 .
If the prediction is correct and the prediction is not the same with the new answer , the following instance must be present in both D 0 and D 1 with details changed, and thus is added to U PDATED LAMA along with the evidence document found in
C4.
If same, the instance is discarded because the instance is neither updated nor new .
(5) Lastly, if the model prediction is wrong, the expert annotator is asked to ﬁnd an alternative answer for the question in C4.
If not found, the instance is added to N EW LAMA since the answer to the question could only be found in the article of CC-R ECENT N EWS ( D 1 ), but not in C4 ( D 0 ).
Similarly, if the alternative answer is found in C4, we check whether it is the same as the new answer and add the instance to U PDATED LAMA if not the same and disregard it otherwise.
Throughout the whole process, a validator checks the sanity of the data and gives detailed real-time feedback on the work of the annotator.
N EW LAMA-E ASY
Even though N EW LAMA corresponds to our exact deﬁnition of new knowledge that we deﬁne in the task formulation, scaling the size of the dataset was difﬁcult since each instance required searching the whole C4 database for answers.
Instead, we provide a much larger, easier variant N EW LAMA-E ASY where we test the general new knowledge acquired during continued pretraining on CC-R ECENT N EWS .
The pipeline for the creation of a single instance of
N EW LAMA-E ASY is shown in Figure 4 (b) and follows the following procedures:
(1) First, the crowd-sourced worker is
instructed to classify whether the given article contains new information or not.
(We deﬁne new as not likely to be known before May 2020).
If the article contains new information, the worker is instructed to select a sentence from the article that contains the most recent information and an entity among the possible answer candidates in the sentence and discard the article if otherwise.
We provide the possible entities through a Named-Entity Recognition Model (Honnibal et al., 2020).
(2) We make the selected sentence stand-alone from the article through the decontextualization model provided by Choi et al.
The decontextualized sentence is paraphrased by a back-translation model (en → de → en) (Tiedemann & Thottingal, 2020) and checked whether the selected word is still in the paraphrased sentence; the sentence is discarded if not.
(4) Next, we mask out the selected word from the sentence and ask two crowd-sourced workers to convert the cloze sentence into a question and answer the question.
(5) If the answers agree among the workers as well as correspond to the actual selected word, we add the instance to
N EW LAMA-E ASY .
The speciﬁc interfaces used for the mturk HITs are provided in Appendix B.2.
Statistics of the constructed datasets are in Appendix B.3.
B. T IME - INVARIANT RELATIONS OF LAMA
Table 4 shows the list of 28 time-invariant relations of I NVARIANT LAMA.
We manually ﬁlter the 44 original LAMA relations to leave only the time-invariant relations.
Templates such as “[X] works for [Y] .”
and “[X] is a member of [Y] .”
are excluded because the answer may change for different timestamps.
In the template, [X] and [Y] refers to subject and object labels, respectively.
Given a template with only the subject included, the model has to predict the object label [Y] for knowledge probing
. B. I NTERFACES USED FOR THE CONSTRUCTION OF CKL BENCHMARK
The Mturk interface used during construction of U PDATED LAMA and N EW LAMA, N EW LAMAE ASY , and N EW LAMA-E ASY are shown in Figure 5, 6, and 7, respectively.
B. D ATASET S TATISTICS AND E XAMPLES
We report the data statistics for the CKL benchmark in Table 5.
We measure the size, average input token length, average answer token length, and the answer types of each constructed dataset.
One
[Table] [Table]
LAMA- E ASY
[Table]
thing to consider is that LAMA (Petroni et al., 2019) from which we constructed I NVARIANT LAMA is originally constructed for only single-token decoding (1.3 with the T5-tokenizer) because multitoken decoding entails additional, tunable parameters (beam size, n-gram repetition penalties, etc.).
The newly constructed datasets U PDATED LAMA, N EW LAMA, and N EW LAMA-E ASY require multi-token decoding which adds a level of difﬁculty for the task compared to I NVARIANT LAMA.
Moreover, N EW LAMA-E ASY has a different input distribution (longer input sequences) than the other datasets since the decontextualization and back-translation processes are applied to create each instance, which makes the sentences longer.
Lastly, some examples of the CKL benchmark datasets are provided in Table 6.
[Table]
C E XPERIMENTAL C ONFIGURATION
Pretraining Congifuration We utilize the T5 initially pretrained on C4 (April 2019) and continually pretrained with salient span masking (Guu et al., 2020) on Wikipedia (May 2020) as initialization.
We use the checkpoints from Wolf et al.
We also perform the SSM objective during
CKL because it was shown to help LMs “focus on problems that require world knowledge” (Guu et al., 2020; Roberts et al., 2020).
Continual Pretraining Conﬁgurations
The input and output sequence length is ﬁxed to 350.
We use gradient accumulation for cases where the same number of training batches could not be loaded on the GPUs due to the varying memory consumption required for different methods and set the global batch size to 60.
We use Adafactor optimizer with an initial learning rate of 1e-3.
We show the effects of learning rate variation regarding the trade-off between maintaining previous knowledge and acquiring new knowledge in
Appendix E. We use learning rate warm-up for the ﬁrst 10% of training and linearly decay the learning rate to half of the initial learning rate towards the end of training.
For all of the experiments, we use 4 32GB V100 GPUs for training with each method except Mix-Review, where we use 16 32GB V100 GPUs.
The details of the conﬁgurations used for evaluation on each individual CKL task are provided in Appendix C.
Evaluation Conﬁgurations For T5 based models, all evaluation is done in a zero-shot manner and is processed with a single GPU.
For I NVARIANT LAMA, the input and output length is ﬁxed asand 4 respectively.
For U PDATED LAMA and N EW LAMA, the input and output length is 50 andrespectively.
Lastly, the input and output length is 150 and 10 respectively for N EW LAMA-E ASY .
The rationale of this hyperparameter is based on average input and answer token in Table 5.
Unlike T5 models, GPT-2 based models need additional light-tuning for 1 epoch for evaluation.
For
I NVARIANT LAMA, the input and output length is 50 and 3 respectively.
The training batch size is 32 and the learning rate is 1e-3.
For evaluation on the acquisition of new knowledge, the input and output length is 100 and 10 respectively.
The training batch size is 8 due to memory constraints and the learning rate is 1e-3.
For both tuning processes, 4 V100 32GB GPUs are used.
The detailed result and discussion of GPT-2 based models are shown in Appendix G.
D H YPERPARAMETERS FOR I MPLEMENTATION OF CKL M ETHODS
RecAdam (Chen et al., 2020)
We use the same hyperparameter setting for the optimizer as in Chen et al.
(2020): we set the coefﬁcient of the quadratic penalty γ to 5,000, and select the best t 0 and k in 100, 250, 500, 1,000 and 0.05, 0.1, 0.2, 0.5, 1 respectively for the annealing coefﬁcient λ ( t ) .
Mix-Review (He et al., 2021)
We use the English Wikipedia 14 to represent the original pretraining corpus.
The mix-decay and mix-ratio are set to 4 and 0.7, respectively, which is the best hyperparameter setting in the paper.
LoRA (Hu et al., 2021)
We only freeze the encoder for the encoder-decoder LM and the entire model for the decoder-only LM.
We use the optimal rank r of 4 and adapt both W q and W v in the self-attention module, which corresponds to the best performing hyperparameter setting in the paper.
K-Adapter (Wang et al., 2021b)
Similarly with T5-LoRA, we freeze the encoder for the encoderdecoder LM and the entire model for GPT-2.
We implement k = 2 , 3 for both T5 and GPT-2 to see the effect of increasing # of parameters.
Unlike in the original paper, we set the conﬁguration of the adapter identical to a single transformer layer from the original LM, ridding the need of an up-projection and down-projection layer.
Modular We use a projection layer before adding the hidden state outputs from both encoders to match the dimensions.
Why do we add parameters to only the encoder for T5?
For parameter-expansion methods, we add parameters to only the encoder because the encoder is applied to the input sequence and the decoder is applied to the output sequence.
Since most of the computational cost comes from the decoder computing for the output sequence in an auto-regressive manner as highlighted in (Li et al., 2021), the newly added parameters in the encoder are roughly expected to have minimal additional computational cost.
Why do we freeze parameters of only the encoder for T5?
K-Adapter and LoRA are initially proposed to freeze all of the parameters except for the newly added parameters.
However, when applying this methodology to T5, it was empirically shown that unfreezing the parameters of the decoder results in better performances when utilized together with parameter-expansion methods in terms of overall trade-off.
E E XPLORING THE T RADE - OFF OF V ARYING THE L EARNING R ATE FOR C ONTINUAL P RETRAINING
[Table]
[Table]
Table 7 shows that lowering the learning rate for the continual pretraining leads to less forgetting of the original knowledge, but also less learning of new knowledge.
The experiments are done under the setting of S MALL scenario in Table 3.
By comparing the FUAR among the T5-Vanilla models with different learning rates
[Table]
it can be seen that there is no rule of thumb for choosing the appropriate learning rate since FUAR is the lowest in learning rate of 1e-4 and increases for both lower and higher learning rates.
We suppose that the optimal learning rate heavily depends on the corpus size of D 1 and the model capacity of LM.
We also report the performance of T5-Kadapters, which is a CKL method that shows robust performance throughout most experiments.
Applying T5-Kadapters consistently mitigates the trade-off between forgetting and acquiring new knowledge as shown by the improvement in FUAR from the T5-Vanilla model with the same learning rates, although the level of effectiveness varies according to the value of the learning rate.
We do not perform extensive experiments with each of the varying learning rates since searching for the optimal learning rate for each different continued pretraining setting may be out-of-scope with this research
[Table]
F E XPLORING H OW C ONTINUALLY P RETRAINING ON D 1 A FFECTS KILT T ASKS W HICH R EQUIRES K NOWLEDGE FROM D
[Table]
[Table] [Table]
40 LR 1e
[Table]
1e
[Table]
- 1e
[Table]
1e
[Table]
1e
[Table]
1e
[Table]
1e
[Table]
1e
[Table]
1e
[Table]
Size
[Table]
In addition to the CKL benchmark, we also show in Table 8 the performance on the dev set of
KILT (Petroni et al., 2021) after ﬁnetuning each of the continually pretrained models of Table 2.
Since KILT is made from Wikipedia, which corresponds to the old pretraining corpus D 0 , the performance on KILT measures how continual pretraining on new corpus D 1 affects the performance on the knowledge obtained from D
if ﬁnetuning is done on behalf of the knowledge from D 0 .
Conﬁguration KILT (Petroni et al., 2021) consists of 5 different tasks and 11 datasets:
OpenDomain Question Answering (Joshi et al., 2017; Kwiatkowski et al., 2019; Fan et al., 2019; Yang et al., 2018), Fact Checking (Thorne et al., 2018), Entity Linking (Hoffart et al., 2011; Guo &
Barbosa, 2018), Slot-ﬁlling (Levy et al., 2017), and Knowledgeable Open Dialogue (Dinan et al.,
Because each task requires a different training objective than the one used during pretraining, additional ﬁnetuning is necessary.
We search for the hyperparameters such as training epochs, batch size, input size, output size, and learning rate of each individual KILT task to match the T5-base dev performance reported by Petroni et al.
Using the identiﬁed conﬁgurations, we perform experiments on all of the KILT tasks with the continually pretrained models for each method as the initialization checkpoints.
Evaluation metrics are different for each dataset: accuracy for discrete output (fact-checking, entity linking, slot-ﬁlling), Exact Match (EM) for question answering tasks with short output, ROUGE-L for ELI5 (question answering task with long output), and F1-score for
Wizard of Wikipedia (dialogue).
The data statistics and the hyperparameters used for ﬁnetuning on each KILT dataset is reported in Table 9.
Experimental Result We ﬁrst focus on the performance on zero-shot Relation Extraction (zsRE), which is measured on the dev set of 12 relations that are ensured to have no overlap with the 84 relations of the train set (Levy et al., 2017).
Since the setting is similar to the zero-shot probing setting of IL, the trend of the result on the two datasets are similar.
The performance of T5-Vanilla drops to half from that of T5-Initial as shown in IL, and the best performing method for both datasets is T5Modular.
In addition, corresponding with results from the CKL benchmark, parameter-expansion methods generally show stronger performance than the other methods.
However, for the other datasets that cannot be performed in a zero-shot manner, the intermediate process of continually pretraining on corpus D 1 does not seem to be that harmful on the ﬁnetuning for the target tasks even though they are more related to the knowledge of D 0 .
Even T5-Vanilla shows modest performance, sometimes with better results than some other CKL baselines.
One hypothesis is that the models could have regained the original knowledge from corpus D 0 through the ﬁnetuning process.
Also, some of the knowledge could have been recovered through the testtrain overlap (Lewis et al., 2020b; Wang et al., 2021a).
A more surprising ﬁnding is that the performance of some of the parameter-expansion methods are even higher than that of T5-Initial, which is considered to be the upper bound for KILT because T5Initial is only trained on behalf of the knowledge from D 0 .
For example, T5-Modular shows higher scores than T5-Initial on 6 out of 11 tasks.
Since the parameter-expansion methods force the model to store the new knowledge in the newly added parameters during continual pretraining, one careful conjecture is these LMs have learned to combine and utilize in its internal representation of both old and new knowledge stored in separate parameters during ﬁnetuning to maximize the performance.
G E XPLORING H OW CKL M ETHODS T RANSFER A CROSS LM A RCHITECTURES
We perform experiments with GPT-2 Large ( ∼ 774M params)
(Radford et al., 2019) initially pretrained on WebText and Wikipedia 15 ( D 0 ) and continually trained on CC-R ECENT N EWS -S MALL , i.e., S MALL ( D 1 ) for 8 epochs.
For continued pretraining, we use the common teacher-forcing pretraining objective.
The initial learning rate for the continued pretraining stage is empirically chosen as 1e-4 (results with learning rate as 1e-3 are shown in Appendix G.1).
After continued pretraining, we apply light-tuning , a process denoted for ﬁnetuning the model for only one epoch on a small portion of data similar to the evaluation set.
Training on a single epoch constrains the model to barely adapt to the input-output form of the data and not to learn the knowledge in tuning samples, mitigating the problem suggested by Lewis et al.
(2020b).
To measure the time-invariant knowledge, we use InvariantLAMA (IL) because most of the slots to ﬁll are at the end of the sentence.
For light-tuning on behalf of IL, we use additional T-Rex data from
Shin et al.
(2020) which has a similar distribution as instances from IL.
Among them, 5,000 instances with the same time-invariant relations as IL are randomly sampled for light-tuning .
On the other hand, unlike IL where most of the slots to ﬁll are at the end of the sentences, the LAMA datasets for new knowledge in our CKL benchmark mostly have the slots at the beginning of the sentences.
[Table]
Therefore, we use the corresponding CBQA dataset of N EW LAMA-E ASY , N EW Q UESTIONSE ASY (NQE) to roughly measure the new knowledge.
For light-tuning on behalf of NQE, 5, instances are sampled from a set of QA pairs constructed from CC-R ECENT N EWS but not CCR ECENT N EWS -S MALL to remove the test-train overlap
[Table]
Table 10 shows the CKL benchmark performance of GPT-2 models.
We report the results averaged over 5 runs with different random seeds.
As in Table 2, parameter-expansion methods show robust performance on both IL and NQE, resulting in low FUAR.
This shows that these methods are not only effective on the encoder-decoder model but also the decoder-only model as well.
One interesting result in Table 10 is that GPT2-MixReview performs the best on IL, with performance even higher than the initial model, which results in the best FUAR of 0 which means no forgetting occurred at all.
We suppose that the training strategy of GPT2-MixReview, allowing access to samples of D 0 during continued pretraining, would have allowed fast adaptation to knowledge from Dduring the light-tuning phase.
Performance of GPT2-MixReview suggests that it makes it possible to regain the original knowledge for decoder-only models even with small tuning steps.
We leave more exploration of applying CKL methods on decoder-only models such as GPT-2 architecture as future work.
G. F AILED GPT-2 EXPERIMENTS WITH L ARGER L EARNING R ATE
Table 11 shows the CKL benchmark result of GPT-2 models continually pretrained on CCR ECENT N EWS -S MALL for 8 epochs with a learning rate of 1e-3.
By comparing the results in this table with those in Table 10, which is for models continually pretrained with a learning rate of 1e-4, the results in Table 11 shows worse performance on both IL and NQE.
Unlike in Appendix E, increasing the learning rate does not result in better learning of new knowledge.
Instead, NQE performance is even worse than GPT2-Initial for GPT2-Vanilla, GPT2-Recadam, and GPT2-MixReview.
FUAR is no gain for these cases by the deﬁnition of the metric because the denominator has the value of zero.
This shows that a large learning rate for continual pretraining may lead to failure: neither retaining old knowledge nor acquiring new knowledge effectively.
For parameter-expansion methods, because many parameters including the decoder are frozen during the continual training process, they seem to be less prone to the effect of a large learning rate.
H E XPLORING THE P REDICTION C HANGE D URING C ONTINUAL P RETRAINING
Table 12 shows the prediction results of T5-Vanilla and T5-Modular on three knowledge probing tasks: I NVARIANT
[Table]
[Table]
TheofﬁciallanguageofRepublicofIngushetiais
[Table]
Rome
UL
Thebiggestexporterofcrudeoiltochinais.
V
SaudiArabia SaudiArabia
SaudiArabia SaudiArabia
SaudiArabia → Russia M
Russia
SaudiArabia
Russia
Russia istheheadof theeurozonecentralbank
V
MarioDraghi
YvesLeMaire
YvesDujarric
MarioDraghi MarioDraghi
→ ChristineLagarde M
MarioDraghi
ChristineLagarde ChristineLagarde
ChristineLagarde isthemanagerof chelseainthepremierleague
V
MauricioFernandez
SteveBruce
FrankLampard
MikelArteta
LuisEnrique → FrankLampard M
JoseMourinho JoseMourinho
FrankLampard
FrankLampard isthepriceforaﬂatinnottingham V
What £1.25m £1.25m 36,000 → 40,000 M
This 30,000pounds 40,000pounds 40, wasthegovernorofNewYork atthetimethisarticlewaswritten
V
AndrewM.Cuomo
Cuomo
AndrewCuomo
FranklinD.Roosevelt MartinVanBuren → AndrewCuomo M
AndrewCuomo AndrewCuomo
AndrewM.Cuomo
AndrewCuomo
NL isontheBillsall-proteam
V
Corey
Williams
Corey
Connor
Williams M
Williams Williams
Williams
Williams isthefounderofthepopularcryptocurrencybitcoin
V
SatoshiNakamoto SatoshiNakamoto
Yuri
Xiaobo
SatoshiNakamoto M
VitalikButerin
SatoshiNakamoto SatoshiNakamoto
SatoshiNakamoto
Thebailforkylerittenhouseis .
V
Rs.
1crore awhopping$1million $2million $1million $2million M $2million $2million $2million $2million
Thelasvegasraidersbeatintheplayoffs
V theLasVegasRaiders theNewOrleansSaints
theLasVegasRaiders thesacramento theNewOrleansSaints M theNewOrleansSaints
[Table]
correct but T5-Initial got wrong on the ﬁnal prediction, in order to see where the gap of the EM comes from.
I E XPLORING THE C AUSE OF THE EM G AP B ETWEEN U PDATED LAMA AND N EW LAMA
As shown in the main experiment, Table 2, there is a considerable gap between the EM of U PDATED LAMA (UL) and N EW LAMA (NL) over all the methods, despite undergoing the same data construction process.
We attempt to analyze the causation by ﬁrst analyzing what answer types make up the EM score of both UL and NL of T5-Vanilla, which are 10.17 and 3.77, respectively.
As shown in Figure 8a, the cloze sentences that take Person type as the ground truth makes up most
[Figure]
of the EM of both tasks, despite Person type answers taking up a similar proportion out of the total answer types (61.46% for UL and 59.7% for NL).
Since UL consists of probes requiring an update of information from D 0 , one might conjecture that the EM gap is simply due to the difference of the frequency in each corpus of the entities that serve as the ground truths, e.g., those entities appear more in corpus D 0 than in D 1 .
In order to get rid of the inﬂuence of frequency of entities when analyzing the source of the EM gap, we ﬁnd overlapping Person type answers from UL and NL, and analyze only the 67 probing sentences for both datasets each paired to one of these entities.
As shown in Figure 8b, the EM on UL is still much higher than that of NL.
Manually analyzing these instances, we ﬁnd that the probing sentences for NL ask for relatively more ﬁne-grained knowledge compared to UL, since the instances of UL by deﬁnition are overlapped cloze sentences with different answers in the corpus D 0 and D 1 , that naturally make them be coarse-grained .
For instance, the probing sentences for entity “Tim Walz” in UL and NL are “ is the governor of Minnesota this year.”
and “ is the governor of Minnesota calling for the evacuation of St. Paul.”, respectively.
We thus conjecture that the main causation of the EM gap to be UL consisting of instances requiring coarse-grained knowledge, which is likely to have appeared more during in D 1 , while NL consisting of instances requiring ﬁne-grained knowledge, which is expected to likely have appeared less in D 1 .