Extending Complex Logical Queries on Uncertain Knowledge Graphs

Weizhi Fei, Zihao Wang, Hang Yin, Yang Duan, Yangqiu Song

Modern Knowledge Graphs (KGs), such as ConceptNet or protein-interaction databases, are rarely composed of absolute truths. Instead, they contain facts with varying degrees of confidence. Traditional Complex Query Answering (CQA) frameworks, however, typically treat these facts as binary—either a link exists or it does not. This rigidity fails to capture the probabilistic reality of real-world data. Presented at ACL 2025, this research introduces a new framework for performing complex logical reasoning over uncertain KGs by incorporating "Soft Queries."

The Challenge of Uncertainty and Nuance

Most existing methods for KG reasoning struggle with two primary issues: incompleteness and lack of nuance. Incompleteness refers to the inability to reason about missing links that might be true with a certain probability. Nuance refers to the inability of standard first-order logic to handle soft constraints. For example, a recruiter might require a candidate who "definitely" has a specific degree (high necessity) while considering it "highly important" but not strictly required that they know a specific programming language (high importance).

To bridge this gap, the authors propose Soft Queries on Uncertain Knowledge Graphs (SQUK). This framework extends Existential First-Order (EFO) logic by introducing two new parameters for every atomic formula: a necessity threshold ($\alpha$) and an importance weight ($\beta$).

Figure 3: Overview of a Soft Query for candidate search (a) applied to an Uncertain KG of job candidates and their skillsets (b).

Soft Reasoning with Calibrated Confidence (SRC)

The proposed solution, Soft Reasoning with calibrated Confidence values (SRC), is a neural-symbolic approach that operates in three stages:

  1. Soft Query Language: The logic is extended to include $\alpha$ and $\beta$ parameters, allowing users to define the strictness and weight of various query components.
  2. Forward Inference: SRC treats the query as a graph and progressively prunes it. It utilizes Uncertain Knowledge Graph Embeddings (UKGE) to predict the confidence of unobserved links. To ensure mathematical stability and prevent error cascading during multi-hop reasoning, the system employs a specific algebraic semiring structure.
  3. Calibration: Recognizing that raw embedding scores can be biased, the authors implement two calibration strategies: Debiasing (D), which shifts thresholds to account for systematic underestimation, and Learning (L), which uses affine transformations to fine-tune scores for specific reasoning tasks.

Theoretical Positioning

This work represents a significant evolution in the language of reasoning. While traditional relational databases use standard First-Order (FO) logic and probabilistic databases introduce confidence values, they often assume a closed-world or uniform probability for unobserved facts. SQUK combines EFO logic with soft requirements and leverages machine learning to generalize confidence across both observed and unobserved knowledge.

Figure 5: Comparison of problem settings, showing how Soft Queries on uncertain KGs extend previous reasoning paradigms.

Key Insights and Experimental Results

The researchers evaluated SRC on three diverse datasets: CN15k (commonsense knowledge), PPI5k (protein interactions), and O*NET20k (employment and skills). The results yielded several critical insights:

  • Symbolic Stability: Unlike many purely neural methods that suffer from exponential error growth as queries become more complex, SRC’s error accumulation is linear. This makes it significantly more reliable for deep, multi-step reasoning.
  • Outperforming LLMs: In head-to-head comparisons on numerical reasoning tasks, SRC achieved 48.9% accuracy on a subset of CN15k, notably higher than Llama 3.3 70B (42.6%) and GPT-4-preview (37.8%). This suggests that while Large Language Models are proficient in natural language, they struggle with the precise arithmetic required for combining multiple uncertain logical constraints.
  • Computational Efficiency: By leveraging the natural sparsity of KGs, the authors reduced storage requirements by 97% and accelerated computation, making symbolic reasoning practical for large-scale uncertain data.

Conclusion and Ethical Considerations

SRC demonstrates that a neural-symbolic approach can effectively handle the inherent uncertainty of real-world knowledge while maintaining the transparency of logical reasoning. However, the authors caution that because KGs often reflect human biases—particularly in domains like hiring—the use of "soft queries" must be accompanied by careful data auditing to prevent the automated amplification of these biases. Future work will look to expand the framework to handle more complex cyclic queries and broader disjunctive logic.

Summary updated

BibTeX
@inproceedings{fei2025extending,
  author = {Weizhi Fei and Zihao Wang and Hang Yin and Yang Duan and Yangqiu Song},
  title = {{Extending Complex Logical Queries on Uncertain Knowledge Graphs}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure