cs.AINov 22, 2026

Similarity-Constrained Reweighting for Complex Query Answering on Knowledge Graphs

Authors: Daniel Daza, Alberto Bernardi, Luca Costabello, Christophe Gueret, Michael Cochez, Martijn Schut

Organizations: Vrije Universiteit Amsterdam · Eindhoven University of Technology · Translational AI Laboratory, Department of Laboratory Medicine Amsterdam University Medical Center, Vrije Universiteit Amsterdam · Accenture Labs · 

Abstract

Machine learning models for Complex Query Answering (CQA) on knowledge graphs estimate the likelihood of answers that are not reachable via direct traversal. Recent work has proposed extending such queries with soft entity constraints, which require the target variable to be similar or dissimilar to specified sets of entities. We study a more general formulation where similarity constraints are specified on an arbitrary variable in a query, and introduce SCORE: a computationally efficient and interpretable method for incorporating similarity constraints on an arbitrary variable of a query. SCORE is based on a lightweight and interpretable score adjustment function that only requires tuning two hyperparameters on a validation set. Our experiments show that SCORE effectively incorporates preferences while maintaining strong query answering performance. It significantly improves ranking quality when constraints apply to the target variable and performs effectively in the more general case involving constraints on intermediate variables, and its performance remains robust when applied to several existing methods for CQA. Our implementation is available at https://github.com/dfdazac/score.

Figures & tables

Appendix figures & tables18 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Is Complex Query Answering Really Complex?

    Oct 16, 2024Cosimo Gregucci, Bo Xiong, Daniel Hernandez +4Knowledge Graph Question AnsweringKnowledge Graphs

  2. CQD-SHAP: Explainable Complex Query Answering via Shapley Values

    Oct 17, 2025Parsa Abbasi, Stefan HeindorfNeuro-Symbolic ReasoningKnowledge Graph Question Answering