# Answering Complex Queries in Knowledge Graphs with Bidirectional Sequence Encoders

arXiv: https://arxiv.org/abs/2004.02596 · HTML: https://mlsanity.com/paper/2004.02596/

## Key facts

- Cited by 28 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 6 Apr 2020.

## Built on by (most cited first, 28 of 28)

- [Mask and Reason: Pre-Training Knowledge Graph Transformers for Complex Logical Queries](https://mlsanity.com/paper/2208.07638/) (2022)
- [Neural Graph Reasoning: Complex Logical Query Answering Meets Graph Databases](https://mlsanity.com/paper/2303.14617/) (2023)
- [Inductive Logical Query Answering in Knowledge Graphs](https://mlsanity.com/paper/2210.08008/) (2022)
- [Query Embedding on Hyper-relational Knowledge Graphs](https://mlsanity.com/paper/2106.08166/) (2021)
- [Transformers over Directed Acyclic Graphs](https://mlsanity.com/paper/2210.13148/) (2022)
- [Benchmarking the Combinatorial Generalizability of Complex Query Answering on Knowledge Graphs](https://mlsanity.com/paper/2109.08925/) (2021)
- [GammaE: Gamma Embeddings for Logical Queries on Knowledge Graphs](https://mlsanity.com/paper/2210.15578/) (2022)
- [Knowledge Graph Reasoning with Logics and Embeddings: Survey and Perspective](https://mlsanity.com/paper/2202.07412/) (2022)
- [SMORE: Knowledge Graph Completion and Multi-hop Reasoning in Massive Knowledge Graphs](https://mlsanity.com/paper/2110.14890/) (2021)
- [Wasserstein-Fisher-Rao Embedding: Logical Query Embeddings with Local Comparison and Global Transport](https://mlsanity.com/paper/2305.04034/) (2023)
- [A Unified Framework for Rank-based Evaluation Metrics for Link Prediction in Knowledge Graphs](https://mlsanity.com/paper/2203.07544/) (2022)
- [Sequential Query Encoding For Complex Query Answering on Knowledge Graphs](https://mlsanity.com/paper/2302.13114/) (2023)
- [Knowledge Graph Reasoning over Entities and Numerical Values](https://mlsanity.com/paper/2306.01399/) (2023)
- [NQE: N-ary Query Embedding for Complex Query Answering over Hyper-Relational Knowledge Graphs](https://mlsanity.com/paper/2211.13469/) (2022)
- [Effective Instruction Parsing Plugin for Complex Logical Query Answering on Knowledge Graphs](https://mlsanity.com/paper/2410.20321/) (2024)
- [Enhancing Transformers for Generalizable First-Order Logical Entailment](https://mlsanity.com/paper/2501.00759/) (2025)
- [Privacy-Preserved Neural Graph Databases](https://mlsanity.com/paper/2312.15591/) (2023)
- [Conditional Logical Message Passing Transformer for Complex Query Answering](https://mlsanity.com/paper/2402.12954/) (2024)
- [Generating SROI^- Ontologies via Knowledge Graph Query Embedding Learning](https://mlsanity.com/paper/2407.09212/) (2024)
- [A Neuro-Symbolic Framework for Answering Graph Pattern Queries in Knowledge Graphs](https://mlsanity.com/paper/2310.04598/) (2023)
- [Learning Federated Neural Graph Databases for Answering Complex Queries from Distributed Knowledge Graphs](https://mlsanity.com/paper/2402.14609/) (2024)
- [DAGE: DAG Query Answering via Relational Combinator with Logical Constraints](https://mlsanity.com/paper/2410.22105/) (2024)
- [Query Structure Modeling for Inductive Logical Reasoning Over Knowledge Graphs](https://mlsanity.com/paper/2305.13585/) (2023)
- [NN-Former: Rethinking Graph Structure in Neural Architecture Representation](https://mlsanity.com/paper/2507.00880/) (2025)
- [Modeling Relational Patterns for Logical Query Answering over Knowledge Graphs](https://mlsanity.com/paper/2303.11858/) (2023)
- [Pathformer: Recursive Path Query Encoding for Complex Logical Query Answering](https://mlsanity.com/paper/2406.14880/) (2024)
- [Approximate Answering of Graph Queries](https://mlsanity.com/paper/2308.06585/) (2023)
- [Prompt-fused framework for Inductive Logical Query Answering](https://mlsanity.com/paper/2403.12646/) (2024)

## Abstract (arXiv)

Representation learning for knowledge graphs (KGs) has focused on the problem of answering simple link prediction queries. In this work we address the more ambitious challenge of predicting the answers of conjunctive queries with multiple missing entities. We propose Bi-Directional Query Embedding (BIQE), a method that embeds conjunctive queries with models based on bi-directional attention mechanisms. Contrary to prior work, bidirectional self-attention can capture interactions among all the elements of a query graph. We introduce a new dataset for predicting the answer of conjunctive query and conduct experiments that show BIQE significantly outperforming state of the art baselines.
