kompare: a knowledge graph comparative reasoning system3 kompare basics in this section, we...

9
KompaRe: A Knowledge Graph Comparative Reasoning System Lihui Liu, Boxin Du, Heng Ji, Hanghang Tong Department of Computer Science, University of Illinois at Urbana Champaign {lihuil2, boxindu2, hengji , htong}@illinois.edu ABSTRACT Reasoning is a fundamental capability for harnessing valuable in- sight, knowledge and patterns from knowledge graphs. Existing work has primarily been focusing on point-wise reasoning, includ- ing search, link predication, entity prediction, subgraph match- ing and so on. This paper introduces comparative reasoning over knowledge graphs, which aims to infer the commonality and in- consistency with respect to multiple pieces of clues. We envision that the comparative reasoning will complement and expand the existing point-wise reasoning over knowledge graphs. In detail, we develop KompaRe, the ๏ฌrst of its kind prototype system that provides comparative reasoning capability over large knowledge graphs. We present both the system architecture and its core algo- rithms, including knowledge segment extraction, pairwise reason- ing and collective reasoning. Empirical evaluations demonstrate the e๏ฌƒcacy of the proposed KompaRe. KEYWORDS knowledge graph, knowledge graph reasoning, system, comparative reasoning ACM Reference Format: Lihui Liu, Boxin Du, Heng Ji, Hanghang Tong. 2021. KompaRe: A Knowl- edge Graph Comparative Reasoning System. In Online โ€™21: The 14th ACM International WSDM Conference, March 8-12, 2021. ACM, New York, NY, USA, 9 pages. https://doi.org/10.1145/1122445.1122456 1 INTRODUCTION Since its birth in 1995 [18] and especially its re-introduction by Google in 2012, knowledge graph has received more and more attentions, penetrating in a multitude of high-impact applications. To name a few, in fact checking, knowledge graph provides the vital background information about real-world entities and help a human fact checker corroborate or refute a claim [14]; in question answering, a question can be naturally formulated as a query graph, and the Q/A problem thus becomes the classic subgraph matching problem [9]; in recommendation systems, knowledge graph o๏ฌ€ers the auxiliary information to improve the recommendation quality and/or explainability [19]; in computer vision, knowledge graph can be used to pre-optimize the model to boost its performance [6]. A fundamental enabling capability underlying these applications (and many more) lies in reasoning, which aims to identify errors Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for pro๏ฌt or commercial advantage and that copies bear this notice and the full citation on the ๏ฌrst page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior speci๏ฌc permission and/or a fee. Request permissions from [email protected]. Online โ€™21, March 8-12, 2021, Online ยฉ 2021 Copyright held by the owner/author(s). Publication rights licensed to ACM. ACM ISBN 978-1-4503-9999-9/18/06. . . $15.00 https://doi.org/10.1145/1122445.1122456 and/or infer new conclusions from existing data [3]. The newly discovered knowledge through reasoning provides valuable input of these down stream applications, and/or can be used to further enrich the knowledge graph itself. Most, if not all, of the existing work on knowledge graph reason- ing belongs to the point-wise approaches, which perform reasoning w.r.t. a single piece of clue (e.g., a query). For example, in knowledge graph search [17], it returns the most relevant concepts for a given entity; in link prediction [10], given the โ€˜subjectโ€™ and the โ€˜objectโ€™ of a triple, it predicts the relation; in fact checking [13], given a claim (e.g., represented as a triple of the knowledge graph), it decides whether it is authentic or falsi๏ฌed; in subgraph matching [9], given a query graph, it ๏ฌnds exact or inexact matching subgraphs. In this paper, we introduce comparative reasoning over knowl- edge graph, which aims to infer the commonality and/or the in- consistency with respect to multiple pieces of clues (e.g., multiple claims about a news article). We envision that the comparative reasoning will complement and expand the existing point-wise reasoning over knowledge graphs. This is because comparative rea- soning o๏ฌ€ers a more complete picture w.r.t. the input clues, which in turn helps the users discover the subtle patterns (e.g., inconsis- tency) that would be invisible by point-wise approaches. Figure 1 gives an example to illustrate the power of comparative reasoning. Suppose there is a multi-modal news asset and we wish to verify its truthfulness. To this end, two query graphs are extracted from the given news, respectively. One query graph contains all the informa- tion from the text, and the other contains the information from the image. If we perform point-wise reasoning to check each of these two query graphs separately, both seem to be true. However, if we perform reasoning w.r.t. both query graphs simultaneously, and by comparison, we could discover the subtle inconsistency between them (i.e., the di๏ฌ€erent air plan types, the di๏ฌ€erence in maximum ๏ฌ‚ying distances). In addition, comparative reasoning can also be used in knowledge graph expansion, integration and completion. To be speci๏ฌc, we develop KompaRe, the ๏ฌrst of its kind proto- type system that provides comparative reasoning capability over large knowledge graphs. A common building block of comparative reasoning is knowledge segment, which is a small connection sub- graph of a given clue (e.g., a triple or part of it) to summarize its semantic context. Based on that, we present core algorithms to en- able both pairwise reasoning and collective reasoning. The key idea is to use in๏ฌ‚uence function to discover a set of important elements in the knowledge segments. Then, the overlapping rate and the transferred information amount of these important elements will help reveal commonality and inconsistency. The main contributions of the paper are โ€ข Problem De๏ฌnition. We introduce comparative reasoning over knowledge graphs, which complements and expands the existing point-wise reasoning capabilities. arXiv:2011.03189v1 [cs.AI] 6 Nov 2020

Upload: others

Post on 26-Jan-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

  • KompaRe: A Knowledge Graph Comparative Reasoning SystemLihui Liu, Boxin Du, Heng Ji, Hanghang Tong

    Department of Computer Science, University of Illinois at Urbana Champaign{lihuil2,boxindu2,hengji,htong}@illinois.edu

    ABSTRACTReasoning is a fundamental capability for harnessing valuable in-sight, knowledge and patterns from knowledge graphs. Existingwork has primarily been focusing on point-wise reasoning, includ-ing search, link predication, entity prediction, subgraph match-ing and so on. This paper introduces comparative reasoning overknowledge graphs, which aims to infer the commonality and in-consistency with respect to multiple pieces of clues. We envisionthat the comparative reasoning will complement and expand theexisting point-wise reasoning over knowledge graphs. In detail,we develop KompaRe, the first of its kind prototype system thatprovides comparative reasoning capability over large knowledgegraphs. We present both the system architecture and its core algo-rithms, including knowledge segment extraction, pairwise reason-ing and collective reasoning. Empirical evaluations demonstratethe efficacy of the proposed KompaRe.

    KEYWORDSknowledge graph, knowledge graph reasoning, system, comparativereasoningACM Reference Format:Lihui Liu, Boxin Du, Heng Ji, Hanghang Tong. 2021. KompaRe: A Knowl-edge Graph Comparative Reasoning System. In Online โ€™21: The 14th ACMInternational WSDM Conference, March 8-12, 2021. ACM, New York, NY,USA, 9 pages. https://doi.org/10.1145/1122445.1122456

    1 INTRODUCTIONSince its birth in 1995 [18] and especially its re-introduction byGoogle in 2012, knowledge graph has received more and moreattentions, penetrating in a multitude of high-impact applications.To name a few, in fact checking, knowledge graph provides thevital background information about real-world entities and help ahuman fact checker corroborate or refute a claim [14]; in questionanswering, a question can be naturally formulated as a query graph,and the Q/A problem thus becomes the classic subgraph matchingproblem [9]; in recommendation systems, knowledge graph offersthe auxiliary information to improve the recommendation qualityand/or explainability [19]; in computer vision, knowledge graphcan be used to pre-optimize the model to boost its performance [6].A fundamental enabling capability underlying these applications(and many more) lies in reasoning, which aims to identify errors

    Permission to make digital or hard copies of all or part of this work for personal orclassroom use is granted without fee provided that copies are not made or distributedfor profit or commercial advantage and that copies bear this notice and the full citationon the first page. Copyrights for components of this work owned by others than theauthor(s) must be honored. Abstracting with credit is permitted. To copy otherwise, orrepublish, to post on servers or to redistribute to lists, requires prior specific permissionand/or a fee. Request permissions from [email protected] โ€™21, March 8-12, 2021, Onlineยฉ 2021 Copyright held by the owner/author(s). Publication rights licensed to ACM.ACM ISBN 978-1-4503-9999-9/18/06. . . $15.00https://doi.org/10.1145/1122445.1122456

    and/or infer new conclusions from existing data [3]. The newlydiscovered knowledge through reasoning provides valuable inputof these down stream applications, and/or can be used to furtherenrich the knowledge graph itself.

    Most, if not all, of the existing work on knowledge graph reason-ing belongs to the point-wise approaches, which perform reasoningw.r.t. a single piece of clue (e.g., a query). For example, in knowledgegraph search [17], it returns the most relevant concepts for a givenentity; in link prediction [10], given the โ€˜subjectโ€™ and the โ€˜objectโ€™ ofa triple, it predicts the relation; in fact checking [13], given a claim(e.g., represented as a triple of the knowledge graph), it decideswhether it is authentic or falsified; in subgraph matching [9], givena query graph, it finds exact or inexact matching subgraphs.

    In this paper, we introduce comparative reasoning over knowl-edge graph, which aims to infer the commonality and/or the in-consistency with respect to multiple pieces of clues (e.g., multipleclaims about a news article). We envision that the comparativereasoning will complement and expand the existing point-wisereasoning over knowledge graphs. This is because comparative rea-soning offers a more complete picture w.r.t. the input clues, whichin turn helps the users discover the subtle patterns (e.g., inconsis-tency) that would be invisible by point-wise approaches. Figure 1gives an example to illustrate the power of comparative reasoning.Suppose there is a multi-modal news asset and we wish to verify itstruthfulness. To this end, two query graphs are extracted from thegiven news, respectively. One query graph contains all the informa-tion from the text, and the other contains the information from theimage. If we perform point-wise reasoning to check each of thesetwo query graphs separately, both seem to be true. However, if weperform reasoning w.r.t. both query graphs simultaneously, and bycomparison, we could discover the subtle inconsistency betweenthem (i.e., the different air plan types, the difference in maximumflying distances). In addition, comparative reasoning can also beused in knowledge graph expansion, integration and completion.

    To be specific, we develop KompaRe, the first of its kind proto-type system that provides comparative reasoning capability overlarge knowledge graphs. A common building block of comparativereasoning is knowledge segment, which is a small connection sub-graph of a given clue (e.g., a triple or part of it) to summarize itssemantic context. Based on that, we present core algorithms to en-able both pairwise reasoning and collective reasoning. The key ideais to use influence function to discover a set of important elementsin the knowledge segments. Then, the overlapping rate and thetransferred information amount of these important elements willhelp reveal commonality and inconsistency.

    The main contributions of the paper are

    โ€ข Problem Definition. We introduce comparative reasoningover knowledge graphs, which complements and expandsthe existing point-wise reasoning capabilities.

    arX

    iv:2

    011.

    0318

    9v1

    [cs

    .AI]

    6 N

    ov 2

    020

    https://doi.org/10.1145/1122445.1122456https://doi.org/10.1145/1122445.1122456

  • Online โ€™21, March 8-12, 2021, Online

    Air Force One

    Obama

    Image Analysis

    Text Analysis

    Refused byGEO-Place

    Play

    6000 Miles

    HelicopterPeople

    In front of

    Sport Harvard

    US

    President

    US Army

    Obama

    Golf

    Air Force

    Columbia

    PoliticalScience

    Live

    Is

    CommandCommand

    Like

    Name

    Graduate

    Command

    Major

    Golf

    Fly

    Navy

    Air Force One

    Helicopter

    Study

    Command

    Command

    Knowledge Graph

    Query 2

    Sport

    President

    Us Army

    Obama

    Golf

    Air ForceIs

    In charge

    Command

    Like

    Name

    Command

    Air Force One

    President

    Us Army

    Obama

    Air ForceIs

    In charge

    Command

    People Subclass

    Helicopter

    CommandCommand

    Conflict

    600MMaximumDistance 6000M

    Maximum Distance

    600MMaximumDistance6000M

    Maximum Distance

    Query graph 1

    Query graph 2

    Input multi-modal news asset

    Law

    Conflict

    Knowledge Segment of Query graph 1

    Query 1

    Knowledge Segment of Query graph 2

    Inconsistency Detection

    Inconsistency Detection

    Command

    Command

    Command Graduate

    Figure 1: An illustrative example of using comparative reasoning for semantic incon-sistency detection. Source of the image at the top-left: [4].

    IndexPredicate Similarity Matrix

    Storage and Offline mining

    Commonality

    Inconsistency

    Pairwise Comparative Reasoning

    Embedding

    Commonality

    Inconsistency

    Collective Comparative Reasoning

    Node-specific Knowledge Segment

    Extraction

    Triple Knowledge Segment Extraction

    Subgraph Knowledge Segment Extraction

    Predicate EntropyKnowledge

    Graph

    Visualization

    Figure 2: KompaRe architecture.

    โ€ข Prototype Systems and Algorithms.We develop the firstof its kind prototype for knowledge graph comparative rea-soning, together with a suite of core enabling algorithms.

    โ€ข Empirical Evaluations. We perform extensive empiricalevaluations to demonstrate the efficacy of KompaRe.

    2 KOMPARE OVERVIEWA - Architecture and Main Functions. The architecture of Kom-paRe is shown in Figure 2 . Generally speaking, there are three keycomponents in KompaRe, including (1) offline mining, (2) onlinereasoning and (3) UI.(1) Offline Mining. Three are two main offline functions supportedby KompaRe, including predicate entropy calculation and predicate-predicate similarity calculation1. These functions provide funda-mental building blocks for KompaReโ€™s online reasoning capabilities.For example, the predicate-predicate similarity will be used in bothedge-specific knowledge segment extraction (Subsection 3.2) andsubgraph-specific knowledge segment extraction (Subsection 3.3).(2) Online Reasoning. In the online reasoning phase, KompaRe sup-ports a variety of reasoning functions which are summarized inTable 1. First, it supports point-wise reasoning, which returns asmall connection subgraph (referred to as โ€˜knowledge segmentโ€™ inthis paper) for a single piece of clue provided by the user (f1 to f3in Table 1). For example, if the given clue is a single entity, KompaRefinds a semantic subgraph to summarize the context of the givenentity in the underlying knowledge graph; if the given clue is asingle triple, KompaRe finds a connection subgraph to summarizethe semantic proximity from the โ€˜subjectโ€™ of the triple to its โ€˜objectโ€™;if the given clue is a subgraph, KompaRe finds a semantic match-ing subgraph where each edge of the query graph corresponds toa knowledge segment between the two matching nodes. Second,based on these point-wise reasoning functions, KompaRe furthersupports comparative reasoning (f4 and f5 in Table 1), which iden-tifies both the commonality and the potential inconsistency w.r.t.multiple pieces of clues provided by the user. In addition, KompaRealso supports a number of common knowledge reasoning tasks,

    1KompaRe also contains other offline mining algorithms, e.g. TransE [2]. We omit thedetails of these algorithms due to space limit.

    e.g., top-k query (i.e., given an entity, find the top-k most relevantentities), link prediction, subgraph matching, etc.(3) UI. KompaRe provides a user friendly interface to visualize thepoint-wise and/or comparative reasoning results. Basically, theinterface supports three primary functions, including (i) functionselection, where the user can select different kind of functions inTable 1 on the web page; (ii) query input, where the user can inputvarious queries on the web page (e.g,. node, edge and query graph);and (iii) visualization, where KompaRe visualizes the reasoningresults,and the user further modify their queries accordingly. TheUI is implemented by HTML, Javascript and D3.js.B - Key Challenges. There are several challenges to implementKompaRe which are listed below. First (C1 - challenge for point-wise reasoning), although there exists rich algorithms and toolsto extract connection subgraphs on weighted graphs [7, 11, 16],they do not directly apply to knowledge graphs whose edges en-code semantic relationship between different nodes. Second (C2 -challenges for comparative reasoning), different from point-wisereasoning which focuses on a single piece of clue, comparative rea-soning aims to infer the commonality and/or the inconsistency w.r.t.multiple clues. Take knowledge graph based fact checking as anexample. Even if each clue/claim could be true, we might still failto detect the inconsistency between them without appropriatelyexamining different clues/claims together. Third (C3 - scalability), acommon challenge to both point-wise and comparative reasoningis how to support real-time or near real-time system response overlarge knowledge graphs.

    3 KOMPARE BASICSIn this section, we introduce three basic functions in our KompaResystem, including f1, f2 and f3 in Table 1. These three functions,all of which belong to point-wise reasoning methods, form the basisof the comparative reasoning that will be introduced in the nextsection. Generally speaking, given a clue (e.g., a node, a triple or aquery graph) from the user, we aim to extract a knowledge segmentfrom the knowledge graph, which is formally defined as follows.

    Definition 1. Knowledge Segment (KS for short) is a connec-tion subgraph of the knowledge graph that describes the semanticcontext of a piece of given clue (i.e., a node, a triple or a query graph).

  • KompaRe: A Knowledge Graph Comparative Reasoning System Online โ€™21, March 8-12, 2021, Online

    Table 1: Summary of major functions in our system.Name Input Output Key techniquesf1 A single query node A node-specific knowledge segment Predicate entropyf2 A Single query edge An edge-specific knowledge segment Predicate-predicate similarityf3 A query graph A subgraph-specific knowledge segment Semantic subgraph matching

    f4 Two or more query edges Commonality and inconsistency Pairwise comparative reasoning (influence function,overlapping rate, transferred information)

    f5 A query graph Commonality and inconsistency Collective comparative reasoning (influence function,overlapping rate, transferred information)

    When the given clue is a node or an edge/triple, there exist richalgorithms to extract the corresponding knowledge segment2 onweight graphs (e.g., a social network). To name a few, PageRank-Nibble [1] is an efficient local graph partition algorithm for extract-ing a dense cluster w.r.t. a seed node; K-simple shortest paths basedmethod [7] or connection subgraph [5], [11] can be used to extracta concise subgraph from the source node of the querying edge toits target node. However, these methods do not directly apply toknowledge graphs because the edges (i.e., predicates) of a knowl-edge graph have specific semantic meanings (i.e., types, relations).To address this issue, we seek to convert the knowledge graph toa weighted graph by designing (1) a predicate entropy measurefor node-specific knowledge segment extraction (Subsection 3.1),and (2) a predicate-predicate similarity measure for edge-specificknowledge segment extraction (Subsection 3.2), respectively.

    When the given clue itself is a subgraph (Subsection 3.3), wepropose to extract a semantic matching subgraph. We would like topoint out that semantic matching subgraph extraction is similar tobut bears subtle difference from the traditional subgraph matchingproblem [12]. In subgraph matching, it aims to find a matchingedge or path for each pair of matching nodes if they are requiredto be connected by the query graph; whereas in semantic subgraphmatching, we aim to find a small connection subgraph (i.e., anedge-specific knowledge segment) for each pair of matching nodesthat are required to be connected according to the query subgraph.In other words, a subgraph-specific knowledge segment consistsof multiple inter-linked edge-specific knowledge segments (i.e.,one edge-specific knowledge segment for each edge of the inputquery subgraph).We envision that the subgraph-specific knowledgesegment provides richer semantics, including both the semantics foreach edge of the query graph and the semantics for the relationshipbetween different edges of the input query graph.3.1 Node-specific Knowledge SegmentPageRank-Nibble [1] is a local graph partitioning algorithm to finda dense cluster near a seed node (i.e., the query node) on a weightedgraph. It calculates the approximate PageRank vector with runningtime independent of the graph size. By sweeping over the PageRankvector, it finds a cut with a small conductance to obtain the localpartition. In order to apply PageRank-Nibble to find node-specificknowledge segment, we propose to convert the knowledge graphinto a weighted graph by predicate entropy.

    To be specific, we treat each predicate in the knowledge graphas a random variable. The entropy of the predicates offers a natu-ral way to measure its uncertainty and thus can be used to quan-tify the importance of the corresponding predicate. For example,2It is worth pointing out that the extracted knowledge segment itself provides apowerful building block for several existing knowledge graph reasoning tasks, e.g.multi-hop method [8], minimum cost maximum flow method [14], etc.

    some predicates have a high degree of uncertainty, e.g. livesIn,isLocatedIn, hasNeighbor, actedIn. This is because, in knowl-edge graph, different persons usually have different numbers ofneighbors, and different actors may act in different movies. A pred-icate with high uncertainty indicates that it is quite common whichoffers little specific semantics of the related entity, and thus it shouldhave low importance. On the other hand, some predicates have alow degree of uncertainty, e.g. isPresident, isMarriedTo. This isbecause only one person can be the president of a given countryat a time, and for most of persons, they marry once in life. Such apredicate often provides very specific semantics about the corre-sponding entity and thus it should have high importance. Based onthis observation, we propose to use predicate entropy to measurethe predicate importance as follows.

    We treat each entity and all the predicates surrounding it as theoutcome of an experiment. In this way, we could obtain differentdistributions for different predicates. Let ๐‘– denote a predicate in theknowledge graph, and ๐ท denote the maximal out-degree of a node.For a given node, assume it contains ๐‘‘ out links whose label is ๐‘– ,we have 0 โ‰ค ๐‘‘ โ‰ค ๐ท . Let V๐‘‘

    ๐‘–denote the node set which contains

    ๐‘‘ out links with label ๐‘– , E denote the entropy, and P๐‘‘๐‘–denote the

    probability of a node having ๐‘‘ out links with label/predicate ๐‘– .The entropy of a given predicate ๐‘– can be computed as E(๐‘–) =โˆ‘๐ท๐‘‘=1 โˆ’P

    ๐‘‘๐‘–log(P๐‘‘

    ๐‘–), where P๐‘‘

    ๐‘–=

    |V๐‘‘๐‘–|โˆ‘๐ท

    ๐‘‘=1 |V๐‘‘๐‘– |. Finally, we compute

    the importance of a predicate ๐‘– as๐‘ค (๐‘–) = 2๐œŽ ( 1E(๐‘–) ) โˆ’ 1, where ๐œŽ ()is the sigmoid function.

    3.2 Edge-specific Knowledge SegmentEdge-specific knowledge segment extraction aims at finding aknowledge segment to best characterize the semantic context ofthe given edge (i.e. a triple). Several connection subgraph extrac-tion methods exist for a weighted graph, e.g. [16], [11], [7]. Wepropose to use a TF-IDF based method3 to measure the similaritybetween different predicates, and transfer the knowledge graphinto a weighted graph whose edge weight represents the similaritybetween the edge predicate and query predicate. Then, we findk-simple shortest paths [11] from the subject to the object of thegiven query edge as its knowledge segment.

    The key idea behind predicate similarity is to treat each triple inthe knowledge graph and its adjacent neighboring triples as a docu-ment, and use a TF-IDF like weighting strategy to calculate the pred-icate similarity. Consider a triple ๐‘’๐‘ก = in the knowledge graphwhose predicate is ๐‘– = receiveDegreeFrom.In the neighborhood of ๐‘’๐‘ก , there is a high probability that tripleslike and also exist (adjacent3The TF-IDF based method was also used in [14] for computational fact checking.

  • Online โ€™21, March 8-12, 2021, Online

    to ๐‘’๐‘ก ). The predicates of these triples should have high similaritywith each other. On the other hand, triples like , may also occur in the adjacent neighborhood oftriple ๐‘’๐‘ก . This is because these predicates are very common in theknowledge graph, and occur almost everywhere. These predicatesare like the stop words such as โ€œtheโ€, โ€œaโ€, โ€œanโ€ in a document. There-fore, if we treat each predicate and its neighborhood as a document,we could use a TF-IDF like weighting strategy to find highly similarpredicates and in the meanwhile penalize common predicates likelivesIn, hasNeighbor.

    To be specific, we use the knowledge graph to build a co-occurrencematrix of predicates, and calculate their similarity by a TF-IDFlike weighting strategy as follows. Let ๐‘–, ๐‘— denote two differentpredicates. We define the TF between two predicates as TF(๐‘–, ๐‘—) =log(1 + ๐ถ (๐‘–, ๐‘—)๐‘ค ( ๐‘—)), where ๐ถ (๐‘–, ๐‘—) is the co-occurrence of pred-icate ๐‘– and ๐‘— . The IDF is defined as IDF( ๐‘—) = log |๐‘€ || {๐‘–:๐ถ (๐‘–, ๐‘—)>0} | ,where ๐‘€ is the number of predicates in the knowledge graph.Then, we build a TF-IDF weighted co-occurrence matrix ๐‘ˆ as๐‘ˆ (๐‘–, ๐‘—) = TF(๐‘–, ๐‘—) ร— ๐ผ๐ท๐น ( ๐‘—). Finally, the similarity of two predi-cates is defined as Sim(i, j) = Cosine(๐‘ˆ๐‘– ,๐‘ˆ ๐‘— ), where where๐‘ˆ๐‘– and๐‘ˆ ๐‘— are the ๐‘–๐‘กโ„Ž row and ๐‘—๐‘กโ„Ž row of๐‘ˆ , respectively.

    3.3 Subgraph-specific Knowledge Segment

    Given an attributed query graph Q={๐‘‰๐‘„ , ๐ธ๐‘„ , ๐ฟ๐‘„ }, the traditionalsubgraph matching aims to find an edge or a path for each ๐‘’๐‘– โˆˆ ๐ธ๐‘„ .On the contrary, subgraph-specific knowledge segment extractionaims to find an edge-specific knowledge segment for each edge๐‘’๐‘– โˆˆ ๐ธ๐‘„ . To our best knowledge, there is no existing method forsubgraph-specific knowledge segment extraction. In order to findthe edge-specific knowledge segments for each ๐‘’๐‘– โˆˆ ๐ธ๐‘„ , we againuse the k-simple shortest path method to extract the paths with thelowest cost. The cost of a path is equal to the sum of the reciprocal ofthe predicate-predicate similarity of all edges in the path. Finally, allthe edge-specific knowledge segments will be merged together toobtain the semantic matching subgraph (i.e., the subgraph-specificknowledge segment).

    4 KOMPARE COMPARATIVE REASONINGIn this section, we introduce the technical details of comparativereasoning in KompaRe. We first introduce the pairwise reasoning(f4 in Table 1) for two pieces of clues (e.g., two edges/triples), andthen present the collective comparative reasoning (f5 in Table 1).Table 2 summarizes the main notation used in this section.

    4.1 Pairwise Comparative ReasoningPairwise comparative reasoning aims to infer the commonalityand/or inconsistency with respect to a pair of clues according totheir knowledge segments. Here, we assume that the two givenclues are two edges/triples:๐ธ๐‘„1 =< s1, p1, o1 > and๐ธ

    ๐‘„

    2 =< s2, p2, o2 >where s1, o1, s2, o2 โˆˆ ๐‘‰๐‘„ and p1, p2 โˆˆ ๐ธ๐‘„ . We denote their cor-responding knowledge segments as ๐พ๐‘†1 for ๐ธ๐‘„1 and ๐พ๐‘†2 for ๐ธ

    ๐‘„

    2 ,respectively. The commonality and inconsistency between thesetwo knowledge segments are defined as follows.

    Definition 2. Commonality. Given two triples (๐ธ๐‘„1 and ๐ธ๐‘„

    2 )and their knowledge segments (๐พ๐‘†1 and ๐พ๐‘†2), the commonality of

    Table 2: Notations and definitionSymbols Definition

    Q={๐‘‰๐‘„ , ๐ธ๐‘„ , ๐ฟ๐‘„ } an attributed query graphG={๐‘‰๐บ , ๐ธ๐บ , ๐ฟ๐บ } a knowledge graph

    ๐พ๐‘†๐‘– knowledge segment ๐‘–๐ด๐‘– adjacency matrix of ๐พ๐‘†๐‘–๐‘๐‘– attribute matrix of ๐พ๐‘†๐‘– , the ๐‘— th row

    denotes the attribute vector of node ๐‘— in ๐พ๐‘†๐‘–๐ดร— Kronecker product of๐ด1 and๐ด2๐‘ ๐‘™ diagonal matrix of the ๐‘™ th node attribute๐‘ร— combined node attribute matrix๐‘†๐‘–,๐‘— single entry matrix ๐‘†๐‘–,๐‘— (๐‘–, ๐‘—) = 1 and zeros elsewhere

    these two triples refers to the shared nodes and edges between ๐ธ๐‘„1and ๐ธ๐‘„2 , as well as the shared nodes and edges between ๐พ๐‘†1 and ๐พ๐‘†2:((๐‘‰๐พ๐‘†1 โˆฉ๐‘‰๐พ๐‘†2 ) โˆช (๐‘‰๐‘„1 โˆฉ๐‘‰๐‘„2 ), (๐ธ๐พ๐‘†1 โˆฉ ๐ธ๐พ๐‘†2 ) โˆช (๐ธ๐‘„1 โˆฉ ๐ธ๐‘„2 )).

    Definition 3. Inconsistency. Given two knowledge segments๐พ๐‘†1 and ๐พ๐‘†2, the inconsistency between these two knowledge seg-ments refers to any element (node, node attribute or edge) in ๐พ๐‘†1 and๐พ๐‘†2 that contradicts with each other.

    In order to find out if the two given edges/triples are inconsistent,we first need to determine if they refer to the same thing/fact. Givena pair of clues < s1, p1, o1 > and < s2, p2, o2 >, we divide it intothe following six cases. includingC1. s1 โ‰  s2, s1 โ‰  o2, o1 โ‰  s2, o1 โ‰  o2. For this case, thesetwo clues apparently refer to different things, e.g., and .C2. s1 = s2 and o1 = o2. If p1 = p2, these two clues are equal. Ifp1 and p2 are different or irrelevant, e.g., p1 = wasBornIn, p2 =hasWebsite, these two clues refer to different things. However, ifp1 is opposite of p2, they are inconsistent with each other.C3. s1 = s2 but p1 โ‰  p2 and o1 โ‰  o2, e.g., , .C4. s1 = s2, p1 = p2, but o1 โ‰  o2, e.g., , .C5. o1 = o2, but s1 โ‰  s2. For this case, no matter what p1 and p2are, these two clues refer to different things.C6. o1 = s2. For this case, no matter what p1 and p2 are, they referto different things. For example, ,.

    Among these six cases, we can see that the clue pair in C1, C5and C6 refer to different things. Therefore, there is no need to checkthe inconsistency between them. For C2, we only need to checkthe semantic meaning of their predicates, i.e., if p1 is the oppositeof p2. For example, p1 = isFather and p2 = isSon, they are in-consistent with each other. Otherwise, there is no inconsistencybetween them. We mainly focus on C3 and C4 where the two cluesmay be inconsistent with each other even if each of them is true.For example, in Figure 1, either or could betrue. But putting them together, they cannot be both true, sincethese two claims could not happen at the same time. In otherwords, they are mutually exclusive with each other and thus areinconsistent. However, queries like and are bothtrue, because Honolulu belongs to Hawaii. Alternatively, we cansay that Hawaii contains Honolulu. Another example is and ,both of which are true. Although they have the same subject, they

  • KompaRe: A Knowledge Graph Comparative Reasoning System Online โ€™21, March 8-12, 2021, Online

    refer to two different things. We summarize that if (1) the subjectsof two clues are the same, and (2) their predicates are similar witheach other or the same, they refer to the same thing. Furthermore,if their objects are two uncorrelated entities, it is high likely thatthese two clues are inconsistent with each other.

    Based on the above observations, we take the following threesteps for pairwise comparative reasoning. First, given a pair of clues,we decide which of six cases it belongs to, by checking the subjects,predicates and objects of these two clues. Second, if this pair ofclues belongs to C3 or C4, we need to decide whether they refer tothe same thing or two different things. To this end, we first find aset of key elements (nodes or edges or node attributes) in these twoknowledge segments. If most of these key elements belong to thecommonality of these two knowledge segments, it is high likelythat they refer to the same thing. Otherwise, these two clues referto different things. Third, if they refer to the same thing, we furtherdecide whether they conflict with each other. Here, the key idea isas follows. We build two new query triples and. If one of them is true, the original two triplesare consistent with each other. Otherwise, they are inconsistent.

    In order to find the key elements, we propose to use the influencefunction w.r.t. the knowledge segment similarity [20]. The basicidea is that if we perturb a key element (e.g., change the attribute ofa node or remove a node/edge), it would have a significant impacton the overall similarity between these two knowledge segments.Let ๐พ๐‘†1 and ๐พ๐‘†2 be the two knowledge segments. We can treatthe knowledge segment as an attributed graph, where differententities have different attributes. We use random walk graph kernelwith node attribute to measure the similarity between these twoknowledge segments [20].

    Sim(๐พ๐‘†1, ๐พ๐‘†2) = ๐‘žโ€ฒร— (๐ผ โˆ’ ๐‘๐‘ร—๐ดร—)โˆ’1๐‘ร—๐‘ƒร— (1)where ๐‘žโ€ฒร— and ๐‘ร— are the stopping probability distribution andthe initial probability distribution of random walks on the productmatrix, respectively. ๐‘ร— is the combined node attribute matrixof the two knowledge segments ๐‘ร— =

    โˆ‘๐‘‘๐‘—=1 ๐‘

    ๐‘—

    1 โŠ— ๐‘๐‘—

    2 where ๐‘๐‘—๐‘–

    (๐‘– โˆˆ {1, 2}) is the diagonal matrix of the ๐‘— th column of attributematrix ๐‘๐‘– . ๐ดร— is the Kronecker product of the adjacency matricesof knowledge segments ๐ด1 and ๐ด2. 0 < ๐‘ < 1 is a parameter.

    We propose to use the influence function of Sim(๐พ๐‘†1, ๐พ๐‘†2) w.r.t.knowledge segment elements ๐œ•๐‘†๐‘–๐‘š (๐พ๐‘†1,๐พ๐‘†2)๐œ•๐‘’ , where ๐‘’ representsan element of the knowledge segment ๐พ๐‘†1 or ๐พ๐‘†2. The elementwith a high absolute influence function value is treated as a key ele-ment, and it can be a node, an edge, or a node attribute. Specifically,we consider three kinds of influence functions w.r.t. the elements in๐พ๐‘†1, including edge influence, node influence and node attribute in-fluence, which can be computed according to the following lemma.Note that the influence function w.r.t. elements in ๐พ๐‘†2 can be com-puted in a similar way, and thus is omitted for space.

    Lemma 1. (Knowledge Segment Similarity Influence Function [20].)Given Sim(๐พ๐‘†1, ๐พ๐‘†2) in Eq. (1). Let ๐‘„ = (๐ผ โˆ’ ๐‘๐‘ร—๐ดร—)โˆ’1 and ๐‘† ๐‘—,๐‘– isa single entry matrix defined in Table 2. We have that(1.) The influence of an edge ๐ด1 (๐‘–, ๐‘—) in ๐พ๐‘†1 can be calculated as๐ผ (๐ด1 (๐‘–, ๐‘—)) = ๐œ•Sim(๐พ๐‘†1,๐พ๐‘†2)๐œ•๐ด1 (๐‘–, ๐‘—) = ๐‘๐‘ž

    โ€ฒร—๐‘„๐‘ร— [(๐‘†๐‘–, ๐‘— + ๐‘† ๐‘—,๐‘– ) โŠ—๐ด2]๐‘„๐‘ร—๐‘ร—.

    (2.) The influence of a node ๐‘– in ๐พ๐‘†1 can be calculated as ๐ผ (๐‘1 (๐‘–)) =๐œ•Sim(๐พ๐‘†1,๐พ๐‘†2)

    ๐œ•๐‘1 (๐‘–) = ๐‘๐‘žโ€ฒร—๐‘„๐‘ร— [

    โˆ‘๐‘— |๐ด1 (๐‘–, ๐‘—)=1 (๐‘†

    ๐‘–, ๐‘— + ๐‘† ๐‘—,๐‘– ) โŠ— ๐ด2]๐‘„๐‘ร—๐‘ร—.

    (3.) The influence of a node attribute ๐‘— of node ๐‘– in ๐พ๐‘†1 can becalculated as ๐ผ (๐‘ ๐‘—1 (๐‘–, ๐‘–)) =

    ๐œ•Sim(๐พ๐‘†1,๐พ๐‘†2)๐œ•๐‘

    ๐‘—1 (๐‘–,๐‘–)

    = ๐‘žโ€ฒร—๐‘„ [๐‘†๐‘–,๐‘– โŠ— ๐‘๐‘—

    2] (๐ผ +๐‘๐ดร—๐‘„๐‘ร—)๐‘ร—.

    Note that according to Lemma 1, if an element only belongs to๐พ๐‘†1 or ๐พ๐‘†2, its influence function value will be 0. In order to avoidthis, we introduce a fully connected background graph to ๐พ๐‘†1 and๐พ๐‘†2, respectively. This background graph contains all the nodes in๐พ๐‘†1 and ๐พ๐‘†2, and it is disconnected with ๐พ๐‘†1 and ๐พ๐‘†2. If we treat๐พ๐‘†1 and ๐พ๐‘†2 as two documents, we can think of this backgroundgraph as the background word distribution in a language model.

    For a given knowledge segment, we flag the top 50% of theelements (e.g., node attribute, node and edge) with the highestabsolute influence function values as key elements. We would liketo check whether these key elements belong to the commonalityof the two knowledge segments. If most of them (e.g. 60% or more)belong to the commonality of these two knowledge segments, wesay the two query clues describe the same thing. Otherwise, theyrefer to different things and thus we do not need to check theinconsistency between them.

    If we determine that the query clues refer to the same thing, thenext step is to decide whether they are inconsistent with each other.That is, given query clues and , we need todecide whether o1 belongs to o2 or o2 belongs to o1. To this end, webuild two new queries and .Then, we extract the knowledge segments for these two queries,and check whether these two segments are true. If one of themis true, we say the original clues are consistent with each other,otherwise they are inconsistent. After we extract the knowledgesegments for and , we treateach knowledge segment as a directed graph, and calculate howmuch information can be transferred from the subject to the object.We define the transferred information amount as:

    infTrans(o1, o2) = max1โ‰ค ๐‘—โ‰ค๐‘˜

    pathValue( ๐‘—) (2)

    where pathValue( ๐‘—) is defined as the multiplication of the weightsin the path. For an edge, its weight is the predicate-predicate similar-ity Sim(isTypeOf, ๐‘’๐‘– ). Ifmax{infTrans(o1, o2), infTrans(o2, o1)}is larger than a threshold ๐‘‡ , then we say o1 belongs to o2 or o2belongs to o1. We set ๐‘‡ = 0.700 in our experiment.4.2 Collective Comparative ReasoningDifferent from pairwise comparative reasoning, collective compar-ative reasoning aims to find the commonality and/or inconsistencyinside a query graph which consists of a set of inter-connectededges/triples. We first give the corresponding definition below.

    Definition 4. Collective Commonality. For each edge ๐ธ๐‘„๐‘–in a

    query graph ๐‘„ , let ๐พ๐‘†๐‘– be its knowledge segment. The collective com-monality between any triple pair in the query graph is the intersectionof their knowledge segments.

    Definition 5. Collective Inconsistency. For each edge ๐ธ๐‘„๐‘–

    ina query graph ๐‘„ , let ๐พ๐‘†๐‘– be its knowledge segment. The collectiveinconsistency refers to any elements (node or edge or node attribute)in these knowledge segments that contradict with each other.

    To check the inconsistency, one naive method is using the pair-wise comparative reasoning method to check the inconsistency for

  • Online โ€™21, March 8-12, 2021, Online

    Figure 3: Collective comparative reasoning workflow.

    each pair of edges in the query graph. However, this method isneither computationally efficient nor sufficient. For the former, iftwo clues (e.g., two claims from a news article) are weakly or notrelated with each other on the query graph, we might not needto check the inconsistency between them at all. For the latter, insome subtle situation, the semantic inconsistencies could only beidentified when we collectively reason over multiple (more thantwo) knowledge segments. For example, given the following threeclaims, including (1) Obama is refused by Air Force One; (2) Obamais the president of the US; (3) The president of US is in front of ahelicopter. Only if we reason these three claims collectively, can weidentify the semantic inconsistency among them.

    Based on the above observation, we propose the followingmethodto detect the collective inconsistency. First, we find a set of keyelements inside the semantic matching subgraph. Different frompair-wise comparative reasoning, the importance/influence of anelement for collective comparative reasoning is calculated by theentire semantic matching subgraph. More specifically, we first trans-form the query graph and its semantic matching subgraph (i.e.,subgraph-specific knowledge segment) into two line graphs, whichare defined as follows.

    Definition 6. Line Graph [14]. For an arbitrary graph ๐บ =(๐‘‰ , ๐ธ), the line graph ๐ฟ(๐บ) = (๐‘‰ โ€ฒ, ๐ธ โ€ฒ) of ๐บ has the following prop-erties: (1) the node set of ๐ฟ(๐บ) is the edge set of ๐บ (๐‘‰ โ€ฒ = ๐ธ); (2) twonodes ๐‘‰ โ€ฒ

    ๐‘–, ๐‘‰ โ€ฒ๐‘—in ๐ฟ(๐บ) are adjacent if and only if the corresponding

    edges ๐‘’๐‘– , ๐‘’ ๐‘— of ๐บ are incident on the same node in ๐บ .Figure 3 gives an example of the line graph. For the line graph

    ๐ฟ(๐‘„), the edge weight is the predicate-predicate similarity of thetwo nodes it connects. For the line graph ๐ฟ(๐พ๐‘†), the edge weightis the knowledge segment similarity by Eq. (1) of the two nodes itconnects. The rationality of building these two line graphs is thatif the semantic matching subgraph is a good representation of theoriginal query graph, the edge-edge similarity in ๐ฟ(๐‘„) would besimilar to the knowledge segment similarity in ๐ฟ(๐พ๐‘†)

    To measure the importance of an element, we propose to use theinfluence function w.r.t. the distance between ๐ฟ(๐‘„) and ๐ฟ(๐พ๐‘†). Weassume that a key element, if perturbed, would have a great effecton the distance Loss = | |๐ป1 โˆ’ ๐ป2 | |2๐น , where ๐ป1 is the weightedadjacency matrix of ๐ฟ(๐‘„), and ๐ป2 is the weighted adjacency ma-trix of ๐ฟ(๐พ๐‘†). We use the influence function ๐œ•Loss(๐ป1,๐ป2)๐œ•๐‘’ , where๐‘’ represents an element of the knowledge segment graph and itcould be a node, an edge, or a node attribute. Lemma 2 providesthe details on how to compute such influence functions. We skipthe proof of Lemma 2 since it is very easy.

    Lemma 2. Given the loss function ๐ฟ๐‘œ๐‘ ๐‘  = | |๐ป1 โˆ’ ๐ป2 | |2๐น . Let ๐‘›,๐‘˜ denote two different nodes in ๐ฟ(๐‘„), and ๐พ๐‘†๐‘› , ๐พ๐‘†๐‘˜ denote theircorresponding knowledge segments. Let โ„Ž๐‘’๐‘˜,๐‘› denote the weight of

    edge between node ๐‘˜ and ๐‘›, and โ„Ž๐‘๐‘˜,๐‘› denote the weight of edgebetween ๐พ๐‘†๐‘˜ and ๐พ๐‘†๐‘› . We have(1.) The influence of an edge๐ด๐‘› (๐‘–, ๐‘—) in knowledge segment๐พ๐‘†๐‘› can becalculated as ๐ผ (๐ด๐‘› (๐‘–, ๐‘—)) =

    โˆ‘๐‘˜โˆˆ๐‘ (๐‘›) โˆ’2(โ„Ž๐‘’๐‘˜,๐‘›โˆ’โ„Ž๐‘๐‘˜,๐‘› )

    ๐œ•๐‘ ๐‘–๐‘š (๐พ๐‘†๐‘›,๐พ๐‘†๐‘˜ )๐œ•๐ด๐‘› (๐‘–, ๐‘—) .

    (2.) The influence of a node ๐‘– in knowledge segment ๐พ๐‘†๐‘› can becalculated as ๐ผ (๐‘๐‘› (๐‘–)) =

    โˆ‘๐‘˜โˆˆ๐‘ (๐‘›) โˆ’2(โ„Ž๐‘’๐‘˜,๐‘› โˆ’ โ„Ž๐‘๐‘˜,๐‘› )

    ๐œ•๐‘ ๐‘–๐‘š (๐พ๐‘†๐‘›,๐พ๐‘†๐‘˜ )๐œ•๐‘๐‘› (๐‘–) .

    (3.) The influence of a node attribute ๐‘— in knowledge segment ๐พ๐‘†๐‘› canbe calculated as ๐ผ (๐‘ ๐‘—๐‘› (๐‘–, ๐‘–)) =

    โˆ‘๐‘˜โˆˆ๐‘ (๐‘›) โˆ’2(โ„Ž๐‘’๐‘˜,๐‘›โˆ’โ„Ž๐‘๐‘˜,๐‘› )

    ๐œ•๐‘ ๐‘–๐‘š (๐พ๐‘†๐‘›,๐พ๐‘†๐‘˜ )๐œ•๐‘

    ๐‘—๐‘› (๐‘–,๐‘–)

    .

    Second, after we find all the key elements, we check the con-sistency of the semantic matching subgraph according to thesekey elements. The steps are as follows. For each pair of knowledgesegments of the semantic matching subgraph, if their key elementsoverlapping rate is greater than a threshold (60%), we check theconsistency of this pair. Suppose the corresponding triples are and , respectively. We check if or is true. If both of them are false, weskip this pair clues because this clue pair does not belong to C3 orC4. Otherwise, we check if or is true. If both of them are false, we say this query graph hascollective inconsistency. When checking the truthfulness of triples(e.g., , , and ), we use the same method (i.e., transferredinformation amount in Eq. (2)) as in pairwise comparative reason-ing.

    5 EXPERIMENTAL RESULTSIn this section, we present the experimental evaluations. All theexperiments are designed to answer the following two questions:

    โ€ข Q1. Effectiveness. How effective are the proposed reason-ing methods, including both point-wise methods (KompaRebasics) and comparative reasoning methods?

    โ€ข Q2. Efficiency. How fast are the proposed methods?We use the Yago dataset [15]. 4 It contains 12,430,705 triples,

    4,295,825 entities and 39 predicates. All the experiments are con-ducted on a moderate desktop with an Intel Core-i7 3.00GHz CPUand 64GB memory. The source code will be released upon publica-tion of the paper.

    5.1 KompaRe BasicsWe start with evaluating the effectiveness of the proposed predicateentropy. The top-10 predicates with the highest predicate entropyin Yago dataset are edited, isConnectedTo, actedIn, playsFor,dealsWith, directed, exports, isAffiliatedTo, wroteMusicForand hasNeighbor. Predicates like actedIn, playFor, hasNeighborhave a very high entropy. The reason is that these predicates notonly occur commonly in the Yago knowledge graph, but also have ahigh degree of uncertainty. It is consistent with our hypothesis thatthese predicates provide little semantic information about the enti-ties around them. On the contrary, The top-10 predicates with thelowest predicate entropy in Yago dataset are diedIn, hasGender,hasCurrency, wasBornIn, hasAcademicAdvisor, isPoliticianOf,isMarriedTo, hasCaptal, hasWebsite, and isCitizenOf. Predi-cates like diedIn, wasBornIn, isMarriedTo, isPoliticianOf have

    4It is publicly available at https://www.mpi-inf.mpg.de/departments/databases-and-information-systems/research/yago-naga.

    https://www.mpi-inf.mpg.de/departments/databases-and-information-systems/research/yago-nagahttps://www.mpi-inf.mpg.de/departments/databases-and-information-systems/research/yago-naga

  • KompaRe: A Knowledge Graph Comparative Reasoning System Online โ€™21, March 8-12, 2021, Online

    Figure 4: Node-specific knowledge segment of Barack Obama.

    a very low entropy. They provide specific and detailed backgroundinformation about the entities around them.

    Next, we evaluate the proposed predicate-predicate similarity.The top similar predicates w.r.t. exports by our method includeimports, hasOfficialLanguage, dealsWith, all of which have ahigh similarity with exports. They all provide specific semantic in-formation about exports. Likewise, the top similar predicates w.r.t.livesIn include wasBornIn, isCitizenOf, diedIn, all of whichare closely related to livesIn. These results show that the pro-posed TF-IDF based method can effectively measure the similaritybetween different predicates.

    Figure 4 shows the node-specific knowledge segment found byour method w.r.t. the query node Barack Obama. We can see thatthe extracted knowledge segment provides critical semantics of thequery node Barack Obama. For example, Barack Obama graduatedfrom Harvard Law School and Columbia University; his wife isMichelle Obama; he is affiliated to the democratic party; he was thesenator of united states and he was born in Honolulu. The resultshows that node-specific knowledge segment is able to capturesemantic context of the query node/entity.

    5.2 Pair-wise Comparative ReasoningHere, we evaluate the effectiveness of the proposed pair-wise com-parative reasoning. We first give an example to show how it works,then we evaluate it on several subsets of Yago. Consider a fakenews which says โ€œThe white house will participate in the operationmountain thrust, because the white house wants to punish the iraqiarmy." From this news, we can extract two query clues, including

    and . Figure 5 shows thesetwo corresponding knowledge segments. Table 3 shows the nodeattribute influence value of ๐พ๐‘†1 and ๐พ๐‘†2, respectively 5. We cansee from Table 3 that for ๐พ๐‘†1, the top-50% elements with the high-est node attribute influence are Washington,D.C, United StatesPresident, White House and United States. For ๐พ๐‘†2, the top-50% elements with the highest node attribute influence are WhiteHouse, Washington,D.C, and United States. Because all the im-port elements with the highest node attribute influence of ๐พ๐‘†2 alsobelong to ๐พ๐‘†1, the key elements overlapping rate for node attributeis 100%. For the top-50% elements with the highest node influence,we obtain the same result. As for the top-50% edges of ๐พ๐‘†1 with thehighest influence, there is one edge () which also belongs to the top-50% edges of๐พ๐‘†2. Therefore, the key elements overlapping rate of ๐พ๐‘†1 and ๐พ๐‘†2 is1+1+ 1

    33 =

    79 > 60%. This means that these two clues refer to the

    same thing.We further check if there is any inconsistency between them.

    To this end, we extract the knowledge segment for and . The right part of Fig-ure 5 shows the knowledge segment for . We obtain the same knowledgesegment for .The proposed TF-IDF predicate-predicate similarities between isTypeOfand happendIn, dealsWith, participatedIn, isLocatedIn are0.767, 0.697, 0.869 and 0.870, respectively. Based on that, we have inf-Trans(Operation Mountain Thrust, Iraqi Army) = infTrans(IraqiArmy, Operation Mountain Thrust) = 0.505 < 0.700. This meansthat "Operation Mountain Thrust" and "Iraqi Army" are twodifferent things. We obtain the same result for triple . Therefore, we concludethat the two given clues are inconsistent.

    We test Pair-wise comparative reasoning method on 5 querysets. Table 4 gives the details of the results. For each positive queryset, it contains a set of queries which describe the truth, while foreach negative query set, it contains a set of queries which describethe false fact. For example, in query set "Birth Place", and is a positive query pair, while and is an negative query pair. The accuracy is defined as ๐‘

    ๐‘€where ๐‘ is

    the number of queries correctly classified by pair-wise comparativereasoning and๐‘€ is the total number of queries. As we can see, theaverage accuracy of pair-wise comparative reasoning is more than85%.

    5.3 Collective Comparative ReasoningHere, we evaluate the effectiveness of the proposed collective com-parative reasoning. We first give an example to show how it works,then we evaluate it on several subsets of Yago.We test a query graphwith three edges, including , and

  • Online โ€™21, March 8-12, 2021, Online

    US PresidentWhite House

    Washington,D.C

    US ArmyisLocatedIn

    dealsWith

    participatedIn participatedIn

    Afghanistan

    hasCapital

    President

    Us Army

    Obama

    Air Forceis

    command

    Command

    Helicopter

    Command

    Command

    600M

    MaximumDistance

    Operation Mountain Thrust

    Knowledge segment 1

    Conflict

    Knowledge segment 2

    United States

    livesIn

    isLeaderOf

    US PresidentWhite House

    Washington,D.C

    isLocatedIn

    dealsWithisLocatedIn

    Iraq

    hasCapital

    Iraqi Army

    Knowledge segment 2

    United States

    livesInisPoliticianOf

    Conflict

    Operation Mountain Thrust

    US ArmyAfghanistan

    Operation Purple Haze

    Baghdad

    Iraqi Army

    United States

    Battle OfBasra

    happenedIn ParticipatedIn

    ParticipatedIn

    happenedIn

    isLocatedIn

    dealsWith

    ParticipatedIn

    ParticipatedIn

    Figure 5: Pair-wise comparative reasoning results.

    Washington,D.C

    Iraqi Army

    White House means

    punish participatedIn

    Knowledge segment 1

    Knowledge segment 2

    US President

    Washington,D.CUS Army

    dealsWith

    participatedIn participatedIn

    Afghanistan

    hasCapital

    President

    Us Army

    Obama

    is

    command

    CommandCommand

    Command

    600MMaximumDistance Operation Mountain Thrust

    Knowledge segment 3Knowledge segment 2

    United States

    livesInisLeaderOf

    US PresidentWhite House

    Washington,D.C

    isLocatedIn

    dealsWithisLocatedIn

    Iraq

    hasCapital

    Iraqi Army

    Knowledge segment 1

    United States

    livesInisPoliticianOf

    isLocatedIn

    Operation Mountain ThrustSecond_inauguration_of_

    Ronald_Reagan

    White House Washington,D.C

    Figure 6: Collective comparative reasoning results.

    Table 5: Accuracy of collective comparative reasoning.Yago Dataset Positive Negative

    Query Category # of Queries Accuracy # of Queries AccuracyBirth Place 375 0.838 52 0.902Citizenship 486 0.798 92 0.861

    Graduated College 497 0.711 56 0.882

    participatedIn, Operation Mountain Thrust>. Figure 6 showsthe query graph and the corresponding semantic matching sub-graph. As we can see, if we use the pair-wise comparative reasoningmethod to check each pair of them, all of them are true, becausenone of them belong to C3 or C4. However, if we use the collectivecomparative reasoning method, we could detect the inconsistencyin the query graph as follows.

    If we check each pair of clues in the query graph, we find thatthe key elements overlapping rate between ๐พ๐‘†1 and ๐พ๐‘†3 is morethan 60%. This is because the overlapping rates are 66.6% for nodeattribute influence, 100% for node influence and 66.6% for edgeinfluence, which give the average overlapping rate

    23+1+ 2

    33 > 60%.

    Based on this, we future check or .Our TF-IDF based predicate-predicate similarity between "isTypeOf"and "isLocatedIn" is 0.870. Thus, we have infTrans(Washington,D.C,White House) = 0.870 > 0.700. This means that these two knowl-edge segments have the same subject. Finally, we check or . According to the results in theprevious subsection, we have that Iraqi Army and OperationMountain Thrust are two different things. Therefore, we concludethat this query graph is inconsistent.

    We test collective comparative reasoning method on 3 querysets. Table 5 gives the details of the results. Different from thequeries of pair-wise comparative reasoning which only containtwo edges, each query of collective comparative reasoning contains3 edges. For example, in query set "Birth Place", , and is a positive query triad, while, and is an negative querytriad. The definition of the accuracy is the same as the previous sec-tion. As we can see, the average accuracy of collective comparativereasoning is more than 82%.

    (a) Subgraph-specific KS extraction (b) Comparative reasoningFigure 7: Runtime of KompaRe

    5.4 KompaRe EfficiencyThe runtime of knowledge segment extraction depends on the sizeof the underlying knowledge graphs. Among the three types ofknowledge segments (f1, f2 and f3 in Table 1), subgraph-specificknowledge segment (f3) is most time-consuming. Figure 7(a) showsthat its runtime scales near-linearly w.r.t. the number of nodes in theknowledge graph. Figure 7(b) shows the runtime of comparativereasoning, where โ€˜Pair-wiseโ€™ refers to the pairwise comparativereasoning, and the remaining bars are for collective comparativereasoning with 3, 4 and 5 edges in the query graphs respectively.Notice that the runtime of comparative reasoning only dependson the size of the the corresponding knowledge segments whichtypically have a few or a few tens of nodes. In other words, theruntime of comparative reasoning is independent of the knowledgegraph size. If the query has been searched before, the runtime isless than 0.5 second. 6

    6 CONCLUSIONSIn this paper, we present a prototype system (KompaRe) for knowl-edge graph comparative reasoning. KompaRe aims to complementand expand the existing point-wise reasoning over knowledgegraphs by inferring commonalities and inconsistencies of multiplepieces of clues. The developed prototype system consists of threemajor components, including its UI, online reasoning and offlinemining. At the heart of the proposed KompaRe are a suite of corealgorithms, including predicate entropy, predicate-predicate sim-ilarity and semantic subgraph matching for knowledge segmentextraction; and influence function, commonality rate, transferredinformation amount for both pairwise reasoning and collective rea-soning. The experimental results demonstrate that the developedKompaRe (1) can effectively detect semantic inconsistency, and (2)scales near linearly with respect to the knowledge graph size.

    6The system was deployed in May 2020.

  • KompaRe: A Knowledge Graph Comparative Reasoning System Online โ€™21, March 8-12, 2021, Online

    REFERENCES[1] R. Andersen, F. Chung, and K. Lang. 2006. In 2006 47th Annual IEEE FOCS 06

    (FOCS โ€™06). 475โ€“486.[2] B. Antoine, U. Nicolas, G. Alberto, W Jason, and Y. Oksana. [n.d.]. Translating

    Embeddings for Modeling Multi-relational Data. In NIPS โ€™13. 2787โ€“2795.[3] X. Chen, S. Jia, and Y. Xiang. 2020. A review: Knowledge reasoning over knowl-

    edge graph. Expert Systems with Applications 141 (2020), 112948.[4] Limeng Cui, Suhang Wang, and Dongwon Lee. 2019. SAME : Sentiment-Aware

    Multi-Modal Embedding for Detecting Fake News.[5] C. Faloutsos, K. McCurley, and A. Tomkins. 2004. Fast Discovery of Connection

    Subgraphs. In KDD โ€™04. ACM, New York, NY, USA, 118โ€“127.[6] Y. Fang, K. Kuan, J. Lin, C. Tan, and V. Chandrasekhar. 2017. Object Detection

    Meets Knowledge Graphs (IJCAI-17). https://doi.org/10.24963/ijcai.2017/230[7] S. Freitas, N. Cao, Y. Xia, D. H. P. Chau, and H. Tong. 2018. Local Partition in Rich

    Graphs (BigData โ€™19). 1001โ€“1008. https://doi.org/10.1109/BigData.2018.8622227[8] C. Giovanni, S. Prashant, R. Luis, B. Johan, M. Filippo, and F. Alessandro. 2015.

    Computational Fact Checking from Knowledge Networks. PloS one 10 (01 2015).[9] S. Hu, L. Zou, J. X. Yu, H. Wang, and D. Zhao. 2018. Answering Natural Language

    Questions by Subgraph Matching over Knowledge Graphs. 30, 5 (May 2018).[10] S. Mehran Kazemi and P. David. 2018. SimplE Embedding for Link Prediction in

    Knowledge Graphs. In Advances in Neural Information Processing Systems 31.[11] Y. Koren, S. North, and C. Volinsky. 2006. Measuring and Extracting Proximity

    in Networks (KDD โ€™06). ACM, New York, NY, USA, 245โ€“255.[12] L. Liu, B. Du, and H. Tong. 2019. GFinder: Approximate Attributed Subgraph

    Matching (BigData โ€™19).[13] H. Naeemul, A. Fatma, and C. Li. 2017. Toward Automated Fact-Checking:

    Detecting Check-Worthy Factual Claims by ClaimBuster (KDD โ€™17). 10.[14] Prashant S, Alessandro F, Filippo M, and Giovanni C. 2017. Finding Streams in

    Knowledge Graphs to Support Fact Checking. 859โ€“864.[15] Fabian M. Suchanek, Gjergji Kasneci, and Gerhard Weikum. 2007. Yago: A Core

    of Semantic Knowledge (WWW โ€™07). Association for Computing Machinery, 10.[16] Hanghang Tong and Christos Faloutsos. 2006. Center-piece Subgraphs: Problem

    Definition and Fast Solutions (KDD โ€™06). ACM, New York, NY, USA, 404โ€“413.[17] Z. Wang, K. Zhao, H. Wang, X. Meng, and J. Wen. 2015. Query Understanding

    ThroughKnowledge-based Conceptualization (IJCAIโ€™15). AAAI Press, 3264โ€“3270.[18] S Yoo and O Jeong. 2020. Automating the expansion of a knowledge graph. Expert

    Systems with Applications 141 (2020), 112965.[19] F. Zhang, J. Yuan, D. Lian, X. Xie, and W. Ma. 2016. Collaborative Knowledge

    Base Embedding for Recommender Systems (KDD โ€™16). ACM, 353โ€“362.[20] Q. Zhou, L. Li, N. Cao, L. Ying, and H. Tong. 2019. adversarial attacks on multi-

    network mining: problem definition and fast solutions (ICDM โ€™19).

    https://doi.org/10.24963/ijcai.2017/230https://doi.org/10.1109/BigData.2018.8622227

    Abstract1 Introduction2 KompaRe Overview3 KompaRe Basics3.1 Node-specific Knowledge Segment3.2 Edge-specific Knowledge Segment3.3 Subgraph-specific Knowledge Segment

    4 KompaRe Comparative Reasoning4.1 Pairwise Comparative Reasoning4.2 Collective Comparative Reasoning

    5 Experimental Results5.1 KompaRe Basics5.2 Pair-wise Comparative Reasoning5.3 Collective Comparative Reasoning5.4 KompaRe Efficiency

    6 ConclusionsReferences