Knowledge-in-Context: Towards Knowledgeable Semi-Parametric Language Models
Authors: Xiaoman Pan
Wenlin Yao
Hongming Zhang
Dian Yu
Dong Yu
Jianshu Chen
Venue: ICLR 2023 notable top 25% (2023)
Keywords: Semi-parametric language model
text-to-text model
mixture-of-experts
natural language understanding

Abstract: Fully-parametric language models generally require a huge number of model parameters to store the necessary knowledge for solving multiple natural language tasks in zero/few-shot settings. In addition, it is hard to adapt to the evolving world knowledge without the costly model re-training. In this paper, we develop a novel semi-parametric language model architecture, Knowledge-in-Context (KiC), which empowers a parametric text-to-text language model with a knowledge-rich external memory. Specifically, the external memory contains six different types of knowledge:  entity,  dictionary, commonsense, event, script, and causality knowledge. For each input instance, the KiC model adaptively selects a knowledge type and retrieves the most helpful pieces of knowledge. The input instance along with its knowledge augmentation is fed into a text-to-text model (e.g., T5) to generate the output answer, where both the input and the output are in natural language forms after prompting. Interestingly, we find that KiC can be identified as a special mixture-of-experts (MoE) model, where the knowledge selector plays the role of a router that is used to determine the sequence-to-expert assignment in MoE. This key observation inspires us to develop a novel algorithm for training KiC with an instance-adaptive knowledge selector. As a knowledge-rich semi-parametric language model, KiC only needs a much smaller parametric part to achieve superior zero-shot performance on unseen tasks. By evaluating on 40+ different tasks, we show that KiC-Large with 770M parameters easily outperforms large language models that are 4-39x larger. In addition, KiC also exhibits emergent abilities at a much smaller model scale compared to the fully-parametric models.

Published as a conference paper at ICLR 2023
KNOWLEDGE-IN-CONTEEY TOWARDS KNOWLEDGE- ABLE PEMM-PARAMETRIC LANGUAGE MODELS
Xiaoman Pan, Wenlin Yao, Hongming Zhang, Dian Yu, Dong Yu & Jianshu Chen Tencent Al Lab, Bellevue, WA 98004, USA
ABSTRACT
Fully-parametric language models generally require a huge number of model parameters to store the necessary knowledge for solving multiple natural language tasks in zero/few-shot settings. In addition, it is hard to adapt to the evolving world knowledge without the costly model re-training. In this paper, we develop a (KiC),
novel semi-paramen paramerrrett language model architecture, Knowledge-in-Contn which empowers a parametric text-to-text language model with a knowledge- rich external memory. Specifically, the external memory contains six different types of knowledge: entity, dictionary, commonsense, event, script, and causality knowledge. For each input instance, the KiC model adaptively selects knowledge type and retrieves the most helpful pieces of knowledge. The input instance along with knowledge augmentation is fed into text-to-text model (e.g., T5) generate the output answer, where both the input and the output are in natural language forms after prompting, Interestingly, we find that KiC can be identified special mixture-of-exppee the role of a router that used to determine the sequence-to-exper assignment develop novel algorithm for training
(MoE) model, where the knowledge selector plays
MoE. This key observation inspires KiC with an instance-ade anstaice-adaptive knowledge selector. As a knowledge-ric semi- parametric language model, KiC only needs much smaller parametric part achieve superior zero-shot performance on unseen tasks. By evaluating on 40+ different tasks, we show that KiCLarge with 770M parameters easily outperforms large language models that are 4-39x larger. In addition, KiC also exhibits emergent abilities a much smaller model scale compared the fully- callmm-areetticc models.
INTRODUCTION
Recently, large-scale fully-parametric language models have achieved great success in solving natural language processing (NIP)) tasks (Radford et al.] 2019, Brown et al. 2020) Chowdhery et al.) 2022 Kaplan et al., 2020). However, they generally require huge number of model parameters to store the necessary knowledge for solving multiple NLP tasks in the zero/few-shot setting. Meanwhile, their problem solving capability only emerges after reaching certain model scale (Wei et al., 2022). In addition, large parametric language models are hard to adapt to the evolving world knowledge without expensive model re-training. To overcome these challenges, there has been increasing interest in developing semi-parametric language models, where a parametric language model is augmented with an external memory containing large number of text chunks (Borgeaud et al. 2022 Izacard et al. 2022; Khandelwal et al. 2019 Zhong et al. 2022). Although these semi cemipparametric approaches are shown to be more effective than their much larger parametric counterparts, there remain several challenges. The first challenge is that useful knowledge pieces are generally sparsely distributed over a large textual corpus. Therefore, it is difficult locate and retrieve the correct text chunk that contains the right knowledge complement given input instance. Second, it is difficult to determine the proper text chunk granularity to cover the desired knowledge. Thus, people usually oversized text chunks build indexing, which makes it even harder to determine whether knowledge is contained. On the other hand, there have been a rich collection of knowledge resources (c.g., knowledge graphs), where different kinds of knowledge densely and compactly organized in structured or remi-structured forms. In this paper, we leverage these knowledge resources to construct
xx1 aomanpan, wen nyao, honga ngshang, yudian, dyy, 1f arscchen @globbl lobal www.cent.ccm

---

Published as a conference paper at ICLR 2023
Retriever
External Knowledge Memory
Hachgrunare simtee stop from roking the coller rugion of cnvupeeee daene waver oon coodengle iiss will sour Mieey rosd high- pretusee saver rensine seeu long parsad toee?
Hor's prolliin l0ge jige-yemmse
Distionacy
Eaity
The folloning the refermne:: Pevvirss high prosuve foo suabiiinng
Deaghi
concatinata & prompt
Text-to tox--to-Text Model
Knowledge Selector
solect
EIENIS
Personst high prrsnse box saabiitiiig offer on the woddey, cooiing consiliing air duat shis sur the stnogdleee
Scrpe
Counaity
Figure I: Overview of the KiC model architecture. is augmented with a knowledge-rich memory that contains diverse categories of knowledge. For each input instance, KiC first selects a particular knowledge category and retrieves the most helpful knowledge pieces to augment the input. It then feeds the prompted imput into a text-to-text backbone module (e.g., T5) to generate the output answer.
semi-parametric language model, by simply using off-shelf encoders and retrievers index and search the external memory.
In particular, our primary contribution is developing a novel semi-parametric language model architec- ture, Knowledge-ing Segpwledg-iin-onteen Context (KiC), that is fueled by a large knowledge-rich external memory (Section 2.. Specifically, the memory covers six broad categories of knowledge types: entity, dictionary. commonsense, event, script and causality (Section 2.2 Our comprehensive analysis reveals that a wide range of natural language tasks (31 out of 35 tasks) benefit from adding knowledge, where different knowledge resources help with different subsets of tasks. Interestingly, some tasks are even improved by 10%+ after adding suitable knowledge. To adaptively utilize knowledge, we exploit KiC to dynamically identify the most useful knowledge pieces for each input instance from certain task and place them in the current context for answering the question. We adopt a single text-to-text transformer (e.g., T5) to generate the output answer from the input. Specifically, we append the retrieved knowledge pieces to the input instance, and then feed them into the text-to-text model to generate the output answer (also in natural language). The major advantage of such text-to-text paradigm is that it handles multiple natural language tasks with the same interface and can also generalize to unseen tasks (Sanh al. 2022 Raffel et al., 2020). Moreover, we find this training paradigm is suitable for our model design as it can teach our KiC model to learn how to select and use knowledge through various seen language tasks and then generalize well to use knowledge for solving unseen tasks. Our experimental analysis further shows that such instance- adaptive (context- dependent) knowledge augmentation is critical to the success of KiC model. However, due to the inherent discrete nature, it is difficult to train KiC in fully differentiable manner to select the correct knowledge category for each instance. To solve this problem. we find that KiC can be reformulated special mixture-of-cxpeee
(MoE) model (Jacobs et al. [991 Jordan & Jacobs 1994 Shazeer jet al. 2017 Fedus et al.) 2022), where the knowledge selector is identified as the router that is used to determine the sequence-to-exper to-expert assignment in MoE (Section 2.3). Furthermore, the memory partition corresponding to each knowledge category together with the text-to-text model can be recognized special semi-parametric expert MoE. This key observation inspires us develop a novel learning algorithm to train KiC with instance-adaptive knowledge selection capabilities.
In our experiments (Section 3). we adopt the same setting as TO (Sanh et al., 2022), where we train KiC models on a collection of tasks and then evaluate on another set of unseen tasks in zero-shot manner. As a knowledge-riee smaller parametric part to achieve superior zero-shot performance on unseen tasks. With only 0.77B parameters, KiCLarge outperforms zero-shot baseline models such as GPT-NeoX-20B or OPT-30B that are 25-38x larger. It achieves 39.4% zero-shot performance on MMLU benchmark, very close to the GPT-3's 5-shot performance of 43.9% that has 175B parameters (227x larger). Also, KiC exhibits emergent abilities much smaller model scale compared to the aall--parametri models.
semi-parametric language model, KiC only needs a much
2
KNOLWEDGGE-IN-CNTEER LANGUAGE MODEL
2.1 OVERVIEW
In this section, we introduce our proposed KiC language model, which augments a parametric text-to- text Transformer (backhone) model with knowledge-rich external memory (Figure Overall, KiC
2

---

Published as a conference paper at ICLR 2023
consists of the following modules: (i) a parametric text-to-text backbone, (ii) an external knowledge memory with a retriever, and (iii) a knowledge selector. As shown in Figure for each input instance, the knowledge selector first selects particular knowledge category based on the input context and then retrieves the most helpful knowledge pieces for solving the current problem. The retrieved knowledge is used to complement the input context via concatenation, and the knowledge-augmentt textual inputs are fed into the text-to-texi backbone model, which generates the output solution in natural language. The text-to-text backbone model can be any encoder-decoder models (e.g., T5, BART) or decoder-only models (e.g., GPT, PaLM). For convenience and without loss of generality, we adopt T5 as our backbone model throughout this paper. In the following subsections, we will explain in detail how to construct the knowledge memory along with its retriever (Section 2.2 as well as how to learn the entire KiC model in a fully-differentiaall end-to-end manner (Section 2.3)
2.2 EXTERNAL. KNOWLEEDGE MEMORY AND RETRIEVER
Knowledge-rich external memory A significant advantage of semi-paramette models over fully- parametric ones is that we could flexibly change the knowledge resources. As shown in Table 7 structured or semi-structured knowledge resources can often provide more relevant and accurate knowledge than plain text. In this work, we include the following popular representative knowledge resources, where each knowledge piece is in the form of subject, relation, object > triplet. More details about the statistics and examples of these knowledge resources can be found in Appendix A.
Dictionary: We consider dictionary (lexical) knowledge, which records definitions and example sentences of English words. We leverage the largest open-source dictionary Wiktionary as the lexical knowledge resource (e.g., < "apple" definition, "A common, round fruit... ..."" >). Specifically, we use the Wiktionary dump dated April 30, 2022 that contains 1.3M word definitions and 470K example sentences for IM words/phrases.
fruit
Commonsense:
We include commonsense knowledge from ConceptNet (Liu & Singh 2004),
which covers broad knowledge in our daily life. In ConceptNet, all knowledge pieces are repre- sented in the format of triplets with human-defined relations (e.g., < "bird". CapableOf, "fly" >). We follow previous works (Zhang et al. 2020) to include the core 600K high-quality triplets.
Entity: We cover named entity knowledge in Wikipedia and Wikidata (Vrandečić & Krötzsch 2014). For each entity (c.g., United States), we collect its Wikidata properties (c.g., < "United States", ", capital, "Washington D.C." >), and its related Wikipedia sentences (c.g.. < "United States", context, "It consists of 50 states ..." " >). Here, related sentences refer to the sentences from an entity's own article, or the sentences of other articles that link this entity.
Event: We consider knowledge about daily events with human- human-constinn constructed (i.e., ATOMIC (Hwang ett al. 2021) and GLUCOSE (Mostafazadeh et al., 2020)) and auto-extracted event knowledge graphs (i.e., ASER (Zhng et al. (022a)). Similar to commonsense knowledge, all event knowledge graphs store knowledge in the triplet format, where relations are human-defined discourse relations, the subject and the object are events (e.g.. "I am hungry", bbeggrrr, "I eat food" >).
We also include the script knowledge from Sun et al. (022).. which implicitly repre- sents complex relations by situating argument pairs in a context (mostly natural conversations). Specifically, we use 325K triples that are in the form of < verbal information, context, nonverbal information >, where verbal information is an utterance, nonverbal information can be body move- ments, vocal tones, or facial expressions, etc., and context is the entire text of the scene from which the verbal-nonverbal pair is extracted.
Script:
The last external knowledge resource we include the auto-extracted causal knowledge CausalBank (Li et al. 2020), which collects large-scale English sentences expressing cause-effect relations. It consists 133M because-mode sentences (i.e., sentences captured by 12 patterns such "because", "caused by", etc.) and 181M therefore-mode sentences (i.e., sentences captured by 19 patterns such as "therefore", " "result in". etc.). We also convert each sentence into triplet form (e.g. "babies cry", therefore-mode, "will lead to sleep problems" >).
Causality?
https: : //en wikt ionaooorr...oommm www.aar.oog/wiiii i /wikt/iiiiiitt ona ry: :aaMain iapainn____ Page
Follow the literatures in the commonsense community (Zhang et al. 2021
2022b
use the term
"causality" to refer to commonsense causality, which is mostly contributory (Bunge 201
3

---

Published as a conference paper at ICLR 2023
T(x ci)
T c + oz)
Generalist
Expert
Expert
Expert
Text-to-Text
Test-lo-Tadd
Text--o-Tee
Text-l-Teok
2 + C
N
(x)
h arg max Sa(x)
y01!
C
Knowledge Selector S(x)
Expert Model-
Figure 2: KiC model can be equivalently formulated a mixture-of-experts (MoE) architecture. The knowledge selector can be identified as router that is used to determine the sequence-to to-eexeertt assignment MoE. Each expert made up of the (shared) text-to-text model and the external memory of particular knowledge category. Therefore, each expert is in itself stand-alone semi-parametric language model specialized in a certain type knowledge. To allow the option not using any knowledge, we also include "generalist" module, which is the (shared) text-to-text model alone.
Note that although the effectiveness of certain knowledge types such entity and dictionary knowl- edge has been demonstrated on wide range of tasks (e.g.. (Zhang et al.) (019b)), other types of knowledge such as commonsense and script knowledge are only used for carefully selected tasks that tend to require these types of knowledge (Ye et al., [219 QQu et al., 2019). In this paper, we evaluate the contribution of all aforementioned knowledge types on broader sets of downstream tasks to better understand the contribution of these knowledge types. Some examples of retrieved knowledge can be found in Appendix D which show their usefulness for solving different tasks.
To effectively retrieve knowledge from the knowledge memory, we follow the previous work (Borgeaud et al., 2022) to dense retrieval techniques. Specifically, for each knowledge resource, we design one or more knowledge-specffic strategies to generate key-value pairs from the original knowledge pieces (see Table & in Appendix for details). Then encode all keys into dense vectors using a SOTA sentence encoder MPNet (Song et al. 2020). During retrieva 3 given a query, encode it with the same sentence encoder model and then retrieve the most relevant knowledge using the maximum inner product search (MIPS), which is able to reduce search complexity from (nn) Ologgn). n). In KiC, employ SCaNN (Guo et al. 2020) the MIPS search algorithm.
Retriever
2.3 KIC: A MIXTURE OF SEMI-PARAMETRE EXPERTS
As we will show in our comprehensive analysis (Table []. for a particular task, some knowledge categories help the performance while others might hurt. For this reason, it is critical to dynamically select the correct knowledge type in order to facilitate the solution of the problem. In our work, instead of using task-da deseedeenddntt knowledge selection, consider more fine-grained desennne strategy: we adaptively choose the knowledge based on each input instance. We now proceed to explain how KiC learns to make such instance-dependent knowledge selection.
Note that the discrete decision made by the knowledge selector will seep into the overall neural architecture in the form of a discrete latent variable. There could be several alternative methods (such as reinforcement learning (Sutton & Barto 2018)) for learning the model with discrete latent variables. In this paper, we develop simple yet effective approach for learning KiC in a fully-differentiabbl end-to-end manner. The key idea is based on an important observation that KiC can be reformulated as a special one-layer mixtureeoffeexpers architecture, as shown in Figure 2 Note that the know knowledge selector can be identified as the router that is used to determine the sequence-to-expert assignment MoE. This is slightly different from the settings of the recent MoE works (Shazeer et al., 2017 7 Fedus et al. 2022), where their routers perform loken-to-exper assignments. Meanwhile, each expert
To further enhance retrieval quality and decrease search space, employ an additional filtering step for dictionary and entity knowledge pieces. See Appendix A.2 for more knowledge retrieval details.
4

---

Published as a conference paper at ICLR 2023
is made up of the text-to-text module together with particular category of knowledge memory. Interestingly each expert is in itself a stand-alone semi- parameetii language model, which retrieves a particular kind of knowledge from its own memory to augment its inputs. In other words, each expert can be understood as a specialist with expertise in a specific knowledge category. In addition, we also include special expert named generalist, which is used to handle situations where we do not need knowledge from our memory. Furthermore, due to the original KiC design, the text-to-text modules in all the experts (and the generalist) share the same model parameters with the only difference being the non-pann cor-aammtttic parts (i.e., the knowledge memories).
Inspired by the above KiC-MoE equivalence, we now proceed to develop a dilly-differentiable learning strategy for KiC by leveraging existing MoE learning approaches used in Fedus et al. (2022). More formally, the knowledge selector S(x) is modeled as (K + 1)-class linear classifier, which outputs (K + 1) -)-dimensional normalized probability vector. We apply the same encoder from our T5 backbone model to the input text sequence from a particular task, which generates a sequence of hidden representation vectors. Then, apply mean-pooling to them to obtain fixed-dimension vector, which is fed into the (K + 1)-way linear classifier to generate the probabilities of selecting different knowledge categories. Its k-th element, denoted as S& (z), represents the probability of choosing the k-th knowledge category for k = 0, 1,..,, K, where k = represents the choice of generalist (i.e., external knowledge). Let T(-) denote the text-to-text transformer and eæ be the knowledge retrieved from the k-th category. Then, in KiC, we select the top-1 knowledge category according to (z)) and compute the output according to the following expressions:
k arg max (a))
(z ① cg) SE(())
where @ denotes concatenation of the input x and the retrieved knowledge eg (both in the form of natural language). Observe that KiC first selects the knowledge category k that has the highest probability, and then retrieves the most relevant knowledge Cj from that category to complement the input v. The snowledge-augmenter for the output tokens. Similar to WovithhTrrasformee (Fedus et al., (022). we multiply the output logits from (-) by the probability Sj. (z) from the selector to compute the final logits for the output tokens. This is a simple yet quite effective strategy to enable differentiable learning in MoE, which was successfully used in both [Shazeer et al. (2017) and Fedus et al. (2022). We adopt this similar strategy and our experiments in Section 3 will demonstrate its effectiveness in KiC learning as well Note that we currently only consider the top-1 knowledge selection (routing) for simplicity and leave the generalization to top-n selection as future work. Finally, similar to MoE, we also add an auxiliary load balancing loss together with the standard cross-entropy loss during KiC learning:
input fed into the text-to-text model to generate the logits
T
C(x.8) = CrossEntropy (Nt. vt) + a Balancing(S(A)
where y denotes the target sequence, the subscript indexes the 1-th output token, and a is a positive hyper-parameter that controls the tradeoff between the two losses. We find that, without a load balancing term, the knowledge selector tends to select only one knowledge category throughout the entire training process, which was also observed in MoE learning. There could be different choices of
the balancing loss such as the ones used in (Shazeer et al.) 2017 Fedus et al.) 2022). which encourage the diversity of knowledge selection in different ways based S(r). Without loss of generality,
use the same load balancing loss as in Switch Transformer (Fedus et al. 2022) (see Equation 4.
The above KiC-MoE equivalence may also lead to interesting observations that could potentially benefit the studies of both semi-parametrie language models and MoFs. For example, in MoE works, the experts are generally designed to be different parametric neural modules (c.g., different MLPs (Fedus et al. 2022: Shazeer et al. 2017)). However, our work shows that this may not be the only option: we can construct different experts by using the same parametric module but with different inputs. By bridging these two active areas, we hope there could be more fruitful future outcomes.
'It might be tempting to use Gumbel-Softmas to handle the discrete latent variable in KiC. However, in order to use the traight-hrough-estmmae during hackpropagation, it has to compute the hidden states for all the experts, i.c., executing the text-to-text transformer by (K 1) times, which is prohibitive when K increases.
5

---

Published as a conference paper at ICLR 2023
3 EXPERIMENTS
3.1 ANALYSIS OF KNOWLEDGE USEFULNESS
To verify our assumption that external knowledge resources can facilitate LMs in general language understanding and see the effects of using different types of knowledge, conduct single-task fine-tuning experiments on a wide range of downstream tasks (Table []. We evaluate 35 tasks in total and classify them into 10 categories following the P3 task categorization framework (Sanh) et al. 2022). For each knowledge type (each column), we append retrieved knowledge pieces to the input sentence and truncate the entire sequence whenever exceeds the sequence limit. Next, the augmented input sentences are fed into the standard text-to-text model (T5) to generate the target answer for optimization, where training instances are from every single task. We can see that model performances on 30 out of 35 tasks are improved after adding at least one type of knowledge, which demonstrates the effectiveness using high-quality external knowledge. Based on these results, we exploit KiC to dynamically identify the most useful knowledge pieces to adaptively utilize knowledge.
Category
Task
Task Reference
None
ENT
DIC
COM
EVT
SCR
CAU
WSC Wino. debiased
Levesque al.
2012
60.3
49.5
62.0
53.1
64.7
62.0
63.4
Coreference
Sakaguchi
2021
59.1
53.5
57.3
56.9
58.3
58.5
54.1
Wino. xl
Sakaguchi al.
2021
63.5
63.0
64.2
64.5
64.3
63.8
63.5
CB
De Marnefle et al.
22019
87.5
85.9
87.5
85.9
90.6
84.4
NLI
RTE
Wang al. 20019
77.1
76.2
79.0
79.2
76.6
76.9
71.3
MRPC
Dolan & Brockett
2005
82.9
80.5
87.7
77.9
84.9
84.4
82.0
Paraphrase
QQP
Wang al.
2018
89.4
89.1
89.5
89.5
89.2
89.3
89.4
PAWS
Zhang et
2019a
94.6
94.2
94.3
94.4
94.4
94.5
94.2
ARC-Ease Easy
Clark et al.
2018
52.8
53.1
51.7
64.6
Closed QA
ARC-Chand Challenge
Clark et al.
30.9
30.9
33.5
34.2
39.5
WikiQA
Yang et
2015
96.2
95.8
95.9
95.7
95.7
96.2
Extr. QA
ReCoRD
Zhang et al.
2018
53.9
53.9
53.2
54.0
54.1
53.9
53.5
CoS-E v1.11
Rajani al.
2019
60.6
61.2
59.9
60.8
60.1
59.7
61.1
CosmosQA
Huang
2019
69.1
69.0
68.3
69.7
67.9
67.7
66.4
DREAM
2019
62.4
63.8
63.5
62.5
63.3
63.8
62.7
OpenBookQA
Mihaylov
2018
56.2
54.7
57.4
58.2
57.6
PIQA
Bisk al. 20.20
71.7
71.6
71.5
71.5
70.6
74.3
QASC
Khot al.
2020
97.8
98.0
98.0
98.1
97.6
QuAIL
Rogers et
68.3
72.9
73.5
72.9
66.6
68.6
QuaRTz
Tarjord
2019
83.1
81.8
81.1
81.1
81.5
82.2
Multi QA
RACE-Middle
et 20177
74.1
74.1
74.4
73.3
RACE-High
Lai et 2017
69.4
69.9
69.7
69.2
SciQ
Welbi et 2201
94.0
95.0
98.0
96.6
94.1
SocialIQA
Sap et al. (2019
63.4
63.6
64.2
63.7
63.9
63.2
BoolQ
Clark et al. (2019)
81.9
81.7
82.0
80.6
81.5
81.7
MultiRC
Khashabı al. 2018
80.0
79.7
79.5
80.0
79.5
79.2
79.0
WikiHop
Welbi al.
2018
58.7
58.7
58.8
59.4
59.4
59.1
58.5
WIQA
Tandon et al.
2019
74.4
74.4
75.1
83.6
83.5
IMDB
Maas et al.
2011
94.8
94.9
94.7
94.9
94.7
94.7
94.8
Sentiment
Rotten Tomatoes
Päng & Lee 2105
90.2
89.6
90.3
89.9
90.0
90.0
89.6
Completion
HellaSwag
Zellers
2019
49.8
49.3
50.6
51.8
52.0
53.7
COPA
Roemmele
2011
58.0
58.5
59.8
54.5
58.9
56.2
62.0
AG News
Del Corso et al.
2005
93.9
93.6
94.0
94.3
94.0
94.1
94.1
Topic Class. DBpedial4
Lehmann et al,
2015
28.4
28.4
28.4
28.4
28.4
28.4
28.4
WSD
WiC
Pilchvar al.
2019
68.8
67.9
69.5
70.2
68.2
66.3
69.8
Table Single task fine-tuning results (accuracy % of using no knowledge (None) or adding entity (ENT), dictionary (DIC), commonsense (COM), event (EVT), script (SCR), causality (CAU) knowledge separately. For each row, we use green and red to indicate performance increase or decrease comparison with knowledge (Nonc). The boldface numbers are the best performance for each row. Note that all results in this table are based on T5 Appendix C contains the full description of all tasks.

---

Published as a conference paper at ICLR 2023
3.2
MAIN RESULTS
Coreference
NLI
Completion
WSD
Models
Params
WSC
Wino.
ANLIRI
ANLIR2
ANLIRs
CB
RTE
COPA
H.S.
S.C.
WiC
BERT
0.34B
53,478
49.5
33.814
33.8p.9
33.2n6
48.2n1
48.41.
49.0s.
25.5gz
50.1n.
50.2o4
RoBERTa
0,35B
37.0t3
48.9a7
33.409
33.4n.6
33.3n5
42.94.
54.11.
56.0;3
22.41.1
48.5n4
50.0
GPT-Nco
2.7B
45.2as
50.8a9
33.5
33.30.7
33.405
48.2189
51.1s2
50.561
25.0a4
54.614
52.51a
GPT-J
6B
40.40.
48.5os
34.012
33.70.9
33.607
28.6150
50.532
56.042
24.7as
53.31.1
51.0s0
OPT
30B
63.5
48.40.
33.302
33.3p.1
33.4a.
50.0
47.31.
52.01g
24.404
55.3n3
50.0po
GPT-NeoX
20B
60.6g4
48.90s
33.412
33.410
33.607
30.4146
48.42.
44.55a
25.0a4
53.51a
49.925
T0
0.22B
61.1ss
50.6n9
32.214
33.01a
34.207
53.6111
64.114
65.7sa
25.7as
80.613
50.7
TOtage
0.77B
59.1s9
50.5a3
30.520
32.70.6
33.8os
60.7230
62.13.1
73.5a4
25.7a4
84.1
50.2
TOsB
3B 64.427
50.5
33.709
33.41.2
33.304
50.0159
64.1
74.9k7
27.510
85.132
50.409
T0
11B
64.4,a
60.525
44.716
39.42.2
42.43.
78.61s5
81.23,1
90.8,.
33.7a5
94.7a7
57.2
Killl
0.06B
63.5%g
51.1as
3
33.3n.9
33.6n6
44.6121
47.324
48 Oza
25.4a.
57.71z
50.0os
KiCe
0.22B
63.5
50.0g4
28.424
30.9
32.8,,1
58.9
66.82.
65 Ogo
26.
82.6ns
50.2
KiCragg
0.77B
65 4ga
55.324
36.318
35.01,4
37.625
67.9229
74.0s8
85.3Gx 29.6u9 94.41,2 52.415
Table 2: Zero-shot evaluation results on held-out unseen tasks (Wino.: Winogrande XL; H.S.: HellaSwag; S.C.: StoryCloze). Following previous papers, we report the median accuracy (%) and the standard deviation of all prompts used. Note that T0nase and T0h.rrge are reproduced using the same collection tasks and
with KiC models. Baseline models are: BERT Devlln (Delln al. 2019), OPT-Nco(Black et al. 202I), GPT-J(Wang & Komatsuzaki 2021), GPT-NcoX Black et al. 2022). (hang et al. 2022c). We use the standard autoregressive
ct al. 2019). RoBERTa(LLu
(log) probabilities to score candidate choices and select the best as the prediction for all bascline
models including mask LMs such as BERT and RoBERTa.
Models
Params
Method
STEM
Humanitics
Sucial Science
Other
Average
RoBERTarange
0.35B
fine-tune
27.0
27.9
28.8
27.7
27.9
GPT-2
1.5B
fine-tune
30.2
32.8
33.3
33.1
32.4
Gopher
7.1B
5-shot
30.1
28.0
31.0
31.0
29.5
Atlas
11B
5-shot
$4.6
52.8
47.9
GPT-3
13B
5-shot
24.3
27.1
25.6
26.5
26.0
GPT-NeoX
20B
5-shot
34.9
29.8
33.7
33.6
GPT-3
175B
5-shot
36.7
40.8
50.4
48.8
43,9
GPT-Neo
2.7B
0-shot
28.2
30.1
21.9
24.4
26.1
T03B
3B
0-shot
29.9
34.2
40.4
38.1
35.7
GPT-J
6B
0-shot
26.9
29.3
29.2
27.4
28.2
T0
11B
O-shot
33.3
42.2
48.5
48.9
43.2
Atlas
11B
O-shot
38.0
43.6
54.1
54.4
47.5
GPT-NeoX
20B
O-shot
29.2
29.9
28.5
27.0
28.7
OPT
30B
O-shot
27.7
30.1
27.0
28.6
28.4
KiCsmall
0.06B
0-shot
26.4
26.6
26.8
27.5
26.8
KiCuuse
0.22B
0-shot
27.9
30.7
33.7
31.4
KiCLarge 0.77B
0-shot
38.3
43.6
39.4
Table 3: Comparison to state-of-the-an results on the test set of MMLU tasks. Following standard approaches, we choose the prompt that yields the best accuracy (%) on the validation set. Additional models used for comparison: Gopher (Rac et al. 202I), Atlas (Izacard et al. 2022).
Our main model KiC is initialized with M5 an improved version of T5 that continues training T5 for additional 100K steps on the LM objective (Lester al.] [02T) to enhance its ability to generate natural language. Similar to TO, train our KiC model mixture of multiple tasks (39 tasks in total) by combining and shuffling all training instances from different tasks (8.4M total) and predict unseen (held-out) tasks to evaluate zero-shot generalization ability. Our final KiCL model trained with 128 V100 GPUs for 42 hours. More training details are in Appendix A.2
Zero-shot generalization We evaluate
KiC model two groups of zero-shot datasets. 1)
Held-out tasks of P3 contain two coreference tasks, three NLI tasks, three sentence completion tasks and one word sense disambiguation (WSD) task. Table shows that our KiC model outperforms
7

---

Published as a conference paper at ICLR 2023
Paraphrase QQP
Close Book QA ARCovallonee
MultiCChoice QA CosmosQA
Model
MRPC
PAWS
ARCrasy
WikiQA
CoS-Ext.11
SciQ
Togag
85.30x 85.5o7
88. 88.6u.
94.7Go
10.9
37.50,
95.401
58.1o3 76.30.
71.2239
92.5134
LaCge
89.30.3
95.30.1
67.91.
46.5
95.7p3
81.328..
94.6110
Multi-Choice QA
Model
DREAM
OpenBookQA"
PIQA
QASC QuAIL
QuaRTz
RACEMaiie
RACEnigh
TO arge
72.9no 82.5o.1
38.81,
53.221
97.6an
71.4
84.8as 89.7p.8
61.6k1 74.81L0
49.673
KiCLaree
53.42.
64.67.9
19.1
78.919.
65.79.1
Multi-Choice QA BoolQ"
Sentiment Analysis
Topic Classification
Model
SociallQA
WikiHop
WIQA
IMDB' Rotten Tomatoes
AG News DBpedial4*
TO
67.7100
62.612
60.9o.1
75.8
95.227A
87.803
94.0pe 94.2g.1
28.429
KiCLare
74.211.5
72.923
58.80.
79.1a.5
96.527.7
91.702
31.353
Table 4: In-domain evaluation results measured in accuracy (%) and standard deviation. arge and aiCr are trained using the same collection of tasks and knowledge selector during multitask learning. * indicates that the training data provided by this task are not used in multitask training. Thus, we regard tasks with as in-domain zero-shot evaluation because KiC has observed similar tasks (such as other multi-choice QA tasks) in multitask training. 4 indicates that it's the score on the test set. Otherwise, we report the score on the validation set.
while KiCrarge has the
all zeroshot baseline models (c.g., GPT-NeoX, OPT) that are 25-38x larger. Moreover, KiC beats To3B that has 3B parameters on all 9 tasks by a large margin with our adaptive knowledge selector and only 0.77B parameters. 2) Massive Multitask Language Understanding (MMLU) (Hendrycks et al., 2020) benchmark is designed measure knowledge acquired in model pretraining. MMLU covers 57 subjects under four categories, i.e., STEM, Humanities, Social Sciences and Other. Comparisons with SOTA LMS are shown in Table 3 We can see that KiCTaare beats all fine-tuning baseline models RoBERTaLarge and GPT-2 without using any training data from MMLU. Surprisingly, KiCLarge achieves an average performance of 39.4% using only 0.77B parameters, which is just 4.5% below the 5-shot performance of GPT-3 that has 175B parameters (227x larger). To investigate how the KiC knowledge selector leverages different knowledge resources when applying to unseen tasks, we plot the distributions of the selected knowledge categories in Figure More discussions and analysis can be found in Appendix B Finally, to examine the importance of different KiC components (e.g.. knowledge selectors, external knowledge sources, etc.), we conduct extensive ablation studies by comparing our full KiC model with the following baselines: (i) KiC without knowledge, (ii) KiC with an external memory that contains only plain text (English Wikipedia), (iii) KiC without knowledge- selector but retrieving from mixture of all knowledge categories, (iv) KiC with task-adaptive selector, and (v) KiC without generalist. The results are reported Table 12 Appendix B
KiC in multi-task training To see whether our KiC learning can help with multi-tasking training. we reproduce Torage with the same collection of tasks and evaluate KiC on the validation set of each in-domain task (Table Here, in-domain tasks can be divided into two groups tasks used in multitask training and tasks not used in multitask training but within the observed task category. Again, KiCLarge outperforms Larage with significant improvement on in-domain unseen tasks (tasks marked with *) such as Race and BoolQ and noowledge-intnsiing tasks such as CosmosQA and DREAM. It demonstrates the superiority of our proposed KiC learning in multi-tasking training.
Emerging behavior Wei et al. (2022) discover that language models usually can only perform a near-random zero/few-shot performance when they are small but achieves a substantial performance jump when they reach a certain critical threshold of scale (size). A language model is generally considered superior if it can show emerging behavior at a smaller model scale. Therefore, we compare our KiC model with TS and TO on held-out tasks to see how performance change with respect to their model sizes. From Figure 3 we can see that T5 is around random guess when the model is below 1 11B. TO is better than T5 as it shows emerging behavior when it increases from 3B to 1IB. Surprisingly, our KiC model shows emerging behavior when it increases from 0.22B to 0.77B, which demonstrates that our semi cami-paraettric model can achieve the same language understanding capacity using much fewer parameters with the help of adaptive knowledge selector and external knowledge.
8

---

Published as a conference paper at ICLR 2023
KiC
Random
T5
Winogrande XL
Word-in-Context
HellaSwag
ANLI
60
Accuracy (9)
Accumcy (%)
32.5
Accuracy (%)
40
Accuracy
54
30.0
55
52
27.5
35
50
50
25.0
0.18
18
108
0.18
18
10B
0.18
18
10B
0.18
IB
10B
CB
RTE
CОРА
MMLU
80
80
Aceurcc (9)
80
Accuracy Veenssy (%)
60
Accuracy
60
30
40
0.18
18
10B
0.18
18
10B
0.18
1B
10B
0.18
1B
10B
Figure 3: Emerging behaviors of T5, TO and KiC models. Our KiC model shows emerging behavior at much smaller model scale (when it increases from 0.22B to 0.77B) compared to TO.
RELATED WORK
Knowledge Injection of PLMs Although PLMs can capture knowledge such as linguistic, semantic, commonsense, and world knowledge to some extent, they can only memorize knowledge vaguely in parameters, causing poor performance on knowledge-intensinn effort inject knowledge such lexical knowledge, entity knowledge graph, syntactic knowledge into LM pre-training (Yang et al.] (202T. For example, besides masked language modeling (MLM) and next sentence prediction (NSP), Lauscher et al. (2020) add synonyms and byponym-hypernym relation prediction between words and Levine et al. (2020) add supersense prediction of masked words into LM training objectives. To use entity knowledge, ERNIE 2.0 (Sun al. (020) introduces named entity masking to learn better embeddings for semantic units, Peters et al. (2019) include entity linking, hypernym linking into pre-training and K-BERT (Liu et al. 2020) uses entity knowledge triples to construct knowledge-rich sentence trees. For syntax knowledge injection, Wang al. (2021) integrate dependency relation prediction into LM training and Bai ct al. (202I) incorporate syntax tree information through syntax-awart self-attention mechanism.
tasks. Recent studies make a great
Semi-parametric language models Most of the existing works on semi-parametric language models (Khandelaa et al. 2019 Zhhong et al. 2022, Grave al. 2017 Merity et al. 2017 de Mas son d' d'Autume et al.) 2019 Guu et al. 2020 Fan et al. 2021 Lewis et al. 2020) mainly focus on improving the language modeling capability (e.g., improving perplexities) or particular category of downstream task (e.g., open-domain question answering). Some recent works (Izacard al. 2022 Borgeaud al. 2022: Petroni et al. 202T) seek to improve diverse downstream tasks with an external memory. All these works augment the parametric language model with memories of plain texts. In contrast, we focus on developing semi-parametric language models with a knowledge- memory for improving the performance of wide range of downstream language tasks.
CONCLUSIONS AND FUTURE WORK
This work develops a novel semi-parametric language model architecture, Knowledgeinn-Cotte (KiC), which empowers parametric text-to-text language model with knowledge-rich external memory containing six different types of knowledge. We also design an instance-adaptive know ledge selector to retrieve the most helpful pieces of knowledge for each input instance. As knowledge-rich semi parimparametric language model, KiC only needs a relatively smaller parametric part to achieve superior cero-shot performance model scale compared to the fully-paramett models. Future work may include future exploiting unstructured plain texts pre-train KiC.
unseen tasks and exhibits emergent abilities much smaller

---

Published as a conference paper at ICLR 2023
REFERENCES
Jiangang Bai. Yujing Wang, Yiren Chen, Yaming Yang, Jing Bai, Jing Yu, and Yunhai Tong. Syntax- bert: Improving pre-trained transformers with syntax trees. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, Pp. 3011-3020, 2021.
Yonatan Bisk, Rowan Zellers, Jianfeng Gao, Yejin Choi, et al. Piqa: Reasoning about physical commonsense in natural language. In Proceedings of the AAAI conference artificial intelligence, volume 34, pp. 1432-7439, 2020.
Sid Black, Gao Leo. Phil Wang, Connor Leahy, and Stella Biderman. GPT-Neo: Large Scale Autore- gressive Language Modeling with Nesh-Tensorflow, March 2021. URL https://doi....... org/ 10. 10.5281/zenooe
5297715 If you use this software, please cite it using these metadata.
Sidney Black, Stella Biderman, Eric Hallahan, Quentin Anthony, Leo Gao, Laurence Golding, Horace He, Connor Leahy, Kyle McDonell, Jason Phang, et al. Gpt-neox-225 -20b: An open-source autore- gressive language model. In Proceedings of BigScience Episode 5- Workshop Challenges & Perspectives in Creating Large Language Models, pp. 95-136, 2022.
Sebastian Borgeaud, Arthur Mensch, Jordan Hoffmaann, Trevor Cai, Eliza Rutherford, Katie Millican, George Bm Van Den Driessche, Jean- -aantttptstte Lespiau, Bogdan Damoc, Aidan Clark, al. Improving language models by retrieving from trillions of tokens. In International Conference on Machine Learning, pp. 2206-2240. PMLR, 2022.
Tom Brown, Benjamin Mann, Nick Ryder, Mclanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models few-shot learners. Advances in neural information processing systems, 33:1877-1901, 2020.
Mario Bunge. Causality and modern science. Routledge, 2017.
Aakanksha Chowdhery, Sharan Narang, Jacob Devlin, Maarten Bosma, Gaurav Mishra, Adam Roberts, Paul Barham, Hyung Won Chung, Charles Sutton, Sebastian Gehrmann, et al. Palm: Scaling language modeling with pathways. arXiv preprint ar0.i:220..0231111 2022.
Christopher Clark, Kenton Lee, Ming-Wes Chang, Tom Kwiatkowski, Michael Collins, and Kristina Exploring the surprising difficulty of natural yes/no questions. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume (Long and Short Papers). pp. 2924-2936 Minneapolis, Minnesota, June 2019. Association for Computational Linguistics. doi: 10. 10.1/833/v/ N19-1300. ht.hotts::// ac ant
Toutanova. BoolQ:
wrg.Nor/... NN 90119-11300
Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tafjord. Think you have solved question answering? try arc, the ai2 reasoning challenge. arXiv preprint arXiv: 0803. 2018.
De Marneffe, Mandy Simons, and Judith Tonhauser. The commitmentbank: In- vestigating projection in naturally occurring discourse. In proceedings of Sinn und Bedeutung. volume 23, pp. 107-124, 2019.
Cyprien de Masson d'Autume, Sebastian Ruder, Lingpeng Kong, and Dani Yogatama. Episodic mem- ory in lifelong language learning. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Bur Buc, E. Fox, and R. Garnett (eds.). Advances in Neural Information Processing Systems, volume 32, Cur- Associates, Inc., 2019. URL https: http:::::s//ppppppdppppe mlle/ffd2er Fed2e8022 456ea2501 wad22caaaab337 Paperrr..ppppppp ppff
neur ispripp...o ps wwtpppppp////..///////
Gianna M Del Corso, Antonio Gulli, and Francesco Romani. Ranking a stream of news. In Proceedings of the 14th international conference on World Wide Web, pp. 97-106, 2005.
Jacob Devlin, Ming-Wor Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume I (Long and Short Papers), pp. 4171-4186, 2019.
10

---

Published as a conference paper at ICLR 2023
Bill Dolan and Chris Brockett. Automatically constructing corpus of sentential paraphrases. In Third International Workshop on Paraphrasing (IWP2005), 2005.
Angela Fan, Claire Gardent, Chloé Braud, and Antoine Bordes. Augmenting Transformers with
KNN-Based Composite Memory for Dialog. Transactions of the Association for Computational Linguistics, 9:82-99, 99, 03 2021. ISSN 2307-387X. doi: 10.1162/tacl 00356. URL https
//doi . org/i.org/000 10. 1tw./taccllccc. a 00356
William Fedus, Barret Zoph, and Noam Shazeer. Switch transformers: Scaling to trillion parameter models with simple and efficient sparsity. Journal of Machine Learning Research, 23(120): 2022.
Edouard Grave, Armand Joulin, and Nicolas Usunier. Improving neural language models with continuous cache. In International Conference on Learning Representations, 2017. URL
htttss:/ net wow.umidd-i1452...
Ruiqi Guo, Philip Sun, Erik Lindgren, Quan Geng, David Simcha, Felix Chern, and Sanjiy Kumar. Accelerating large-scale inference with anisotropic vector quantization. International Conference on Machine Learning, pp. 3887-3896. PMLR, 2020.
Kelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat, and Mingwei Chang. Retrieval augmented language model pre-training. In Hal Daumé III and Aarti Singh (eds.), Proceedings of the the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pp. -9399. PMLR, 13-18 Jul 2020. URL https: https: htttp:://proceedinngs. mlr
pTess/v119/qun2UU html
Dan Hendrycks, Collin Burns, Steven Basart, Andy Zou, Mantas Mazeika, Dawn Song, and Jacob Steinhardt. Measuring massive multitask language understanding. In International Conference on Learning Representations, 2020.
Lifu Huang, Ronan Le Bras, Chandra Bhagavatula, and Yejin Choi. Cosmos qa: Machine reading comprehension with contextual commonsense reasoning. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP) pp. 2391-2401 2019.
Jena D. Hwang, Chandra Bhagavatula, Ronan Le Bras, Jeff Da. Keisuke Sakaguchi, Antoine Bosselut, and Yejin Choi. (Comet-) Atomic 2020: On symbolic and neural commonsense knowledge graphs. In Proceedings of the 25th AAAI Conference on Artificial Intelligence, Virtual Event, pp.
6384-6392, 2021.
Gautier Izacard, Patrick Lewis, Maria Lomeli, Lucas Hosseini, Fabio Petroni, Timo Schick, Jane Dwivedi- Yu, Armand Joulin, Sebastian Riedel, and Edouard Grave. Few-shot learning with retrieval augmented language models. arXiv preprint arXiv:2208.03299, 2022.
Robert A Jacobs, Michael Jordan, Steven Nowlan, and Geoffrey Hinton. Adaptive mixtures of local experts. Neural computation, 3(1):79-87, 1991.
Michael I Jordan and Robert A Jacobs. Hierarchical mixtures of experts and the em algorithm. Neural computation, 6(2):181-214 1994.
Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. Scaling laws for neural language models. arXiv preprint arXiv:2001.088 008361,,00006,,,00.0010 2020.
Urvashi Khandelwal, Omer Levy, Dan Jurafsky, Luke Zettlemoyer, and Mike Lewis. Generalization through memorization: Nearest neighbor language models. arXiv preprint 1010721
2019.
Daniel Khashabi, Snigdha Chaturvedi, Michael Roth, Shyam Upadhyay, and Dan Roth. Looking beyond the surface: A challenge set for reading comprehension over multiple sentences. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Com- putational Linguistics: Human Language Technologies, Volume (Long Papers), pp. 252-262, 2018.
11

---

Published as a conference paper at ICLR 2023
Tushar Khot, Peter Clark, Michal Guerquin, Peter Jansen, and Ashish Sabharwal. Qasc: A dataset for question answering via sentence composition. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pp.
2020.
Guokun Lai, Qizhe Xie, Hanxiao Liu, Yiming Yang, and Eduard Hovy. RACE: Large-scale ReAding comprehension dataset from examinations. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 785-794, Copenhagen, Denmark, September 2017. Association for Computational Linguistics. doi: 10.18653/w1/DD1-10033 URL https
7/aclantho ogy. 0rtp////1111110500
Anne Lauscher, Ivan Vulić, Edoardo Maria Ponti, Anna Korhonen, and Goran Glavaš. Specializing unsupervised pretraining models for word-level semantic similarity. In Proceedings of the 28th International Conference on Computational Linguistics, pp. 1371-1383, 2020.
Jens Lehmann, Robert Isele, Max Jakob, Anja Jentzsch, Dimitris Kontokostas, Pablo N Mendes, Sebastian Hellmann, Mohamed Morsey, Patrick Van Kleef, Sören Auer, et al. Dbpedia-a large- scale, multilingual knowledge base extracted from wikipedia. Semantic web, 6(2):167-195, 2015.
Brian Lester, Rami AI-Rfou, and Noah Constant. The power of scale for parameter-efficient prompt tuning. Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pp. 3045-3059, 2021.
Hector Levesque, Ernest Davis, and Leora Morgenstern. The winograd schema challenge. In Thirteenth international conference on the principles of knowledge representation and reasoning, 2012.
Yoav Levine, Barak Lenz, Or Dagan, Ori Ram, Dan Padnos, Or Sharir, Shai Shwarr- Amnon Shashua, and Yoav Shoham. Sensebert: Driving some sense into bert. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 4656-4667, 2020.
Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Na- man Goyal, Heinrich Küttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, Sebastian Riedel, and Douwe Kiela. nenrieval-augmennee generation for knowledge-intensive nip tasks. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin (eds.), Ad- vances in Neural Information Processing Systems, volume 33, pp. 9459-9474. Curran Asso- ciates, Inc., 2020. URL http/tttt//////eeeddnng iet.eeeeeddinn....ri..seeeee.eee neurips...... www.n/ips.cpppppee//2..... cc/ppapp////222//11eeee 00
6b493230205 780 250
pdf
Zhongyang Li. Xiao Ding, Ting Liu, J. Edward Hu, and Benjamin Van Durme. Guided generation of cause and effect. Proceedings of the IJCAI, 2020.
Hugo Liu and Push Singh. Conceptnet- practical commonsense reasoning tool-kit. BT technology journal, 22(4):211-226, 2004.
Weijie Liu, Peng Zhou, Zhe Zhao, Zhiruo Wang, Qi Ju, Haotang Deng, and Ping Wang. K-bert: Enabling language representation with knowledge graph. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pp. 2901-2908, 2020.
Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. Roberta: A robustly optimized bert pretraining 2019.
approach. arXiv preprini urXiv:
Andrew Maas, Raymond E Daly, Peter T Pham, Dan Huang, Andrew Ng, and Christopher Potts. Learning word vectors for sentiment analysis. In Proceedings of the 49th annual meeting of the association for computational linguistics: Human language technologies, pp. 142-150, 2011.
Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models. In International Conference on Learning Representations, 2017. URL https://
openreview weret//oorrmiff/ (ot.oruunmnddyyyyduuo..
Todor Mihaylov, Peter Clark, Tushar Khot, and Ashish Sabharwal. Can a suit of armor conduct electricity? a new dataset for open book question answering. In Proceedings the 2018 Conference Empirical Methods in Natural Language Processing. pp. 2381-2391. Brussels, Belgium, October-November 2018. Association for Computational Linguistics. doi: 11111166///D1...... 1260. U htRthtttt:://ca antho ogg.org///1-11266/
12

---

Published as a conference paper at ICLR 2023
Nasrin Mostafazadeh, Nathanael Chambers, Xiaodong He. Devi Parikh, Dhruv Batra, Lucy Van- derwende, Pushmeet Kohli, and James Allen. A corpus and cloze evaluation for deeper under- standing of commonsense stories. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pp. 839-849 San Diego, California, June 2016. Association for Computational Linguistics. doi: 10.18653/v 1098. URL ltap:::://clannhhlogyyooooo
1098
Nasrin Mostafazadeh, Aditya Kalyanpur, Lori Moon, David W. Buchanan, Lauren Berkowitz, Or Bi- ran, and Jennifer Chu-Carroll. GLUCOSE: Generalized and contextualized story explanations. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, 2020.
Virtual Event, pp.
Xiaoman Pan, Kai Sun, Dian Yu, Jianshu Chen, Heng Claire Cardie, and Dong Yu. Improving question answering with external knowledge. In Proceedings of the 2nd Workshop Machine Reading for Question Answering. pp. 27-37, Hong Kong, China, November 2019, Association for Computational Linguistics. doi: 10. 1..11863/11/D11958000 URL URLhttps:: /otttps:/aci /ta///allannnhooo antho oxg/D19-
Bo Pang and Lillian Lee. Seeing stars: Exploiting class relationships for sentiment categorization with respect to rating scales. In Proceedings of the 43rd Annual Meeting of the Association for Computational Linguistics (ACI, pp- 115 115-124, 2005.
Matthew E. Peters, Mark Neumann, Robert Logan, Roy Schwartz, Vidur Joshi, Sameer Singh, and Noah A Smith. Knowledge enhanced contextual word representations. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pp. 43-54, 2019.
Fabio Petroni, Aleksandra Piktus, Angela Fan, Patrick S. H. Lewis, Majid Yazdani, Nicola De Cao, James Thorne, Yacine Jernite, Vladimir Karpukhin, Jean Maillard, Vassilis Plachouras, Tim Rocktäschel, and Sebastian Riedel. Kilt: benchmark for knowledge intensive language tasks. In NAACL-HLT, pp. 2523 2544, 2021. URL https: org /ttp://0....0r1111.11663/1//1/1/
naacl ma in.in..0000 200
Mohammad Taher Pilehvar, Jose Camacho-Collados, et al. WiC: the word-in-context dataset for evaluating context-sensitive meaning representations. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volune I (Long and Short Papers), pp. 1267-1273, Minncapolis, Minnesota, June 2019, Association for Computational Linguistics. doi: 10.18653/11N11--12222 URL https
7/acl //aclanthol ogy. ogg.ooggoo..ooooooooooo.. 9-199-122 128
Delai Qiu, Yuanzhe Zhang, Xinwei Feng, Xiangwen Liao, Wenbin Jiang, Yajuan Lyu, Kang Liu, and Jun Zhao. Machine reading comprehension using structural knowledge graph-aware network. In Proceedings of the EMNLP-IJCNLP, pp. 5896-5901, Hong Kong, China, 2019, URL https
//aclanthology.co Togel wwt. 1602
Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. Language models are unsupervised multitask learners. OpenAl blog, 1(8):9 2019.
Jack W Rae, Sebastian Borgeaud, Trevor Cai, Katie Millican, Jordan Hoffmann, Francis Song, John Aslanides, Sarah Henderson, Roman Ring, Susannah Young, et al. Scaling language models: Methods, analysis & insights from training gopher. arXiv preprint 12Xiv:2112.114444 2021.
Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, Peter J Liu, et al. Exploring the limits of transfer learning with unified text-to-text transformer. Mach. Learn. Res., 2 (1(11)) 2020.
Nazneen Fatema Rajani, Bryan McCann, Caiming Xiong, and Richard Socher. Explain yourself! leveraging language models for commonsense reasoning. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 4932-4944 Florence, Italy, July 2019. Association for Computational Linguistics. doi: 10.18653/v 1P19-1991 1487. URL https
//aclanthol ogy.
13

---

Published as a conference paper at ICLR 2023
Melissa Roemmele, Cosmin Adrian Bejan, and Andrew S Gordon. Choice of plausible alterna- tives: An evaluation of commonsense causal reasoning. In AAAI spring symposium: logical formalizations of commonsense reasoning, pp. 90-95, 2011.
Anna Rogers, Olga Kovaleva, Matthew Downey, and Anna Rumshisky. Getting closer to ai complete question answering: A set of prerequisite real tasks. In Proceedings of the AAAI conference on artificial intelligence, volume 34, pp. 8722-8731, 2020.
Stuart Rose, Dave Engel, Nick Cramer, and Wendy Cowley, Automatic Keyword Extraction from Individual Documents, pp. 1 - 20. 03 2010. ISBN 9780470689646. doi: 1011002/9780470699666.
ch1.
Keisuke Sakaguchi, Ronan Le Bras, Chandra Bhagavatula, and Yejin Choi. Winogrande: adversarial winograd schema challenge at scale. Communications of the ACM, 64(9):99-106, 2021.
Victor Sanh, Albert Webson, Colin Raffel, Stephen Bach, Lintang Sutawika, Zaid Alyafeai, Antoine Chaffi,, Araud Stiegler, Teven Le Scao, Arun Raja, al. Multitask prompted training enables zero-shot task generalization. In The Tenth International Conference on Learning Representations, 2022.
Maarten Sap, Hannah Rashkin, Derek Chen, Ronan Le Bras, and Yejin Choi. Social IQa: Com- monsense reasoning about social interactions. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Confer- ence on Natural Language Processing (EMNLP-IJCNLP)) pp. 1463-4477 Hong Kong, China, November 2019. Association for Computational Linguistics. doi: 10.1865//v1/119114544 URL
Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoe Le, Geoffrey Hinton, and Jeff Dean. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer. In International Conference Learning Representations, 2017.
Kaitao Song, Xu Tan, Tao Qin, Jianfeng Lu, and Tie-Yan Liu. Mpnet: Masked and permuted pre-training for language understanding. In Hugo Larochelle, Mare' Aurelio Ranzato, Raia Hadsell, Maria-Florina Balcan, and Hsuan-Tien Lin (eds.), Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, 2020.
Kai Sun, Dian Yu, Jianshu Chen, Dong Yu, Yejin Choi, and Claire Cardie. Dream: A challenge data set and models for dialogue-based reading comprehension. Transactions of the Association for Computational Linguistics, 7:217-231, 231, 2019.
Kai Sun, Dian Yu, Jianshu Chen, Dong Yu, and Claire Cardie. Improving machine reading compre- hension with contextualized commonsense knowledge. In Proceedings of the ACL pp. 8736-8747, 2022. URL RoRLstttps::/acanthooooe
org/ orgg//2222 2022 acl long. 598
Yu Sun, Shuohuan Wang, Yukun Li, Shikun Feng, Hao Tian, Hua Wu, and Haifeng Wang. Emnic 2.0: A continual pre-training framework for language understanding. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pp. 8968-8975, 2020.
Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction. MIT press, 2018.
Oyvind Tafjord, Matt Gardner, Kevin Lin, and Peter Clark. QuaRTz: An open-domain dataset of qualitative relationship questions. Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pp. 5941-5946, Hong Kong, China, November 2019. Association
for Computational Linguistics. doi: 10. 1155//v1/D11-1666// URL http::ttt////e //acl htt///ccaanthooc antho logy
org/Di9-110
Niket Tandon, Bhavana Dalvi, Keisuke Sakaguchi, Peter Clark, and Antoine Bosselut. WIQA: A dataset for "what if..." reasoning over procedural text. In Proceedings of the 2019 Conference Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNIPP-ICCNIP), pp. 6076-6085, Hong Kong, China, November
14

---

Published as a conference paper at ICLR 2023
2019. Association for Computational Linguistics. doi: 101118553/1//DD19.. 1629. URL https
Denny Vrandečié and Markus Krötzsch. Wikidata: free collaborative knowledgehase. Communica- tions of the ACM, 57(10))78-85, 2014.
Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R Bowman. Glue: A multi-task benchmark and analysis platform for natural language understanding. arXiv preprint arXiv: 1804.0084 2018.
Alex Wang, Yada Pruksachatkun, Nikita Nangia, Amanprect Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. Superglue: A stickier benchmark for general-purpose language understanding systems. Advances in neural information processing systems, 32, 2019.
Ben Wang and Aran Komatsuzaki. GPT-J-6B: A 6 Billion Parameter Autoregressive Language Model. jax, May 2021.
httpp::/ggite
Ruize Wang, Duyu Tang, Nan Duan, Zhongyu Wei, Xuan-Jing Huang, Jianshu Ji, Guihong Cao, Daxin Jiang, and Ming Zhou. K-adapter: Infusing knowledge into pre-trained models with adapters. In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, pp. 1405-1418, 2021.
Jason Wei, Yi Tay, Rishi Bommasani, Colin Raffel, Barret Zoph, Sehastian Borgeaud, Dani Yogatama, Maarten Bosma, Denny Zhou, Donald Metzler, et al. Emergent abilities of large language models. Transactions on Machine Learning Research, August 2022.
Johannes Welbl, Nelson F. Liu, and Matt Gardner. Crowdsoureing multiple choice science questions. In Proceedings of the 3rd Workshop on Noisy User-generated Text, pp. 94-106, Copenhagen, Den- mark, September 2017. Association for Computational Linguistics. doi: 10. 10.18653/1//117-4411
URL http:::/taaae.......e http:///caaaahoooo/o antho ogy. ogt.
Johannes Welbl, Pontus Stenetorp, and Sebastian Riedel. Constructing datasets for multi-hop reading comprehension across documents. Transactions of the Association for Computational Linguistics, 6:287-302, 2018. doi: 10.1 1a111622acl__000000
org/018 1021
Jian Yang, Gang Xiao, Yulong Shen, Wei Jiang, Xinyu Hu, Ying Zhang, and Jinghui Peng. A survey of knowledge enhanced pre-trained models. arXiv preprint arXiv:21 10.00269, 2021.
Yi Yang, Wen-tau Yih, and Christopher Meek. WikiQA: A challenge dataset for open open-domain question answering. In Proceedings of the 2015 Conference Empirical Methods in Natural Language Processing, pp. 2013-2015 Lisbon, Portugal, September 2015. Association for Computational Linguistics. doi: 10.18653/v 1237. URL/aatts://allaattotttt http:///ooooooooooo///-11113
Zhi-Xiu Ye, Qian Chen, Wen Wang, and -he Ling. Align, mask and select: A simple method for incorporating commonsense knowledge into language representation models. arXiv preprint, A.CL/1908.0672550 2019, URL https: http://aaxvvvvv.a org http:///as1111...0000 06725v5
Rowan Zellers, Ari Holtzman, Yonatan Bisk, Ali Farhadi, and Yejin Choi. HellaSwag: Can a machine really finish your sentence? In Proceedings of the 57th Annual Meeting of the Association for Com- putational Linguistics. pp. 1791-4800, Florence, Italy, July 2019. Association for Computational Linguistics. doi: 10. 1/t1:////999////// 1472. URL http://llaaaahhooooo
Hongming Zhang, Daniel Khashabi, Yangqiu Song, and Dan Roth. Transomes: From linguistic graphs to commonsense knowledge. In Christian Bessiere (ed.), Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, IJCAI 2020, pp. 4004-4010. ijcai.org,
2020. URL/tttps: //toi. orgg////// 10. 24963/4933/33 /itee/ijaai..// 2020/554
Hongming Zhang, Yintong Huo, Xinran Zhao, Yangqiu Song, and Dan Roth. Learning contextual causality between daily events from time-consecutive images. In IEEE Con- ference Computer Vision and Pattern Recognition Workshops, CVPR Workshops 2021, virtual, June 19-25. 2021. pp. 1752-1755. Computer Vision Foundation IEEE, 2021.
URL https: hatp::///cpeaaceeo wttp/ccess.cs.ceo/ thectf com http://ottttttttecc http:///oooo.///////////////////
Zhang Ctatniiinn_ooteetaaaaaaaaa Causality Between Seetween_Dailye Beent__ereetennneeeee___ From
i me Coo.aeutt ive wwwagaaaavveeeemmmmm 2001__2212221
15

---

Published as a conference paper at ICLR 2023
Hongming Zhang, Xin Liu, Haojie Pan, Haowen Ke, Jiefu Ou, Tianqing Fang, and Yangqiu Song. ASER: towards large-scale commonsense knowledge acquisition via higher-order selectional preference over eventualities, Artif. Intell., 309:103740, 2022a. URL htttaaa///ooo.o///11
1016/j.artint. 2022. 103740
Jiayao Zhang, Hongming Zhang, Weijie J. Su, and Dan Roth. ROCK: causal inference principles for reasoning about commonsense causality. In Kamalika Chaudhuri, Stefamie Jegelka, Le Song, Csaba Szepesvári, Gang Niu, and Sivan Sabato (eds.), International Conference on Machine Learning, ICMI, 2022, 17-23 July 2022, Baltimore, Maryland, USA, volume 162 Proceedings of Machine Learning Research, pp. 26750-26771, PMLR, 2022b. URL httttpss:pppccceeiiitit press/v162 v2/ zhang22ang22 html
mlr
Sheng Zhang. Xiaodong Liu, Jingjing Liu, Jianfeng Gao, Kevin Duh, and Benjamin Van Durme. Record: Bridging the gap between human and machine commonsense reading comprehension. arXiv preprint arXiv: 1810. /2885, 2018.
Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen, Christopher Dewan, Mona Diab, Xian Li, Xi Victoria Lin, et al. Opt: Open pre-trained transformer language models. arXiv preprint arXiv:2205.00000 2022c.
Yuan Zhang, Jason Baldridge, and Luheng He. Paws: Paraphrase adversaries from word scrambling. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pp. 1298-1308, 2019a
Zhengyan Zhang, Xu Han, Zhiyuan Liu, Xin Jiang, Maosong Sun, and Qun Liu. ERNIE: Enhanced language representation with informative entities. In Proceedings of the ACL, pp. 1441-1451, 2019b.
-rwpp19-gg91900 1139
Zexuan Zhong, Tao Lei, and Danqi Chen. Training language models with memory augmentation. arXiv preprint urXiv:2205. /2674, 2022.
16

---

Published as a conference paper at ICLR 2023
APPENDIX
A EXPERIMENTAL DETAILS
A.1 KNOWLEDGE PIECES
In this section, we give the basic statistics of different knowledge categories that are used in KiC Table 5 In addition, further give examples of the knowledge pieces for each category (Ta The knowledge pieces are in the form of < subject, relation, object >. They will further encoded into key-value pairs according to different strategies in Appendix A.2
Dictionary
Commonsense
Entity
Event
Script
Causality
# instances storage
1.8M
600K
257M
6.4M
248K
314M
257MB
213MB
155GB
930MB
361MB
36GB
type
human
human
human
auto
Table 5: The statistics of different knowledge categories ("K": thousand, "M": million). Storage is the space required store the original data ("MB": megabyte, "GB": gigabyte). The type marked as "human" means that is collected by crowd-sourcing, and "auto" means it is automatically extracted.
subject
relation
object
Dictionary
apple
definition
common, round fruit
apple
context
Apples were washed, then tipped,
Conmonmeense
bike
bind
CapableOJ
UsedFor
fly
ride
United States
capital
Washington D.C. consists of 50 states
Entity
United States
contest
hungry
before
fond
am hungry
Conjunction
am tired
Script
leave mer
MILLER: Peners, you me.
A MAN'S VOICE, in agony, CRACKLES over
Miller's radio:
VOICE: Don't leave
MILLER: Justin? Justin, sound off. Justin!"
Miller trails off
flickers across
his visor. He nums.
DEREK: Michael, wey
waves DEREK, one longest dreads.
very stoned
brother, peace
MICHAEL (continuing.) J: Derek save some after lunch, bub? DEREK: Michael, my brother, peace Cameron follow into the cofeteria.
they
Causality
bubies cry bubier cry
therefore mode becouse mode
will lead to sleep problems because they hungry
Table 6: Examples of knowledge piece in the format of <subject, relation, object> triplets. For script knowledge, < subject, relation, object > becomes < verbal information, context, nonverbal information > extracted from movie scripts (Sun al. 2002)). where verbal information is an utterance, nonverbal information can be body movements, vocal tones, or facial expressions, etc., and context is the entire text of the scene from which the verbal-nonverbal pair is extracted. The verbal and nonverbal messages are conveyed within short time period (usually mentioned in the same turn or adjacent turns), Note that the script knowledge can be viewed as special kind of commonsense knowledge, where the relations characterized by free texts.
A.2 IMPLEMENTATION DETAILS
Key-Value Value pairs construction Our knowledge memory consists of large set of key-value pairs, which are constructed in the following manner. First, we build an initial set of key-value pairs (in textual form) from the original knowledge pieces (i.e., knowledge triplets) according to Table g Then, further encode the keys into dense vectors using MPNet. The encoded keys along with their corresponding values (in textual forms) will stored as the final key-value pairs in our knowledge memory. The encoded key vectors used for knowledge piece retrieval during MIPS search.
17

---

Published as a conference paper at ICLR 2023
Question
High-pressure systems stop air from rising into colder regions of the aimo- sphere where water can condense. What will most likely result if a high-pressure system remains in an area area for loogg period of time?
Answer
Drought
CausalBank (structured)
Persistent high pressure hax stabilizing effect the weather, causing subsiding air that dries the atmosphere.
Wikipedia (plain text)
-reg-pressure systems are alternatively referred as anticyclones. On English language weather maps, high-pressure centers are identified by the letter H in English, within the isobar with the highest pressure value. On constant pressure upper level charts, it is located within the highest height line contour.
Table Examples retrieved supporting knowledge from different resources (i.e., CausalBank v.s. Wikipedia). Note that the retrieved knowledge pieces from CausalBank generally more helpful in solving the problem than the retrieved plain text pieces from Wikipedia.
Key
Value
Dictionary
s
Commonsense
0
Entity
1 r I 7
Event
$ ( o
8 4 r 4
Script
Causality
y B 0 o
s @ o θ
Table 8: Knowledge-specific strategies construct key-value pairs from knowledge triplets subject (s), relation (r), object (o) > (O denotes concatenation). The keys will be further encoded into vector forms using MPNet, which are used for knowledge retrieval during MIPS search.
Retriever We use All-MPNetae-v as the encoder for encoding the keys in knowledge memory well as the input query instance. The model is trained one billion sentence pairs with the contrastive learning objective, and we use the publically available model checkpoint. For most knowledge categories, we directly apply MIPS search to the encoded query and key vectors during retrieval. For the dictionary knowledge and the entity knowledge, we first pre-filter the knowledge pieces according to the following strategies before applying MIPS search.
When retricving from dictionary knowledge, we first use a domain- inneaaiinnddeeedeent keyword extraction algorithm (Rose et al. 2010) to extract important words from the queryf! [ Then, we filter the knowledge pieces so that only the ones related to the important words are retained for MIPS search.
When retrieving from entity knowledge, we follow previous work (Pan et al. (019)) to first extract concept mentions from the query and then link each mention to its corresponding page in Wikipedia. All the knowledge pieces that are not related to the linked concepts excluded from MIPS search.
The above pre-filtering strategies are also common practices when using these types of knowledge, which allow us to locate relevant knowledge pieces more accurately. In addition, they also reduce the MIPS search complexity by focusing only on the most relevant candidates.
Load Balancing Loss To encourage the diversity of knowledge selection, we adopt the load balancing loss from SwitchTransformer (Fedus et 2022 Given K experts, a batch B with B
httees///ugginffccss.c//etteeeee / -mpnet base-v2
18

---

Published as a conference paper at ICLR 2023
sequences, the load balancing loss is computed according to:
K+1
Bal Balancing(S(s)) (K + Σ fc k=0
P.
where fi is the fraction of sequences that are actually dispatched to expert i, and P. is the fraction of the selector probability allocated for expert i, which are defined as
J: B
Σ ZEB
1((arg &
1 arg max Sx(x)= =i), P. B
Σ S,(x).
PEB
The notation 1(.) denotes indicator function that takes the value of one when its argument inside the parenthesis is true and zero otherwise. Note that S;(x) is the probability of assigning a particular sequence z expert while P. is the total probability fractions assigned expert from all the sequences in the batch B. Fedus et al. (2022) point out that the above load balancing loss could encourage uniform routing since it is minimized under a uniform distribution.
The parammtrrssserss of learning KiCBase and KiCLarge are listed in Table 9 In addition, we also list the syper-parametery of single-task finetuning used in Table I0 Note that we set maximum number of retrieved knowledge pieces to concatenate. If a aaddddegggeeeeeed input sequence exceeds the maximum input length, then will be truncated.
Hyper-parameterss
Learning Rate
Max. Input Length
Max. Output Length
Batch Size
a
# #poch
Max. Knowledge Pieces
KiCBase
5e-5
512
64
1024 1024
0.05
5
10
KiClange
5c-5
512
64
0.01
5
10
Table Hyper-paramettrs for KiCBase and KiCLarge-
Model
Learning
Max. Input
Max. Output Length
Batch Size
epoch
Max. Knowledge
Rate
Length
Pieces
T--LMMaddapguee
2
1024
512
16
10
5
Table 10: Hyper-parameteis for single task fine-tuning.
provide the computation resources used for training Basee TO arge. KiCrase and KiClarge along with the total wall-clock time.
Computation cost
In Table 11
Hardware
Hours
T0
NVIDIA V100 x 64
21.2
TOLage
NVIDIA V100 128
27.4
BaCee
NVIDIA V100
33.2
KiClangs
NVIDIA V100 x 128
41.5
Table 11: Hardware and training time.
B ADDITIONAL EXPERIMENTAL RESULTS
In this section, we provide additional experimental results and visualization results.
Ablation studies of KiC We now further examine the contribution of different components of the KiC model by performing extensive ablation studies. Specifically, implement the following ablation models: (i) KiC without knowledge, (ii) KiC with an external memory that contains only plain text (English Wikipedia), (iii) KiC without knowledge-selector but retrieving from mixture of
19

---

Published as a conference paper at ICLR 2023
all knowledge categories, (iv) KiC with task-adaptive selector, and (v) KiC without generalist. The results are reported in Table 12 First of all, it is important to leverage the knowledge-rich memory; when removing the knowledge memory replacing it with plain-text memory that consists of English Wikipedia, the performance would degrade greatly. Second, it is also important to use a knowledge selector to first pick particular category of knowledge and then retrieve the relevant knowledge pieces from it. When we mix all the knowledge categories together with a single retriever, there would be significant performance drop. The main reason that different knowledge categories generally requires certain pre- rre-fiitriing strategy during retrieval (see Appendix A.2). Furthermore, we also find that the instance-adaptive knowledge selector in our KiC model is crucial in achieving good performance. When we replace it with task-adaptive selector, which picks fixed knowledge category for all instances from the same task based on the task description, the performance also noticeably worse. Finally, by comparing KiC without generalist to the original KiC, we also observe that there is a noticeable performance drop, which confirms the importance of allowing the model to ignore all external knowledge for some instances.
Dataset
Task
KiC
w/o knowledge
/w plain texts
w/o selector
/w task-adaptive
w/o generalist
mcan med. sd
mean med. sid
mean med. sd
mcan med. ud
med. ad
mean med. ad
WSC
62.6 65.4 a.
57.6 59.1 5.9
53.3 52.9 17
63.5 64.4 18
62.2 63.9 so
62.8 64.4 2.5
Wino. XL
54.1 55.3 24
50.4 50.5
52.2 52.2
52.5 52.2
53.8 54.7 22
54.2 54.9 am
ANLIgi
36.7 36.3
31.3 30.5
34.0 33.9 os
31.6 31.5
33.1 32.2
35,2 34.6
ANL
34.9 35.0 1.4
32.8 32.7
33.7 33.9 o8
32.8
32.8 as
33.7 33.1 18
35.1 34.9 L.1
ANLIas
37.6 37.6 2.5
34.0 33.8 as
37.0
37.8 1.7
33.9
34.0 1.2
35.5 35.6 1.6
37.0
37.1 1.5
P3
CB
57.5 67.9 22.9
$2.0
60.7 23.0
59.3
69.6 21.
52.7
62.5 20.5
54.0
60.7 22.1
56.8 66.1 21.1
RTB
73.1 74.0 3.8
62.4
62.1
67.6
67.1 27
67.1
66.2
73.1 73.3
73.0 72.4
COPA
81.7 85.3
71.6 73.5
71.1
73.5
75.7
79.0
77.6 82.0
83.9 85.2
HellaSwag
29.7 29.6
25.7
25.7 0.4
26.9 26.7
28.4
28.4 04
29.5 29.3
28.6 28.3
SturyCloze
93.9 14,4
84.5 84.1 1.8
86.9
86.7 1.2
90.4 91.1
89.0 90.0 20
93.6 94.3 1.4
WIC
$2.1 1.5
50.2 50.2 1.D
51.6
51.5 06
50.5
50.3 1.0
$2.1 51.2 24
$2.0 50.8 2.4
Average
55,8 57.6
$0.2 51.2
52.1 53.3
52.6 53.9
54.0 55.1
55.6 56.6
STEM
30.7
28.2
29.1
28.7
29.2
30.3
Humanities
38.3
31,9
36.3
35.3
37.3
MMLU
Soc. Sci.
43.6
33.2
36.6
42
40.5
42.5
Other
44,8
33.8
36.4
42.7
41.8
43,8
Average 39.4
31.8
33.5
37.4
36.7
38.5
Table 12: Ablation study of the KiCLarge model. We consider the following four ablation models: (i) KiC without knowledge (i.e., TO), (ii) KiC with an external memory that contains only plain text (English Wikipedia), (iii) KiC without knowledge-selecton selector but retrieving from a mixture of all knowledge categories, (iv) KiC with a task-adaptive selector, and (v) KiC without generalist. We report the mean, median and standard deviation for P3 tasks over different templates. For MMLU, we report the results on the test set, just like other works in the literature.
Which categories of knowledge are useful for an unseen task? To understand what kind of knowledge categories are retrieved to help particular task, we report the distribution of the selected knowledge by KiClarge for each task in Figure 4 The results show that most of the knowledge categories are useful for different tasks. And the knowledge selector is able to pick the most helpful knowledge type for solving its current task. For example, in Word-in-Context (WiC) task, the model mostly retrieves from the dictionary knowledge help it disambiguate different word senses. In StoryCloze task, it relies more heavily on commonsense knowledge to complete the story ending. For MMLU tasks, since they cover large variety of subjects (i.c., 57 subjects), it not surprising that it needs more diverse categories of knowledge. In addition, the results further show that the generalist in KiC is also very important as the model would frequently choose when solving different tasks. It demonstrates the necessity of allowing the model to ignore all knowledge categories for some instances. Finally, we would like to highlight that we never use any direct supervision to train the knowledge selector. Instead, it learns to make such decisions from the distant supervision of predicting the correct answer. This is valuable because learning to identify the most helpful knowledge for solving particular task is an important step toward general intelligence. More importantly, the results also confirm the effectiveness of our learning strategy based on our KiC-MoE equivalence.
20

---

Published as a conference paper at ICLR 2023
WSC
Winogrande XI,
ANLI RI
ANLI R2
Pareeingg
Percennge
Poreeuzg
Parcentgg
0.25
0.25
0.2
0.00
0.0
0.00
0.0
GEN
ENT
DIC
COM
EVT
SCR
CAU
GEN
ENT
DIC
COM
EVT
SCR
CAU
GEN
ENT
DIC
COM
EVT
SCR
CAU
GEN
ENT
DIC
COM
EVT
SCR
CAU
ANLI R3
CB
RTE
COPA
Pereenage
0.2
Peceenage
0.25
Pecoentage
0.2
Pecoentage
0.25
0.00
0.0
0.00
GEN
ENT
DIC
CDM EVT
SCR
CAU
GEN
ENT
D/C
COM
EVT SCR
CAU
GEN PNT
D/C
COM
EVT
SCR
CAU
GEN
ENT
DIC
COM
EVT
SCR
CAU
Hellaswag
StoryCloze
Word-in-Contex.
MMLU STEM
Pereminge
0.5
Pereminge
0.5
Percmntge
0.25
Penemtage
0.2
0.0
0.0
0.00
0.0
GEN
ENT
DIC
COM
EVT
SCR
CAU
GEN
ENT
DIC
COM
EVT
SCR
CAU
GEN
ENT
DIc
COM
EVT
SCR
CAU
GEN
ENT
DIC
COM
EVT
SCR
CAU
MMLU Humanitics
MMLU Social Sciences
MMLU Other
MMLU All
Percengs
Peccnngge
0.2
Percentage
0.2
Percentags
0.2
0.0
0.0
GEV ENT DIC COM
EVT SCR
CAU
GBV ENT DIC COM EVT SCR
CAU
GEN
ENT DIC
COM EVT SCR
CAU
GEV
ENT
DIC
COM
AVT SCR
CAU
Figure 4: The distribution of the selected knowledge categories for each task. We examine the
following categories knowledge: entity (ENT), dictionary (DIC), commonsense (COM), event (EVT), script (SCR), or causality (CAU) knowledge. In addition, the generalist (GEN) means that do not choose any external knowledge but make predictions based solely on the input query.
Full results for zero-shot performance In Table 13 we provide the full zero-shot results on holdout unseen tasks, where we report both mean and median results together. The reason that report both the mean and median is to be consistent with the results in the TO paper (Sanh et al.) 2022), where they report both metrics. In the main paper, only keep the median results for brevity.
Coreference
NLI
Completion HellaSwag StoryCloze
WSD WsC
Models
Parums
WSC
Wino. XL.
ANLig:
ANLIg:
ANLigs
CB
RTE
COPA
BERT
0.34B
53.2/53.4
49.7/49.5
1/33.8 33.8/33.8
33.2/33.2
45.0/88.2 48.3/48.4 4 48.9/49.0
25.5/25.5
50.1/50.1
50.3/50.2
RoBERTa
0.35B
38.5/37.0
49. 1948/9
33.6/33.4
33.6/33.4
33.5/33.3
44.0/42.9
53.8/54
56.8/56.0
22.9/22.4
48.5/48.5
50.4/50.0
GPT-Noo
2.7B
49.2/45.2
50.4/50.8
34.0/33.5
33.5/33.3
33.5/33.4
36.4/48.2
51.1/51.1
50.3/50.5
24.8/25.0
54.0/54.6
52.2/52.5
GPT-J
6B
44.6/40.4
48 5
33.7/34.0
34.0/33.7
33.7/33.6
26.6/28.6
49.6/50.5
$4.9/56.0
24.7/24.7
53.1/53.3
52.4/51.0
33.4/33.4
55.5/55.3
50.0/50.0
GPT.NeoX
20B
56.0/60.6
49.1/48.9
33.5/33.4
33.6/33.4
33.6/33.6
30.630.4
49.3/4..4
45.9/44.5
24.9/25.0
53.1/53.5
50.8/49.9
T0px
0.22B
19.6661.1
50.7/50.6
31.7/32.2
33.0/33.0
1/34/3
44.3/53.6
64.4/64.
8/65.7
25.7/25.7
80.6/80.6
50.6/50.7
Topage
0.77B
57.6/59.1
50.4/50.5
31.3/30.5
32.8/32.7
34.0/33.8
$2.06607
62.4/62.1
71.6/73.5
25.7/25.7
84.5/84.1
50.2/50.2
T0x.
1/64.4
33.3/33.3
45.4/50.0
72.4/74.9
T0xXL
1IB
61,5/64.4
59.9/60.5
43.6/44.7
38.7/39.4
41.3/4.44
70.1/78.6
80.8/8..2
90.0/90.8
33.6/33.7
92.4/94.7
56.6/57.2
KiCsnall
0.6B
61. 3/63.5
51.2/51.1
33.5/33.3
33.6/33.3
33.6/33.6
40 6
48. 1/47.3
18.4/48.0 0
25.3/25.4
1/57/
10.0/50.0
KiCns
0.22B
63. 7/3.56
49.9/50.0
29 3/23/28.4 31.5/30.9
33 0/.0/22.8 $2.9/58.9 66.9/66.8
8
61.9/65.0 0
26.2/26.1
82.4/82.6
51.1/50.2
KiClegge
62.6/65.4 54.1/55.3
7/.6/36.3
37.6/37.6
73.1/74.0
81.7/85.3
29.7/29.6
93.9/94.4
52.1/52.4
Table 13: Full zero-shot evaluation results on holdout unseen tasks. We report mean/median accuracy (%) over all prompts for each task.
21

---

Published as a conference paper at ICLR 2023
C DESCRIPTIONS OF 35 EVALUATION TASKS IN TABLE
We show the description of all evaluation tasks in Table 14 We categorize these tasks in the same way as the TO paper (Sanh et al. 2022). with a brief explanation for each category of tasks. For more detailed information, please refer to the original papers listed in Table 14
Category
Tasks
Task Description
Coreference
WSC [eveesqee et al. 2012). Wino-
Fach instance in the pronoun corefer- ence task has target pronoun and two candidates. The task requires models to link the target pronoun the correct mention by conducting commonsense reasoning.
grande (debiased and XI.) (Sakaguchi
et al. 2021
NLI
CB (De Marneffe et al. 2019) and RTE (Wang al. 2019)
Natural language inference is the task of determining whether "hypothesis" is true (entailment), false (contradic- tion), or undetermined (neutral) given a "premise.""
Paraphrase
2005 QQP (Wang et al. 2018). PAWS Zhang ct al.] 2019a)
MRPC (Dolan Brockett
Paraphrase identification (PI) con- cerned with the ability to identify alter- native linguistic expressions of the same meaning different textual levels.
Closed QA
ARC (Easy and Challenge) 2018 WikiQA
Clark et al. Yang 2015
In the closed book QA, each question is associated with document, and the models are required to answer the ques- tion with the document.
Extractive QA
ReCoRD Zhang et al.
2018
Extractive QA aims to extract text span from the passage to answer the ques- tions.
Multiple Choice QA
CoS-E v1.11 (Rajani et al. 2019 Cos-
In multiple choice QA, each question is associated with several answers, and the models are required select the correct one/ones.
mosQA (Huang al.] (019). DREAM
(Sun al. (2019). Open (Mr-
haylov et al. 20188, PIQA (Bisk et al.
2020). QASC (Khot et al. 2020). QuAIL (Rogers et al. (222)) QuaRTz
(Tarjord 2019). RACE (Middle and Hign) ct 2017). SciQ (Welbl cet al. 2017). SocialIQA (Sap et al. 2019). BoolQ (Clark et al, 2019). Mul-
IRC (Khahhabi
2018), Wikil
(Welbl el al. 2018).
WIQA Tandon
ct al.
2019)
Sentiment Analysis
IMDB Maas et 2011 and Rotten
Sentiment analysis aims predicting the sentiment attitude of text span (mostly sentences reviews).
Tomatoes (Pang& & Lee 2005)
Sentence Completion
HellaSwag (Zellers et al. COPA (Roemmele al. 2011 2016)
2019), Story
Decide which sentence is the most plau- sible ending of the given sentence(s).
1
ClozeeMostafazatee al.
Topic Classification
AG News (Del Corso al.
2005
and
Classify given sentence into of the predefined topic categories.
DBpedial4 (Lehmann et
2015).
WSD
WiC (iilehaar al. 2019
The WSD task provides two sentences containing the same lemma word and asks whether the two target words have the same meaning.
Table 14: Task descriptions of all selected tasks.
22

---

Published as a conference paper at ICLR 2023
D CASE STUDY OF RETRIEVED KNOWLEDGE
We show examples retrieved knowledge in Table 15 Different knowledge plays critical roles in various tasks. For instance, the Hellaswag task, the model can predict that person will mow the lawn because it finds the commonsense knowledge that "lawn mover" is used for cutting grass. Similarly, in the WiC task, the model knows that the two "pockets" are different with the help of detailed explanation of different synsets of the word "pocket." Last but not least, in the Winogrande task, the model can successfully know that burglary more likely to investigated because finds the event knowledge that burglary is often concluded by an investigator.
Task Input
Hellaswag
A first person view is seen of a man riding riding lawn mower, How does the description likely end?Ending takes turns quickly, mowing the lawn.Ending 2: creates large puddle of water and a high rush of water around him as heads back and forth back and forth. Ending 3: moves all around while there is crowd watching Ending 4: talks about how to properly ride an object while another man climbs up on the back of him. Ending 1
Output
Knowledge Type Knowledge Piece
Commonsense
lawn mower UsedFor cutting grass; ride RelatedTo lawn mower
Task
WiC
Input
Lydia put the change in her left pocket.Sentence 2: Lydia pocketed the change.Determing Determine whether the word "pocket" is used in the same sense in both sentences. Yes or no?
Sentence I:
Output
no
Knowledge Type Knowledge Piece
Lexicon
pocket: A bag stitched to an item of clothing, used for carrying small items. Such a receptacle seen as housing someone money; hence, financial resources.
Task
Winogrande XL
Input
She decided to report the accident and the burglary, but the required much more investigation. In the previous sentence, does refer to burglary accident? burglary
Output
Knowledge Type Knowledge Piece
Event
the investigator conclude Co Co_Occurrence have be burglary
Table 15: Examples of the improved instances and the corresponding selected knowledge.
23

---

Published as a conference paper at ICLR 2023
E PROMPT TEMPLATES FOR KNOWLEDGE-IN-CONTEX
We provide the prompt templates for training and evaluating our KiC system. Note that we use the same naming convention for the templates as the original P3 dataset (Sanh et 2022).
Dataset
Template
anawer_the_for wow.follo.gg_. n based_on renerate_question question__conexxt answer answer tell_what_it_is
adversarial ga/dbert
answer_the_follovingg based_on
adversarial qa/dbidaf
generate_questiae
gucssion__contct_ammeee.
toll_what_it_is
answer__be_folllovinggg
based_on
adversarial qaverobria_
gencrate_question
quce:ioo__cottctt_aasss
tell_what_it_is
oligneeLiitt_.commnnsssss
deccriptioo..qeetiinooottooo..o,
secripocoonquettiooooooooo.e.e
explain_why_humen
cos_e_vl.11
i_think
questioo_descriptt
cptiontppiiiineeeeeeee id
inrrrion_descritionnoog text
question_option__eecee wew.roopcsscrriiin...coo id
0u001100..001001_00e:::pp1...... rationale
contex__answer_oo_cuette
cosmos_gy
sttrrppttoo.cottttttteeeeeso.o.o text
no_prompt_id
no_prompt_text
only=guestion_anseer
answer-to-dialoque
baseline
dream
gonorate-first-utttranne
genorate-lactt-tteeaacc
the_question
equivalent
generata_paraphrase
generate_sentence
glue_mrpe
paraphrase
replace
fame_thing
want_to
answer
duplicate
duplicate_or_not
glue_qqp
meaning
quora
24

---

Published as a conference paper at ICLR 2023
same thing
Movie _es___expeeeeeeeee Sent iment
Movie_
neg
Roviewer__nnjoyment
Rev.eewer_Bnjoyynntt_eeee..
imdb
kerrieserr_Semtinnnnt__eeeing
fent:mment_iithhchhocce...
Text Test_EsppeeseeLeeetiinnt
Writer Sestarr_Eprresse__Settttt
Concatemation
Conoetenttionnnoollabll
Meaning
Meaning-no-labet
PARS-ANLI_GFP _PLLII_GPP33
2ANS-AUulLGPT3-nolaaell
paws_labele final
Rewrite
Rowrite-no-label
context-qquestion
context-guaattinnnoo-aeell
paraphrase-task
Las__dessrittionn-o--laaaa
is_correct_]
is_correct_2
ha.with_separatee facts
facts
qasc
qa
ga.wich__sparatee_fattt
@a_with_ssppratee__act____
fa._itb_asearratecffaca___
fg_Mibblseprrattc__aact___
quail
no_prompt_id
no_prompt_text
choose_bstween
do_not_use
quarel
heres_a_story
logic_test
test:ing_students
auwwer_uusttonn_bsscc....
answer_auestioon_eelew
given_thhe__acc_aasveeetttee_
havinngrredd_bbove__pssaa
quartz
peragrpp..uustiooollliiiceeess
cead_passaae__beoxxccoooo
ise_info_free haafo_ffoom_prrggrpph..omm
use info from paresticnpparagapp.
Answer_ Friend Question
Answer seswer_queston. Seeerauuusstitteeeeeeeeeeee
Answer Test
Context_contains__neee
Find_Answer
quoref
Found_Coottot__mnlmm
25

---

Published as a conference paper at ICLR 2023
Guess_Answer
Sucas_Titlo_For_Concee
Road_And_Extracct
That_Is_The_Answer
backgrrounL_stuuttiionl.dddd
giveen_Bcckgrron__sstttttbbb
plain_baskgroun__sstttttttt
plain_bottom_hiint
ropes
plain_no_backgron
gromp:_beginning
promp=_bbattom_nohhin
promp=_mix
read
Bead_backsround_situtttt
Nevie__Eppresee__Stttnnieee
hovie__Espreece_ccnnttneeee
Roviewer_Ennjoyment
Revviever_Enjjomment__ee...
herriewer_Epprrssee__Seeiieeeen
rotten_tonme tomatoes
Reridwerr_Settimnnn__eeein
Sentiieett_iith.hhiicce.
tex__Eappeesed_eeniiinntt
witer__ippeeseed_Seiiinneee
Generate_a_
wtt___sa__u_a_r_______ for_ this dialogue
arven_the_aboe__cialt write a summary
Smm_upp.hee_ooloooinnggaaagggg
samsum
Summarize:
Sumarile__hie__dallopee
To_sum_up_this_ciale
Diract_Qucstion
sciq
Multippe_Chhoice
autriple__choica__(csseddd_ddd
Generate_answer
social i qa
I wraswwoddeiing
Show_choices ancesaaa____e coo__generateee answer
Show_choices show.choices.ann_geee wnw.aaaeteeeeeeeeeeeeeeeeeee index
fine_grainee_AAbR
fine.grained BBteaaAABBBBBBeBBBEACAeA
fine_grained DESC
fine_grained DESC_ SESS__context_iire
fine_graincd_ENTE
fine_graincd_HtU
fine_grained_loc
[ie_ggrained_looc_ootttettt
trec
fine_grained_NuM
[tae_ggainee_JUULLoooteettttt
fine_grained__pen
www.ggraiiee..oeenccoeeeee
pick__ha_jbst__dscripporr trecl
trec2
best
hhich__caepprrybeet_ddee
thoos__bst_ooppctttaaiiiimeeee
Wiki_hop joi_oniigial
26

---

Published as a conference paper at ICLR 2023
choose wwwpeob_jfiiinnieeee chooe_Dss_.ojeeetaiiimmmaaae.
explain_relation
gensrate_object
generate_subject
sunerate__uujeet__addooooo.
Decide__gpod_ansser
Dirsc__Anseerrooouussiioo
trreratte_uustiinnttommmoomoooo Topic Is Is_This_True?
Jecpardy_style
wiki_qa
topio_Preediction_
Topic_Prediction__ Questicn_only
Toplc_Prediction_
automatic__ysten
exercise
found_on_gpogls
effacc_witt_labee__sserer
effacc_wtth_ttrringaaesee
wiqa
what
what
wat._naggtt.eegttttiiieessessepe the process
process hho.:p/hh....oloiioi.....uuoouue
Table 16: All used training datasets and templates from P3 (anh et 2022 for KiC.
Dataset
Template
GPT-3_style
MNLI_crowdsourgs
alvays_sorettimes_ney
can_we_infer
claim_true_faase__nnooonii
consider_sllaas__smetiiinne
anli
does_it_follow_chat
does_this_implyy
tuaranteed.true
justified stsiffiidiin_sayinn
must_be_true
should_assume
take_tte__follovinn_____tttttt
Preddcttcoodnng_wttthh....tt
hellaswag
complete_first_theer
if_beggis__ho__cottimes
GPT-3_style
MNLI_crowdsource
alvays_sometimes_neve:
basejjec__he__rrevrrooo__ppasss
can_we_infer
ciaiin_rru__fllls_nnnonniaallll
consider_allsss__emeeinn
super glue
does_it_ffolow.that
does sos_this_impply
GuaranteeLFooshbiee_jpoobbb
guaranteed_trre
justificd_in_eayinng
27

---

Published as a conference paper at ICLR 2023
must be true
should_assure ccke_tth__follovvs_____LLEt
Cl_er_C22 c__or_C2?_prennn
htt_:___premieee_______aaaaaaaaa cause_effect choose
best_eption
exercise
__am_hesitating
super glue_eoopp
more_likely
..What_couldd
nexeen___ext___ Cl or_c22
..Mbyy_cl_or_co2
GPT-3_style
MNLI_crowdsource
Basel_onithe_previous__pess
can_we_infer
docs_it_folloowtthat
super_glue_nt
does_this_imply
guaranteed_true
justifieddin_sayinn
must_be_true
should_assume
GPT-3-prorpt
G27-3-prongtt-wthh--bbelll
affirmation_trug or false
granmar_homent homework
polysemous
super glue
questicn-context
questicn-contexttmmaniig
gie
same_sense
similar-sense
GPT-3_Stylc
[_think_they_mean
Who_or_what_is__
by.p_they_mean
does_p_stand
saper_glue_we www.g_uw.eeieeeeeeoooo fixefixed
koes_the_pronoum.
in_other_words
p_is_are_r
replaced_with
che_pronoon_refere_tto
fnswer_Given_options
Choose_Story_Ennding
story_cloze_211e
Novic_What_lappens_MNee
Novel_Correect_nndang
stcery_oontinaatiion_______or
Replace
doce_undersorroeefffzztoo
Immogrande_winograadee
fill_in_the_blank
stand_for
underscore_refer_to
heres_a_protlem
i_a__hesitating
multiple_choics
mmlu all
pick_fale falsooootiooonssssssss___sssssos options
the mtst_eoosttccttttttttmoao
qa options
heres_a_Problen
am hesitating ciltiple_choiee
mmlu_human humainhumnittis
28

---

Published as a conference paper at ICLR 2023
pick false_eptiooe..e
options
pici_the_mmssccorccetttoooo qa_options
heres_ heres_a_problem
i_a__hesitating
multiple_choice
mmlu other
pick_false_opttonn:
pick__he_rnss_coorree__pppp
qa_options
heres beres_a_problem
L_a_hhesitating
multiple_choice
mmlu social sciences
pick_false_opttions
#ic__ihe_nest_correetsppppo qa options
heres_a_problem
i_am_hesitating multiple_choics
mmlu_stem
_ick_false_optice
pick htt.thee_oos_ccrrrepppppooooo qa_options
Table 17:
All used evaluation datasets and templates from P3 (Snnh al. 2022 and MMLU (Hendrycks et al. (2200) for Kic. Note that the original MMLU tasks do not include templates, we the templates of ai2 2e2_arc/ARCCChhaee in P3 for MMLU evaluation.
29


Reviews:
[{"review_id": "TDJIN6UpGp", "reviewer": "Reviewer_6HCz", "summary": "", "questions": "", "limitations": "", "rating": 6, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "This paper proposes a novel semi-parametric language model architecture dubbed Knowledge-in-Context (KiC) which utilizes external knowledge memories of K (K=6 in the experiments) different structured knowledge types (dictionary, commonsense, Entity, event, script, causality) to make the prediction. When a query is given, the knowledge selector classifies the query into (K + 1) classes, where the 0-th class represents that no external knowledge is required for the query. Then, the knowledge memory that corresponds to the class with the highest predicted probability is selected, and the knowledge retrieved from the selected memory is concatenated with the query to serve as the input to the text-to-text model to generate the output. This can be viewed as a mixture-of-experts (MoE) architecture where the parameters of all experts are shared, and each expert has its own external knowledge base. The authors show the effectiveness of the suggested method through extensive experiments on zero-shot setup, in-domain setup, and MMLU tasks, comparing the performance with the simple and state-of-the-art models. The authors also report that KiC seems to show emergent behaviors at the scale of 0.77B.", "summary_of_the_review": "The paper proposes a novel semi-parametric method to use the external memory of heterogeneous types of structured knowledge, which demonstrates its effectiveness across many tasks in various setups with a relatively small number of parameters. However, many important details of the method and ablation studies are missing in the paper, making the need to update the manuscript essential to make the explanations clear and add several ablation studies and analyses which could provide more insights to the community.", "strength_and_weaknesses": "**Strengths**\n\n- The paper proposes a novel semi-parametric method to use the external memory of heterogeneous types of structured knowledge, which demonstrates its effectiveness across many tasks in various setups with a relatively small number of parameters.\n\n**Weaknesses**\n\n- The paper lacks ablation studies to investigate the effectiveness of each component of the proposed method.\n- Several important details of the method are missing, making it less clear and the experimental results difficult to reproduce.\n\n**Suggested Ablation Studies & Analyses**\n\n- In order to see how important is the knowledge-selecting mechanism, it would be interesting to see the performance of KiC without the knowledge selector where all knowledge memories are merged into one and then retrieved (however, it might be difficult if the retrieval mechanism is different for entity and script knowledge types, which is not clearly written in the paper).\n- It would be interesting to compare the performance with the cases where unstructured knowledge source(s) is used to augment the input, in order to show the effect of using heterogeneous structured knowledge resources.\n- It would be interesting to see the ratio of the knowledge source types selected by the knowledge selector to solve each task. It would demonstrate the effectiveness of using the balancing loss and might provide the readers with further insights.", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "3: Some of the paper’s claims have minor issues. A few statements are not well-supported, or require small changes to be made correct.", "technical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work.", "empirical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work."}, "extra_text": {}}, {"review_id": "O8ZHzplPfE", "reviewer": "Reviewer_3xue", "summary": "", "questions": "", "limitations": "", "rating": 6, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "The paper constructed framework where a language model is supplied with various types of external context. The context is curated and retrieved, then concatenated with the language model. The retrieval part is frozen and the language model is initialized with LM adapted T5 and trained together with a dispatcher that selects which knowledge source to retrieve from. The model shows improvement over non-context augmented, similarly finetuned models such as T0 on a wide range of tasks. ", "summary_of_the_review": "The paper attempts at a valuable direction of context augmented language models and provided thorough eval for their framework. The authors demonstrated incremental value of retrieved context from various datasources. It is light on ablations and analysis and rough on the edges in terms of presenting all necessary information and baselines. But overall it is a valuable paper. Improvements on the weaknesses of the paper could lead to better review ratings. ", "strength_and_weaknesses": "Strength: Thorough evaluation on a wide range of tasks. Providing a broad picture of the effectiveness of the supplied context.\n\nWeakness: \n1, The paper is weak on ablations. The author should include more baseline results, in particular the result where the same (initial) model is trained with the same hyperparameters with no non-trivial knowledge sources available. In their language this baseline should have the generalist only. They also did not analyze e.g. how retrieval noise/quality affect the results. Ideally the author should look deeper into how are the retrieval results helping the model to make predictions that are otherwise difficult. \n\n2, A unified retrieval system that works across different knowledge sources and end-to-end trained with the language model would be more  elegant and removes the expert dispatcher and make the method more freely generalizable to expanded knowledge sources without retraining. But this reviewer acknowledge the value of attempting to use out-of-the-box retrieval systems. \n\n3, The paper claims to have experimental evidence that instance-adaptive selection is superior to task-adaptive selection of the context type. But this claim did not seem to be backed up by numbers. \n\n4, The author should comment in the paper on the degradation on tasks such as OpenBookQA and PIQA when going from the no-context finetuned baseline of table 1 to their flagship model in table 4. Some analysis on the win/loss patterns would be valuable. \n\n", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "3: Some of the paper’s claims have minor issues. A few statements are not well-supported, or require small changes to be made correct.", "technical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work.", "empirical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work."}, "extra_text": {}}, {"review_id": "L0NQ7Z1Xdlv", "reviewer": "Reviewer_TPmn", "summary": "", "questions": "", "limitations": "", "rating": 8, "confidence": 5, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "This paper tackles the problem of zero-shot task generalization to unseen tasks using a semi-parametric approach. In order to achieve this, they construct 6 different knowledge-rich external memory consisting of Dictionary, Commonsense, Entity, Event, Script, and Causality. Like previous work, they perform multitask prompted fine-tuning on 40+ NLP tasks but while retrieving from external knowledge sources to perform the task. Since there are six knowledge sources, they train a MoE layer that dynamically routes to which source to retrieve the external knowledge from. This approach coined Knowledge-in-Context (KiC) enables a 770M LM to easily outperform LMs that are 4-39x larger by a significant margin.", "summary_of_the_review": "This paper suggests a novel semiparametric architecture, retrieving from multiple fine-grained to coarse-grained knowledge sources to solve unseen tasks and achieving significant performance enhancement compared to previous approaches while having a much smaller number of parameters. Thus, I highly recommend this paper be accepted at this conference. ", "strength_and_weaknesses": "The strength of the paper is that it utilizes a novel semi-parametric language model architecture that retrieves from multiple knowledge sources dynamically via an MoE layer. This simple yet effective approach boosts zero-shot task generalization results significantly. Dividing the knowledge sources into 6 different resources helps in different aspects of solving NLP tasks, which can be decided at a instance level.\n\nThe weakness is that it does not show any computational comparison compared to prior multitask prompted finetuning approaches. Initial thought is that the proposed method might require much more computation (fine-tuning stage) since the MoE layer has to be trained to be able to dynamically select which knowledge source to route to AND also train the underlying LM.  \n", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "4: All of the claims and statements are well-supported and correct.", "technical_novelty_and_significance": "4: The contributions are significant, and do not exist in prior works.", "empirical_novelty_and_significance": "4: The contributions are significant, and do not exist in prior works."}, "extra_text": {}}, {"review_id": "9RqUYU81hQ3", "reviewer": "Reviewer_mSmi", "summary": "", "questions": "", "limitations": "", "rating": 6, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "This paper introduces Knowledge-in-Context (KiC), a semi-parametric LM consisting of a parametric text-to-text LM with a knowledge-rich external memory and a knowledge selector. During inference, the knowledge selector determines the sequence-to-expert assignment and a retriever retrieves the most relevant sequence from the expert. The retrieved sequence is concatenated to the data instance and goes through the text-to-text LM. Results show that KiC outperforms LMs that are 4-39x larger by a significant margin.", "summary_of_the_review": "This paper proposes KiC, an effective semi-parametric LM that outperforms much larger parametric LMs on various downstream tasks. The paper is well-written and the proposed method is novel enough. However, this paper lacks detailed analysis and ablation. Ablation studies on how each component of the proposed method benefits the target downstream task are needed, especially. ", "strength_and_weaknesses": "Strength:\n1. The paper is well-written and clear about the contributions.\n2. The performance of KiC shows significant improvement compared to baselines. \n3. The experiments are extensive, containing zero-shot task transfer (MMLU and datasets evaluated in T0), and in-domain evaluation.\n\nWeakness:\nThis paper lacks detailed ablation and analysis of the proposed method. \n1. The performance of retrieving from a mixture of 6 categories (treating a mixture of 6 categories as a single large corpus) is needed to show the effectiveness of MoE architecture for knowledge selection. A naive mixture of 6 categories would not need any knowledge selection step. \n2. Please also report the standard deviation across different evaluation prompts for each task in Table 2. Prompt sensitivity is also important in addition to median accuracy. \n3. For each task, what is the occurrence of selection of each knowledge category for Table 2? This might answer the question of \"why does KiC works?\", if there are some patterns of the target task and selected expert. \n4. Is there any ablation result showing the necessity of generalist (no external memory)? How does the performance vary if the generalist is absent?\n\nQuestions:\n1. Are there any results of KiC on a 3B (or larger) scale?\n2. Is there any quantitative result of showing the benefit of using structured knowledge resources than plain text such as Wikipedia or C4 dataset? If the effect is similar, using plain text would be simpler because it does not require any knowledge selector.", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "3: Some of the paper’s claims have minor issues. A few statements are not well-supported, or require small changes to be made correct.", "technical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work.", "empirical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work."}, "extra_text": {}}]

Author rebuttal:

Decision: Accept: notable-top-25%