SalKG: Learning From Knowledge Graph Explanations for Commonsense Reasoning

1 Introduction . Natural language processing ( NLP ) systems generally need common sense to function well in the real world [ 15 ] . However , NLP tasks do not always provide the requisite commonsense knowledge as input . Moreover , commonsense knowledge is seldom stated in natural language , making it hard for pre-trained language models ( PLMs ) [ 11 , 35 ] — i.e. , text encoders — to learn common sense from corpora alone [ 9 , 38 ] . In contrast to corpora , a knowledge graph ( KG ) is a rich , structured source of commonsense knowledge , containing numerous facts of the form ( concept1 , relation , concept2 ) . As a result , many methods follow the KG-augmented model paradigm , which augments a text encoder with a graph encoder that reasons over the KG ( Fig . 2 ) . KG-augmented models have outperformed text encoders on various commonsense reasoning ( CSR ) tasks , like question answering ( QA ) ( Fig . 1 ) [ 31 , 5 , 36 , 61 ] , natural language inference ( NLI ) [ 7 , 57 ] , and text generation [ 33 , 65 ] . Since KGs do not have perfect knowledge coverage , they may not contain useful knowledge for all task instances ( e.g. , if the KG in Fig . 1 only consisted of the gray nodes ) . Also , even if the KG is useful overall for a given task instance , only some parts of the KG may be useful ( e.g. , the ∗Work done while TG interned remotely at USC . 2Code and data are available at : https : //github.com/INK-USC/SalKG . 35th Conference on Neural Information Processing Systems ( NeurIPS 2021 ) . green nodes in Fig . 1 ) . Ideally , a KG-augmented model would know both if the KG is useful and which parts of the KG are useful . Existing KG-augmented models always assume the KG should be used , but do often use attention [ 54 ] to focus on specific KG components ( e.g. , nodes [ 13 , 47 , 60 ] , paths [ 56 , 46 , 5 ] ) when predicting . Still , the attention mechanism is supervised ( end-to-end ) only by the task loss , so the model is never explicitly taught which KG components should be used . Without component-level supervision , the attention mechanism is more likely to overfit to spurious patterns . How can we better teach the model whether each KG feature ( e.g. , graph , node , path ) is useful for solving the given task instance ? Using the task ’ s ground truth labels , saliency methods [ 2 ] can score each KG feature ’ s influence on the model making the correct prediction . Whereas attention weights show which KG features the model already used , saliency scores indicate which KG features the model should use . By binarizing these scores , we are able to produce saliency explanations , which can serve as simple targets for training the model ’ s attention mechanism . For example , Fig . 1 shows saliency explanations [ market=1 , produce=1 , trading=0 , merchant=1 , store=0 , shop=0 ] , stating that market , produce , and merchant are useful nodes for answering the question . In this paper , we investigate how saliency explanations can be used to improve KG-augmented models ’ performance . First , we propose to create coarse ( graph-level ) and fine ( node-/path-level ) saliency explanations . Since KGs have features at different granularities , saliency explanations can supply a rich array of signals for learning to focus on useful KG features . To create coarse explanations , we introduce an ensemble-based saliency method which measures the performance difference between a KG-augmented model and its corresponding non-KG-augmented model . To create fine explanations , we can adapt any off-the-shelf saliency method , e.g. , gradient-based [ 10 ] or occlusion-based [ 30 ] . Second , to demonstrate the potential of saliency-based supervision , we analyze the performance of oracle KG-augmented models , whose attention weights are directly masked with coarse and/or fine saliency explanations . Third , as motivated by our oracle model analysis , we propose the Learning from Saliency Explanations of KG-Augmented Models ( SALKG ) framework . Given coarse and/or fine explanations created from thse task ’ s training set , SALKG jointly trains the model to predict the explanations , then solve the task by attending to KG features highlighted in the predicted explanations . Using saliency explanations to regularize the attention mechanism can help the model generalize better to unseen instances , especially when coarse and fine explanations are used together as complementary learning signals . Indeed , on three standard commonsense QA benchmarks ( CSQA , OBQA , CODAH ) and a range of KG-augmented models , we show that SALKG can achieve considerable performance gains . 2 Preliminaries Since KGs abundantly provide structured commonsense knowledge , KGaugmented models are often helpful for solving CSR tasks . CSR tasks are generally formulated as multi-choice QA ( discriminative ) tasks [ 52 , 39 , 23 ] , but sometimes framed as open-ended response ( generative ) [ 33 , 32 ] tasks . Given that multi-choice QA has been more extensively studied , we consider CSR in terms of multi-choice QA . Here , we present the multi-choice QA problem setting ( Fig . 1 ) and the structure of KG-augmented models ( Fig . 2 ) . Problem Definition Given a question q and set of answer choices A = { ai } , a multi-choice QA model aims to predict a plausibility score ρ ( q , ai ) for each ( q , ai ) pair , so that the predicted answer â = argmaxai∈A ρ ( q , ai ) matches the target answer a∗ . Let q ⊕ ai be the text statement formed from ( q , ai ) , where ⊕ denotes concatenation . For example , in Fig . 1 , the text statement for q ⊕ a∗ would be : What kind of store does a merchant have if they sell produce ? market . We abbreviate q ⊕ ai as xi and its plausibility score as ρ ( xi ) . KG-Augmented Models KG-augmented models use additional supervision from knowledge graphs to solve the multi-choice QA task . They encode the text and KG inputs individually as embeddings , then fuse the two embeddings together to use for prediction . A KG is denoted as G̃ = ( Ṽ , R̃ , Ẽ ) , where Ṽ , R̃ , and Ẽ are the KG ’ s nodes ( concepts ) , relations , and edges ( facts ) , respectively . An edge is a directed triple of the form e = ( c1 , r , c2 ) ∈ Ẽ , in which c1 , c2 ∈ Ṽ are nodes , and r ∈ R̃ is the relation between c1 and c2 . A path is a connected sequence of edges in the KG . When answering a question , the model does not use the entire KG , since most information in G̃ is irrelevant to xi . Instead , the model uses a smaller , contextualized KG Gi = ( Vi , Ri , Ei ) , which is built from G̃ using xi . Gi can be constructed heuristically by extracting edges from G̃ [ 31 , 37 ] , generating edges with a PLM [ 5 ] , or both [ 56 , 60 ] . In this paper , we consider KG-augmented models where Gi is built by heuristically by extracting edges from G̃ ( see Sec . A.1 for more details ) , since most KG-augmented models follow this paradigm . If xi and Gi are not discussed in the context of other answer choices , then we further simplify xi ’ s and Gi ’ s notation as x and G , respectively . Since the model never uses the full KG at once , we use “ KG ” to refer to G in the rest of the paper . As in prior works [ 31 , 5 ] , a KG-augmented model FKG has three main components : text encoder ftext , graph encoder fgraph , and task predictor ftask ( Fig . 2 ) . Meanwhile , its corresponding non-KGaugmented model FNo-KG has no graph encoder but has a slightly different task predictor f̄task which only takes x as input . In both FKG and FNo-KG , the task predictor outputs ρ ( x ) . Let x and g be the embeddings of x and G , respectively . Then , the workflows of FKG and FNo-KG are defined below : x = ftext ( x ) ; g = fgraph ( G , x ) ; FKG ( x , G ) = ftask ( x⊕ g ) ; FNo-KG ( x ) = f̄task ( x ) . Typically , ftext is a PLM [ 11 , 35 ] , fgraph is a graph neural network ( GNN ) [ 13 , 47 ] or edge/path aggregation model [ 31 , 5 , 46 ] , and ftask and f̄task are multilayer perceptrons ( MLPs ) . In general , fgraph reasons over G by encoding either nodes or paths , then using soft attention to pool the encoded nodes/paths into g. Let Ltask be the task loss for training FKG and FNo-KG . For multi-choice QA , Ltask is cross-entropy loss , with respect to the distribution over A . For brevity , when comparing different models , we may also refer to FKG and FNo-KG as KG and No-KG , respectively . 3 Creating KG Saliency Explanations . Now , we show how to create coarse and fine saliency explanations , which tell us if the KG or certain parts of the KG are useful . These explanations can be used as extra inputs to mask oracle models ’ attention ( Sec . 4 ) or as extra supervision to regularize SALKG models ’ attention ( Sec . 5 ) . We first abstractly define a unit as either G itself or a component of G. A unit can be a graph , node , path , etc. , and we categorize units as coarse ( the entire graph G ) or fine ( a node or path within G ) ( Table 1 ) . Given a model and task instance ( x , G ) , we define an explanation as a binary indicator of whether a unit u of G is useful for the model ’ s prediction on ( x , G ) . If u is useful , then u should strongly influence the model to solve the instance correctly . By making explanations binary , we can easily use explanations as masks or learning targets ( since binary labels are easier to predict than real-valued scores ) for attention weights . 3.1 Coarse Saliency Explanations Explanation Setting Unit . Coarse KG Fine ( MHGRN ) Node Fine ( PathGen ) Path Fine ( RN ) Path To get yc ( x , G ) , we begin by computing coarse saliency score sc ( x , G ) ∈ R , which we define as the performance difference between FKG and FNo-KG . For QA input xi = q ⊕ ai and its KG Gi , let pKG ( xi , Gi ) and pNo-KG ( xi ) be the confidence probabilities for xi predicted by FKG and FNo-KG , respectively . sc ( xi , Gi ) = { pKG ( xi , Gi ) − pNo-KG ( xi ) , ai = a∗ , pNo-KG ( xi ) − pKG ( xi , Gi ) , ai ̸= a∗ . ( 1 ) Ideally , a QA model should predict higher probabilities for answer choices ai that are correct , and vice versa . To capture this notion , we define sc ( xi , Gi ) in Eq . 1 , where a∗ denotes the correct answer . Note that sc ( xi , Gi ) is positive if pKG ( xi , Gi ) is higher than pNo-KG ( xi ) for correct choices and lower for incorrect choices . We obtain yc ( xi , Gi ) by binarizing sc ( xi , Gi ) to 0 or 1 based on whether it is greater than or less than a threshold T , respectively . If yc ( xi , Gi ) = 1 , then the KG is useful , and vice versa . See the appendix for more details about why we use ensemble-based saliency for coarse explanations ( Sec . A.2 ) and how we tune T ( Sec . A.6 ) .

Summary: This paper proposes a framework, SALKG, for commonsense question answering (i.e., Multiple choice). It employs saliency explanations (i.e., coarse and fine) to regularize the attention mechanism and provide direct supervision for the task. The proposed framework is shown to achieve state-of-the-art or competitive results on three QA benchmarks, namely CSQA, OBQA, and CODAH. The proposed work has highlighted the right research questions and answered quantitatively and to some extent qualitatively. Overall, the paper is well motivated and proposes a technically solid framework for multiple-choice commonsense question answering tasks. I have some concerns regarding the details on using the knowledge graph that I have highlighted in the weaknesses section.