TasksSotADatasetsPapersMethodsSubmitAbout
Papers With Code 2

A community resource for machine learning research: papers, code, benchmarks, and state-of-the-art results.

Explore

Notable BenchmarksAll SotADatasetsPapersMethods

Community

Submit ResultsAbout

Data sourced from the PWC Archive (CC-BY-SA 4.0). Built by the community, for the community.

Papers/NQE: N-ary Query Embedding for Complex Query Answering ove...

NQE: N-ary Query Embedding for Complex Query Answering over Hyper-Relational Knowledge Graphs

Haoran Luo, Haihong E, Yuhao Yang, Gengxian Zhou, Yikai Guo, Tianyu Yao, Zichen Tang, Xueyuan Lin, Kaiyang Wan

2022-11-24AAAI 2023 6Knowledge GraphsNegationComplex Query AnsweringLogical Reasoning
PaperPDFCode(official)

Abstract

Complex query answering (CQA) is an essential task for multi-hop and logical reasoning on knowledge graphs (KGs). Currently, most approaches are limited to queries among binary relational facts and pay less attention to n-ary facts (n>=2) containing more than two entities, which are more prevalent in the real world. Moreover, previous CQA methods can only make predictions for a few given types of queries and cannot be flexibly extended to more complex logical queries, which significantly limits their applications. To overcome these challenges, in this work, we propose a novel N-ary Query Embedding (NQE) model for CQA over hyper-relational knowledge graphs (HKGs), which include massive n-ary facts. The NQE utilizes a dual-heterogeneous Transformer encoder and fuzzy logic theory to satisfy all n-ary FOL queries, including existential quantifiers, conjunction, disjunction, and negation. We also propose a parallel processing algorithm that can train or predict arbitrary n-ary FOL queries in a single batch, regardless of the kind of each query, with good flexibility and extensibility. In addition, we generate a new CQA dataset WD50K-NFOL, including diverse n-ary FOL queries over WD50K. Experimental results on WD50K-NFOL and other standard CQA datasets show that NQE is the state-of-the-art CQA method over HKGs with good generalization capability. Our code and dataset are publicly available.

Results

TaskDatasetMetricValueModel
Knowledge GraphsWD50K-QEAVGp-MRR0.7584NQE
Knowledge GraphsWD50K-NFOLAVGn-MRR0.1406NQE
Knowledge GraphsWD50K-NFOLAVGp-MRR0.3687NQE
Knowledge Graph CompletionWD50K-QEAVGp-MRR0.7584NQE
Knowledge Graph CompletionWD50K-NFOLAVGn-MRR0.1406NQE
Knowledge Graph CompletionWD50K-NFOLAVGp-MRR0.3687NQE
Large Language ModelWD50K-QEAVGp-MRR0.7584NQE
Large Language ModelWD50K-NFOLAVGn-MRR0.1406NQE
Large Language ModelWD50K-NFOLAVGp-MRR0.3687NQE
Inductive knowledge graph completionWD50K-QEAVGp-MRR0.7584NQE
Inductive knowledge graph completionWD50K-NFOLAVGn-MRR0.1406NQE
Inductive knowledge graph completionWD50K-NFOLAVGp-MRR0.3687NQE

Related Papers

SMART: Relation-Aware Learning of Geometric Representations for Knowledge Graphs2025-07-17Topic Modeling and Link-Prediction for Material Property Discovery2025-07-08FEVO: Financial Knowledge Expansion and Reasoning Evolution for Large Language Models2025-07-08Modeling (Deontic) Modal Operators With the s(CASP) Goal-directed Predicate Answer Set Programming System2025-07-07Graph Collaborative Attention Network for Link Prediction in Knowledge Graphs2025-07-05Context-Driven Knowledge Graph Completion with Semantic-Aware Relational Message Passing2025-06-29MiCo: Multi-image Contrast for Reinforcement Visual Reasoning2025-06-27Active Inference AI Systems for Scientific Discovery2025-06-26