TL;DR
The authors present an updated version of fosf, a reasoner that brings "fuzzy" flexibility to RDF knowledge graph queries. By integrating similarity relations into Order-Sorted Feature (OSF) logic, the system can rewrite rigid SPARQL queries into approximate ones, ensuring that users get relevant results even when their queries slightly conflict with strict ontological constraints.
What Problem Does This Paper Address?
Querying Knowledge Graphs (KGs) via SPARQL typically requires a "perfect match" mindset. If an ontology defines two classes (sorts) as disjoint—for example, a teacher cannot be a researcher—a query looking for someone who is both will return zero results. This is due to the closed-world assumption inherent in many logic frameworks, where anything not explicitly allowed is forbidden.
In the real world, knowledge is often evolving or imprecise. A user might not know the exact structure of a massive ontology, or the data itself might be slightly inconsistent. The challenge is to move away from "fail-fast" rigid logic toward a system that understands similarity, allowing for approximate answers with a calculated degree of confidence.
Methods
The researchers utilize Fuzzy Order-Sorted Feature (OSF) logic. In this framework:
- Sorts represent classes of objects (e.g.,
Professor,University). - Features represent functional attributes (e.g.,
teaches_at). - Fuzzy Subsumption: Instead of a simple "is-a" relationship, sorts have a degree of membership.
The core innovation in this release of fosf is the integration of a similarity relation ($\sim$) between sorts. As shown in the figure below, the system can combine standard hierarchical subsumption (black arrows) with user-defined similarity (dotted green lines) to create a new "fuzzy subsumption" (dashed red lines).
The workflow follows a specific pipeline:
- Normalization: The system takes an OSF term (the query) and simplifies it based on the ontology, sort definitions, and similarity relations.
- Constraint Relaxation: If a query is technically inconsistent (e.g., asking for a
teacherwho is also aresearcher), the reasoner uses the similarity relation to "relax" the constraint to a similar sort (likeprofessor) that satisfies the ontology. - SPARQL Translation: The normalized, relaxed OSF term is compiled into a standard SPARQL query that can be executed against any RDF database.
Datasets
The paper does not evaluate the reasoner on a specific large-scale benchmark dataset. Instead, it uses illustrative examples, such as a university ontology (involving sorts like lecturer, researcher, and professor) and a movie database example (involving horror, slasher, and thriller genres) to demonstrate the logic.
Key Insights and Ideas
- The Similarity Bridge: The most critical insight is the inference rule: If sort $s_0$ is a type of $s_1$, and $s_1$ is similar to $s_2$ with degree $\alpha$, then $s_0$ can be considered a type of $s_2$ with degree $\alpha$. This allows the logic to bridge gaps in the hierarchy.
- Ontology-Aware Rewriting: Unlike simple keyword expansion, this rewriting happens at the logic level. It respects feature domains and ranges (e.g., knowing that the
directed_byfeature implies the subject is amovieand the object is aperson). - User-Centric Flexibility: By returning approximate solutions, the system prevents "surprising" empty results for users who may not have mastered a complex ontology.
Key Results
The authors successfully demonstrated that fosf can take a query that would normally fail under strict OSF normalization and transform it into a valid SPARQL query.
For instance, a query for a person who teaches_at an institution and researches_at a research_center is technically inconsistent if the ontology says teachers and researchers are disjoint. fosf identifies that lecturer (similar to teacher) and researcher meet at the sort professor. It then rewrites the SPARQL query to look for professors, returning results with a similarity degree of 0.5 rather than nothing at all.
The researchers also provided a web interface to visualize these taxonomies and test the query translation in real-time.
Limitations and Future Work
- Performance: The current reasoner is written in pure Python, which limits its speed on very large taxonomies. The authors are currently developing a C++ engine to improve efficiency.
- Expressiveness: The system does not yet support "disjunctive" sorts (e.g., "find me a teacher OR a researcher").
- Manual Similarity: Currently, similarity degrees must be manually defined. The authors plan to explore automated similarity estimation using vector embeddings (like Word2Vec or FastText) in the future.
- Strict Disjointness: The logic still struggles with the inherent disjointness of the closed-world assumption unless similarity is explicitly provided; they plan to allow for "non-disjoint" declarations in future versions.
Summary updated