Table of Contents
Fetching ...

Interactive Query Answering on Knowledge Graphs with Soft Entity Constraints

Daniel Daza, Alberto Bernardi, Luca Costabello, Christophe Gueret, Masoud Mansoury, Michael Cochez, Martijn Schut

TL;DR

This work tackles query answering on knowledge graphs under incomplete data by introducing soft constraints that capture user preferences through interactive, example-based feedback. It formalizes an interactive reranking framework and proposes two lightweight methods—Cosine (linear) and Neural Query Reranker (NQR)—that adjust base QA scores while preserving global ranking structure. By extending existing QA benchmarks with automatically generated soft constraints, the authors demonstrate that the methods can meaningfully steer rankings toward semantically related answers with minimal computational overhead. The results reveal a favorable trade-off between preserving original query performance and aligning results with user-specified soft constraints, enabling practical, interactive knowledge graph querying. The approaches are compatible with existing QA models and offer interpretable, tunable controls for domain experts to balance constraint satisfaction and ranking fidelity in real time.

Abstract

Methods for query answering over incomplete knowledge graphs retrieve entities that are \emph{likely} to be answers, which is particularly useful when such answers cannot be reached by direct graph traversal due to missing edges. However, existing approaches have focused on queries formalized using first-order-logic. In practice, many real-world queries involve constraints that are inherently vague or context-dependent, such as preferences for attributes or related categories. Addressing this gap, we introduce the problem of query answering with soft constraints. We formalize the problem and introduce two efficient methods designed to adjust query answer scores by incorporating soft constraints without disrupting the original answers to a query. These methods are lightweight, requiring tuning only two parameters or a small neural network trained to capture soft constraints while maintaining the original ranking structure. To evaluate the task, we extend existing QA benchmarks by generating datasets with soft constraints. Our experiments demonstrate that our methods can capture soft constraints while maintaining robust query answering performance and adding very little overhead. With our work, we explore a new and flexible way to interact with graph databases that allows users to specify their preferences by providing examples interactively.

Interactive Query Answering on Knowledge Graphs with Soft Entity Constraints

TL;DR

This work tackles query answering on knowledge graphs under incomplete data by introducing soft constraints that capture user preferences through interactive, example-based feedback. It formalizes an interactive reranking framework and proposes two lightweight methods—Cosine (linear) and Neural Query Reranker (NQR)—that adjust base QA scores while preserving global ranking structure. By extending existing QA benchmarks with automatically generated soft constraints, the authors demonstrate that the methods can meaningfully steer rankings toward semantically related answers with minimal computational overhead. The results reveal a favorable trade-off between preserving original query performance and aligning results with user-specified soft constraints, enabling practical, interactive knowledge graph querying. The approaches are compatible with existing QA models and offer interpretable, tunable controls for domain experts to balance constraint satisfaction and ranking fidelity in real time.

Abstract

Methods for query answering over incomplete knowledge graphs retrieve entities that are \emph{likely} to be answers, which is particularly useful when such answers cannot be reached by direct graph traversal due to missing edges. However, existing approaches have focused on queries formalized using first-order-logic. In practice, many real-world queries involve constraints that are inherently vague or context-dependent, such as preferences for attributes or related categories. Addressing this gap, we introduce the problem of query answering with soft constraints. We formalize the problem and introduce two efficient methods designed to adjust query answer scores by incorporating soft constraints without disrupting the original answers to a query. These methods are lightweight, requiring tuning only two parameters or a small neural network trained to capture soft constraints while maintaining the original ranking structure. To evaluate the task, we extend existing QA benchmarks by generating datasets with soft constraints. Our experiments demonstrate that our methods can capture soft constraints while maintaining robust query answering performance and adding very little overhead. With our work, we explore a new and flexible way to interact with graph databases that allows users to specify their preferences by providing examples interactively.

Paper Structure

This paper contains 35 sections, 15 equations, 5 figures, 7 tables.

Figures (5)

  • Figure 1: A query over a KG can be written in a logical form that specifies hard constraints that an entity must meet. We investigate the problem of incorporating soft constraints that cannot be specified in logical form, such as "awards given to performers." Such constraints correspond to subsets of entities, shown in shaded clusters, that share some similarities.
  • Figure 2: Example dendrogram used to generate preference sets. Highlighted in green are preferred entities, other entities are non-preferred.
  • Figure 3: Results on interactive query answering with soft preferences, on FB15k237 and Hetionet.
  • Figure 4: Trajectories of pairwise accuracy vs MRR for the Cosine update. Each subplot corresponds to a different value of $\alpha$, with lines colored by values of $\beta$. Highlighted circles indicate the initial interaction step (t=1), and the following points show increasingly larger preference sets.
  • Figure 5: Types of complex queries used in our experiments.

Theorems & Definitions (2)

  • Definition 1: Soft constraint (informal)
  • Definition 2: Interactive query answering with soft constraints