Table of Contents
Fetching ...

Efficient and Scalable Neural Symbolic Search for Knowledge Graph Complex Query Answering

Weizhi Fei, Zihao Wang, hang Yin, Shukai Zhao, Wei Zhang, Yangqiu Song

TL;DR

This work tackles complex query answering over incomplete knowledge graphs by addressing both data-scale and NP-hard cyclic-query challenges. It introduces NLISA, a neural-symbolic framework that uses Neural Logical Indices to prune variable domains and an approximate, parallelizable local-search strategy to handle cyclic EFO1 queries, achieving quadratic rather than exponential complexity in practice. Key contributions include local and global constraint strategies for efficient neural indexing and a two-stage coarse-to-fine ranking for global constraints, yielding up to ~90% reduction in search domain and substantial runtime speedups (e.g., up to ~13x) with minimal accuracy loss, scalable to KG sizes reaching 400k entities. Empirical results on BetaE, Real EFO1, and Smore demonstrate strong performance against state-of-the-art symbolic and embedding-based baselines, particularly for cyclic queries and large-scale graphs, highlighting the practical impact for real-world knowledge graph reasoning.

Abstract

Complex Query Answering (CQA) aims to retrieve answer sets for complex logical formulas from incomplete knowledge graphs, which is a crucial yet challenging task in knowledge graph reasoning. While neuro-symbolic search utilized neural link predictions achieve superior accuracy, they encounter significant complexity bottlenecks: (i) Data complexity typically scales quadratically with the number of entities in the knowledge graph, and (ii) Query complexity becomes NP-hard for cyclic queries. Consequently, these approaches struggle to effectively scale to larger knowledge graphs and more complex queries. To address these challenges, we propose an efficient and scalable symbolic search framework. First, we propose two constraint strategies to compute neural logical indices to reduce the domain of variables, thereby decreasing the data complexity of symbolic search. Additionally, we introduce an approximate algorithm based on local search to tackle the NP query complexity of cyclic queries. Experiments on various CQA benchmarks demonstrate that our framework reduces the computational load of symbolic methods by 90\% while maintaining nearly the same performance, thus alleviating both efficiency and scalability issues.

Efficient and Scalable Neural Symbolic Search for Knowledge Graph Complex Query Answering

TL;DR

This work tackles complex query answering over incomplete knowledge graphs by addressing both data-scale and NP-hard cyclic-query challenges. It introduces NLISA, a neural-symbolic framework that uses Neural Logical Indices to prune variable domains and an approximate, parallelizable local-search strategy to handle cyclic EFO1 queries, achieving quadratic rather than exponential complexity in practice. Key contributions include local and global constraint strategies for efficient neural indexing and a two-stage coarse-to-fine ranking for global constraints, yielding up to ~90% reduction in search domain and substantial runtime speedups (e.g., up to ~13x) with minimal accuracy loss, scalable to KG sizes reaching 400k entities. Empirical results on BetaE, Real EFO1, and Smore demonstrate strong performance against state-of-the-art symbolic and embedding-based baselines, particularly for cyclic queries and large-scale graphs, highlighting the practical impact for real-world knowledge graph reasoning.

Abstract

Complex Query Answering (CQA) aims to retrieve answer sets for complex logical formulas from incomplete knowledge graphs, which is a crucial yet challenging task in knowledge graph reasoning. While neuro-symbolic search utilized neural link predictions achieve superior accuracy, they encounter significant complexity bottlenecks: (i) Data complexity typically scales quadratically with the number of entities in the knowledge graph, and (ii) Query complexity becomes NP-hard for cyclic queries. Consequently, these approaches struggle to effectively scale to larger knowledge graphs and more complex queries. To address these challenges, we propose an efficient and scalable symbolic search framework. First, we propose two constraint strategies to compute neural logical indices to reduce the domain of variables, thereby decreasing the data complexity of symbolic search. Additionally, we introduce an approximate algorithm based on local search to tackle the NP query complexity of cyclic queries. Experiments on various CQA benchmarks demonstrate that our framework reduces the computational load of symbolic methods by 90\% while maintaining nearly the same performance, thus alleviating both efficiency and scalability issues.
Paper Structure (35 sections, 2 theorems, 11 equations, 4 figures, 5 tables, 1 algorithm)

This paper contains 35 sections, 2 theorems, 11 equations, 4 figures, 5 tables, 1 algorithm.

Key Result

Proposition 2.7

The constant node in $G_\phi$ can be removed in $O(|\mathcal{E}|)$.

Figures (4)

  • Figure 1: The left is the cyclic query graph of formula $\exists x_1,x_2. \lnot \text{Graduate}(x_1, x_2) \land \text{Graduate}(x_1, y) \land \text{Married}(x_2, y)$. It can be interpreted as "Find someone who is married to a person who graduated from a different institution". Find all the answers of this formula from KG is $O(N^3)$, where $N$ is number of entities within KG. Notably, complex query answering is NP hard since it can be reduced as constraint satisfaction problem. The middle presents the constraints used in the local strategy for the free variable $y$, while the right shows the constraints employed in the global strategy for the same free variable $y$. By the constraints, we can reduce the domain of free variable to accelerate search.
  • Figure 2: The top section depicts the pipeline of FIT yin_rethinking_2023 for addressing a given cyclic query, while the bottom section illustrates the pipeline of NLISA tackling the same cyclic query. NLISA maintains a smaller fuzzy vector by preserving only the indices within the relevant domains, resulting in greater flexibility. Additionally, NLISA employs Local Optimization to search for assignments for each candidate of free variables, which can be executed in parallel and operates with quadratic complexity.
  • Figure 3: 14 query types propsed in BetaE benchmark ren_beta_2020. These query types are modeled by the operator tree.
  • Figure 4: 10 query types propsed in Real EFO1 benchmark yin_rethinking_2023. These query types are modeled by query graph.

Theorems & Definitions (10)

  • Definition 2.1: Knowledge Graph
  • Definition 2.2: (EFO1 query)
  • Definition 2.3: Answer set
  • Definition 2.4: Truth value function
  • Definition 2.5: Query Graph
  • Definition 2.6: Fuzzy vector
  • Proposition 2.7: RemoveConstNode
  • Proposition 2.8: RemoveLeafNode
  • Definition 3.1: Neighbor Subgraph
  • Definition H.1: $t$-norm