System 1 + System 2 = Better World: Neural-Symbolic Chain of Logic Reasoning (2022)

Abstract: Logical reasoning is a challenge for many current NLP neural network models since it requires more than the ability of learning informative representations from data. Inspired by the Dual Process Theory in cognitive science — which proposes that human cognition process involves two stages: an intuitive, unconscious and fast process relying on perception calledSystem 1, and a logical, conscious and slow process performing complex reasoning called System 2 — we leverage neural logic reasoning (System 2) on top of the representation learning models (System 1), which conducts explicit neural-based differentiable logical reasoning on top of the representations learned by the base neural models. Based on experiments on the commonsense knowledge graph completion task, we show that the two-system architecture always improves from its System 1 model alone. Experiments also show that both the rule-driven logical regularizer and the data-driven value regularizer are important and the performance improvement is marginal without the two regularizers, which indicates that learning from both logical prior and training data is important for reasoning tasks.

## introduction current nlp neural network models such as bert @xcite , roberta @xcite and many more recent language models have revolutionized how representations and semantic information can be extracted from language, which have led to large improvements on various tasks. one challenge, however, is how to perform logical reasoning, which relies on the informative representations learned from data but also requires reasoning abilities on top of it. our paper builds an architecture that explicitly conducts neural logical reasoning inspired by cognitive science theory of the human mind. according to the dual process theory @xcite figure 1 : overview of the two-system architecture @xcite , humans' cognition processes involve two systems: an intuitive, unconscious and fast process called system 1, and a logical, conscious and slow process called system 2. system 1 relies mainly on perception, which is employed to get an intuitive judgment of the current situation and reach an experience-based conclusion. meanwhile, system 2 is used for more complex logical reasoning processes such as solving numerical problems, logical deduction problems, and even logical and coherent everyday communications. system 1 is unconsciously deployed which generates representations and helps make intuitive judgments. when complex reasoning is needed, system 2 is used to work together with system 1 and reason over the representations from system 1 for decision making. most existing models mainly focus on the system 1 stage, leveraging gigantic deep neural networks to learn high-quality representations such as language models @xcite , vision representations @xcite @xcite and graph embeddings @xcite @xcite . based on the dual process theory, equipping a reasoning layer that works as the system 2 on top of the representations from system 1 would work better at complex reasoning tasks. in this paper, we use the common sense knowledge graph (cskg) link prediction task to illustrate that models integrating the representation learning ability and the logical reasoning ability perform better than models that only perform representation learning. technically, our model incorporates logical reasoning with representation learning to enhance the link prediction task based on the observation that a correct proposition (triple) usually has a relevant chain of propositions (triples) that helps validate it. for example, suppose there is a candidate proposition (obesity, causedesire, exercise), from these two known propositions (lose weight, hasprerequisite, exercise) and (obesity, causesdesire, lose weight), we can infer that (obesity, causedesire, exercise) is likely to be valid. if the model can pay attention to the chain of propositions in the knowledge graph to determine, it would be able to improve the graph completion task. a similar idea is introduced by @xcite , where the model is trained to generate a chain of thoughts that leads to the final answer in a numerical question answering task. the training of generating explicit reasoning process facilitates the acquisition of reasoning ability in language models. our work does not abandon the existing successful representation learning models, instead, we leverage the representations and develop a general architecture that infuses logical reasoning ability on top of the representations for improved performance. the reasoning layer is flexible enough to be plugged into any representation learning model as long as outputs of these models are embeddings. here are our main contributions: (1) conceptually, we demonstrate the advantage of applying dual process theory to facilitate the logical reasoning ability and (2) technically, we develop a neuralsymbolic two-system architecture for chain of logic reasoning based on both rule-driven logical regularizers and the data-driven value regularizers. ## preliminaries: chain of propositions this section introduces the definition of chain used in the model and its coverage in the dataset. definition 3.1 (chain). let @xmath0, rel q , e tq ) be a query proposition triple of cskg @xmath1, r), where e is the set of entities and r is the set of relations. notice that q could be an existing triple in g (for training) or a non-existing one that needs to be predicted in inference. an ordered list of propositions p 1 , p 2 , • • • , p n where p @xmath2, rel i , e ti ) is a chain for q if and only if: (1) for each p i , e hi , e @xmath3, (2) p 1 = (e hq , rel 1 , e t1 ) and p @xmath4, rel n , e tq ) for some e t1 , e @xmath5, and (3) for each p i , e @xmath6. the above is a very strict definition for propositional reasoning chain. to increase coverage, we apply two extensions to the above definition. ## the two-system architecture our architecture consists of two components: a representation learning component and a neural logic reasoning component on top of it, as shown in figure 2 . the representation learning component can be any model that encodes proposition triples into vector embeddings, and the neural logic reasoning component conducts reasoning in a latent logical space based on neural logical operators. given a query proposition q and its chain {p 1 , p 2 , • • • , p n }, the model determines whether q is valid by determining whether the following logical expression is true or false: according to the definition of material implication (→) foot_0 , the above expression can be transformed to: ## conclusions and future work as a simple instantiation of the dual process theory, this paper demonstrates the advantage of incorporating a system 2 reasoning model on top of a system 1 representation learning model on cskg link prediction tasks. the positive results verify the potential of our method. as a flexible reasoning model that is differentiable and that can be easily infused with any representation learning model, we intend to incorporate our method with larger pretrained language models and extend to more nlp tasks in the future.