SlowGuess/NAACL_2022_OCR huggingface dataset:
Table 4: Test accuracy on OpenBookQA leaderboard. All listed methods use the provided science facts as an additional input to the language context. The previous top 2 systems, UnifiedQA (11B params) and T5 (3B params) are  $30\mathrm{x}$  and  $8\mathrm{x}$  larger than our model.
namic pruning mechanism.
In particular, we do not compare with the higher ranking models on the leaderboard, such as unified QA (Khashabi et al., 2020), Albert + DESC-KCR (Xu et al., 2021), because they either use a stronger text encoder or use additional data resources, while our model focuses on improving the joint reasoning between LM and KG.
We further conduct in-depth analyses to investigate the effectiveness of different components in our model. We show the accuracy of JointLK on the CommonsenseQA IHdev set.
Impact of JointLK components We assess the impact of the joint reasoning module (§ 3.4) and the dynamic pruning module (§ 3.5), shown in Table 5. Disabling the dynamic pruning module results in  $0.5\%$  drop in performance, showing that some nodes in subgraph are not conducive to reasoning. Especially, when we disable the joint reasoning module, the corresponding dynamic pruning module will also be removed, because the latter depends on the attention value in the former. Then the
Methods	IHdev-Acc. (%)
JointLK (N=5)	77.88
- Dynamic Pruning Module	77.38
- Joint Reasoning Module	76.61
(b)
Figure 3: Ablation study on stacked of JointLK layers (a) and the retention ratio in pruning (b).
results have a significant drop:  $77.88\% \rightarrow 76.61\%$ , suggesting that the joint reasoning between LM and KG is critical.
Impact of stacked of JointLK Layers We investigate the impact of the number of JointLK layers (shown in Figure 3 (a)). The increase of layers continues to bring benefits until layers  $N = 5$ . However, performance begins to drop when  $N > 5$ . As the number of layers increases, the model changes from underfitting to overfitting.
Impact of the Retention Ratio in Pruning The retention ratio  $K$  is a hyperparameter of the dynamic pruning module. Since it is recursively pruning in each stacked layer of JointLK, the percentage of graph nodes that the model ultimately retains is also related to the number of layers of JointLK, that is,  $K^{N}$ , where  $N = 5$ . Experiments show that if the retention ratio is too high, there may be almost no pruning effect (for example,  $K = 0.98$ ,  $90\%$  of the nodes are retained in the last layer); otherwise, useful nodes may be deleted. As shown in Figure 3 (b), when the number of JointLK layers  $N = 5$ ,  $K = 0.92$  (about  $66\%$  of the original nodes remain in the last layer) works the best on the CommonsenseQA dev set.
Considering the overall performance improvement of our model on these two datasets, we analyze whether the improvement is reflected in questions that require more complex reasoning, such as questions with negation and complex questions with
Table 5: Ablation study on model components using RoBERTa-large as the text encoder. We report the IHdev accuracy on CommonsenseQA.
Methods	IHdev-Acc (Overall)	IHdev-Acc (Questions w/ negation)	IHdev-Acc (Questions w/ ≤7 entities)	IHdev-Acc (Questions w/ >7 entities)
Number	1221	133	723	498
QA-GNN	76.99	72.18	76.63	77.51
JointLK(Ours)	78.38	75.18 (↑3.00)	77.59 (↑0.96)	79.52 (↑2.01)
Table 6: Performance on questions with negative words and fewer/more entities. The questions are retrieved from the CommonsenseQA IHdev set.
more entities. We compare our model with the prior best LM+KG model, QA-GNN in Table 6.
Questions with negation Large LMs do well due to memorizing subject and filler co-occurrences but are easily distracted by elements like negation (Zagoury et al., 2021). To investigate the reasoning ability of the model on negation, we retrieved 133 questions with negation terms (e.g., no, not, nothing, never, unlikely, don't, doesn't, didn't, can't, couldn't) from the CommonsenseQA IHdev set. JointLK exhibits a big boost ( $\uparrow 3.00\%$ ) over QA-GNN, suggesting its strength in negation reasoning. The fine-grained joint inference of LM and GNN allows the model to pay attention to the semantic nuances of language expressions.
Questions with fewer/more entities When the question contains many entities, the size and noise of the retrieved KG may limit the model's performance because the model needs to understand the complex relationship between entities. According to statistics (see Appendix A), questions contain an average of 7 entities, so we divide the question into two categories: containing fewer entities  $(\leq 7)$  and more entities  $(>7)$ . Compared with QA-GNN, JointLK has a bigger boost on questions with more entities  $(\uparrow 2.01\%)$  than those with fewer entities  $(\uparrow 0.96\%)$ , suggesting that our model can reduce the reasoning difficulty of complex questions because it can remove irrelevant nodes in reasoning.
5.4 Interpretability: A Case Study
We aim to interpret JointLK's reasoning process by analyzing the pruning of the knowledge subgraph. Figure 4 shows an example from CommonsenseQA where our model correctly answers the question and finally retains reasonable reasoning paths by pruning the subgraph. The flow from (a) to (b) to (c) represents the recursive pruning of the subgraph according to the LM-to-KG attention weight at each GNN update layer. From (a) to (b), although the nodes wood and burn bridge the reasoning gap between question entity and answer entity, their
(a)
Figure 4: Case study of our model reasoning and pruning process. The question and answer choices corresponding to this case are: "What do people typically do while playing guitar? A.cry B. hear sounds C. singing D. arthritis E. making music".
semantics are very different from the question. From (b) to (c), "play_guitar  $\xrightarrow{\text{usedfor}}$  fun" and "fun  $\xrightarrow{\text{relatedto}}$  gas  $\xrightarrow{\text{relatedto}}$  singe" are both reasonable, but the former is related to the semantics of the question, and the latter is not. Two paths are reserved in (c), "play_guitar  $\xrightarrow{\text{hassubject}}$  take Lessons  $\xrightarrow{\text{hassubject}}$  dance  $\xrightarrow{\text{relatedto}}$  singing" and "play_guitar  $\xrightarrow{\text{relatedto}}$  action  $\xrightarrow{\text{relatedto}}$  singer  $\xrightarrow{\text{relatedto}}$  singing". These two paths describe two possible scenarios that support answering the question.
In order to understand why our model fails in some cases, we randomly select 100 error cases and group them into several categories. There are three main types of errors, and we show some examples in the Appendix C.
Miss important evidence (39/100) Although we can retrieve many nodes related to questions and choices from ConceptNet, due to the incompleteness of the knowledge graph, there may be missing essential evidence nodes in the reasoning paths to answer the question. For example, although "eating_dinner" will cause "sleepiness" or "indigestion", knowledge such as "lactose intolerance causes indigestion" is essential to answer the question (Wikipedia: Lactose intolerance is a common condition caused by a decreased ability to digest lactose, a sugar found in dairy products.). However, ConceptNet does not cover such knowledge or not is retrieved.
Indistinguishable knowledge (25/100) Several choices of the question may be correct, difficult to distinguish, and which one is correct may vary from person to person. For example, “human” and
"cat" may be at location "bed" or "comfortable chair", and the knowledge provided by Concept-Net is also the same. The model may choose bed because the bed appears more frequently in the pre-trained corpus.
Incomprehensible questions (23/100) This type of error often occurs when the question is particularly long, involving various events and changes in the characters' emotions. The model is difficult to understand the scene described by the question. Some questions may require reasoning based on events, but the knowledge in ConceptNet is more based on entities and attributes.
The above three types of errors show that selecting complete, accurate, and context-sensitive knowledge is vital for more effective KG-augmented models.
In this work, we propose JointLK and provide a set of experiments to prove that (i) LM and KG interactive fusion can reduce the semantic gap between the two information modalities and make better use of KG for joint reasoning with LM. (ii) Dynamic pruning module can recursively delete irrelevant subgraph nodes at each layer of JointLK to provide fine appropriate evidence. Our results on CommonsenseQA and OpenBookQA demonstrate the superiority of JointLK over other methods using external knowledge and the strong performance in performing complex reasoning. In addition, our research results can be broadly extended to other tasks that require KGs as additional background knowledge to augment LMs, such as entity linking, KG completion and the recommendation system.
We would like to thank the anonymous reviewers for their helpful comments. This work was supported by the Key Development Program of the Ministry of Science and Technology (No.2019YFF0303003), the National Natural Science Foundation of China (No.61976068) and "Hundreds, Millions" Engineering Science and Technology Major Special Project of Heilongjiang Province (No.2020ZX14A02).
Ethical Impact
This paper proposes a general approach to fuse language models and external knowledge graphs for commonsense reasoning. We worked within the purview of acceptable privacy practices and strictly followed the data usage policy. In all the experiments, we use public datasets and consist of their intended use. We neither introduce any social/ethical bias to the model nor amplify any bias in the data, so we do not foresee any direct social consequences or ethical issues.
Pratyay Banerjee and Chitta Baral. 2020. Knowledge fusion and semantic knowledge ranking for open domain question answering. arXiv preprint arXiv:2004.03101.
Pratyay Banerjee, Kuntal Kumar Pal, Arindam Mitra, and Chitta Baral. 2019. Careful selection of knowledge to solve open book question answering. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 6120-6129, Florence, Italy. Association for Computational Linguistics.
Ning Bian, Xianpei Han, Bo Chen, and Le Sun. 2021. Benchmarking knowledge-enhanced commonsense question answering via knowledge-to-text transformation. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pages 12574-12582.
Peter Clark, Oren Etzioni, Tushar Khot, Daniel Khashabi, Bhavana Mishra, Kyle Richardson, Ashish Sabharwal, Carissa Schoenick, Oyvind Tafjord, Niket Tandon, et al. 2020. From 'f'to 'a' on the NY regents science exams: An overview of the aristo project. AI Magazine, 41(4):39-53.
Yanlin Feng, Xinyue Chen, Bill Yuchen Lin, Peifeng Wang, Jun Yan, and Xiang Ren. 2020. Scalable multi-hop relational reasoning for knowledge-aware question answering. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language
Processing (EMNLP), pages 1295-1309, Online. Association for Computational Linguistics.
David Gunning. 2018. Machine common sense concept paper. arXiv preprint arXiv:1810.07528.
Daniel Khashabi, Sewon Min, Tushar Khot, Ashish Sabharwal, Oyvind Tafjord, Peter Clark, and Hannaneh Hajishirzi. 2020. UNIFIEDQA: Crossing format boundaries with a single QA system. In Findings of the Association for Computational Linguistics: EMNLP 2020, pages 1896-1907, Online. Association for Computational Linguistics.
Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, and Radu Soricut. 2020. Albert: A lite bert for self-supervised learning of language representations. In International Conference on Learning Representations.
Junhyun Lee, Inyeop Lee, and Jaewoo Kang. 2019. Self-attention graph pooling. In Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 3734-3743. PMLR.
Bill Yuchen Lin, Xinyue Chen, Jamin Chen, and Xiang Ren. 2019. KagNet: Knowledge-aware graph networks for 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), pages 2829-2839, Hong Kong, China. Association for Computational Linguistics.
Liyuan Liu, Haoming Jiang, Pengcheng He, Weizhu Chen, Xiaodong Liu, Jianfeng Gao, and Jiawei Han. 2020. On the variance of the adaptive learning rate and beyond. In International Conference on Learning Representations.
Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692.
Shangwen Lv, Daya Guo, Jingjing Xu, Duyu Tang, Nan Duan, Ming Gong, Linjun Shou, Daxin Jiang, Guihong Cao, and Songlin Hu. 2020. Graph-based reasoning over heterogeneous external knowledge for commonsense question answering. In Proceedings of the AAAI Conference on Artificial Intelligence, pages 8449-8456.
Kaixin Ma, Jonathan Francis, Quanyang Lu, Eric Nyberg, and Alessandro Oltramari. 2019. Towards generalizable neuro-symbolic systems for commonsense question answering. In Proceedings of the First Workshop on Commonsense Inference in Natural Language Processing, pages 22-32, Hong Kong, China. Association for Computational Linguistics.
Todor Mihaylov, Peter Clark, Tushar Khot, and Ashish Sabharwal. 2018. Can a suit of armor conduct electricity? a new dataset for open book question answering. In Proceedings of the 2018 Conference on
Empirical Methods in Natural Language Processing, pages 2381-2391, Brussels, Belgium. Association for Computational Linguistics.
Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2020. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21(140):1-67.
Adam Santoro, David Raposo, David G Barrett, Mateusz Malinowski, Razvan Pascanu, Peter Battaglia, and Timothy Lillicrap. 2017. A simple neural network module for relational reasoning. In Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc.
Franco Scarselli, Marco Gori, Ah Chung Tsoi, Markus Hagenbuchner, and Gabriele Monfardini. 2008. The graph neural network model. IEEE transactions on neural networks, 20(1):61-80.
Michael Schlichtkrull, Thomas N Kipf, Peter Bloem, Rianne Van Den Berg, Ivan Titov, and Max Welling. 2018. Modeling relational data with graph convolutional networks. In European semantic web conference, pages 593-607. Springer.
Robyn Speer, Joshua Chin, and Catherine Havasi. 2017. Conceptnet 5.5: An open multilingual graph of general knowledge. In *Thirty-first AAAI* conference on artificial intelligence.
Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. 2014. Dropout: A simple way to prevent neural networks from overfitting. Journal of Machine Learning Research, 15(56):1929-1958.
Alon Talmor, Jonathan Herzig, Nicholas Lourie, and Jonathan Berant. 2019. CommonsenseQA: A question answering challenge targeting commonsense knowledge. 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), pages 4149-4158, Minneapolis, Minnesota. Association for Computational Linguistics.
Denny Vrandecic and Markus Krötzsch. 2014. Wiki-data: A free collaborative knowledgebase. Commun. ACM, 57(10):78-85.
Kai Wang, Weizhou Shen, Yunyi Yang, Xiaojun Quan, and Rui Wang. 2020a. Relational graph attention network for aspect-based sentiment analysis. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 3229-3238, Online. Association for Computational Linguistics.
Peifeng Wang, Nanyun Peng, Filip Ilievski, Pedro Szekely, and Xiang Ren. 2020b. Connecting the dots: A knowledgeable path generator for commonsense question answering. In *Findings of the Association*
for Computational Linguistics: EMNLP 2020, pages 4129-4140, Online. Association for Computational Linguistics.
Xiaoyan Wang, Pavan Kapanipathi, Ryan Musa, Mo Yu, Kartik Talamadupula, Ibrahim Abdelaziz, Maria Chang, Achille Fokoue, Bassem Makni, Nicholas Mattei, et al. 2019. Improving natural language inference using external knowledge in the science questions domain. In Proceedings of the AAAI Conference on Artificial Intelligence, pages 7208-7215.
Yichong Xu, Chenguang Zhu, Ruochen Xu, Yang Liu, Michael Zeng, and Xuedong Huang. 2021. Fusing context into knowledge graph for commonsense question answering. In *Findings of the Association for Computational Linguistics: ACL-IJCNLP* 2021, pages 1201-1207, Online. Association for Computational Linguistics.
Jun Yan, Mrigank Raman, Aaron Chan, Tianyu Zhang, Ryan Rossi, Handong Zhao, Sungchul Kim, Nedim Lipka, and Xiang Ren. 2021. Learning contextualized knowledge structures for commonsense reasoning. In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, pages 4038-4051, Online. Association for Computational Linguistics.
Michihiro Yasunaga, Hongyu Ren, Antoine Bosselut, Percy Liang, and Jure Leskovec. 2021. QA-GNN: Reasoning with language models and knowledge graphs for question answering. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 535-546, Online. Association for Computational Linguistics.
Avishai Zagoury, Einat Minkov, Idan Szpektor, and William W Cohen. 2021. What's the best place for an ai conference, vancouver or _. Why completing comparative questions is difficult. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pages 14292-14300.
Chen Zhu, Yu Cheng, Zhe Gan, Siqi Sun, Tom Goldstein, and Jingjing Liu. 2020. Freelb: Enhanced adversarial training for natural language understanding. In International Conference on Learning Representations.
A Extracting subgraph from External KG
We choose ConceptNet as the external knowledge base, and we follow the process of Feng et al. (2020) and Yasunaga et al. (2021) to retrieve the knowledge subgraph.
Given the question and choice, we identify the concepts that appear in ConceptNet in question and choice, respectively, and get the initial node set  $V_{q}$  and  $V_{a}$ , which form the initial node set  $V_{q,a}$ . For example, in the question "What do people typically
do while playing guitar?" and choice "singing",  $V_{q} = \{$  guitar, people, play, play_guitar, playing, playing_guitar, typically \},  $V_{a} = \{$  singe, singing \}. Then, in order to extract the subgraph related to question and choice, we add the bridge entities on the 1 and 2 hop paths between any pair of entities in  $V_{q,a}$ , thus obtaining the retrieved entity set  $V$ .
There may be many nodes in  $V$ , especially long questions contain many concepts. We follow the preprocessing method of Yasunaga et al. (2021), connect the nodes with question + choice, and calculate the relevant scores of the nodes through a pre-trained LM. We only retain the top 200 scoring nodes (It is worth noting that this is the preprocessing of the retrieval process, which is different from the dynamic pruning in section 3.5. The former is to score only one node and separate from the whole subgraph where the node is located, while the latter is recursive pruning in the updating process of the modeling subgraph).
Finally, we get the relation set  $R$  by merging the relation types in ConceptNet and adding reverse relation. We retrieve all the edges in  $R$  of any two nodes in  $V$ . In addition, we add question as a node  $q$  to  $V$ , and add the bidirectional edges of  $q$  to  $V_{q}$  and  $q$  to  $V_{a}$ . The relation types are shown in Table 7, and the statistics of the retrieved nodes are shown in Table 8.
B Node Initialization
For each entity in the subgraph, we need to obtain its feature representation. Following (Feng et al., 2020), we first use the template to convert the knowledge triples in ConceptNet into sentences, and feed them into BERT-Large, obtaining a sequence of tokens embeddings from the last layer. For each entity, we perform mean pooling over the tokens of the entity's occurrences across all the sentences to form the initial embeddings  $x_{i}^{0}$ .
C Error Types and Examples
In Table 9, we present examples for each error type in the Commonsense IHdev set. Because the average number of subgraph nodes corresponding to each case is about 100, we cannot list them all. Only some important nodes are shown here.
Relation	Merged Relation
AtLocation LocatedNear	AtLocation
Causes CausesDesire *MotivatedByGoal	Causes
Antonym DistinctFrom	Antonym
HasSubevent HasFirstSubevent HasLastSubevent HasPrerequisite Entails MannerOf	HasSubevent
IsA InstanceOf DefinedAs	IsA
PartOf *HasA	PartOf
RelatedTo SimilarTo Synonym	RelatedTo
CapableOf	CapableOf
CreatedBy	CreatedBy
Desires	Desires
UsedFor	UsedFor
HasContext	HasContext
HasProperty	HasProperty
MadeOf	MadeOf
NotCapableOf	NotCapableOf
NotDesires	NotDesires
ReceivesAction	ReceivesAction
q → Vq	q → Vq
q → Va	q → Va
Table 7: Relation types after preprocessing. *RelationX indicates the reverse relation of RelationX. There are 19 kinds of merged relations. We consider the reverse edge of each relation during training and testing, so there are 38 relation types in total.
Datesets	Split	Average |Vq|	Average |Va|	Average |V|
CommomsenseQA	Train set	7.43	2.07	107.96
Dev set	7.20	2.05	106.55
Test set	7.38	2.05	106.22
OpenBookQA	Train set	6.59	2.85	100.14
Dev set	6.48	3.41	108.15
Test set	6.42	3.08	101.60
Table 8: Statistics on the number of retrieved subgraph nodes corresponding to each piece of data.  $V_{q}$  is the set of entities included in a question.  $V_{a}$  is the set of entities included in a choice.  $V$  contains  $V_{q}, V_{a}$ , and any bridging entity with no more than two hops between any pair of entities in  $V_{q}$  and  $V_{a}$ .
Error type	Example
Missing
important
evidence
(39/100)	Question	He has lactose intolerant, but was eating dinner made of cheese,
what followed for him?
Answer choices	digestive×| feel better ×| sleepiness×| indigestion √| illness×
Subgraph for correct answer	eating_dinner causes indigestion, intolerant related to pain symptom isa indigestion, ...
Subgraph for predicted answer	lactose related to food hassubesent eating_dinner causes sleepiness, intolerant related to bear related to sleep, ...
Indistinguishable
knowledge
(25/100)	Question	Where would a cat snuggle up with their human?
Answer choices	floor×| humane society×| bed×| comfortable chair√| window sill×
Subgraph for correct answer	cat atlocation chair, human atlocation chair, ...
Subgraph for predicted answer	cat atlocation bed, human atlocation bed, ...
Incomprehensible
questions
(23/100)	Question	The man tried to break the glass in order to make his escape in time, but he could not. The person in the car, trying to kill him, did what?
Answer choices	accelerate | putting together ×| working ×| construct ×| train ×
Subgraph for correct answer	escape isa break antonym accelerate, kill related to attack related to accelerate, man related to break related to falling hassubevent accelerate, ...
Subgraph for predicted answer	break isa action related to work, escape isa break hassubevent work, kill causes die hassubevent work, ...
Table 9: Several error cases of JointLK model on CommonsenseQA dev dataset. Because there are many nodes in the subgraph, we represent some nodes and relationships in the subgraph in the form of links.