NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Query2Particles: Knowledge Graph Reasoning with Particle Embeddings

Jiaxin Bai, Zihao Wang, Hongming Zhang, Yangqiu Song

Abstract

Knowledge Graph (KG) reasoning involves answering complex logical queries over incomplete data. Traditional embedding methods represent queries as single points or geometric shapes, which often fail to capture the multi-modal nature of answer sets. We present Query2Particles (Q2P), a framework that represents queries as sets of "particle" embeddings. By utilizing neural logic operations and self-attention, Q2P effectively models diverse answer distributions and handles existential positive first-order (EPFO) and full first-order logic (FOL) queries. Q2P achieves state-of-the-art results on FB15k, FB15k-237, and NELL995 benchmarks while maintaining high inference efficiency.

Introduction

Knowledge Graphs (KGs) like Freebase or NELL are massive networks of facts, but they are notoriously incomplete. Answering complex queries—those involving multiple hops and logical operators like AND ($\wedge$), OR ($\vee$), and NOT ($\neg$)—requires more than simple path-finding; it requires "reasoning" to fill in the gaps.

Existing methods typically embed queries into a vector space as a single point (GQE) or a hyper-rectangle (Query2Box). However, these "uni-modal" representations are often too restrictive. For example, the answer to a query like "Find Nobel Prize winners who moved to the US" might include people from vastly different backgrounds, research fields, and eras. In the embedding space, these entities might form several disjoint clusters. A single vector or box struggles to "reach" all these scattered clusters simultaneously without also capturing many incorrect entities in the intermediate space.

Methodology

The core innovation of Query2Particles (Q2P) is the representation of a query as a matrix of $K$ particle embeddings rather than a single point. This allows the model to track multiple "hypotheses" or clusters of potential answers simultaneously.

Neural Logic Operations

Q2P defines specific neural layers to handle logical reasoning through the manipulation of these particle sets:

  • Projection: This operation uses gated transitions (similar to Gated Recurrent Units) to move particles across relations in the KG.
  • Intersection & Negation: These operations utilize self-attention mechanisms. This allows particles to "communicate" with each other to narrow down the search space or move toward areas not occupied by input particles (in the case of negation). This treats intersection as a coordination problem where particles must agree on the most likely shared characteristics of the answer set.
  • Union: Unlike previous methods that required complex preprocessing (such as converting queries to Disjunctive Normal Form), Q2P handles "OR" operations simply by merging sets of particles. This makes it significantly more efficient for queries with high logical complexity.

Scoring

To determine if an entity is a valid answer, the model calculates the similarity between the entity's embedding and all particles in the query representation, taking the maximum similarity score. If an entity is close to even one particle, it is considered a candidate.

Experimental Results

The model was evaluated on three standard KG reasoning benchmarks: FB15k, FB15k-237, and NELL995. The authors tested the model on both Existential Positive First-Order (EPFO) queries and more general First-Order Logic (FOL) queries that include negation.

Performance Metrics

Q2P outperformed existing leaders like BetaE and Query2Box across almost all query types. On FB15k, Q2P achieved an Average Mean Reciprocal Rank (MRR) of 46.8, compared to BetaE’s 41.6.

In a targeted evaluation of the most "diversified" queries—those with many scattered answers—the multi-particle version (Q2P-KP) improved performance by 7.8 points over a single-particle version. This confirms the hypothesis that multi-modality is essential for complex reasoning.

Efficiency

While more complex than a single vector, Q2P remains much faster than "query decomposition" methods (like CQD) during inference. Because it does not require iterative optimization at test time, it scales well for multi-hop queries.

Discussion and Future Work

The success of Q2P highlights the power of multi-modal representations in vector space. By using particles, the model creates a flexible "net" that can cover multiple disconnected regions of the embedding space.

However, the authors note that the optimal number of particles ($K$) currently varies depending on the query's structure. Using too many particles for a simple query might add unnecessary computation, while too few for a complex one might lead to missed answers. Future work could explore dynamic particle allocation, where the model decides how many particles are needed on-the-fly based on query complexity. Additionally, integrating this particle-based reasoning with Large Language Models (LLMs) for natural language interfaces remains a promising frontier.

Summary updated

BibTeX
@inproceedings{bai2022query,
  author = {Jiaxin Bai and Zihao Wang and Hongming Zhang and Yangqiu Song},
  title = {{Query2Particles: Knowledge Graph Reasoning with Particle Embeddings}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.findings-naacl.207},
}
Figure