Do Transformers Dream of Inference, or Can Pretrained Generative Models Learn Implicit Inferential Rules? (2020)

Abstract: Large pretrained language models (LM) have been used successfully for multi-hop question answering. However, most of these directions are not interpretable, as they do not make the inference hops necessary to explain a candidate answer explicitly. In this work, we investigate the capability of a state-of-the-art transformer LM to generate explicit inference hops, i.e., to infer a new statement necessary to answer a question given some premise input statements. Our analysis shows that such LMs can generate new statements for some simple inference types, but performance remains poor for complex, real-world inference types such as those that require monotonicity, composition, and commonsense knowledge.

## introduction the emergence of large pretrained language models (lm) @xcite yielded significant progress in question answering (qa), including complex qa tasks that require multihop reasoning @xcite @xcite . most of these stateof-the-art (sota) approaches address multi-hop reasoning tasks in a discriminative manner: they take the question, the candidate answer, and all the context available as the input, and produce a single score indicating the likelihood of the answer as justified by the provided context (an example is shown in figure 1 ). however, why that context actually justifies the answer remains unclear to the human end user of the qa system. in contrast, most of us are likely to answer the question in figure 1 by building a reasoning chain from the given facts. for example, such a possible chain starts by first combining "metal is a thermal conductor" and "steel is made of metal' to yield "steel is a thermal conductor". next, combining "steel is a thermal conductor" and "heat travels figure 1 : an example of question and candidate answers from openbookqa @xcite (the correct answer is option b). the science fact and the commonsense knowledge facts are needed to explain the correct answer. usually the large lms solve this problem by taking the question, the science fact, the common knowledge facts and each candidate answer as the input and producing a single score indicating the probability of the candidate answer being justified by all of the inputs. but why the facts explain the answer is normally not covered. motivated by this, in this work we investigate whether a state-of-the-art (sota) transformerbased language model is able to generate a valid intermediate statement given two premise statements on a natural language qa dataset, which is fundamental to generating the reasoning chains. our results show that although the sota model investigated can handle some types of inferences well, there remain multiple types of inferences where the lm fails. ## related work recently several works have investigated whether deep learning (dl) language models (lm) are able to learn and use the explicit and implicit rules in natural language. @xcite build a synthetic dataset containing the relationships between people; their language model needs to predict the unstated relationships between people. the problem can be summarized as: given that "mike is the child of kate and kate is the child of tom", the model needs to predict "tom is the grandparent of mike", by learning the implicit rule: "if x is the child of y and y is the child of z, then z is the grandparent of x". it has been shown that the transformer networks perform well on this task. other works have analyzed whether dl language models are able to leverage explicit rules. @xcite generates a synthetic dataset consisting of facts and rules. the problems can be summarized as: given the facts such as "x is red" and "x is big", as well as rules such as "if x is red and big, then x is strong", the lm trained on this data must be able to judge whether "x is strong" is true. they demonstrate that transformers can fulfill this task well, and are able to generalize to unseen lexicons. however, all existing works investigate this problem in a discriminative manner: either a single score, a single token, or a single choice is produced as the output. in contrast, we conduct our work in a generative manner: the lm needs to generate a whole natural language statement as the output. we believe this task will eventually give the lm the ability to generate clear and complete explanations, which are necessary in multi-hop reasoning problems. further, we investigate the capability of transformers to generate inferential statements on a complex, real-world task in the science domain, which relies on much sparser data than other tasks previously investigated. ## results below "well learned" means most of the predictions on that type of generations are evaluated as "perfect" and "not well learned" means most of the predictions are evaluated as "unacceptable" by the criteria mentioned in 3.3. inference types well learned: instantiation here the input statements are s 1 (a, b) and isa(b, c), i.e., c is an instantiation of a more general concept b. the target output is s 1 (a, c) ( equivalence here the input statements are s 1 (a, b) and equ(b, c), i.e., b is equivalent to c. the target output is s 1 (a, c) ( inference types not well learned: multiple possible statements to generate when the input statements are long and complex, there might be multiple valid statements that could be generated from the input (discussed in 3.2). in this case t5 tends to be confused. adding lexical hints can relieve this problem to some extent by forcing the model to pay extra attention to certain areas in the input, but problems remain. first, even when adding the lexical hints, some generations are still not reasonable ( ## conclusion in this work we investigate how well a state-ofthe-art transformer language model can generate a valid statement inferred from two given statements. we manually evaluated two fine-tuned t5 models @xcite with slightly different inputs (i.e., with and without contextual information) on the question answering via sentence composition dataset @xcite . our analysis indicates that the two models can generate good-quality statements, when the inference relies solely on instantiation or equivalence. however, the models perform poorly on more complex inferences such as: (a) multiple valid statements can be generated given the premises, (b) inference that requires non-trivial reasoning of monotonicity (especially with quantifiers in natural language), (c) inference that needs composition and summarization, and (d) statements that require rephrasing based on background commonsense knowledge.