Query2GMM: Learning Representation with Gaussian Mixture Model for Reasoning over Knowledge Graphs

Yuhan Wu, Yuanyuan Xu, Wenjie Zhang, Xiwei Xu, Ying Zhang

Abstract

Query2GMM introduces a novel framework for reasoning over Knowledge Graphs (KGs) by representing queries as Gaussian Mixture Models (GMMs). Unlike traditional uni-modal embedding methods, Query2GMM captures the multi-modal nature of real-world query answers, allowing them to exist in multiple disjoint regions of the embedding space. By explicitly modeling the cardinality and dispersion of these clusters, the model achieves state-of-the-art performance, outperforming existing baselines by an average of 6.35% Mean Reciprocal Rank (MRR).

Introduction

Knowledge Graphs (KGs) serve as vast repositories of structured facts, yet they are inherently incomplete. Logical query answering aims to predict missing links by embedding entities and queries into a continuous vector space. A significant limitation of current state-of-the-art models is the assumption that query answers follow a uni-modal distribution—typically represented as a single geometric shape like a box or a sphere.

However, real-world queries are often multi-modal. For instance, the query "Who has been nominated for an Emmy Award?" encompasses diverse groups such as actors, directors, and writers, which occupy distinct semantic regions. Previous attempts to model these subsets often suffered from "cluster collapse" or failed to accurately represent the varying sizes (cardinality) of different answer groups.

Methodology: Reasoning with GMMs

The core innovation of Query2GMM is the representation of each query as a univariate Gaussian Mixture Model consisting of $k$ components. Each component is defined by its semantic center (mean), dispersion (standard deviation), and cardinality (weight).

Figure 2: Overview of Query2GMM reasoning process, showing how complex queries are decomposed and visualized as multi-modal distributions.

Neural Operators

To handle complex logical queries, the authors developed specialized neural operators that maintain the GMM structure throughout the reasoning pipeline:

  • Projection: Maps a head entity to a tail entity across a relation using a distributed gate and self-attention.
  • Intersection: Employs a co-attention model to aggregate information across all query subsets simultaneously, avoiding the cascading errors of pairwise operations.
  • Negation: Identifies regions of the embedding space not covered by the current answer set via self-attention.
Figure 4: Visualization of logical operators (Projection, Intersection, Negation, and Union) acting upon Gaussian Mixture Models.

Mixed Wasserstein Distance

To train the model, a new similarity measure based on the Earth Mover’s Distance was introduced. This "Mixed Wasserstein Distance" allows for precise N-to-M mapping between individual entities (represented as simple Gaussians) and complex query GMMs.

Experiments and Results

The model was evaluated on two benchmark datasets: FB15k-237 and NELL995, covering 14 distinct logical query structures.

Query2GMM demonstrated significant performance gains over eight major baselines, including BetaE and GNN-QE. Notably, on the NELL dataset, it achieved an MRR of 38.3%, a substantial improvement over previous top-tier models which hovered around 30%. The model proved particularly robust in handling negation, a historically challenging task in KG reasoning.

Key Insights

  • Cardinality vs. Spatial Radius: A critical finding is that the spatial volume of a query embedding does not necessarily correlate with the number of answers. By modeling cardinality as a GMM weight, Query2GMM decouples semantic spread from answer density.
  • Preserving Multi-modality: Unlike previous multi-cluster models that flattened distributions to calculate distance, Query2GMM maintains its multi-modal structure until the final similarity computation.
  • Optimal Complexity: Empirical results suggest that $k=3$ Gaussian components provide the ideal balance between capturing answer diversity and avoiding overfitting.

Conclusion and Future Work

Query2GMM sets a new standard for multi-modal reasoning in Knowledge Graphs. While powerful, the model currently requires independent training for each KG and does not yet incorporate large-scale pre-training techniques. Future research will explore cross-KG knowledge transfer and the integration of LLM-style pre-training to further enhance reasoning capabilities.

Summary updated

BibTeX
@inproceedings{wu2023query,
  author = {Yuhan Wu and Yuanyuan Xu and Wenjie Zhang and Xiwei Xu and Ying Zhang},
  title = {{Query2GMM: Learning Representation with Gaussian Mixture Model for Reasoning over Knowledge Graphs}},
  booktitle = {The Web Conference},
  year = {2023},
}
Figure