Multi-hop reading comprehension requires an ability to reason across multiple documents. On the one hand, deep learning approaches only implicitly encode query-related information into distributed embeddings which fail to uncover the discrete relational reasoning process to infer the correct answer. On the other hand, logic-based approaches provide interpretable rules to infer the target answer, but mostly work on structured data where entities and relations are well-defined. In this paper, we propose a deep-learning based inductive logic reasoning method that firstly extracts query-related (candidate-related) information, and then conducts logic reasoning among the filtered information by inducing feasible rules that entail the target relation. The reasoning process is accomplished via attentive memories with novel differentiable logic operators. To demonstrate the effectiveness of our model, we evaluate it on two reading comprehension datasets, namely WikiHop and MedHop. Reasoning has been extensively studied in the structured domain, e.g., knowledge base completion which infers missing facts given background entities and relations. However, when the background knowledge is expressed in natural languages, as shown in the multi-hop reading comprehension problem with triplet-form questions (Welbl et al., 2018), it becomes difficult to conduct complex reasoning because the entities and relations are not explicitly labeled in the documents. For example, consider the question country( Moonhole , ?), given the following documents:  Moonhole is a private community on the island of Bequia . Moonhole was founded by Thomas and Gladys Johnston in the 1960s.  Gladys Johnston was born in United States .  Bequia is an island and is part of the country of Saint Vincent and the Grenadines  In this example, the underlined entities are used to infer the correct answer, i.e., country( Moonhole , Saint Vincent and the Grenadines ), but are not explicitly annotated for relational reasoning. Deep neural networks (DNNs) for multi-hop reading comprehension (RC) can be summarized into following three categories. 1) Memory-based models (Zhong et al., 2019; Wang et al., 2018; Zhuang and Wang, 2019) that produce query-aware context representations. 2) Graph-based approaches (Song et al., 2018; De Cao et al., 2019) that use graph neural networks to propagate information based on pre-constructed entity (context) graphs. 3) Neural Module networks (Andreas et al., 2016) that decompose the question into a series of action modules (Jiang and Bansal, 2019; Gupta et al., 2020). However, DNNs only implicitly encode relevant contexts and fail to explicitly uncover the underlying relational compositions for complex inference. For instance, in the above example, DNNs may encode Bequia and Gladys Johnson into 1-hop features, given the fact that both entities co-occur with the query Moonhole . As a result, the model may predict United States by linking it with Gladys Johnson instead of the correct answer Saint Vincent and the Grenadines . In contrast, human beings would easily produce the correct answer given the knowledge if A is in B and B is part of country C, then A is in country C and by examining the relations between each entity pair co-occurred in the context. Inductive logic programming (ILP) (Muggleton, 1991) aligns with human reasoning by inducing interpretable rules to entail positive but not negative examples. To answer the previous query, ILP could generate a rule as located_in ( X, Z )  country ( Z, Y )  country ( X, Y ) . Combining deep learning with ILP is a promising direction to benefit from both worlds (Evans and Grefenstette, 2018; Dong et al., 2019). Deep logic models have been proposed for structured knowledge base comple-4999 tion (Minervini et al., 2017, 2020; Yang and Song, 2020; Rocktschel and Riedel, 2017; Yang et al., 2017). However, it becomes much more challenging when dealing with natural language inputs, as in the case of multi-hop reading comprehension. Weber et al. (2019) proposed to combine a symbolic reasoner: prolog, with weak unifications based on distributed embeddings as a backward-chaining theorem prover to induce feasible rules for multi-hop reasoning. However, their work relies on the degree of precision for pre-extracted NERs and is limited by the number of rule templates. To address the aforementioned limitations, we propose a novel end-to-end integration of deep learning and logic reasoning termed D eep I nductive L ogic R easoning (DILR). It consists of two components: 1) a hierarchical attentive reader that filters query-related and candidate-related information from given documents, and 2) a multihop reasoner that conducts inductive logic reasoning by attentively selecting proper predicates to form candidate rules and refines them upon given examples. We introduce novel differentiable logic operators combined with attention mechanisms for smooth back-propagation. Compared to existing deep logic models, we build connections between raw text inputs and the symbolic domain by mapping high-level semantic representations to logic predicates and instantiating logic variables with neural representations to conduct relational reasoning. We also parameterize the entire process for end-to-end differentiable learning. The contributions of this work include: 1) We introduce a novel smooth connection between deep representation learning with logic reasoning by associating distributed representations with discrete logic predicates and their probabilistic evaluations. 2) We propose deep-learning-based inductive logic programming via attentive memories and differentiable logic operators for the task of multi-hop reading comprehension considering the number of reasoning steps. 3) We provide comprehensive evaluations of our model on two benchmark datasets. Multi-Hop Reading Comprehension Recent works for multi-hop RC include memory-based methods which apply attentions to iteratively update query and context representations considering their interactions (Dhingra et al., 2018; Clark and Gardner, 2018; Wang et al., 2018; Zhong et al., 2019; Zhuang and Wang, 2019; Jiang et al., 2019). To explicitly incorporate entity connections, De Cao et al. (2019), Ding et al. (2019), Qiu et al. (2019), Tang et al. (2020), Song et al. (2018) and Tu et al. (2019) proposed to build entity graphs and apply Graph Neural Networks for information propagation. Kundu et al. (2019) formalized reasoning as a path-finding problem with neural encoding to rank candidate paths. Path modeling was also adopted in (Chen et al., 2019) using pointer networks. However, these approaches only focus on local information without the ability to generalize, and some of them rely on off-the-shelf NER tools. Dhingra et al. (2020) proposed to convert texts into a virtual knowledge base for retrieval using a pre-constructed entity database. Another research direction is to decompose target questions into sub-questions (Min et al., 2019) or sub-modules parameterized with neural module networks (Jiang and Bansal, 2019; Gupta et al., 2020; Chen et al., 2020) which also fail to explicitly uncover the underlying logic for reasoning. Deep Learning with Logic Reasoning Neuro-symbolic learning aims to integrate deep learning's ability on dealing with uncertainty and logic pro-gramming's ability on reasoning. Deep neural networks have been used to parameterize discrete logic operators and logic atoms (Frana et al., 2014; Hu et al., 2016; Manhaeve et al., 2018; Xu et al., 2018; Li and Srikumar, 2019; Wang and Pan, 2020; Wu et al., 2020) given the logic rules. A more challenging direction is inductive logic programming that automatically learns rules through representation learning and differentiable backpropagation (Evans and Grefenstette, 2018; Dong et al., 2019; Wang et al., 2019; Yang and Song, 2020). Neuro-symbolic learning has been applied to knowledge-base completion through logic embeddings (Guo et al., 2016), tensor operations (Co-hen, 2016; Rocktschel and Riedel, 2017), adversarial learning (Minervini et al., 2017), variational learning (Qu and Tang, 2019) or attentions (Yang and Song, 2020). Differentiable theorem proving has also been proposed with weak unifications and backward chaining (Rocktschel and Riedel, 2017; Campero et al., 2018; Minervini et al., 2020). However, unlike multi-hop RC, knowledge-base completion only takes structured inputs without the need to address language ambiguity. The most related work to ours is NLProlog (Weber et al., 2019), a neural theorem prover for multi-hop RC by con-5000 verting language utterances to distributed embeddings. However, NLProlog relies on a NER tool to extract entities and its expressiveness is limited by the number of rule templates. We focus on multi-hop reading comprehension tasks containing explicit query types which align with the standard ILP setting. Formally, for each RC problem, we are given a set of documents C = { c 1 , ..., c K } , a structured query in the form of a relational triplet ( s, q, ?) , where s denotes the subject of the relation q , and a list of candidate answers A = { a 1 , ..., a n } . The task is to select an answer a  A such that q ( s, a ) is satisfied, i.e., a is the object of relation q given the subject s . For example, country ( Moonhole, ?) is a query asking for the country where Moonhole is located. This task could be converted into an ILP problem with the formal definition as follows. Definition 3.1 (Inductive Logic Programming) . Given a logic theory B representing the background knowledge (facts), a set of positive examples E + and a set of negative examples E  , an ILP system aims to derive a hypothesis H which entails all the positive and none of the negative examples: B  H | =  for   E + . B  H | =  for   E  . The hypothesis H is a logic program consisting of definite clauses b 1  ...  b N  h where b 1 , ..., b N and h are logic atoms. The LHS of    is the clause body and h is the head. An atom is composed of a predicate and its arguments, e.g., h = located_in ( X, Y ) with predicate located_in and arguments X , Y . A ground atom is obtained by instantiating variables in the arguments with constants, e.g., X = US. We use  (  ) to denote the value of an atom or a clause. For smooth optimization, we assign  (  )  [0 , 1] which indicates the probability of the atom or clause being true. For multi-hop reading comprehension, we treat the query relation q ( X, Y ) as the head atom of the clauses to be induced. The correct answer a + i from each problem forms the set of positive examples E + = { q ( s i , a + i ) } N + i =1 , and the incorrect answer a  i forms the set of negative examples E  = { q ( s i , a  i ) } N  i =1 . Here we use lower cases: s i , a + i , a  i to represent constants and upper cases: X , Y to represent variables. The predicates in the logic domain correspond to pairwise relations between two entities 1 . To differentiate the number of inference steps, we define a l -hop reasoning clause as F 0 ( X 0 , X 1 )  ...  F l ( X l , X l +1 )  r ( X 0 , X l +1 ) with l denoting the number of extra arguments as bridging entities in the rule body except those in the head atom. Here r denotes a predicate, i.e., a relation between X 0 and X l +1 . Each subclause F t ( X t , X t +1 ) can be one or a conjunction (  ) of 2-ary atoms taking only X t and X t +1 as arguments, e.g., F t ( X t , X t +1 ) = r 1 ( X t , X t +1 )  r 2 ( X t , X t +1 ) . Overall, DILR simulates a multi-hop reasoning process considering different number of inference steps. It is an end-to-end framework consisting of two components: a Hierarchical Attentive Reader and a Multi-hop Reasoner . The attentive reader learns to select relevant information from the given documents to produce query-aware, candidate-aware and bridging entity representations. These representations are passed to the multi-hop reasoner to instantiate logic atoms in order to generate and evaluate clauses that are relevant to the query relation. The multi-hop reasoner conducts rule induction via attentive memories that softly select atoms to form new clauses and novel differentiable logic operators that produce probabilistic values for generated clauses. The final loss can be back-propagated smoothly to update the attentive reader for more accurate selections. Next, we illustrate each component with more details. To avoid inevitable errors brought by off-the-shelf NER tools for named entity extraction, we propose to extract relevant information using an attentive reader. Since multiple documents (contexts) are involved for each question, we design a 2-level hierarchical attention network to progressively filter token-level and context-level information. Specifically, the token-level attentions aim to select l hop ( l = 0 , ..., L ) relevant entities in each context. Then the context-level attentions produce the final representations by softly attending to each context considering different number of reasoning hops. Given a query subject s with n s tokens, a candidate a with n a tokens, and a context c of length n c , we denote by S  R n s  D , A  R n a  D and C  R n c  D their word features after a biGRU layer, respectively. For multi-hop reasoning, we use different attentions for finding or relocating target tokens in each context, inspired by (Gupta et al., 2020). Firstly, a subject-to-context attention is adopted to find similar tokens as the subject in each context: B sij = w  s [ S i ; C j ; S i  C j ] where w s is a learnable transformation vector and [; ] denotes concatenations. We obtain the normalized similarity score  sij between the i -th token in the subject and the j -th token in the context via a softmax operation on each row of B s . A subject-aware (0-hop) context representation is produced as h s = n c (cid:88) j =1   sj C j , with   sj = n s (cid:88) i =1  sij  si , (1) where  si weighs the contribution of each subject token via a self-attention:  s = softmax (  w  s S + b s ) . Similarly, we produce an attention score  aij for the j -th context token w.r.t. the i -th candidate token and a candidate-aware context representation h a . We denote by s =  s S , and a =  a A the feature representation of the query subject and the candidate entity, respectively. For ( l + 1) -hop reasoning ( l  0 ), it is desired to relocate to intermediate (bridging) entities that are related to the l -hop entities. Hence, we adopt context-to-context attentions B l +1 ij = w  l [ C i + h l ; C j ; ( C i + h l )  C j ] given the l -hop representation h l where h 0 = h s . We use  l +1 ij to denote a normalized attention score between the i -th and the j -th context tokens after applying a softmax operator over each row of B l +1 . With   0 j =   sj , the ( l + 1) -hop bridging context representation becomes h l +1 = n c (cid:88) j =1   l +1 j C j , with   l +1 j = n c (cid:88) i =1  l +1 ij   l i . With multiple contexts (documents) available, we use a context-level attention to produce the final l -hop feature representations. When l = 0 , the model softly attends to each context to produce context-attended subject representation as (cid:98) h s = K (cid:88) k =1   sk h s,k , (3) where   sk is the attention weight of context c k obtained by normalizing over a score vector  s r 1 ( s,a ) r M ( s,a ) r 1 ( s,c 1 k ) r M ( s,c 1 k ) r 1 ( c 1 k ,a ) r M ( c 1 k ,a ) r 1 ( s,c 1 k ) r M ( s,c 1 k ) r 1 ( c 2 k ,a ) r M ( c 2 k ,a ) r 1 ( c 1 k ,c 2 k ) r M ( c 1 k ,c 2 k ) r 01 ( s,a ) r 0 M 0 ( s,a ) r 11 ( s,a ) r 1 M 1 ( s,a ) r 21 ( s,a ) r 2 M 2 ( s,a ) c 11 c 1 K c 11 c 1 K q ( s,a ) 0-hop 1-hop 2-hop c 21 c 2 K Figure 1: An example of multi-hop ILP. with entries  sk = v  s [ s ; h s,k ; s  h s,k ] . Here h s,k is the subject-aware context representation computed in (1) corresponding to the k -th context c k . v s is a trainable transformation vector. The final subject representation is produced as  h s = W s [ s ; (cid:98) h s ; s  (cid:98) h s ] incorporating both original features and attended information. Similar procedure applies to each candidate entity to produce  h a . We treat  h s and  h a as 0-hop subject and candidate representations, respectively. When l > 0 , the context-level attention aims to produce the probability of each context being chosen as a bridging entity using p lk =  ( v  l [ h s ; h lk ;  h s  h lk ]) , (4) where  (  ) is the sigmoid function, and h lk is the l -hop intermediate entity representation for context c k  C computed using (2). The multi-hop reasoner aims to conduct complex reasoning by first generating probable logic clauses and then evaluating each clause by instantiating the variables with relevant contexts obtained from the attentive reader. The clause generation process is parameterized by attentive memories which compute the probability of selecting each atom to form a relevant clause to entail the query relation. An illustration of the procedure is shown in Figure 1 and is elaborated in the following sub-section. The clause evaluation process is then to instantiate variables in each atom with constants such as query subjects, candidate entities or bridging entities. The outputs from the attentive reader, i.e.,  h s ,  h a and { h lk } 's ( l > 0 ), can be used as feature representations for these constants to compute the atom scores for clause evaluation and updates. A definite clause is composed of atoms defined over relational predicates. Since there are no explicit relations given in this task, we pre-define a fixed set of relations for each corpus, named as existential predicates: PE = { r 1 , ..., r M } , e.g., located_in, next_to. For expressiveness, we further create a set of invented predicates PI =  Ll =0 P lI defined from the existential predicates, inspired by (Evans and Grefenstette, 2018). Specifically, P lI = { r l 1 , ..., r lM l } consists of invented predicates r lm defined using l -hop reasoning clauses F 0 ( X 0 , X 1 )  ...  F l ( X l , X l +1 )  r lm ( X 0 , X l +1 ) . For example, located_in ( X 0 , X 1 )  next_to ( X 1 , X 2 )  outside ( X 0 , X 2 ) defines a 1-hop invented predicate outside. Here L is the maximum hop number. The final clauses defining the query relation will be produced by learning to select relevant invented predicates, e.g., r l 1 i ( X, Y )  ...  r l n j ( X, Y )  q ( X, Y ) with 0  l 1  ...  l n  L . The number of actual inference steps l n to answer q is flexibly decided by the model itself, which will be discussed later. The clause generation process is divided into two stages: 1) to generate clauses defining invented predicates using only the existential predicates, and 2) to generate final clauses defining query relation q using only the invented predicates. To allow for smooth optimization, we parameterize both stages by computing an attention weight for each predicate indicating its probability to appear in the clause body. Specifically, we assign each predicate a learnable embedding to indicate its semantics. Let U  RD  M denote the embedding matrix for M existential predicates and U l  RD  M l ( l  { 0 , 1 , ..., L } ) denote the embedding matrix for l -hop invented predicates. In the first stage, we use attentive memories to generate S lt = sparsemax (( W lt U lt )  ( W lb U )) , (5) U lt +1 = U lt + S lt  ( W lv U ) , (6) where U l 0 = U l , and W lt and W lb are transformation matrices for invented predicates (queries) and existential predicates (keys), respectively. We use sparsemax , a sparse version of softmax (Mar-tins and Astudillo, 2016), to select only a small number of predicates. Intuitively, to learn to define a l -hop invented predicate r l m , (5) and (6) sequentially produce F t ( X t , X t +1 ) at each step t  { 0 , ..., l } to form the clause body by attending over all the existential predicates with attention weight S lt . For example, when l = 1 , (5) first attends to the existential predicate r i to generate F 0 ( X 0 , X 1 ) = r i ( X 0 , X 1 ) at step t = 0 , and then attends to another predicate r j to generate F 1 ( X 1 , X 2 ) = r j ( X 1 , X 2 ) at step t = 1 . The resulting clause r i ( X 0 , X 1 )  r j ( X 1 , X 2 )  r 1 m ( X 0 , X 2 ) defines the invented predicate r 1 m . In the second stage, we produce H final clauses taking invented predicates to define the target atom q ( X, Y ) . Given an embedding u q  RD for the target relation q , we use a multi-head attention mechanism to compute a probability distribution s h over all the invented predicates for each head h  { 1 , ..., H } to produce the h -th final clause: s h = sparsemax { ( W hq u q )  ( W he [ U 0 ; ... ; UL ]) } , (7) where s h is a sparse selective distribution over PI = { r 01 , ..., r LML } . For example, if s h selects r 01 and r 12 , the final clause becomes r 01 ( X, Y )  r 12 ( X, Y )  q ( X, Y ) , which involves at most 1 inference step because r 12 is a 1-hop invented predicate. This completes the recursive rule generation step with multi-hop inference. To this end, we generate H clauses that can be used to define q ( X, Y ) . Instantiation The clauses generated using the attentive memories need to be tested and refined against the given positive and negative examples, known as learning from entailment that tries to maximize the truth probabilities of positive examples and minimize those of negative examples. The positive examples correspond to q ( s, a ) and the negative examples correspond to { q ( s, a  ) } 's, where s , a and a  refers to the query subject, correct answer and incorrect candidate, respectively. To obtain the truth probabilities of these atoms, we first instantiate the variables for each generated clause with constant contexts, e.g., X = s and Y = a (or Y = a  ) in q ( X, Y ) . The bridging variables X 1 , ..., X l are instantiated using the bridging contexts selected via the attentive reader as introduced in 4.1. Specifically, to instantiate each X l , we pick topK contexts (documents) { c l 1 , ..., c l K }  C , namely X l = c lk , 1  k  K with highest probabilities according to p lk computed via (4). Neural Logic Operator Given a definite clause b 1  ...  b N  h consisting of grounded atoms (e.g., b 1 = r 1 ( s, a ) ), we could obtain the value for its head atom as  ( h ) =  ( b 1  ...  b N ) . To compute the RHS involving logic operators (  ,  ), T-norm (Klement et al., 2013) is usually adopted: 5003 T : [0 , 1]  [0 , 1]  [0 , 1] . For example, minimum t-norm defines T  (  1 ,  2 ) = min(  1 ,  2 ) , T  (  1 ,  2 ) = max(  1 ,  2 ) . Product t-norm defines T  (  1 ,  2 ) =  1   2 , T  (  1 ,  2 ) = 1  (1   1 )  (1   2 ) . Here  1 ,  2  [0 , 1] refer to the value for the body atoms. However, minimum t-norm is prone to learning plateau because the gradient only flows through one of the inputs. Product t-norm is less stable and is prone to exponential decay when the number of atoms in the clause grows. To address these limitations, we propose a novel neural logic operator G defined as follows: G  (  1 , ...,  N )=1  exp (cid:32) N (cid:88) n =1 log(1   n +  ) (cid:33) 1 N , G  (  1 , ...,  N )=exp (cid:32) N (cid:88) n =1 log(  n +  ) (cid:33) 1 N , (8) where  1 , ...,  N  [0 , 1] refer to the probabilistic values of all the atoms in the conjunctive (  ) or disjunctive (  ) clause. is a small value to guarantee the validity for logarithm. The operator G has the following property that is ideal for logic semantics. Proposition 1. When   n  1 with 1  n  N , G  (  1 , ...,  N )  1 , aligning with logic AND. When   n  1 , G  (  1 , ...,  N )  1 , aligning with logic OR. Proposition 2. 0  G  (  1 , ...,  N )   min  ( N 1 / (1  N )  N N/ (1  N ) )( (cid:81) n  =min  N ) 1 / ( N  1) , where min refers to the index of the minimum value among {  1 , ...,  N } . Without loss of generality, assume the minimum value is  min =  1 . By fixing  2 , ...,  N as constants, we obtain the gradient for (9) w.r.t.  1 as 1 N  (1  N ) /N 1 N (cid:89) n =2  1 /Nn  1 . By replacing  min in (9) with (11), we have G  (  1 , ...,  N )   min  N 1 / (1  N ) N (cid:89) n =2  1 /N ( N  1)+1 /N n  N N/ (1  N ) N (cid:89) n =2  1 / ( N  1) n = ( N 1 / (1  N )  N N/ (1  N ) ) N (cid:89) n =2  1 / ( N  1) n . In other words, the difference between G  and  min is bounded. When N = 2 , the RHS of the inequality equals to 1 / 4   n  =min , which makes G  closer to  min when  n  =min is smaller. This formulation results in a more stable and smooth gradient flow compared to minimum t-norm. Moreover, It avoids exponential decay in the output when N > 1 . It also facilitates neural learning when the exact clause is parameterized with attention scores. Evaluation With the neural logic operator defined above, the value for the head atom can be inferred once the value for each body atom is given. For grounded atoms over existential predicates, e.g., r m ( s, a ) , we directly generate its value using a relational network F : R d  R d  RM that takes the features of two constant arguments as input to produce a probability distribution over all the existential predicates r 1 , ..., r M : F ( h s ,  h a ) = softmax( W r tanh[ h s ;  h a ;  h s   h a ;  h s   h a ]) , where  ( r m ( s, a )) equals the m -th entry of F (  h s ,  h a ) , and  h s and  h a are the outputs from the attentive reader. Similarly, h lk can be regarded as the feature of c lk generated from the attentive reader which is used to compute atom values with bridging entities, e.g.,  ( r m ( s, c lk )) . For l -hop grounded atoms over invented predicates { r l 1 ( s, a ) , ..., r lM l ( s, a ) } , we compute their values according to the value of the clause body that defines them, e.g.,  ( F 0 ( s, c 1 k )  ...  F l ( c lk , a )) using neural logic operators:  l = max z Z l exp (cid:32) l (cid:88) t =0 S lt log(  ( z t ,z t +1 ) +  ) (cid:33) 1 ( l +1) (12) 5004 Here  l = [  ( r l 1 ( s, a )) , ...,  ( r lM l ( s, a ))]  denotes the vector of the atom values formed by those l -hop invented predicates. We denote by Z l = { ( s, c 1 k , ..., c lk , a ) } 1  k K the set for all possible instantiations for l -hop reasoning and denote by z t the t -th constant of z  Z l . ( z t ,z t +1 ) = [  ( r 1 ( z t , z t +1 )) , ...,  ( r M ( z t , z t +1 ))]  is a vector of values for grounded atoms over existential predicates. Thus, exp(  ) gives a neural approximation of logic conjunctions as shown in (8) over { F t ( z t , z t +1 ) } 0  t  l , each of which is a sparse selection of existential predicates using S lt . We use a max operator to generate the maximum score over all possible instantiations in Z l to represent the final truth probability of each invented predicate. Intuitively, a relation between two entities should be satisfied as long as there is at least one instantiation that follows the rule. Also note that (12) has the effect that when S lt [ i, j ]  0 , the corresponding predicate r j will have little effect on the value of its head r li , which is in contrast to existing T-norms. The final value for q ( s, a ) is computed via  ( q ( s, a ))=max 1  i  H (cid:8) exp (cid:0) s i log([  0 ; ... ;  L ] +  ) (cid:1)(cid:9) , which selects the maximum score over H final clauses that define q ( s, a ) . We use the cross-entropy loss over  ( q ( s, a )) as the final objective to train the entire model (except the word embeddings which are kept fixed) in an end-to-end manner. Here we organize the dataset according to subject-candidate pairs: ( s, a ) . We associate the ground-truth label y = 1 with ( s, a ) if a is the correct answer, otherwise, y = 0 . We conduct experiments on two multi-hop reading comprehension datasets, namely WikiHop and MedHop (Welbl et al., 2018). The WikiHop dataset contains 43,738 training and 5,129 development instances ranging over 277 query relations. MedHop is a medical dataset containing 1,620 training and 342 development instances with a unique query relation, i.e.,  interact with . For WikiHop, we experiment with both non-contextual (follow (Weber et al., 2019)) named as DILR and contextual word embeddings (BERT (Devlin et al., 2019)) named as DILR-BERT to demonstrate our model's generalization ability. For MedHop, we use the same setting following (Weber et al., 2019). We define M = 10 relations as existential predicates and M l = 5 invented predicates for each hop with Model WikiHop MedHop Publisher Developer Country Record_label EPAr 81.48 65.52 70.10 80.57 64.90 HDEG 85.19 79.31 73.20 83.39 DynSAN 85.19 75.86 76.80 83.39 NLProlog 83.33 68.97 77.84 79.51 65.78 DrMD 85.19 75.86 74.23 81.27 67.25 DILR 88.89 79.31 79.38 84.10 71.35 BERT 88.89 79.31 81.96 83.04 DILR-BERT 88.89 82.76 84.02 84.45 Table 1: Comparison results with baseline models on MedHop and four selected relations in WikiHop. l = 0 , 1 , 2 . The number of final clauses to define the query relation is H = 5 and the number of candidate bridging contexts for each hop is set to K = 5 . The dimension of predicate embeddings and biGRU layer is 100 and 200, respectively. For training, we adopt Adam optimization with learning rate initialized at 0 . 001 . The batch size is set to 10. For all the experiments, we use the development dataset to evaluate the results because the test data is not publicly available to be grouped by query relations under our setting. Weber et al. (2019) only selects four different query relations from WikiHop, namely Publisher , Developer , Country and Record_label . For fair comparisons, we first follow their setting to evaluate on these four domains, then we further evaluate on all the other 47 valid query relations 2 in WikiHop for a more complete analysis. For pure deep learning baselines, we use two memory-based models: EPAr (Jiang et al., 2019) and DynSAN (Zhuang and Wang, 2019), and a graph-based model HDEG (Tu et al., 2019) 3 . For reasoning baselines, we use NLProlog (Weber et al., 2019) and DrMD which is a differentiable reasoning model adapted from (Dhin-2 We consider those query relations containing at least 20 development and 100 training instances as valid. 3 These baselines demonstrate good performances according to the leaderboard with available code for implementation. 5005 Setting Located Publisher Producer Country Occupation Record  0 Hop 70.24 85.19 61.76 76.29 71.78 78.80  1 Hop 71.72 87.04 67.65 77.84 71.78 81.98  2 Hop 73.38 88.89 67.65 79.38 73.62 84.10  3 Hop 70.79 83.33 58.82 76.29 69.63 82.69 DILR 73.38 88.89 67.65 79.38 73.62 84.10  PI 69.03 88.89 58.82 77.32 69.63 81.63  ILP 65.80 85.19 52.94 75.77 68.71 80.92  AR 66.73 85.19 55.88 74.23 65.95 83.39  Rel 63.22 87.04 64.71 78.35 69.63 79.15 prod-T 70.98 88.89 58.82 77.84 69.33 81.63 min-T 69.32 87.04 64.71 78.87 70.25 80.92 NLO 73.38 88.89 67.65 79.38 73.62 84.10 Table 3: Abalation study over model architecture.  indicates the removal of an element from the model. gra et al., 2020) by removing pre-defined entities and only consider mention interactions following our settings. BERT is a baseline model that first generates a context-aware query subject (or candidate) representation given the input [CLS] query subject (or candidate) [SEP] context [SEP]. Then the representations of the query subject and each candidate are concatenated to be fed into a binary classifier. On the other hand, DILR-BERT adopts the attentive reader and the multi-hop reasoner on top of BERT representations. For all the baselines, we train the models on each query relation separately to test the reasoning capability, same as our setting. Table 1 lists the results for MedHop and four query relations from WikiHop according to (Weber et al., 2019). Clearly, DILR gives the best performances across all the baselines, demonstrating the advantage of combining deep attentive learning with logic reasoning. Though NLProlog also conducts logic reasoning, it is limited by the model's capacity and relies on the extraction accuracy of the NER tool. Even with well-trained contextualized word embeddings (DILR-BERT), our model still brings consistent performance gains. For a more thorough analysis, we take the entire WikiHop dataset and group the query relations in terms of the number of training instances. As shown in Table 2, there are 38 relations (D1) containing less than 1,000 training examples, 7 relations (D2) with training examples ranging from 1,000 to 4,000 and 2 relations (D3) having more than 4,000 training examples. The entire data (D1+D2+D3) contains 36,653 training instances and 4,462 development instances. We report the micro-average accuracy scores over all the domains within each data group and their combinations in Table 2. Clearly, our model achieves the best performances over all data groups. The margin is larger for D1 and D3, demonstrating the consistency of our proposed model with varying data sizes. In fact, ILP could be beneficial when training data is not sufficient via learning of generalized rules. To provide detailed analysis, we conduct ablation experiments on 6 datasets as shown in Table 3. For fair demonstration, we pick one relation in D3 (Lo-cated), 2 relations in D2 (Occupation and Record) and 3 relations in D1 (Publisher, Producer, Coun-try). The first four rows reflect the accuracies by varying the maximum allowed number of reasoning hops ( L ). Clearly,  0 Hop and  3 Hop produce lower accuracies because  0 Hop fails to model the bridging entities and  3 Hop could overfit the model given most of the questions only involve at most 2 reasoning hops. The middle part of Table 3 reflects the effect of each element of DILR. Specifically,  PI removes the invented predicates: remove (5), (6), (12) and replace U l with U in (7). ILP removes the reasoner and uses a classifier on top of the attentive reader to produce the final predictions. AR removes the attentive reader and uses NER tools to extract entities for reasoning. Rel only computes binary relations that decide whether two constants are related or not. This demonstrates the effect of relational reasoning considering different relations. By comparison, it is evident that removing any component will suffer from non-trivial prediction loss, especially for ILP. To verify the effect of the neural logic operator (NLO), we compare it with two T-norm operators, namely prod-T for product T-norm and min-T for minimum T-norm. Clearly, NLO produces the best performances across all the experiments. To provide a concrete view of how the attentive reader filters relevant information and how the generated clauses look like, we list three examples as shown in Table 4. The underlined texts have the maximum attention weights learned from the attentive reader. The bold texts indicate the query subject and the correct answer for each query. Clearly, the attentive reader is able to select bridging entities relevant to the answer. The third column lists some learned clauses from the reasoner. The first row of each example shows the clauses that define an invented predicate and the second row shows the final clause that entails the query relation 4 . We use ab-4 We convert the attention scores to the exact clauses by 5006 breviated entities as the constants in each grounded atom (e.g., CC is short for Chris Church). The two clauses for the first example could be read as: if Chris Church and Massachusetts has relation r 7 , and Massachusetts and United States has relation r 2 , then the country of Chris Church is United States . We further demonstrate the robustness of DILR by varying model parameters, as shown in Figure 2. The top subplots reveal the accuracies on MedHop and Country datasets when changing the number of final clauses H (left) and the number of existential predicates M (right). The subplot in the bottom depicts the accuracies when varying the number of instantiations K of the bridging contexts for Genre dataset under both DILR and BERT-DILR models. We shall observe that the performances are relatively stable given that the total number of testing examples are less than 400 for each dataset. We propose an end-to-end model DILR to solve the problem of multi-hop reading comprehension. DILR smoothly connects a hierarchical attentive reader with a multi-hop reasoner to conduct automatic information extraction and complex reason-keeping those predicates with scores higher than 0.4. ing. We also introduce differentiable logic operators to induce valid clauses with smooth and stable gradient-based learning. Extensive experiments reveal consistent improvements brought by DILR. This work is supported by Microsoft Research Asia collaborative research grant and the College of Engineering International Postdoctoral Fellowship of Nanyang Technological University.
abstain abstain abstain objective abstain objective abstain abstain other abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain objective abstain objective method abstain objective objective method other other other other other other other other other other other other other other other other method abstain other other other other other other other other other abstain method abstain abstain other method other method other other abstain abstain abstain abstain abstain abstain abstain abstain method abstain abstain abstain abstain abstain abstain abstain other method abstain abstain method method abstain method other abstain abstain abstain abstain abstain abstain other abstain abstain abstain abstain abstain abstain method method abstain abstain abstain abstain abstain abstain method method abstain other method abstain other abstain method method abstain abstain method abstain abstain abstain abstain method abstain abstain abstain abstain abstain abstain abstain other abstain abstain abstain abstain abstain abstain abstain abstain abstain method abstain abstain abstain abstain abstain abstain method abstain method abstain abstain abstain method abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain result abstain abstain abstain abstain abstain abstain result abstain abstain abstain other abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain result abstain abstain result abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain result abstain result abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain result objective abstain abstain abstain other