Differentiable Neuro-Symbolic Reasoning on Large-Scale Knowledge Graphs
Authors: CHEN SHENGYUAN
YUNFENG CAI
Huang Fang
Xiao Huang
Mingming Sun
Venue: NeurIPS 2023 poster (2023)
Keywords: Neuro-Symbolic Reasoning
Knowledge graph embedding
Probabilistic soft logic
TL;DR: A differentiable nero-symbolic framwork is proposed for reasoning on large knowlege graph.

Abstract: Knowledge graph (KG) reasoning utilizes two primary techniques, i.e., rule-based and KG-embedding based. The former provides precise inferences, but inferring via concrete rules is not scalable. The latter enables efficient reasoning at the cost of ambiguous inference accuracy. Neuro-symbolic reasoning seeks to amalgamate the advantages of both techniques. The crux of this approach is replacing the predicted existence of all possible triples (i.e., truth scores inferred from rules) with a suitable approximation grounded in embedding representations. However, constructing an effective approximation of all possible triples' truth scores is a challenging task, because it needs to balance the tradeoff between accuracy and efficiency, while compatible with both the rule-based and KG-embedding models. To this end, we proposed a differentiable framework - DiffLogic. Instead of directly approximating all possible triples, we design a tailored filter to adaptively select essential triples based on the dynamic rules and weights. The truth scores assessed by KG-embedding are continuous, so we employ a continuous Markov logic network named probabilistic soft logic (PSL). It employs the truth scores of essential triples to assess the overall agreement among rules, weights, and observed triples. PSL enables end-to-end differentiable optimization, so we can alternately update embedding and weighted rules. On benchmark datasets, we empirically show that DiffLogic surpasses baselines in both effectiveness and efficiency.

Differentiable Neuro-Symbolic Reasoning on Large-Scale Knowledge Graphs
Shengyuad uan Chen
Yunfeng Cai Cognitive Computing Lab Baidu Research
Department of Computing
The Hong Kong Polytechnic University Hung Hom, Hong Kong SAR
10 Xibeiwang East Rd., Beijing, China caiyunfeng@baidus com
shengyuan. wwwn@connect.......mmmmm wow.oonnnnetttlt....oo.om.m hk
Huang Fang
Xiao Huang
Cognitive Computing Lab Baidu Research
Department of Computing
The Hong Kong Polytechnic University Hung Hom, Hong Kong SAR como polyu. edu hk
10 Xibeiwang East Rd., Beijing, China
Fanghuang@baidu. com
Mingming Sun
Cognitive Computing Lab
Baidu Research
10 Xibeiwang East Rd., Beijing, China summingming@0@baiduu
@ibiiiiiun@@bbiuuuoummm com
Abstract
Knowledge graph (KG) reasoning utilizes two primary techniques, i.c., rule-based and KG-em KG-embedding based. The former provides precise inferences, but inferring via concrete rules not scalable. The latter enables efficient reasoning at the cost of ambiguous inference accuracy. Neuro-symbolic reasoning seeks amalgamate the advantages of both techniques. The crux of this approach is replacing the predieted existence of all possible triples (i.e., truth scores inferred from rules) with a suitable approximation grounded in embedding representations. However, constructing effective approximation of all possible triples' truth scores is challenging task, because it needs to balance the tradeoff between accuracy and efficiency, while compatible with both the rule-based and KG-embedding models. To this end, we proposed differentiable framework DiffLogic. Instead of directly approximating all possible triples, we design tailored filter adaptively select essential triples based on the dynamic rules and weights. The truth scores assessed by KG-embedding are continuous, so we employ a continuous Markov logic network named probabilistic soft logic (PSL). It employs the truth scores of essential triples assess the overall agreement among rules, weights, and observed triples. PSL enables end-to-end differentiable optimization, so we can alternately update embedding and weighted rules. benchmark datasets, we empirically show that DiffI Logic surpasses baselines in both effectiveness and efficiency.
Introduction
Knowledge graph (KG) reasoning refers to the process of using existing triples in a KG to infer new knowledge that is not explicitly stated in the original KG (Safavi & Koutra, 2020). For instance, we know that (Paris, is the hhe_cclllll____ of. France) and (France, is country in, Europe), we can infer
37th Conference on Neural Information Processing Systems (NcurIPS 2023).

---

that (Paris, is_ a __city essential KG completion (Shi & Weninger, 2017) and KG error detection (Zhang et al., 2022a; Dong et al., 2023b). Moreover, KG reasoning can infer underlying knowledge and improve the quality of learning or predictions on KGs, which benefits various downstream tasks, such as question answering (Huang et al., 2019; Dong et al., 2023a), recommendations (Huang et al., 2023; Xu et al., 2023), and interpretable machine learning (Lecue, 2020; Tiddi & Schlobach, 2022).
ciit_inn, in. Europe), which is not explicitly included in the original KG. KG reasoning
There are mainly two lines of research in KG reasoning (Zhang et al., 2022b). First, rule-based reasoning derives new triples from existing ones by applying a set of predefined rules, which are usually expressed in form of logical statements (Yang et al., 2017: Sadeghian et al., 2019; Fang al.. 2023). For example, if there are two triples (A, is_a a_paa__t______ of. B) and (B, a __prrent of, C), and a rule saying "the parent of a parent is a grandparent", then we can infer a new triple (A, is_a La_a_gaandpaeen of. C). Rule-based reasoning is particularly effective when the rules are well- defined and the KG is relatively small and static (Bach et al., 2017). Recent studies employ Markov logic network (MLN) (Richardson & Domingos, 2006) to dynamically learn soft rules, which are associated with weight scores indicating their credibility. But it remains not scalable because assessing the truth scores to all possible triples requires ([E)))R)) parameters, where |8| and [R] denote the numbers of entities and relations. Thus, rule-based reasoning becomes inefficient when dealing with large KGs. Second, KG-embedding based reasoning projects a KG into low- dimensioonnll space and infers new relations based on embedding representations (Zhang et al., 2021; Ren et al., 2022). It assumes that KG embedding can preserve most semantic information in the original KGs (Bordes et 2013; Wang et al., 2014; Sun et al., 2019; Dong et al., 2014) so that missing relations can be inferred by using the distances or semantic matching scores in the embedding space. Recent studies (Shang et al., 2019; ?: Vashishth et al., 2019; Zhang et al., 2023) also seek design tailored Graph convolutional networks for learning structural-aware KG embeddings. KG-embedding based reasoning can be scalable (Zheng et al.. 2020; Ren et al., 2022). However, there is no explicit rule to ensure its accuracy and logical consistency. Also, it requires a sufficient amount of training data, and its results are difficult interpret.
Neuro-symbole reasoning models combine the advantages of both techniques, which is to approxi- mate the predicted truth scores of all possible triples inferred by rules with the normalized output scores of a KG-embedding model. However, it is nontrivial to effectively and efficiently construct such approximation. Directly employing rules (Guo et al., 2016, 2018) regularize the embedding learning is efficient, but it cannot update rule weights and is thus sensitive to the initialization of rule weights. Incorporating KG-embedding models into sophisticated rule-based models, such MLN, enables the handling of rule uncertainty (Qu & Tang, 2019; Zhang et al., 2020). However, directly approximating the distributions of the truth scores are still challenging. First, directly approximating the distribution of truth scores within the MLN framework is unfeasible. This process necessitates the optimization of the joint probability of the approximated distribution, which subsequently requires the computation of integration across all scores. Second, optimizing neuro-symbolic models rely on training with ground formulas (i.e. instantiated rules). Given the large grounding space, the performance of neuro-symbolic models may deteriorate if important ground formulas are missed (Guo et al., 2016; Qu & Tang, 2019), and efficiency issues may arise if too many ground formulas are considered (Zhang et al., 2020).
To this end, we proposed differentiable framework DiffLogie. Firstly, a tailored filter is used to adaptively select important ground formulas based on weighted rules and extract connected triples. Second, KG-embedding model is used to compute a truth score for each triple. Then we employ continuous MLN named probabilistic soft logic (PSL) (Bach et al., 2017) that takes these truth scores as input, and assesses the overall agreement among rules, weights, and observed triples with a joint probability. The PSL template enables end-to-end differentiable optimization. In this way, DiffLogic optimized by alternately updating embedding and weighted rules. Contributions of this work are summarized as follows:
(1) We develop unified neuro-symbolic framework DiffLLoicc that combines the advantages of KG-embedding models and rule-based models: efficiency, effectiveness, capability of leveraging prior knowledge and handling uncertainty.
(2) We enable consistent training of rule-based models and KG-embedding models. By employing PSL, the joint probability of truth scores can be optimized directly rather than optimizing an evidence lower bound (ELBO) instead.
2

---

(3) We propose an efficient grounding technique that iteratively identifies important ground formulas required for inference, enabling effective and data-efficient optimization.
(4) We devise a fast estimation technique for the gradient of rule weights, which efficiently estimates the rule weight gradient by exploiting the sparsity of violated ground formulas.
(5) Through experiments, we empirically show that: (i) DiffLogic scales to large knowledge graphs with consistently improved performance, such YAGO3-10; (ii) our model can leverage human prior knowledge by injecting rule patterns using only a compact set of logic rules; and (iii) our grounding technique is both efficient and effective, it reduces the number of ground formulas required for optimization by orders of 10 10", without compromising performance.
2 Preliminaries
In this section, we formally define the problem of knowledge base completion, provide brief introduction to first-order logic, and how to evaluate its agreement with a knowledge base.
2.1 Problem statement
A knowledge base K. comprises set of entities & and set of relations R. For any pair of head-tail entities (h,t) & x and a relation r R, the relation maps the pair of entities to a binary score, i.e., r: E x & - {0, 1}, Vr E R. indicating that the head entity h either has the relation with the tail entity or not. In the knowledge base completion problem, people observe a set of facts O = {(h,, Ti, (:)) _ along with their true assignment vector = [ Moj E RIO with I; ri (h4, t.). Denote the unobserved facts H & R O, and let {FE, W,)) set of weighted rules, where Fg is rule (see Section 2.2 for details, where rule is referred to as first-order logic). W, is the corresponding rule weight. The knowledge graph completion task aims to infer the assignment vector for all unobserved facts y E [R| given the observed facts and the rules.
)m be
2.2 First-order logic
First-order logic. A first-order logic (also referred to as "logic rule" in this paper) associated with a knowledge base K. is an expression based relations in K.. Formally, logic rule F, in clausal form can be represented as disjunction of atoms and negated atoms:
(Viez, ri B.) V (Viz, T. B.)),
where I, and It are two index sets containing the indices of atoms that are negated or not, respectively, A; and B, are variables. Logic rules in clausal form can be equivalently reorganized as an implication from premises (negated) to conclusions (non-negated):
N (A B.) - Viei; Ti (A;, B:).
The implication Eq. (2) is quite expressive since it includes many commonly used types of logic rule, e.g., symmetry/asymmetrr. inversion, sub-relation, composition, etc.
2.3 Rule grounding and distance to satisfaction
Rule grounding. For a logic rule Fg in Eq. (2), by assigning entities e to the variables A, and B, Fg is grounded, producing set of ground formulas. For example, consider a simple logic rule FathherA, B) A Wife(C, A) + Mother C, B). Let A= Jack, = Ross and C = Judy, we get ground formula: Father (Jack, Ross) A Wife(J Jack) + Mother Judy,, Ross).
cistanee-t--stisfactiin Denote all ground formulas created by the q-th logic rule F, by {G( R2g
Jj=1*
where ny is the number of ground formula for the q-th rule. For any ground formula G(i) of Fy. when ri (he, (;) E {0, 1), the satisfaction of G(F) can be evaluated via Eq. (1). The value is either I or O, meaning that the ground formula is satisfied or violated, respectively. The binary value of (fa,, fx) can be relaxed to continuous value ranging over [0, 1]. In such case, may define the
3

---

Logic rules
Weights
Rule mining
1 Arg
M-step update weights W
Fa =
Ey = Ta
Tin
Grounding
Ground formulas
Joint probability
F2
Hinge-loss
Pir(fr e (j:0))
Entity relation embeddings
Truth scores
0f
21 (e, e2; 0) 0.8
o
(e e2; 0.2
B,
Embedding
E-step
The (e ej; 0.6
optimize embeddings 8
0
Figure Overall framework of DiffLogic.
Sestance-to-satisfacee for GD via Eukasiewicz t-norm:
d(G max 1 - Σ ri(
Ea-r((htt)))
(3)
NET
iET9
Note that d(G! ) E [0, 1]. and the smaller is, the better satisfied the ground formula G( is.
Differentiable neuro-symbolic reasoning
In this section, propose neuro-symbolic model, namely, DiffLogic, which unifies KG-embedding and rule-based reasoning. What follows we present the overall framework of DiffLogic, then show how to perform DiftLogic efficiently.
3.1 Overall framework
As shown in Figure 1, the model comprises three components: 1) an efficient grounding technique serving filter to identify crucial ground formulas and extract triples connected to them; 2) KG-embedding model to compute truth scores for the extracted triples; and 3) a tailored continuous MI.N framework that takes the truth scores as input and assess the overall probability. The model is optimized using an EM algorithm, alternating between embedding optimization and weight updating. During the E-step, fix the rule weights and optimize embeddings in end-to-end fashion, by maximizing the overall probability; while in the M-step, we design an efficient rule weight updating method by leveraging the sparsity of violated rules. It is also worth mentioning here that the model requires a set rules, which can be obtained from certain ful-mining process or domain experts.
Next, we turn to the abovementioned three components.
Rule-guided iterative grounding. The success of probabilistic logic reasoning heavily depends the grounding process. However, the number of grounding formulas overwhelmingly large, under setting, equals Σm= Ez |+1 As result, has to sample for approximation. In this work, we propose grounding technique called Rule- iuiegg Iterative Grounding (RGIG) that incrementally identifies crucial ground formulas, reducing the number of ground formulas needed for optimization without compromising performance.
Inference inherently promotes the agreement between assignments (i.c., y, x) and the weighted rule set (i.e., {(Fg. W /ym 1) by penalizing violated rules. Consequently, ground formulas with higher distance-to- totese-ttt-saisfacttooo satisfaction are more valuable in guiding optimization. In light of this, we only need to find the ground formulas whose premise atoms in Eq. (2) have (or potentially have) high scores. Pursuing this idea, RGIG iteratively grounds all logic rules and updates fact set V. The fact set is initialized with the observed facts O from the training set. In each iteration, rules are grounded only from the facts V that match the premise parts of the rules. New facts are derived from the conclusion parts of the rules and subsequently added to V. In the subsequent iterations, the updated

---

FriendDD, Am0.9
08 Smokes(<))Prromddx...) Smokes(y) Smokes(X) Cancer(t) (y)
FriendiA, A--0.1
Smokes(A)- 0.2
Smakes(B)-03 0.8
Friend D)-0.2
P. (vvorllSState) zexp(
Wg (warldStaat)
FriendJA, By-04
Cancen(D-0011
Weight of rule Fg
Potemtaal suas of the
Figure 2:
An illustration of probabilistic soft logic (PSL).
used derive more new facts. From our numerical experience, few iterations of RGIG are sufficient, say 3. In the end, RGIG yields a set of ground formulas.
This grounding technique leverages the sparsity of violated rules (the distances to satisfaction for most ground formulas are approximately zero) to efficiently identify important ground formulas, facilitating data-efficient optimization. The case study in Section 4.2 illustrates that our grounding technique attains comparable reasoning performance and is orders of (103 10*) more efficient in terms of the number of ground formulas.
KG-embedding model. In the literature of probabilistic logic reasoning, the representation of assignment for all unobserved facts is very expensive, which is approximate |E| as the observed fact triples are only a small portion. To this end, we employ a KG-embedding model to parameterize and æ. By embedding each entity to continuous representation with parameters, and each relation with n, parameters. The number parameters is reduced from [ to El + [R|n,. which is linear with respect to the number of entities/relltionss.
Although peaanatramttiinntoonnn improves the representation efficiency, we also need to consider effectiveness. The relation pattern modeling capability is essential for honestly modeling the logic in a KG and performing reasoning. For example, the ability to model symmetric and reverse relation attributed to capturing logic rules with one premise atom (e.g. H Husband( A, B) = Wife(B, A)), while the ability to model composition relation attributed to capturing logic rules with two premise atoms (e.g. Father(A) (A, B) A Wife(C, .) + Mother(C, B)). Among all candidate KG-embedding models, we choose RotatE (Sun et al., 2019) for its simplicity and capability modeling the various logic patterns. And of course, one may use also other KGE models instead. Let the KGE model be parameterized by 6. Using the sigmoid function, we can transform the score for the fact triple (h, r. t) produced by the KGE model into [0, 1], which can be taken the truth value for (h, t). So the truth value for (h, r, t) can be parameterized by 9. Therefore, the assignment vectors æ and y can be parameterized by 0, with their entries being the truth values for the observed and unobserved fact triples, respectively.
Hinge-loss Markov random field. Given the parameterized assignments, we employ PSL (Bach et al., 2017) to build a hinge-loss Markov random field (HL-MRF), Specifically, given a knowledge base I. with assignments y. and set of weighted logic rules {(Fg, W;) Wo) A HL-MRF P over y conditioned on æ is a probability density function defined as
/
Pu Z(W .))
exp(- (xp(-fu((y,z)
Z(W x))
x))dy,
(4)
V
where J is the hinge-loss energy function, defined as the weighted sum of all potentials:
fw (y. W Φ x.) =
Wm
Im (v. xT =
W (y,
(5)
9=1
and (y, x)) is the sum of potentials of all ground formulas of Fq. i..., () Σド d(Gl))
HL-MRF optimizes the assignment and the rule weights W by alternating between Maximum posterior (MAP) inference and weight learning. The former step fixes the W and optimizes y, while the latter step fixes and updates W.
3.2 Optimization
Below we elaborate on the optimization details of DiffLoggic. We demonstrate how the model opti- mization efficiently performed by employing numerical optimization techniques and approximation methods that leverage sparse properties.
5

---

Embedding updating The task in the inference step is to infer Pw (y)a)), i.e., finding the optimum y given the observed assignment a and current weights W, which can be formulated as a maximum a posterior (MAP):
argmax, Pw (y)w) y W (ly
To be consistent with the observation, x00) should be small as possible. Additionally, we also want the truth values for negative samples to be large. So, the overall cost function can be formulated as:
min W (y((0),x(0) + A 0
[] [1-r (1-r(h,t;0)) (h.r.))ET+
E
E r(h, ((h,::0)
-(h.t:00) (6)
IT+
TT-
(hr,,))T
where 2. are parameterized by 8, A > O is parameter, r(h, t: 0; E [0, stands for the truth value of fact triple (h. r.). T and T are positive and negative sample sets, respectively. The optimization problem Eq. (6) can be solved by stochastic gradient descent, where we sample a batch of ground formulas to compute the potentials, T+ batch of positive triples from O, and T is set of negative samples obtained by corrupting T+
Rule weights updating In this step, 0 is fixed, and rule weights are updated by maximizing log Pm (y) The gradient of log Pw (y(zz) with respect to the weight of Fg can be given by
a log Par a) Ew (v, x)] (v.
(7)
ow,
The first term computes the expectation of potential, which involves integration over y under the distribution defined by rule weight W. Directly computing the integration is impractical, so we instead optimize the pseudo-likelihood of training data:
n exp [-
fuv (y U U)..)) x)]
m
Fl
P (y x)
(8 Go- d.
ZW yi U U
q=1
j=1
Here 1, ( = Lif y is connected to ground formula G(f). otherwise, zero. Z, is the integration
of ft over Yi, similar to the second equation in Eq. (4). The pseudo-likelihodd is mean-field approximation for the exact likelihood in Eq. (4). It approximates the exact likelihood by decomposing into a product of the probabilities of y conditioned on the Markov Blanket of y, denoted by MB(y:). The gradient of the pseudo-likeihood is as follows (see Appendix A.2 for a detailed derivation):
b log Pt (y xx)
1
Σ
L (LM
Σ
Co. ) d(G
aw,
The above equality enables us to estimate gradients by minibatch sampling, For each sampled yo- we need to compute both VA (..) and its expectation. The integration term can be estimated using Monte Carlo integration by fixing other variables and sampling yi on the interval [0. 1]. The Monte Carlo integration is parallelizable and converges quickly as the number of samples increases.
To further reduce the computation burden, we leverage the sparsity of the violated ground formulas filter ground formulas. Practically, we pre-compute the truth scores of all triples connected the ground formulas using the KG-embedding model, then use threshold to divide these triples into a "positive" set and a "negative" set. A ground formula is expected to violated if all its premise atoms are positive and all its conclusion atoms are negative. By only involving the violated rules when computing potentials, we significantly reduce computational costs.
Joint reasoning with rules and embeddings After training, we get the trained embeddings and updated rule weights, which can be used to perform reasoning. There are two ways compute the score: 1) compute each embedding score ri (h;,, t;; 0) using the learned embeddings 0; 2) compute the cumulative rule score frute Ts, W) by summing up weights of ground formulas that infer the target triple:
frute (hi, W)
E W
1
(r can be inferred by diPy

---

Table 1: Reasoning performance real-world datasets. [T=n] means the maximum body length of mined rules n. The best results are shown in bold and the second best are underlined. [NA] indicates that the model cannot finish inference within ten hours.
CodeX-s
CodeX-n -
CodeX-1
WNI8RR
YAGO3-10
MRR
hit@ 10
MRR hit@ 10
MRR hit@ 10
MRR hit@ 10
MRR
hit@ 10
MLP
0.279
0.502
0.197
0.347
0.190
0.339
0.139
0.218
0.365
0,575
RotatE
0.421
0.634
0.325
0,466
0.319
0.453
0.469
0.566
0.495
0.670
TuckER
0.444
0.638
0.328
0.458
0.309
0.430
0.470
0.526
TransE:
0.353
0.607
0.320
0.481
0.308
0.452
0.218
0,510
0.436
0.647
SACN
0,470
0,540
CompGCN
0.479
0.546
AMIE
0.195
0.283
0.063
0.095
0.026
0.029
0.36
0.485
0.25
0.343
NeuraLP
0.290
0.395
NA
NA
NA
NA
0.433
0.566
NA
NA
DRUM(T
0.290
0.393
NA
NA
NA
NA
0.434
0,565
NA
NA
DRUM(T=3)
0.342
0.542
NA
NA
NA
NA
0.486
0.586
NA
NA
RNNIo
0.51
0.597
NA
NA
RLogic
0.52
0.604
0.53
0.703
MLN4KB
0.082
0.134
0.035
0.045
0.028
0.032
0.368
0.374
0.460
0,525
PlggcNNet
0.342
0.505
0.306
0.448
0.270
0.388
0.440
0.534
0.387
0.595
Digil
0.445
0.662
0.335
0.487
0.326
0.448
0.493
0.585
0.503
0.673
Diffl
0.458
0.655
0.343
0.495
0.337
0.46
0.50
0.587
0.513
0.674
To perform joint inference using both embedding scores and rule scores, simple way is to the weighted sum of embedding scores and the normalized rule scores:
ri (.)
n) r:(hu, 4;;0) 0) + n1 [h 4; W),
(8)
where fi(he, 4;; W) is the rescaled value of fruie (hi, rs, ta; W) calculated by minmax normalization. The optimum weight coefficient v) is selected by using the validation set.
Experiments
In this section, we conduct experiments to answer the following research questions. RQ1: Can DiffLogic outperform aule-based and embedding-basee models in terms of reasoning performance? RQ2: Can DiffLogic scale to large knowledge graphs that rule-based models struggle to handle?
RQ3: Does Diffl actually learn representations compatible with rules? RQ4: Quantify the efficiency and scalability of DiffLogic. RQ5: How effective the model in terms of leveraging prior knowledge encoded in rules, compared with data-driven methods?
Datasets and candidate rules. We incorporate four real-world knowledge graph datasets: YAGO3- 10, WN18, WNISRR, and CodeX (available in three sizes: small, medium, and large), along with synthetic logic reasoning dataset: Kinship. Dataset statistics and descriptions can be found in Appendix B. Candidate rules for knowledge graphs are mined using AMIE3 (Lajus et al., 2020), with rule weights initialized by rule confidence scores.
Baseline models. Baseline models include four KG-embedding models TransE (Bordes et al., 2013), RotatE (Sun et al., 2019), TuckER (Balažević et al., 2019), MI. (Dong et al., 2014), two GNN-based models- - SACN (Shang et al., 2019), CompGCN (Vashishth et al., 2019), four rule- learning models Neural LP (Yang et al., 2017), DRUM (Sadeghian et al., 2019), RNNLogic (Qu et al., 2020), RLogic (Cheng et al., 2022), a discrete MLN engine MLN4KB Fang et al. (2023), and a neuro-symbolic model pLogicNet (Qu & Tang, 2019) that also integrate KG-embedding and MLN. We exclude the recently proposed ExpressGNN (Zhang et al., 2020) from our experiments on KG experiments since it requires querying test data' during training and is inapplicable in our setting. For all baselines that employ a KG embedding model, we unify the negative sampling scheme as adversarial negative sampling for fair comparison. Hyperparameters for each baseline are taken from their original paper.
Please see the discussion the usage of test at htttttss://ppearevieee... httppppwwww.ro..eeeeoo/ooaaaaaaa
7

---

4.1 Reasoning on real-world knowledge graphs
To answer RQI, RQ2, and RQ3, we conduct link prediction tasks on several real-world datasets. Including WN18RR, YAGO3-10, and CodeX of three sizes (denoted CodeX-s/m/I] Note that YAGO3-10 and Codex-l are large knowledge graphs that are suitable for assessing scalability. We report the performance of DiffLogic under two settings, using embedding scores for reasoning (denoted by DiffLogic) and using both embedding scores and rule scores for reasoning (denoted by DiffToggie". We evaluate the performance using the Mean Reciprocal Rank (MRR) and Hit@ 10, with the results presented in Table 1. We also investigate the evolution of violated rules and MRR on WN18RR during the inference of DiffLogic and RotatE, as demonstrated in Figure 3. These results lead to several key observations:
First, DiffLogic surpasses both rule-based and KG embedding- based methods. This can be primarily attributed to the fact that it combines the ability of both sides: 1) the ability to utilize embeddings to model similarities among entities, which enhance the reasoning performance; and 2) compared with data-driven KG-embedding models that only learn rule patterns from a large amount of labeled data, DiffLogic explicitly leverage rule patterns within principled logic reasoning framework, leading to better overall performance. Our results also indicate that jointly using rules and learned embeddings for reasoning is more effective than solely relying on embeddings. This suggests that rules and embeddings can complement each other during the reasoning process, ultimately leading to more accurate and robust inferences.
Second, oiffLogic outperforms pLogicNet, a neuro-symbolic model. Although pLogicNet also integrates MLN and KG-embeddings for reasoning, the key difference is that DiffLogic optimizes MLN and KG- KG-embedding using a unified objective, whereas pLogicNet accommodates the discrete nature of MLN and essentially employs additional facts for training KG embeddings. As a result, the optimization of MLN and KG embedding in Peo is less consistent, and its performance is sensitive to the annotation threshold. Its performance is lower than TransE - its base KG embedding model on several large KGs (YAGO3- 10/CodeX-I) because the annotated triples are mostly false positive. This highlights the advantages of DiffLogic in providing a more coherent and robust optimization process.
MLN as data augmentation technique to annotate
Third, DiffLogic demonstrates superior scalability compared to rule-based methods. DiffLogic is adept at efficiently scaling to expansive KG datasets like YAGO3- 10 and CodeX-l. Conversely, rule- based methods, including NeuraLP, DRUM, RNNLogic, and MLN4KB, often encounter challenges when attempting to scale to such large KGs. An exception is RLogic, which is a scalable rule-learning model designed to mine complex and lengthy rules for reasoning. Remarkably, comparable results by including only simply rules with a rule body length of < 2.
model achieves
Furthermore, DiffLogic proficiently learns representations that align with both KG-embeddings and rules. As the left subfigure in Figure demonstrates, the number of violated rules during the inference (embedding learning) phase is initially sparse, rises rapidly, and eventually decreases with training progression. We attribute this to 1) the random initialization of embeddings, which assigns low truth scores to most triples, resulting in fewer initial violations; 2) the model's 's training phase, where truth scores for training set triples increase but rule patterns are not yet fully captured, causing rapid rise in rule violations; 3) as training progresses, KG embeddings begin to encapsulate rule patterns, reducing the number of violations. Importantly, despite its base embedding model being RotatE, Difflogic is more effective than pure data-driven RotatE in capturing rule patterns, ensuring a consistent decrease in rule violations. As depicted in the middle subfigure in Figure 3, DiffLogic achieves faster convergence in test MRR compared to RotatE.
4.2 Scalability of optimization
To answer RQ4, we assess the scalability of our methodology, focusing primarily on optimization efficiency, i.e., the efficacy of grounding. We employ Kinship, widely used (Zhang et al., 2020; Fang et al., 2023) synthetic benchmark dataset, to evaluate the efficacy and efficiency of RGIG in identifying important ground formulas. This dataset includes a training set, a test set, and a set of logic rules with full confidence. Some predicates are unobserved in the training set and can only be inferred via logic rules. The task to deduce the gender of each individual in the test set, given the training set and the rule set. Kinship, designed for logical reasoning, necessitates resolving contradictions
8

---

4000
vilated
3000
Number ground
Tgp
MRR
RONO 1or2
2000
PGL
8
1000
Tran (cet.ggc) Train MRR (PataE)
Tost MRR PPorl
50
100
150
200
00
100
150
200
51
55
54
Boration
Iteration
Dalaset $220
Figure 3: Left: Violated rules evolution during inference on WN18RR. Middle: MRR evolution on
WN18RR. Right: Number of considered ground formulas in PSL/ExpresSGNN and RGIG.
among ground formulas, thus the reasoning performance heavily depends on the grounding process. Such challenging dataset is suitable for assessing the efficacy of grounding techniques.
In empirical evaluations, discovered that three iterations of RGIG are enough to identify crucial ground formulas for accurate reasoning, yielding an AUC-ROC of 0.982 + 0.014 (detailed results are available in Appendix B.2.) We then compared the efficiency of RGIG with PSL and ExpressGNN's grounding techniques by examining the number of ground formulas considered for optimization across five different sizes of the Kinship dataset. Detailed calculations for PSL grounding can be found in Appendix A.3, The comparative results are depicted in the right subfigure Figure Although PSL and ExpressGNN can also perform accurate reasoning on Kinship. our model using RGIG has orders of (103 10") more data bata-efficient optimization process over varied sizes of Kinship dataset, demonstrating its applicability.
To further evaluate the efficiency of RGIG, we empirically test the run-time and memory overhead on real-world datasets. Results are presented in Table 2.
Table Grounding overhead on real-world datasets. Run-time overhead is evaluated ten times and report mean and std.
Datasets
CodeX-s
CodeX-m
CodeX-1
WN18RR
YAGO3-10 3.20+0.04
Run-time(/sec)
0.03+0.00
0.3840.01
0.87+0.04
0.54+0.01
Memory(MMB 2.19
11.57
25.58
18.73
262.65
The experimental results demonstrate that RGIG can efficiently scale to accommodate large KGs while maintaining minimal run-time and memory overhead. On the largest KG, YAGO3-10, the grounding process is completed in approximately 3.2 seconds, using around 262 MB of memory. In practice, we also observed that as the grounding iteration progresses, most inferred facts be negative triples. This trend could introduce noise and potentially impact efficiency. To enhance the efficiency of RGIG, one could consider filtering out facts with low scores by using a pre- trained RotatE model.
out to
4.3 Learning from data vs. learning from rules
To answer RQ5, we design a "rule- calle-ptteem re-injection" experiment evaluate DiffLogic's capability of injecting prior knowledge into embeddings, and compare it with pure data-driven based KG- embeddings. The design details are as follows:
The experiment contains two steps: 1) rule pattern removal, and 2) rule pattern re-injection. In our experiments, we use WN18 and select fourteen rules whose confidence scores are higher than 0.95. Then we deduplicate these rules so that no rules can be inferred from other rules, resulting in seven compact rules. the rule pattern removal step, we use the selected seven rules split the original training set, by finding all paths in the original training set that match the rules and extract the connected triples. The triples that match the conclusion part of the rules comprise the pattern set, and the original training set with the pattern set removed becomes the fact set. In this way, the generated fact set does not contain any pattern re-injection step, we add different ratios (0%, 10%, 20%, 100%) of the pattern set back into the fact set, so that rule patterns become increasingly evident. For DiffLogic, seven rules are applied to the training process for explicit rule pattern injection. We also include three KG-embedding models
seven rules. In the rule pattern

---

for comparison. To fairly compare the rule-injection capability for embeddings, we use only the embedding scores of DiffLogic for evaluation. Experimental results are presented Table 3.
Table Comparison of pure data-driven training and rule injection by DifflLogic for embeddings.
MRR
Hits@ 10
Model
0%
10%
20%
100%
0%
10%
20%
100%
MLP 0.123
0.156
0.198
0.851
0.279
0.364
0.449
0.932
TransE 0.399
0,469
0.500
0.775
0.917
0.944
0.944
0.957
RotatE 0.579
0.890
0.927
0.944
0.784
0.949
0.961
0.962
DiffLLogi
0.954
0.953
0.952
0.954
0.964
0.966
0.963
0.967
The results show significant difference between the two rule pattern learning paradigms: DiffLogic can directly leverage explicit prior knowledge compactly encoded in rules, achieving significant improvement in reasoning performance by using only a small number of logical rules. On the contrary, pure data-driven based KG-embedding algorithms can only implicitly learn rule patterns from labeled data. By adding more data from the pattern set back to the fact set, the performance of data-driven algorithms increases as the rule patterns become more evident in the knowledge base. Nevertheless, these data-driven algorithms are not comparable to DiffLogic even though rule patterns are observable.
Related work
There have been some studies attempting to integrate rule-based methods and KG-embedding models. For example, Guo et al. (2016) proposes to learn embeddings from both triples and rules by treating triples 'atomic formulas' while treating ground logic formulas "complex formulas', thus unifying the learning from triples and rules. However, their framework only uses hard rules and thus cannot make use of the soft rules with uncertainty. Another study (Guo al., 2018) applied soft rules for generating additional training data but could not optimize rule weights, making the model's s effectiveness dependent on rule weights initialization. Qu & Tang (2019) enable embedding learning and rule weight updating in a tailored MINN framework, by alternately employing one component to annotate triples to update the other component. However, the annotation process renders the inference not differentiable and is sensitive to the annotation threshold. Moreover, their grounding process only considers ground formulas with premise atoms observed in the training set, limiting the model's effectiveness due to the potential omission of important ground formulas. Zhang et al. (2020) designed graph neural network for learning structure-aware expressive representations under the MLN framework. However, its inference efficiency suffers from a large number of ground formulas and limited generalization ability (requiring querying the test data during inference). The MLN--baed neuro-symbolic models (Qu & Tang, 2019; Zhang et al., 2020) benefit from the dynamically updated rule weights which handle uncertainty. However, they all fail to directly optimize the objective of MIN due to the complexity of the associated integration and thereby resorting to optimizing ELBO.
6 Conclusion
In this paper, we aim to scale neuro- symroly reasoning to large knowledge graphs with improved performance. We develop differentiable model, namely, DifiLogic, that combines the ad advantages of KG-embedding models and rule- based models. DiffLogic directly optimizes the joint probability rather than the EBLO. The KG-embedding component enables linear scalability in representation, together with the grounding technique and the estimation technique for the gradient of rule weights, make DiffLogic efficient and scalable. Numerical simulations benchmark datasets show the merits of DiffLogic. The performance of DiffLogic heavily depends on the quality of the rules. Was possible design automatic and differentiable rule mining method, we may incorporate it into DiffI Logic to further improve the performance. This could be future work.
10

---

References
Stephen H. Bach, Matthias Broecheler, Bert Huang, and Lise Getoor. Hinge-loss Markov random fields and probabilistic soft logic. Journal of Machine Learning Research, 32(1), 2017.
Ivana Balažević, Carl Allen, and Timothy M Hospedales, Tucker: Tensor factorization for knowledge graph completion. arXiv preprint arXiv: 1OXiv:901.00990, 2019.
Antoine Bordes, Nicolas Usunier, Alberto Farcia-Duran, Jason Weston, and Oksana Yakhnenko. Translating embeddings for modeling multi-relational data. Advances in neural information processing systems, 26, 2013.
Kewei Cheng, Jiahao Liu, Wei Wang, and Yizhou Sun. Rlogie: Recursive logical rule learning from knowledge graphs. In Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining. pp. 179-189, 2022.
Junnan Dong, Qinggang Zhang, Xiao Huang, Keyu Duan, Qiaoyu Tan, and Zhimeng Jiang. Hierarchy- aware multi-hop question answering over knowledge graphs. In Proceedings of the ACM Web Conference 2023, pp. 2519-2522 2023a.
Junnan Dong, Qinggang Zhang, Xiao Huang. Qiaoyu Tan, Daochen Zha, and Zhao Zihao. Active ensemble learning for knowledge graph enror detection. In Proceedings of the Sixteenth ACM International Conference on Web Search and Data Mining, pp. 877-885, 2023b.
Xin Dong, Evgeniy Gabrilovich, Geremy Heitz, Wilko Horn, Ni Lao, Kevin Murphy, Thomas Strohmann, Shaohua Sun, and Wei Zhang. Knowledge vault: A web-scale approach to proba- bilistic knowledge fusion. In Proceedings of the 20th ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 601-610, 2014.
Huang Fang, Yang Liu, Yunfeng Cai, and Mingming Sun. MLN4KB: an efficient markov logic network engine for large-scale knowledge bases and structured logic rules. In The International World Wide Web Conference 2023, 2023.
Shu Guo, Quan Wang, Lihong Wang, Bin Wang, and Li Guo. Jointly embedding knowledge graphs and logical rules. In Proceedings of the 2016 conference on empirical methods in natural language processing, pp. 192-202, 2016.
Shu Guo, Quan Wang, Lihong Wang, Bin Wang, and Li Guo. Knowledge graph embedding with iterative guidance from soft rules. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 32, 2018.
Feiran Huang, Zefan Wang, Xiao Huang, Yufeng Qian, Zhetao Li, and Hao Chen. Aligning distilla- tion for cold-start item recommendation. In Proceedings of the 46th International ACM SIGIR Conference on Research and Development in Information Retrieval, pp. 1 1147-1157, 2023.
Xiao Huang, Jingyuan Zhang, Dingcheng Li, and Ping Li. Knowledge graph embedding based question answering. In Proceedings of the twelfth ACM international conference on web search and data mining, pp. 105-113, 2019.
Jonathan Lajus, Luis Galárraga, and Fabian Suchanek. Fast and exact rule mining with amie 3. In The Semantic Web: 17th International Conference, ESWC 2020, Heraklion, Crete, Greece, May 31-June 4, 2020, Proceedings 17, pp. 36-52. Springer, 2020.
Freddy Lecue. On the role of knowledge graphs in explainable ai. Semantic Web, 11(1):41-51, 2020.
Meng Qu and Jian Tang. Probabilistic logic neural networks for reasoning. In Advances in Neural Information Processing Systems (NeurIPS), pp. 7710-7720, Vancouver, Canada, 2019.
Meng Qu, Junkun Chen, Louis-Pascal Xhonneux, Yoshua Bengio, and Jian Tang. Rnnlogic: Learning logic rules for reasoning on knowledge graphs. arXiv preprint xrXiv:2010.04029, 2020.
Hongyu Ren, Hanjun Dai, Bo Dai, Xinyun Chen, Denny Zhou, Jure Leskovec, and Dale Schuurmans. Smore: Knowledge graph completion and multi-hop reasoning in massive knowledge graphs. In Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp- 1472-1482, 2022.
11

---

Matthew Richardson and Pedro Domingos. Markov logic networks. Machine learning, 62:107-136. 2006.
Ali Sadeghian, Mohammadreza Armandpour, Patrick Ding, and Daisy Zhe Wang. Drum: End-to-end differentiable rule mining knowledge graphs. Advances in Neural Information Processing Systems, 32, 2019.
Tara Safavi and Danai Koutra. Codex: A comprehensive knowledge graph completion benchmark. arXiv preprint arXiv:2009.07810, 2020.
Chao Shang, Yun Tang, Jing Huang, Jinbo Bi. Xiaodong He, and Bowen Zhou. End-to-end structure- aware convolutional networks for knowledge base completion. In Proceedings of the AAAI conference on artificial intelligence, pp. 3060-3067, 2019.
Baoxu Shi and Tim Weninger. Proje: Embedding projection for knowledge graph completion. In Proceedings of the AAAI Conference on Artificial Intelligence, 2017.
Fabian M. Suchanek, Gjergji Kasneci, and Gerhard Weikum. Yago: A Core of Semantic Knowledge. In 16th International Conference on the World Wide Web, pp. 697-706, 2007.
Zhiqing Sun, Zhi-Hong Deng, Jian Yun Nie, and Jian Tang. Rotate: Knowledge graph embedding by relational rotation in complex space. arXiv preprint
2019.
Ilaria Tiddi and Stefan Schlobach. Knowledge graphs as tools for explainable machine learning: survey. Artificial Intelligence, 302: 102:10 2022.
Shikhar Vashishth, Soumya Sanyal, Vikram Nitin, and Partha Talukdar. Composition- multi- relational graph convolutional networks. arXiv preprint arXiv: 11119911..000 1.03082, 2019.
Zhen Wang, Jianwen Zhang, Jianlin Feng, and Zheng Chen. Knowledge graph embedding by translating hyperplanes. In Proceedings of the AAAI conference artificial intelligence, 2014.
Yue Xu, Hao Chen, Zefan Wang, Jianwen Yin, Qijie Shen, Dimin Wang, Feiran Huang, Lixiang Lai, Tao Zhuang, Junfeng Ge, and Xia Hu. Multi-factor sequential re-ranking with perception-aware diversification. In Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 5327-5337, 2023.
Fan Yang. Zhilin Yang, and William W Cohen. Differentiable learning of logical rules for knowledge base reasoning. Advances in neural information processing systems, 30, 2017.
Qinggang Zhang, Junnan Dong, Keyu Duan, Xiao Huang, Yezi Liu, and Linchuan Xu. Contrastive knowledge graph error detection. In Proceedings of the st ACM International Conference Information & Knowledge Management, pp. 2590-2599, 2022a.
Qinggang Zhang, Junnan Dong, Qiaoyu Tan, and Xiao Huang. Integrating entity attributes for error- aware knowledge graph embedding. IEEE Transactions Knowledge and Data Engineering, pp- 1-16, 2023. doi: 10. 00.1199/KDDE2222333100404
Wen Zhang, Jiaoyan Chen, Juan I.,, Zezhong Xu, Jeff Z. Pan, and Huajun Chen. Knowledge graph reasoning with logics and embeddings: survey and perspective. arXiv preprint 222142220..07412. 2022b.
Yuyu Zhang, Xinshi Chen, Yuan Yang, Arun Ramamurthy, Bo Li, Yuan Qi, and Le Song. Efficient probabilistic logic reasoning with graph neural networks. Proceedings of the 8th International Conference on Learning Representations (ICLR), Addis Ababa, Ethiopia, 2020.
Zhanqiu Zhang, Jie Wang. Jiajun Chen, Shuiwang Ji, and Feng Wu. Cone: Cone embeddings for multi-hop reasoning over knowledge graphs. Advances in Neural Information Processing Systems, 14.19172-19189 2021.
Da Zheng, Xiang Song, Chao Ma, Zeyuan Tan, Zihao Ye, Jin Dong. Hao Xiong, Zheng Zhang, and George Karypis. Dgl-ke: Training knowledge graph embeddings at scale. In Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval, pp. 739-748, 2020.
12

---

A Notations and mathematical proofs
A.1 Notations
Table 4: Notations.
Notation
Description
K.
The knowledge base The entity set The relation set The set of observed and unobserved facts The assignments of O and H. respectively The set of logic rules and attached weights The index set of premise atoms and conclusion atoms rule Eg. respectively
E
R O H
E. y
Fg. W 1m
ygg=1
I I
A, B....
Variables in logic rules
{G jJ Etg)
All ground formulas created by the 9th logic rule
fy 0
The sum of potentials of all ground formulas of Fę
The embedding parameters
A.2
Derivation of rule weight gradient
Given
exp [-f io (yi U yy x]]
P x)
II
P (yee MB (3:) σ) =
Z,(W, Yi U ))
1=1
Z,WW W1 U ()(
/ exp [- (y: Uy)
fu
W
(v o d(G())) ,
q=1
j=1
have
a log P* (y xx) Oog PM (y:
MB (yi), x)
OW,
Ow,
The partial derivative in the left side of Eq. (9) is summation of terms, each term represents the partial derivatives of the eseuto-log-ikkelhoodd likelihood for each y:, conditioned on its Markov blankets. Each term be further simplified follows:
a log Pa (y: MB (z) x))
aw,
a fün (y: Mi x) log Zi (W, y4 U Uy x))
{
oW,
a für (y: U 33 - log S, exp - (y: 3) x
OW,
Here, we can easily get
0fi, (yi Uy
Σ E ((G))
(10)
OW,
To make the writing concise, replace the right term of Eq. (10) with the following notation:
V (())
Σ ( =pp) , d(G())
13

---

In this way, we can deduce that:
Blog (M MB (z) .x)
aw,
0 0Jg. exp
[- (yi U Uy x)]
V M.B
(11)
Z (W, Yi x)
Ow,
The partial derivative and the integration in Eq. (11) can be swapped using Lebesgue's dominated convergence theorem, the Eq. (11) thus becomes:
Olog Pa P'(ya MB (1:) a))
dWg
3 Texp
- (vi U x)
V M.M(())
Z W. yb U yi x.)
OWg
exp - (yi (()
(g.MB()
7,WW, Ui(i 2))
q.MB(1)
L. (.MB
+
P (ys MB (ii) x)) V (.M
-D (g,MB())
B MB V (B)
Therefore, the partial derivative soaudo-log-likelihoed with respect to rule weight W, is computed by:
i log (y x)
Σ
B
IB
Σ 1 (v. ppp
Σ 1
aWg
A.3
Calculation of number of ground formulas for Kinship datasets
We present detailed calculation the number of ground formulas considered by PSL in Kinship datasets as follows.
Given
first-order logical rule Fg containing I premise atoms, and
knowledge base containing [E] number of entities,
the number of variables in Fg is [Z, +
PSL grounds each rule by substituting the variables with all possible entities. The number of ground formulas created by this logic rule F, on the knowledge base is:
14
Thus the overall ground formulas created by the rule set (F, Fm is:
14
Given the statistics of Kinship datasets in Table 7, rules statistics are shared across different sizes of Kinship datasets, each dataset contains 12 rules that contain two variables and rules that contain variables. The number of ground formulas considered by PSL is thus computed by:
14

---

12 x 1812 + 99 x 1815.
(12)
By applying the Eq. (12), we can get the ground formula number for each size of the Kinship dataset, as presented in Table 5:
Table 5: Number of ground formulas of Kinship datasets created by classical grounding method.
Kinship Size SI
S2
S3
S4
S5
Number of
1,373,601
10,853,976
35,798,376
74,671,320
172,162,935
ground formulas
B Experimental details
B.1 Dataset statistics
We list the statistics of the real-world knowledge graph datasets in Table 6 and the synthetic Kinship dataset in Table 7. We present detailed descriptions for each dataset below.
CodeX. The CodeX dataset, recently proposed for knowledge graph completion tasks, is compre- hensive collection extracted from both Wikidata and Wikipedia. This challenging dataset comes in three versions: small (S), medium (M), and large (L), allowing for comprehensive evaluation.
YAGO3-I0. YAGO3-10 completion dataset, with the majority of triples describing attributes of persons, including their citizenship, gender, and profession.
subset of YAGO3 (Suchanek et al., 2007), large knowledge base
WN/8. WordNet 18 (WN18) dataset is one of the most commonly used subsets of WordNet.
WN18RR WNI8RR is modified version of WN18 designed to be more challenging for knowledge graph reasoning algorithms by removing reverse relations the knowledge graph.
Kinship. A synthetic dataset, widely used (Zhang et al., 2020; Fang et al., 2023) for evaluating the statistical relational learning ability and the scalability of reasoning algorithms. We use five different sizes of the dataset for evaluating its run time efficiency and parameter scalability, namely Sinshp-S1/52//S354455 respectively.
Table Statistics real-world knowledge base datasets.
Dataset
#Ent
#Rel
#Train/Valid/Tess
#Rules
CodeX-s
2,034
42
01.888/1,827/1.1
35
Co
17,050
51
185,584/10,310/100.11
52
CodeX-1
77,951
69
551,1993/30622//30.66
57
YAGO3-10
123,182
37
0079,044/5,000055000
22
WN18
40,943
18
141,442/ 5,000/ 5,000
140
WNI8RR
40,943
11
86,835/ 3,034/ 3.134
51
Table 7: Statistics for Kinship datasets of varied sizes (S1-S5).
S1
S2
S3
S4
$5
Number of rules containing premise atom Number rules containing 2 premise atoms
12
12
12
12
12
9
Number of predicates Number of entities
15
15
15
15
15
52
106
158
202
267
B.2 Probabilistic logic reasoning on Kinship Dataset
assess performance on the Kinship dataset across five different sizes. Due to the full confidence of rules, only perform inference in this experiment and do not need to update weights. We include
15

---

Table Comparative evaluation reasoning performance on the Kinship dataset.
Ground iteration
AUC-ROC
Algorithms
S1
$2
S3
S4
55
PSL
.9611.011
.9801.005
.9911.003
.982:.000
.972:1.004
ExpressGNN
.97=.0022
.921=.001
.959#.004
.940#.001
.989:.004
.841..005 .8952.001
.922:.001
.901
.9033.000
DiftLogic-RotatE
2
.931=.005 .9942.001
.998:.001
.985..001
.9932.001
3
.377.005 .987=.001
.995+.001
.978+.001
.989+.001
1
5567=009 .537=.041
.5074.024
.503+.018
.504+.014
DiftLogic-MAl
2
.956=.032 .997=.002
.9991.003
.9999.001
.999-.000
.912 3
.997=.001 .9991.001
.9991.000 .999-1000
DiffLogic using two different embedding models, i.e., RotatE and MLP, and evaluate their reasoning performance using RGIG with varied iterations (i.e., 1, 2, 3) for grounding. We include PSL and ExpressGNN as baselines, but we exclude pLogicNer due its inability to utilize handcrafted rules. each model ten times and report the
Given that the Kinship dataset lacks validation set, AUC-ROC statistics from the final epoch of each run on the test set. The results are presented in Table 8, with the best results shown in bold.
B.3 Comparing inference time on Kinship
evaluate the inference time on Kinship dataset across five different sizes. We include models in Appendix B.2 for this experiment. For two DiffLogic variants, only evaluate their inference time when using iterations of RGIG for grounding. All the runtime experiments are conducted in the same machine with configurations as in Table 9. All of these models implemented in Python, thereby ensuring a fair comparison. The inference time results are displayed Table 10, with the best results shown in bold.
Table 9: Machine configuration.
Component
Specification
GPU
NVIDIA GeForce RTX 3090 Intel(R) Xeon(R) Silver 4214R CPU @ 2.40GHz
CPU
Table 10: Comparison of runtime of inference on Kinship.
Grounding iteration
Runtime
Algorithms
S1
S2
S3
S4
S5
PSL
3.6min
~,,9min
122.9mn
~33.5min
~32min
ExpressGNNN
18.4min
~~19.Imin
~18.9min
~19.4min
~20.22in
Diffloogic-Roall RotatE
3
37s
1,,3mnn
~3.2min
~3.6min
~4min
DiffLogic-MLP
3
21.8s
41.5s
45s
54.4s
~1.2min
16


Reviews:
[{"review_id": "U99jZhMdHK", "reviewer": "Reviewer_jUBS", "summary": "The paper proposes a framework called DiffLogic for neuro-symbolic reasoning on knowledge graphs. It balances accuracy and efficiency by selecting essential triples based on dynamic rules and weights. The framework uses a continuous Markov logic network named probabilistic soft logic (PSL) for end-to-end differentiable optimization. Empirical results show that DiffLogic outperforms baselines in both effectiveness and efficiency.", "questions": "\n1. Can you provide a thorougher literature review?\n2. Can you provide a detailed discussion between the MLN-based methods?\n3. Can you explain the results in Table 1?\n4. Can you explain the usage of datasets?\n", "limitations": "This paper does not include contents discussing limitations and impacts.", "rating": 6, "confidence": 3, "soundness": 2, "presentation": 3, "contribution": 2, "strengths": "1. The idea taking advantage of both MLN and embedding methods makes sense.\n\n2. There is little typo.\n\n3. Several formulas are provided to describe the proposed method.", "weaknesses": "1. The authors only classify the KG reasoning methods into two kinds. But there are many methods using graph neural network in recent years for KG reasoning.\n\n2. The EM-algorithm is a common practice in MLN-based methods. It is better for the authors to add some discussion in terms of difference between DiffLogic, pLogicNet and MLN4KB. It seems that MLN4KB is an important and relevant baseline, but there lacks discussion in Section 1, 2, 5.\n\n3. Most of the compared methods are out of date (before 2020, except MLN4KB). Important baselines like RNNLogic[1] and RLogic[2] are missing. ExpressGNN, although cited, is not compared in the experiments.\n\n\n4. Some of the results in Table 1 are problematic.\n- For RotatE, the performance on YAGO3-10 is (MRR=0.495, hit@10=0.670) in their appendix.\n- For DRUM, the performance on WN18RR is (MRR=0.486, hit@10=0.586).\nI did not check the other values, but considering the results above, the improvement is not significant. Based on my experience, several methods have MRR>0.5 on YAGO3-10 recently.\n\n5. The scalability analysis in Section 4.2 is based on a small data Kinship. I think it should be better to show the running time, memory cost on larger KGs used in this paper to support scalability claims.\n\n6. In Section 4.3, the analysis is based on an unused dataset WN18. It is quite strange that the authors use different sets of datasets in different parts.\n\n\n[1] RNNLogic: Learning Logic Rules for Reasoning on Knowledge Graphs. ICLR 2021\n\n[2] RLogic: Recursive Logical Rule Learning from Knowledge Graphs. KDD 2022", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Q1. \nCan you provide a more thorough literature review?\n\nA.\nThanks for your suggestion.\nWe will do a more thorough literature review, including recent GNN-based methods. We will also add RNNLogic and RLogic as baseline methods in our experiments. See Q3 for more details.\n\nQ2. \nCan you provide a detailed discussion between the MLN-based methods?\n\nA.\nHere we compare our model (DiffLogic) with MLN4KB and pLogicNet, respectively.\nDiffLogic leverages logic rules through a continuous and differentiable MLN framework called probabilistic soft logic (PSL), which allows for smooth integration of MLN and KGE models and result in time and space efficient implementation.\nBoth MLN4KB and pLogicNet are built on MLN,\ntheir inference procedure is essentially a discrete optimization problem and requires sophisticated approximation to solve it.\nMLN4KB only uses rules and can not make use of the similarity between entities as KGE models.\nThough pLogicNet also uses KGE, its overall framework is non-differentiable because it needs to annotate new facts by MLN to train the KGE model.\n\nQ3. \nCan you explain the results in Table 1?\n\nA.\nYes, we will answer your question from two aspects: 1) reliability of baseline results; 2) comparison with other baselines such as RNNLogic and RLogic. \n\n1) Reliability of baseline results - {weakness 4.1}\n\nThe unmatched baseline performance (RotatE MRR/hit@10 on YAGO3-10) is due to our choice of a uniform negative sampling scheme.  KGE models may employ different negative sampling schemes, e.g., TransE employs a uniform sampling and RotatE employs an adversarial negative sampling. To make a fair comparison, we applied a uniform sampling scheme across all models. Below we attach the results of RotatE and our model under adversarial negative sampling, and argue that the choice of negative sampling schemes does not affect the conclusion in our paper. \n\n|CodeX-s MRR|Hit@10|CodeX-m MRR|Hit@10|CodeX-l MRR|Hit@10|WN18RR MRR|Hit@10|YAGO3-10 MRR|Hit@10|\n|-|-|-|-|-|-|-|-|-|-|\n|RotatE|0.421|0.634|0.325|0.466|0.319|0.453|0.469|0.566|0.495|0.670|\n|DiffLogic|0.445|0.662|0.335|0.487|0.326|0.448|0.493|0.585|0.503|0.673|\n|DiffLogic$^+$|0.458|0.655|0.343|0.495|0.337|0.46|0.50|0.587|0.513|0.674|\n\nWe can see that the results of RotatE are now matched. Meanwhile, the results for DiffLogic are also improved and still outperform or are comparable to other baselines. \n\nThanks for your careful review, we will clarify this subtle point and include the comparison with adversarial negative sampling in our manuscript.\n\n2) Comparison with other baselines -\n{weakness 4.2 and 3}\n\nWe present the results of other baselines in the following, including AIME3, DRUM(t=2/t=3), RNNLogic, and RLogic. Note that these baselines are all rule-learning methods. \n\n||CodeX-s MRR|Hit@10|CodeX-m MRR|Hit@10|CodeX-l MRR|Hit@10|WN18RR MRR|Hit@10|YAGO3-10 MRR|Hit@10|\n|-|-|-|-|-|-|-|-|-|-|-|\n|AMIE3|0.195|0.283|0.063|0.095|0.026|0.029|0.36|0.485|0.25|0.343|\n|DRUM(T=2)|0.290|0.393|NA|NA|NA|NA|0.434|0.565|NA|NA|\n|DRUM(T=3)|0.342|0.542|NA|NA|NA|NA|0.486|0.586|NA|NA|\n|RNNLogic$^+$|-|-|-|-|-|-|0.51|0.597|NA|NA|\n|RLogic$^+$|-|-|-|-|-|-|0.52|0.604|0.53|0.703|\n\nRegarding the comparison with rule-learning methods, we want to highlight that our model uses simple rules (rule body length $\\le$ 2) extracted by AMIE3, while DRUM(t=3), RNNLogic, and RLogic are advanced rule learning systems and can extract longer high-quality rules. We kindly argue that an immediate comparison of our methodologies with other advanced rule mining systems could lead to an unfair comparison. If more high-quality rules are used in DiffLogic, the performance can be improved.We will include the results in our revision.\n\nRegarding ExpressGNN, as we point out in lines 245 -247 of the manuscript, it requires querying test data during training which is non-applicable in our experimental setting, thus we excluded it from our baselines. More details can be found in the OpenReview discussion at https://openreview.net/forum?id=rJg76kStwH.\n\nQ4. Can you explain the usage of datasets?\n\nA.\nYes, we chose the WN18 dataset because it's more challenging and suitable to demonstrate DiffLogic's rule-injection ability.\nSpecifically, injecting rule patterns effectively back into the learned embeddings becomes challenging when the number of rules is small. In this situation, WN18 successfully injects the rule pattern into representations with only 7 rules, even though a significant portion (approximately 36\\%) of the original training set has been removed. By comparison, other datasets have more high-scoring rules (confidence score $>$ 0.8) \n(YAGO3-10, WN18RR, Codex-S, Codex-M, Codex-L have\n22, 13, 35, 52, 56 rules, respectively), making them less challenging.\n\nConcerns about scalability.\n\nFor weakness 5, we provide the run-time and memory overhead of the rule grounding process on real-world datasets. The run-time is evaluated 10 times to report mean and std.\n\n|Dataset |Grounding run-time(/sec)|Memory overhead(/MB)|\n|-|-|-|\n|YAGO3-10|3.20±0.04|262.65|\n|WN18RR|0.54±0.01|18.73|\n|CodeX-s|0.03±0.00|2.19|\n|CodeX-m|0.38±0.01|11.57|\n|CodeX-l|0.87±0.04|25.58|\n\nWe hope our response can satisfactorily address your concerns and we would appreciate if you could consider raising the score.\n\n"}, {"review_id": "LDIyLUYp7n", "reviewer": "Reviewer_KuwS", "summary": "This paper proposed a differentiable framework - DiffLogic. Instead of directly approximating all possible triples, the author design a tailored filter to adaptively select essential triples based on the dynamic rules and weights. The truth scores assessed by KG-embedding are continuous, so the author employ a continuous Markov logic network named probabilistic soft logic (PSL). It employs the truth scores of essential triples to assess the overall agreement among rules, weights, and observed triples.", "questions": "See above.", "limitations": "See above.", "rating": 6, "confidence": 3, "soundness": 2, "presentation": 2, "contribution": 2, "strengths": "(1) This paper develops a unified neuro-symbolic framework — DiffLogic, that combines the advantages of KG-embedding models and rule-based models: efficiency, effectiveness, capability of leveraging  prior knowledge and handling uncertainty.\n\n(2) This paper enables consistent training of rule-based models and KG-embedding models. By employing PSL, the joint probability of truth scores can be optimized directly rather than optimizing an evidence lower bound (ELBO) instead.\n\n(3) This paper proposes an efficient grounding technique that iteratively identifies important ground formulas required for inference, enabling effective and data-efficient optimization.\n", "weaknesses": "The most impressing advantage of Neuro-Symbolic methods is they are interpretable. But I do not see that.\n\nWhat is the application of this reasoning method?  ", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Q1. The most impressing advantage of Neuro-Symbolic methods is they are interpretable. But I do not see that.\n\nA.\nThe interpretability of neuro-symbolic methods primarily stems from their logic formulas, using rules to infer new facts is interpretable because a rule is an implication from premise to condition. Take for example, the rule $Father(A, B) \\wedge Wife(C, A) \\Rightarrow Mother(C, B)$. Inferring a new fact using this rule becomes interpretable when we assign roles to individuals such as A=Jack, B=Ross, C=Judy, and have relations “Father(Jack, Ross)” and “Wife(Judy, Jack)”. Consequently, the conclusion “Mother(Judy, Ross)” is obtained in an interpretable manner.\n\nIn DiffLogic, we utilize the logic rules mined by external rule-mining systems. These rules are employed to infer new facts from existing ones in knowledge graphs. Moreover, our rule weight updating step enables learning the importance scores of each rule, which reflects the accuracy of these rules. Therefore enable the results to be interpreted with rules and also demonstrate the confidence of the inference with a score. \n\nDuring inference in the final step, both embedding scores and rule scores are combined to perform inference. In the scenario where interpretability is needed, DiffLogic can extract ground formulas connected to the inferred facts to interpret the results.\n\nQ2. What is the application of this reasoning method?\n\nA.\nDiffLogic can be employed to perform accurate and interpretable knowledge graph reasoning. We can take advantage of its reasoning ability and interpretability for downstream tasks such as:\n\n1. Personalized Recommendation Systems: These systems use knowledge graphs (or user-item interaction graphs) to deliver personalized suggestions relevant to a user's preferences, history and behavior.\n\n2. Question Answering Systems: Digital assistants like Google Assistant, Alexa, utilize knowledge graphs to comprehend and respond accurately to complex questions. \n\n3. Entity Linking and Disambiguation: Recognizing entities within a text and linking them to corresponding entities in the knowledge graph. Further, it helps decide which entity an ambiguous term refers to, given the context.\n"}, {"review_id": "YfjTm0uEvD", "reviewer": "Reviewer_Djat", "summary": "This paper introduces differentiable logic approach, DiffLogic, based on the probabilistic soft logic (PSL) representation.  Efficient training of DiffLogic is enabled through the introduction of a grounding technique that iteratively identifies important ground formulas required for inference, and additionally develops a  fast estimation technique for computing the gradient of rule weights.  The authors demonstrate this on a subset of common benchmarking tasks commonly used in the field.", "questions": "Can you explain this method and its performance in the context of recent similar methods?\nThis method seems somewhat complicated to reproduce.  Is there a software implementation available?", "limitations": "The authors could better address the distinction between logical and purely embedding representations, incorporate observations about embedding methods that outperform the differentiable logic approach, and note the significant advantages of a differentiable logic method relative to a pure GNN.", "rating": 7, "confidence": 2, "soundness": 3, "presentation": 4, "contribution": 3, "strengths": "1. The paper is well written and clear in its goals.\n2. Originality of the work resides in the specific embedding representation, which is interesting and straight forward; relevant derivations are presented clearly in the appendix.\n", "weaknesses": "1.  The significance of the work is difficult to assess, as the authors do not compare to many other differentiable nuerual logic approaches that have appeared of the past 5 years, either quantitatively or conceptually?\n2. While the title claims to apply to Large-Scale Knowledge Graphs, the authors do not evaluate on one of the most common such datasets, FB15k-237, one of the larger common evaluation datasets used in this field.  It is worth note that the CoDEx-L dataset is somewhat comparable, but not as common in the relevant literature.\n3. When comparing evaluations on CoDEx-L, the authors do not include TuckER performance; TuckER was one of the baselines in the original CoDEx paper and appears to outperform the method presented in this paper.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Thank you for your question. We will first answer the question raised by the reviewer which concerns the first weakness, then we will respond to weakness 2 and weakness 3.\n\nQ1. Can you explain this method and its performance in the context of recent similar methods? This method seems somewhat complicated to reproduce. Is there a software implementation available?\n\nA.\nOur proposed method, DiffLogic, is a neuro-symbolic approach that combines Markov Logic Networks (MLN) with neural methods. It takes advantage of MLN’s ability to inject knowledge encoded in rules and leverages neural methods’ ability to learn from data. The distinguishing factor of DiffLogic lies in its continuous nature, which brings advantages in terms of optimization efficiency and performance.\n\nRecent similar neuro-symbolic methods such as pLogicNet and ExpressGNN also attempt to combine the advantages of MLN and neural methods. Here's how DiffLogic compares to these:\n\n1) Optimization: Both pLogicNet and ExpressGNN use a neural model to approximate the discrete assignments $x$ and $y$ in an MLN. Finding the optimal approximation is computationally costly because it involves variational inference over a large space. These models avoid this computation by optimizing an Evidence Lower Bound (ELBO) instead. On the contrary, DiffLogic, due to its continuous nature, can directly optimize the MLN objective, thereby offering better computational efficiency and better consistency with rules.\n\n2) Experimental setting: ExpressGNN requires querying the test dataset during inference, which limits its ability to generalize. On the contrary, DiffLogic only requires the training and validation set during training. Therefore, once DiffLogic is trained, it can generalize to unseen data without any further training, providing it with a superior generalization ability.\n\nRegarding the implementation, we have implemented DiffLogic in Python. We intend to open-source the official code upon acceptance of this paper. Thank you for showing interest!\n\nResponse to weakness 2.\n\nThank you for your kind suggestion. We didn't include fb15k-237 because the datasets used in our experiments are already large and challenging. Specifically, the number of training triples in Codex-l and YAGO3-10 is 551K and 1.08M, respectively, larger than fb15k-237 which contains 272K training triples. We will add the results for fb15k-237 in our manuscripts, and  thanks for your advice. \n\nResponse to weakness 3.\n\nIn our original manuscript, we use the negative sampling scheme as uniform negative sampling during our implementation of all KG embedding models for fair comparison. If we use adversarial negative sampling instead, our model's performance on Codex-l achieve higher performance (MRR=0.337 and Hit@10=0.46) than TuckER (MRR=0.309, HIT@10=0.430) and other baselines. We will add the comparision with Tucker in our revision. Thanks for the suggestion.\n\nI hope this address your concerns about our experiment results."}, {"review_id": "dfR1R7bk7m", "reviewer": "Reviewer_kYuQ", "summary": "The paper presents a novel approach for the knowledge base completion task by combining embedding-based and rule-based approaches in a neural symbolic framework. The rule-based component uses probabilistic soft logic to encode rule truth values as continuous values. The overall framework follows an EM approach, where rule weight updating and embedding updating are alternately happening. Later, the authors showed better performance compared to baseline models for the task of knowledge base completion. Additionally, the paper conducted analyses on the efficiency of learning rules and their weight, as well as the effectiveness of injecting new/unseen rules into the framework. \n", "questions": "1. The initialization method for the knowledge graph (KG) embeddings is random, right? Is there a performance change if you try to initialize the embeddings using pre-trained KB models?\n2. In the middle of Figure 3, the training MRR and test MRR are almost the same to each. Typically, there is a difference between the two metrics. Is this happening with all the models? Are the train and eval data so similar to each other? Did you try to overfit the training data and see how the test results changed?", "limitations": "yes, they discussed the limitations of the methods with relying on high quality rules.", "rating": 6, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "1. The proposed approach effectively combines the strengths of both embedding-based and rule-based approaches, resulting in a comprehensive framework. The method is well-motivated, and the empirical results of the proposed approach are strong compared to previous baselines.\n2. The rule injection analysis demonstrates the efficacy of injecting additional new rules into the framework. This experiment highlights the flexibility and adaptability of the proposed approach.\n3. The additional rule violation analysis is strong compared to the base knowledge base completion model RotatE.", "weaknesses": "1. There should be an analysis of the weight parameter between the rule module and the embedding model at inference time. Understanding the behavior would enhance understanding of the model's inference process: whether it relies on the rule system or the embedding system. It's also interesting to know whether changing this parameter would result in a big performance difference.\n2. Similarly, it would be great to see the rule weight change before and after learning. Evaluating the changes in rule weights during the learning process would provide valuable information about the evolution of the rules and their influence on the final model performance. \n", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Thank you for your questions. We will first answer your questions, and then address the weakness.\n\nQ1. The initialization method for the knowledge graph (KG) embeddings is random, right? Is there a performance change if you try to initialize the embeddings using pre-trained KB models?\n\n\nBy default, the KG embeddings are randomly initialized. By changing the initialization method, the final performance does not change as the optimization objective is not changed. However, by initializing the embeddings with pre-trained embeddings (e.g., a RotatE model pre-trained using margin loss and negative sampling), it will take fewer epochs to converge.\n\n{\\color{red}Q2. In the middle of Figure 3, the training MRR and test MRR are almost the same to each. Typically, there is a difference between the two metrics. Is this happening with all the models? Are the train and eval data so similar to each other? Did you try to overfit the training data and see how the test results changed?}\n\nThank you for your question.\n\nAllow us to clarify the confusion. In fact, the two almost overlapped MRR curves in Figure 3 are both training MRR, where one curve is for DiffLogic (red, solid line) and the other is for RotatE (green, dotted line), so the two curves overlap does not mean the training and testing accuracy coincide. \n\nThe similarities between these MRR evolution curves stem from three main factors:\n\n1) We adopt RotatE as the KG embedding model of DiffLogic.\n\n2) During inference (or embedding updating), the learning objectives of DiffLogic are a composite of the objective of RotatE and the rule-based objective. \n\n3) Both curves represent training MRRs, indicating how well the RotatE model is fitted to the training data.\n\nResponse to the two weaknesses.\n\nThank you for your kind advice. The rule weights in DiffLogic are dynamically updated during the rule weight learning step, and then the updated rule weights are used to enhance the embedding learning step. We will include more analysis of the rule module in our manuscripts. Thanks for your suggestions!"}, {"review_id": "yc9WOIHSXq", "reviewer": "Reviewer_wvKd", "summary": "This paper integrates rule-based reasoning and knowledge graph (KG) embedding to enable effective and efficient knowledge graph reasoning. The key idea is to use probabilistic soft logic (PSL) to assess the agreement between the inferred triples and weighted rules, based on the embedding representations of entities and relations. The proposed framework DiffLogic uses several mechanisms to accelerate the optimization. First, it selects essential triples from the inferred triples to perform the assessment. Second, it utilizes the sparsity of violated triples to efficiently estimate the gradient of rule weights. Extensive experiments have been conducted, and the results demonstrate that DiffLogic outperforms all state-of-the-art baselines.", "questions": "1. Why distinguishing I^-_q and I^+_q are important to DiffLogic? \n\n2. What are the meanings of x(\\theta) and y(\\theta)? Should we use x|\\theta and y|\\theta?\n\n3. What is ELBO, and why is it related to DiffLogic?\n\n4. What is the corresponding mathematical expression for using important ground formulas to perform the assessment?\n\n5. What is the time complexity of DiffLogic in Big O?\n\n\n==\nI acknowledged I have read the rebuttal and decide to keep my score.", "limitations": "The authors have already mentioned the limitation, i.e., “The performance of DiffLogic heavily depends on the quality of the rules”. It is the limitation of all rule-based reasoning studies and neuro-symbolic reasoning studies.", "rating": 7, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "- Originality: It is novel to use probabilistic soft logic (PSL) to perform neuro-symbolic reasoning, which makes the proposed framework DiffLogic differentiable. Two tailored mechanisms have been designed to accelerate the optimization. First, it selects essential triples from the inferred triples to perform the assessment. Second, it utilizes the sparsity of violated triples to efficiently estimate the gradient of rule weights.\n\n- Quality: The proposed framework is technically sound. Extensive experiments have been conducted, and the results demonstrate that DiffLogic outperforms state-of-the-art baselines. Details of the experiments have been provided.\n\n- Clarity: The motivation and challenges are well described. The main idea of the proposed framework is well explained. The Experiments Section is well structured.\n\n- Significance: Neuro-symbolic reasoning is promising since it can potentially combine the advantages of KG embedding and rule-based reasoning. The experimental results show that DiffLogic is effective and efficient.", "weaknesses": "1. Some notations are confusing. First, examples should be given to explain I^-_q and I^+_q. Why distinguishing them are important to DiffLogic? Second, we already have h and t to represent head and tail. Why do we still need A and B? Third, it seems like Z() is unnecessary since it is only used in Eq. (4). Fourth, \\theta denotes the embedding parameters. Then, what are the meanings of x(\\theta) and y(\\theta)? Should we use x|\\theta and y|\\theta?\n\n2. The writing can be improved. First, examples should be given to explain assignments x and y. Are they continuous? Second, it seems like ground formulas are triples, but the name “formula” is confusing. Third, the connection between contribution (1) and contributions (2) (3) (4) is unclear. What is ELBO, and why is it related to DiffLogic? What are the relations between DiffLogic and “efficient grounding technique”? \n\n3. The paper emphasizes that DiffLogic is efficient. The running time results in Table 9 should be moved from Supplementary Material to Main Content. The time complexity of DiffLogic should be given?\n\n4. All equations should be indexed.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Q1. Why distinguishing $I^-_q$ and $I^+_q$ are important to DiffLogic?\n\nA.\nThank you for your question.\n\nThe importance of differentiating between the notations $I^-_q$ and $I^+_q$ is twofold: knowledge representation and logical reasoning.\n\n1. Knowledge Representation: As introduced in subsection 2.2 of our paper, a first-order logic is represented as a disjunction of atoms and their negations. $I^-_q$ and $I^+_q$ are index sets containing the indices of atoms that are negated or not, respectively. A rule in this format can also be reorganized as an implication from the premise (negated atoms) to the conclusion (non-negated atoms). Distinguishing between these two notations is crucial as they designate which part forms the premises and which part forms the conclusion.\n\n2. Logical Reasoning: When employing a logic rule for reasoning, it's intrinsic to identify facts that match the premise. Once all facts from the knowledge graph match the premise, the facts in the conclusion part are then inferred.\n\nDiffLogic jointly uses a set of weighted rules to perform reasoning on knowledge graphs. During rule grounding, we find paths that match the negated atoms of a rule. During probabilistic logic reasoning, the assignments y and x are encouraged to satisfy more rules so more new facts are inferred from the knowledge graph.\n\nQ2. What are the meanings of $x(\\theta)$ and $y(\\theta)$? Should we use $x_\\theta$ and $y_\\theta$?\n\nA.\nThanks for your question. \n\nThe notations $x(\\theta)$ and $y(\\theta)$ represent the assignments $x$ and $y$, both parameterized by an embedding $\\theta$. In the context of Probabilistic Soft Logic (PSL), the inference task is to infer the assignment of unobserved facts, or $y$, based on the assignments of observed facts, $x$.\n\nUnder the MLN/PSL framework, the full representation of all assignments is memory-intensive — it requires $O(|\\mathcal{E}|^2|\\mathcal{R}|)$ parameters to represent all assignments for a Knowledge Graph (KG) with $\\mathcal{E}$ entities and $\\mathcal{R}$ relations—we optimize this by parameterizing these assignments through the output scores of a KG embedding model. As such, the assignments become $x(\\theta)$ and $y(\\theta)$.\n\nDuring the inference step, we update the embedding $\\theta$, so it's necessary to explicitly represent all assignments as $x(\\theta)$ and $y(\\theta)$. Conversely, during the weight updating step, the embeddings $\\theta$ are fixed. Therefore, we can omit it for concise writing.\n\nI hope this clarifies your query about our notation.\n\nQ3. What is ELBO, and why is it related to DiffLogic?\n\nA.\nIn variational inference, the Evidence Lower BOund (ELBO) is a crucial concept. It's a function of the parameters of the variational distribution.\n\nThe idea behind variational inference is to approximate the true posterior distribution (which is often intractable in complex models) with a simpler distribution that we can work with more easily. The process aims to minimize the Kullback-Leibler (KL) divergence between the approximated and the true posterior, or alternatively, to maximize the ELBO.\n\nIn terms of existing Markov Logic Network (MLN)-based neuro-symbolic methods, such as pLogicNet and ExpressGNN, they employ either a KG embedding model or a Graph Neural Network (GNN) to approximate the optimal distribution of assignments x and y. The optimization of this approximation occurs through updating embeddings. Therefore, the embedding updating step is actually a variational inference. Both pLogicNet and ExpressGNN seek to optimize ELBO as their objective to avoid intractable computation, but this also leads to in-direct optimization of the actual objective of MLN. \n\nContrastingly, DiffLogic allows us to directly maximize the posterior (in equation (4)) due to the continuous characteristic of our framework, leading to a more smooth integration of MLN and KG embedding model, and better optimization efficiency.\n\nQ4. What is the corresponding mathematical expression for using important ground formulas to perform the assessment?\n\nA.\nThank you for your question.\n\nIn this work, we use rule-guided iterative grounding to identify important ground formulas, to facilitate efficient optimization, rather than assessment.\n\nUsing the important ground formulas for optimization is shown in equation (6). The first term is computing the weighted sum of potential, which is computed on the selected ground formulas.\n\nQ5. What is the time complexity of DiffLogic in Big O?\n\nA.\nThanks for your question.\n\nThe run-time of DiffLogic consists of two parts, inference (embedding updating) and rule weight updating: \n\nThe Big O time complexity for inference is  $O(n*e/bs)$, where $n$ is the number of triples in the training set, $e$ is the overall number of epochs of embedding learning, and the $bs$ is the number of training data used in each batch.\n\nThe Big O time complexity for rule weight updating is $O(b_w\\*n_m)$, here $b_w$ denotes the batch size we use to estimate the gradient weights (see the equation between line 209 and line 210) in minibatch, and $n_m$ is the sample size we use in Monte Carlo integration. In practice, we exploit the sparsity of violated rules, so computing the terms $\\Psi_{q, MB(i)}$ can be reduced to a constant $O(1)$ time complexity. The computation of the expectation term $E_{y_i \\mid MB}\\left[\\Psi_{q, MB(i)}\\right]$ can be estimated using Monte Carlo integration, thus its complexity is $O(n_m)$. Therefore, the overall complexity in rule weight updating step is $O(b_w*(n_m+constant))$ = $O(b_w*n_m)$.\n\nWe also empirically observe from experiments, that the rule weight update is quite efficient and most of the run-time consumption comes from the inference step. Since the inference step has the same big O run-time complexity as the training of pure data-driven KG embedding, DiffLogic can be trained efficiently and can be further accelerated by using a larger batch size on a larger GPU."}]

Author rebuttal:

Meta-review: To integrates rule-based reasoning and knowledge graph (KG) embedding, The paper shows how to use probabilistic soft logic to assess the agreement between the inferred triples and weighted rules, based on the embedding representations of entities and relations. All reviews agree that this is an interesting and important topic. Still the point our some downsides such as a weak discussion of related work, no discussion of the potential loss of interpretability, and some missing experimental settings that should be discussed.
Decision: Accept (poster)