Context-Free Path Querying by Matrix Multiplication

07/04/2017 ∙ by Rustam Azimov, et al. ∙ JetBrains 0

Graph data models are widely used in many areas, for example, bioinformatics, graph databases. In these areas, it is often required to process queries for large graphs. Some of the most common graph queries are navigational queries. The result of query evaluation is a set of implicit relations between nodes of the graph, i.e. paths in the graph. A natural way to specify these relations is by specifying paths using formal grammars over the alphabet of edge labels. An answer to a context-free path query in this approach is usually a set of triples (A, m, n) such that there is a path from the node m to the node n, whose labeling is derived from a non-terminal A of the given context-free grammar. This type of queries is evaluated using the relational query semantics. Another example of path query semantics is the single-path query semantics which requires presenting a single path from the node m to the node n, whose labeling is derived from a non-terminal A for all triples (A, m, n) evaluated using the relational query semantics. There is a number of algorithms for query evaluation which use these semantics but all of them perform poorly on large graphs. One of the most common technique for efficient big data processing is the use of a graphics processing unit (GPU) to perform computations, but these algorithms do not allow to use this technique efficiently. In this paper, we show how the context-free path query evaluation using these query semantics can be reduced to the calculation of the matrix transitive closure. Also, we propose an algorithm for context-free path query evaluation which uses relational query semantics and is based on matrix operations that make it possible to speed up computations by using a GPU.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1. Introduction

Graph data models are widely used in many areas, for example, bioinformatics (Anderson et al., 2013), graph databases (Mendelzon and Wood, 1995). In these areas, it is often required to process queries for large graphs. The most common among graph queries are navigational queries. The result of query evaluation is a set of implicit relations between nodes of the graph, i.e. paths in the graph. A natural way to specify these relations is by specifying paths using formal grammars (regular expressions, context-free grammars) over the alphabet of edge labels. Context-free grammars are actively used in graphs queries because of the limited expressive power of regular expressions.

The result of context-free path query evaluation is usually a set of triples such that there is a path from the node to the node , whose labeling is derived from a non-terminal of the given context-free grammar. This type of query is evaluated using the relational query semantics (Hellings, 2014). Another example of path query semantics is the single-path query semantics (Hellings, 2015) which requires presenting a single path from the node to the node whose labeling is derived from a non-terminal for all triples evaluated using the relational query semantics. There is a number of algorithms for context-free path query evaluation using these semantics (Grigorev and Ragozina, 2016; Hellings, 2014; Zhang et al., 2016; Sevon and Eronen, 2008).

Existing algorithms for context-free path query evaluation w.r.t. these semantics demonstrate poor performance when applied to big data. One of the most common technique for efficient big data processing is GPGPU (General-Purpose computing on Graphics Processing Units), but these algorithms do not allow to use this technique efficiently. The algorithms for context-free language recognition had a similar problem until Valiant (Valiant, 1975) proposed a parsing algorithm which computes a recognition table by computing matrix transitive closure. Thus, the active use of matrix operations (such as matrix multiplication) in the process of a transitive closure computation makes it possible to efficiently apply GPGPU computing techniques (Che et al., 2016).

We address the problem of creating an algorithm for context-free path query evaluation using the relational and the single-path query semantics which allows us to speed up computations with GPGPU by using the matrix operations.

The main contribution of this paper can be summarized as follows:

  • We show how the context-free path query evaluation w.r.t. the relational and the single-path query semantics can be reduced to the calculation of matrix transitive closure.

  • We introduce an algorithm for context-free path query evaluation w.r.t. the relational query semantics which is based on matrix operations that make it possible to speed up computations by means of GPGPU.

  • We provide a formal proof of correctness of the proposed algorithm.

  • We show the practical applicability of the proposed algorithm by running different implementations of our algorithm on real-world data.

2. Preliminaries

In this section, we introduce the basic notions used throughout the paper.

Let be a finite set of edge labels. Define an edge-labeled directed graph as a tuple with a set of nodes and a directed edge-relation . For a path in a graph , we denote the unique word obtained by concatenating the labels of the edges along the path as . Also, we write to indicate that a path starts at the node and ends at the node .

Following Hellings (Hellings, 2014), we deviate from the usual definition of a context-free grammar in Chomsky Normal Form (Chomsky, 1959) by not including a special starting non-terminal, which will be specified in the path queries to the graph. Since every context-free grammar can be transformed into an equivalent one in Chomsky Normal Form and checking that an empty string is in the language is trivial it is sufficient to consider only grammars of the following type. A context-free grammar is a triple , where is a finite set of non-terminals, is a finite set of terminals, and is a finite set of productions of the following forms:

  • , for ,

  • , for and .

Note that we omit the rules of the form , where denotes an empty string. This does not restrict the applicability of our algorithm because only the empty paths correspond to an empty string .

We use the conventional notation to denote that a string can be derived from a non-terminal by some sequence of applications of the production rules from . The language of a grammar with respect to a start non-terminal is defined by

For a given graph and a context-free grammar , we define context-free relations , for every , such that

We define a binary operation on arbitrary subsets of with respect to a context-free grammar as

Using this binary operation as a multiplication of subsets of and union of sets as an addition, we can define a matrix multiplication, , where and are matrices of a suitable size that have subsets of as elements, as

According to Valiant (Valiant, 1975), we define the transitive closure of a square matrix as where and

We enumerate the positions in the input string of Valiant’s algorithm from 0 to the length of . Valiant proposes the algorithm for computing this transitive closure only for upper triangular matrices, which is sufficient since for Valiant’s algorithm the input is essentially a directed chain and for all possible paths in a directed chain . In the context-free path querying input graphs can be arbitrary. For this reason, we introduce an algorithm for computing the transitive closure of an arbitrary square matrix.

For the convenience of further reasoning, we introduce another definition of the transitive closure of an arbitrary square matrix as where and

To show the equivalence of these two definitions of transitive closure, we introduce the partial order on matrices with the fixed size which have subsets of as elements. For square matrices of the same size, we denote iff , for every . For these two definitions of transitive closure, the following lemmas and theorem hold.

Lemma 2.1 ().

Let be a grammar, let be a square matrix. Then for any .

Proof.

(Proof by Induction)

Basis: The statement of the lemma holds for , since

Inductive step: Assume that the statement of the lemma holds for any and show that it also holds for where . For any

Hence, by the inductive hypothesis, for any

Let . The following holds

since and . By the definition,

and from this it follows that

By the definition,

and this completes the proof of the lemma. ∎

Lemma 2.2 ().

Let be a grammar, let be a square matrix. Then for any there is , such that .

Proof.

(Proof by Induction)

Basis: For there is , such that

Thus, the statement of the lemma holds for .

Inductive step: Assume that the statement of the lemma holds for any and show that it also holds for where . By the inductive hypothesis, there is , such that

By the definition,

and from this it follows that

The following holds

since

and

Therefore there is , such that

and this completes the proof of the lemma. ∎

Theorem 1 ().

Let be a grammar, let be a square matrix. Then .

Proof.

By the lemma 2.1, for any , . Therefore

By the lemma 2.2, for any there is , such that

Hence

for any . Therefore

Since and ,

and this completes the proof of the theorem. ∎

Further, in this paper, we use the transitive closure instead of and, by the theorem 1, an algorithm for computing also computes Valiant’s transitive closure .

3. Related works

Problems in many areas can be reduced to one of the formal-languages-constrained path problems (Barrett et al., 2000). For example, various problems of static code analysis (Bastani et al., 2015; Xu et al., 2009) can be formulated in terms of the context-free language reachability (Reps, 1998) or in terms of the linear conjunctive language reachability (Zhang and Su, 2017).

One of the well-known problems in the area of graph database analysis is the language-constrained path querying. For example, the regular language constrained path querying (Reutter et al., 2017; Fan et al., 2011; Abiteboul and Vianu, 1997; Nolé and Sartiani, 2016), and the context-free language constrained path querying.

There are a number of solutions (Hellings, 2014; Sevon and Eronen, 2008; Zhang et al., 2016) for context-free path query evaluation w.r.t. the relational query semantics, which employ such parsing algorithms as CYK (Kasami, 1965; Younger, 1967) or Earley (Grune and Jacobs, 2006). Other examples of path query semantics are single-path and all-path query semantics. The all-path query semantics requires presenting all possible paths from node to node whose labeling is derived from a non-terminal for all triples evaluated using the relational query semantics. Hellings (Hellings, 2015) presented algorithms for the context-free path query evaluation using the single-path and the all-path query semantics. If a context-free path query w.r.t. the all-path query semantics is evaluated on cyclic graphs, then the query result can be an infinite set of paths. For this reason, in (Hellings, 2015), annotated grammars are proposed as a possible solution.

In (Grigorev and Ragozina, 2016), the algorithm for context-free path query evaluation w.r.t. the all-path query semantics is proposed. This algorithm is based on the generalized top-down parsing algorithm — GLL (Scott and Johnstone, 2010). This solution uses derivation trees for the result representation which is more native for grammar-based analysis. The algorithms in (Grigorev and Ragozina, 2016; Hellings, 2015) for the context-free path query evaluation w.r.t. the all-path query semantics can also be used for query evaluation using the relational and the single-path semantics.

Our work is inspired by Valiant (Valiant, 1975), who proposed an algorithm for general context-free recognition in less than cubic time. This algorithm computes the same parsing table as the CYK algorithm but does this by offloading the most intensive computations into calls to a Boolean matrix multiplication procedure. This approach not only provides an asymptotically more efficient algorithm but it also allows us to effectively apply GPGPU computing techniques. Valiant’s algorithm computes the transitive closure of a square upper triangular matrix . Valiant also showed that the matrix multiplication operation is essentially the same as Boolean matrix multiplications, where is the number of non-terminals of the given context-free grammar in Chomsky normal form.

Hellings (Hellings, 2014) presented an algorithm for the context-free path query evaluation using the relational query semantics. According to Hellings, for a given graph and a grammar the context-free path query evaluation w.r.t. the relational query semantics reduces to a calculation of the context-free relations . Thus, in this paper, we focus on the calculation of these context-free relations. Also, Hellings (Hellings, 2014) presented an algorithm for the context-free path query evaluation using the single-path query semantics which evaluates paths of minimal length for all triples , but also noted that the length of these paths is not necessarily upper bounded. Thus, in this paper, we evaluate an arbitrary path for all triples .

Yannakakis (Yannakakis, 1990) analyzed the reducibility of various path querying problems to the calculation of the transitive closure. He formulated a problem of Valiant’s technique generalization to the context-free path query evaluation w.r.t. the relational query semantics. Also, he assumed that this technique cannot be generalized for arbitrary graphs, though it does for acyclic graphs.

Thus, the possibility of reducing the context-free path query evaluation using the relational and the single-path query semantics to the calculation of the transitive closure is an open problem.

4. Context-free path querying by the calculation of transitive closure

In this section, we show how the context-free path query evaluation using the relational query semantics can be reduced to the calculation of matrix transitive closure , prove the correctness of this reduction, introduce an algorithm for computing the transitive closure , and provide a step-by-step demonstration of this algorithm on a small example.

4.1. Reducing context-free path querying to transitive closure

In this section, we show how the context-free relations can be calculated by computing the transitive closure .

Let be a grammar and be a graph. We enumerate the nodes of the graph from 0 to . We initialize the elements of the matrix with . Further, for every and we set

Finally, we compute the transitive closure

where

for and . For the transitive closure , the following statements hold.

Lemma 4.1 ().

Let be a graph, let be a grammar. Then for any and for any non-terminal , iff and , such that there is a derivation tree of the height for the string and a context-free grammar .

Proof.

(Proof by Induction)

Basis: Show that the statement of the lemma holds for . For any and for any non-terminal , iff there is that consists of a unique edge from the node to the node and where . Therefore and there is a derivation tree of the height , shown in Figure 1, for the string and a context-free grammar . Thus, it has been shown that the statement of the lemma holds for .

Figure 1. The derivation tree of the height for the string .

Inductive step: Assume that the statement of the lemma holds for any and show that it also holds for where . For any and for any non-terminal ,

since

Let . By the inductive hypothesis, iff and there exists , such that there is a derivation tree of the height for the string and a context-free grammar . The statement of the lemma holds for since the height of this tree is also less than or equal to .

Let . By the definition of the binary operation on arbitrary subsets, iff there are , and , such that . Hence, by the inductive hypothesis, there are and , such that and , and there are the derivation trees and of heights and for the strings , and the context-free grammars , respectively. Thus, the concatenation of paths and is , where and there is a derivation tree of the height , shown in Figure 2, for the string and a context-free grammar .

Figure 2. The derivation tree of the height for the string , where and are the derivation trees for strings and respectively.

The statement of the lemma holds for since the height . This completes the proof of the lemma. ∎

Theorem 2 ().

Let be a graph and let be a grammar. Then for any and for any non-terminal , iff .

Proof.

Since the matrix for any and for any non-terminal , iff there is , such that . By the lemma 4.1, iff and there is , such that there is a derivation tree of the height for the string and a context-free grammar . This completes the proof of the theorem. ∎

We can, therefore, determine whether by asking whether . Thus, we show how the context-free relations can be calculated by computing the transitive closure of the matrix .

4.2. The algorithm

In this section, we introduce an algorithm for calculating the transitive closure which was discussed in Section 4.1.

Let be the input graph and be the input grammar.

1:function contextFreePathQuerying(D, G)
2:   the number of nodes in
3:   the directed edge-relation from
4:   the set of production rules in
5:   the matrix in which each element is
6:  for all  do Matrix initialization
7:      
8:  while matrix is changing do
9:    Transitive closure calculation   
10:  return
Algorithm 1 Context-free recognizer for graphs

Note that the matrix initialization in lines 6-7 of the Algorithm 1 can handle arbitrary graph . For example, if a graph contains multiple edges and then both the elements of the set and the elements of the set will be added to .

We need to show that the Algorithm 1 terminates in a finite number of steps. Since each element of the matrix contains no more than non-terminals, the total number of non-terminals in the matrix does not exceed . Therefore, the following theorem holds.

Theorem 3 ().

Let be a graph and let be a grammar. The Algorithm 1 terminates in a finite number of steps.

Proof.

It is sufficient to show, that the operation in the line 9 of the Algorithm 1 changes the matrix only finite number of times. Since this operation can only add non-terminals to some elements of the matrix , but not remove them, it can change the matrix no more than times. ∎

Denote the number of elementary operations executed by the algorithm of multiplying two Boolean matrices as . According to Valiant, the matrix multiplication operation in the line 9 of the Algorithm 1 can be calculated in . Denote the number of elementary operations executed by the matrix union operation of two Boolean matrices as . Similarly, it can be shown that the matrix union operation in the line 9 of the Algorithm 1 can be calculated in . Since the line 9 of the Algorithm 1 is executed no more than times, the following theorem holds.

Theorem 4 ().

Let be a graph and let be a grammar. The Algorithm 1 calculates the transitive closure in .

4.3. An example

In this section, we provide a step-by-step demonstration of the proposed algorithm. For this, we consider the classical same-generation query (Abiteboul et al., 1995).

The example query is based on the context-free grammar where:

  • The set of non-terminals .

  • The set of terminals

  • The set of production rules is presented in Figure 3.

Figure 3. Production rules for the example query grammar.

Since the proposed algorithm processes only grammars in Chomsky normal form, we first transform the grammar into an equivalent grammar in normal form, where:

  • The set of non-terminals .

  • The set of terminals

  • The set of production rules is presented in Figure 4.

Figure 4. Production rules for the example query grammar in normal form.

We run the query on a graph presented in Figure 5.

Figure 5. An input graph for the example query.

We provide a step-by-step demonstration of the work with the given graph and grammar of the Algorithm 1. After the matrix initialization in lines 6-7 of the Algorithm 1, we have a matrix presented in Figure 6.

Figure 6. The initial matrix for the example query.

Let be the matrix obtained after executing the loop in lines 8-9 of the Algorithm 1 times. The calculation of the matrix is shown in Figure 7.

Figure 7. The first iteration of computing the transitive closure for the example query.

When the algorithm at some iteration finds new paths in the graph , then it adds corresponding nonterminals to the matrix . For example, after the first loop iteration, non-terminal is added to the matrix . This non-terminal is added to the element with a row index and a column index . This means that there is (a path from the node 1 to the node 2), such that . For example, such a path consists of two edges with labels and , and thus .

The calculation of the transitive closure is completed after iterations when a fixpoint is reached: . For the example query, since . The remaining iterations of computing the transitive closure are presented in Figure 8.

Figure 8. Remaining states of the matrix .

Thus, the result of the Algorithm 1 for the example query is the matrix . Now, after constructing the transitive closure, we can construct the context-free relations . These relations for each non-terminal of the grammar are presented in Figure 9.

Figure 9. Context-free relations for the example query.

By the context-free relation , we can conclude that there are paths in a graph only from the node 0 to the node 0, from the node 0 to the node 2 or from the node 1 to the node 2, corresponding to the context-free grammar . This conclusion is based on the fact that a grammar is equivalent to the grammar and .

5. Context-free path querying using single-path semantics

In this section, we show how the context-free path query evaluation using the single-path query semantics can be reduced to the calculation of matrix transitive closure and prove the correctness of this reduction.

At the first step, we show how the calculation of matrix transitive closure which was discussed in Section 4.1 can be modified to compute the length of some path for all , such that . This is sufficient to solve the problem of context-free path query evaluation using the single-path query semantics since the required path of a fixed length from the node to the node can be found by a simple search and checking whether the labels of this path form a string which can be derived from a non-terminal .

Let be a grammar and be a graph. We enumerate the nodes of the graph from 0 to . We initialize the matrix with . We associate each non-terminal in matrix with the corresponding path length. For convenience, each nonterminal in the is represented as a pair where is an associated path length. For every and we set

since initially all path lengths are equal to . Finally, we compute the transitive closure and if non-terminal is added to by using the production rule where , , then the path length associated with non-terminal is calculated as . Therefore . Note that if some non-terminal with an associated path length is in , then the non-terminal is not added to the with an associated path length for all and . For the transitive closure , the following statements hold.

Lemma 5.1 ().

Let be a graph, let be a grammar. Then for any and for any non-terminal , if , then there is , such that and the length of is equal to .

Proof.

(Proof by Induction)

Basis: Show that the statement of the lemma holds for . For any and for any non-terminal , iff and there is that consists of a unique edge from the node to the node and where . Therefore there is , such that and the length of is equal to . Thus, it has been shown that the statement of the lemma holds for .

Inductive step: Assume that the statement of the lemma holds for any and show that it also holds for where . For any and for any non-terminal , iff or since

Let . By the inductive hypothesis, there is , such that and the length of is equal to . Therefore the statement of the lemma holds for .

Let . By the definition, iff there are , and , such that and . Hence, by the inductive hypothesis, there are and , such that

where the length of is equal to and the length of is equal to . Thus, the concatenation of paths and is , where and the length of is equal to . Therefore the statement of the lemma holds for and this completes the proof of the lemma. ∎

Theorem 5 ().

Let be a graph and let be a grammar. Then for any and for any non-terminal , if , then there is , such that and the length of is equal to .

Proof.

Since the matrix , for any and for any non-terminal , if , then there is , such that . By the lemma 5.1, if , then there is , such that and the length of is equal to . This completes the proof of the theorem. ∎

By the theorem 2, we can determine whether by asking whether for some . By the theorem 5, there is , such that and the length of is equal to . Therefore, we can find such a path of the length from the node to the node by a simple search. Thus, we show how the context-free path query evaluation using the single-path query semantics can be reduced to the calculation of matrix transitive closure . Note that the time complexity of the algorithm for context-free path querying w.r.t. the single-path semantics no longer depends on the Boolean matrix multiplications since we modify the matrix representation and operations on the matrix elements.

6. Evaluation

In this paper, we do not estimate the practical value of the algorithm for the context-free path querying w.r.t. the single-path query semantics, since this algorithm depends significant on the implementation of the path searching. To show the practical applicability of the algorithm for context-free path querying w.r.t. the relational query semantics, we implement this algorithm using a variety of optimizations and apply these implementations to the navigation query problem for a dataset of popular ontologies taken from 

(Zhang et al., 2016). We also compare the performance of our implementations with existing analogs from (Grigorev and Ragozina, 2016; Zhang et al., 2016). These analogs use more complex algorithms, while our algorithm uses only simple matrix operations.

Since our algorithm works with graphs, each RDF file from a dataset was converted to an edge-labeled directed graph as follows. For each triple from an RDF file, we added edges and to the graph. We also constructed synthetic graphs , and , simply repeating the existing graphs.

All tests were run on a PC with the following characteristics:

  • OS: Microsoft Windows 10 Pro

  • System Type: x64-based PC

  • CPU: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz, 3601 Mhz, 4 Core(s), 4 Logical Processor(s)

  • RAM: 16 GB

  • GPU: NVIDIA GeForce GTX 1070

    • CUDA Cores: 1920

    • Core clock: 1556 MHz

    • Memory data rate: 8008 MHz

    • Memory interface: 256-bit

    • Memory bandwidth: 256.26 GB/s

    • Dedicated video memory: 8192 MB GDDR5

We denote the implementation of the algorithm from a paper (Grigorev and Ragozina, 2016) as . The algorithm presented in this paper is implemented in F# programming language (Syme et al., 2012) and is available on GitHub111GitHub repository of the YaccConstructor project: https://github.com/YaccConstructor/YaccConstructor.. We denote our implementations of the proposed algorithm as follows:

  • dGPU (dense GPU) — an implementation using row-major order for general matrix representation and a GPU for matrix operations calculation. For calculations of matrix operations on a GPU, we use a wrapper for the CUBLAS library from the managedCuda222GitHub repository of the managedCuda library: https://kunzmi.github.io/managedCuda/. library.

  • sCPU (sparse CPU) — an implementation using CSR format for sparse matrix representation and a CPU for matrix operations calculation. For sparse matrix representation in CSR format, we use the Math.Net Numerics333The Math.Net Numerics WebSite: https://numerics.mathdotnet.com/. package.

  • sGPU (sparse GPU) — an implementation using the CSR format for sparse matrix representation and a GPU for matrix operations calculation. For calculations of the matrix operations on a GPU, where matrices represented in a CSR format, we use a wrapper for the CUSPARSE library from the managedCuda library.

We omit performance on graphs , and since a dense matrix representation leads to a significant performance degradation with the graph size growth.

We evaluate two classical same-generation queries (Abiteboul et al., 1995) which, for example, are applicable in bioinformatics.

Query 1 is based on the grammar for retrieving concepts on the same layer, where:

  • The grammar .

  • The set of non-terminals .

  • The set of terminals

  • The set of production rules is presented in Figure 10.

Figure 10. Production rules for the query 1 grammar.
Ontology #triples #results GLL(ms) dGPU(ms) sCPU(ms) sGPU(ms)
skos 252 810 10 56 14 12
generations 273 2164 19 62 20 13
travel 277 2499 24 69 22 30
univ-bench 293 2540 25 81 25 15
atom-primitive 425 15454 255 190 92 22
biomedical-measure-primitive 459 15156 261 266 113 20
foaf 631 4118 39 154 48 9
people-pets 640 9472 89 392 142 32
funding 1086 17634 212 1410 447 36
wine 1839 66572 819 2047 797 54
pizza 1980 56195 697 1104 430 24
8688 141072 1926 26957 82
14712 532576 6246 46809 185
15840 449560 7014 24967 127
Table 1. Evaluation results for Query 1
Ontology #triples #results GLL(ms) dGPU(ms) sCPU(ms) sGPU(ms)
skos 252 1 1 10 2 1
generations 273 0 1 9 2 0
travel 277 63 1 31 7 10
univ-bench 293 81 11 55 15 9
atom-primitive 425 122 66 36 9 2
biomedical-measure-primitive 459 2871 45 276 91 24
foaf 631 10 2 53 14 3
people-pets 640 37 3 144 38 6
funding 1086 1158 23 1246 344 27
wine 1839 133 8 722 179 6
pizza 1980 1262 29 943 258 23
8688 9264 167 21115 38
14712 1064 46 10874 21
15840 10096 393 15736 40
Table 2. Evaluation results for Query 2

The grammar is transformed into an equivalent grammar in normal form, which is necessary for our algorithm. This transformation is the same as in Section 4.3. Let be a context-free relation for a start non-terminal in the transformed grammar.

The result of query 1 evaluation is presented in Table 1, where #triples is a number of triples in an RDF file, and #results is a number of pairs in the context-free relation . We can determine whether by asking whether , where is a transitive closure calculated by the proposed algorithm. All implementations in Table 1 have the same #results and demonstrate up to 1000 times better performance as compared to the algorithm presented in (Zhang et al., 2016) for . Our implementation demonstrates a better performance than . We also can conclude that acceleration from the increases with the graph size growth.

Query 2 is based on the grammar for retrieving concepts on the adjacent layers, where:

  • The grammar