Skip to content

lifr-reasoner/lifr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LiFR

LiFR is a Lighweight Fuzzy semantic Reasoner. It implements a fuzzy extension of -.


Description

The algorithmic foundation of LiFR lies in the crisp reasoner it has extended: the Pocket KRHyper reasoner, a reasoner initially developed for first generation mobile devices. Thus it is a first-order model generating reasoner implementing the hyper-tableaux calculus. DL reasoning in Pocket KRHyper is performed through translating DLs axioms to first order clauses, as portrayed in the translation primitives of Pocket KRHyper. The original Description Logic (DL) interface provided by Pocket KRHyper was extended to support added semantics and fuzzy operators’ transformation into the native first order clausal implementation.

LiFR has extended Pocket KRHyper to fuzziness and has made improvements on the original implementation efficiency-wise and with respect to disjunction handling. The first extension within CERTH, named initially f-PocketKRHyper, was a J2ME application like its crisp predecessor. Since then, it was transformed to JavaSE with an interest in rendering it capable of multi-platform implementations, while maintaining the original implementation's principles of a lightweight and efficient algorithm, capable of performing reasoning services in every device, including in limited resource devices, such as smartphones, tablets, set-top boxes etc.

The general inferencing services provided by LiFR are:

  • Consistency checking
  • Satisfiability checking
  • Concept subsumption
  • Fuzzy entailment
  • Best entailment degree (BED) calculation

Extending Pocket KRHyper, LiFR’s default reasoning service consists in the generation of all models that satisfy the input fuzzy knowledge base, thereby providing native support for the computation of the BED for all combinations of individuals and concepts.

Relevant publication

Tsatsou, D., Dasiopoulou, S., Kompatsiaris, I., & Mezaris, V. (2014, May). LiFR: a lightweight fuzzy DL reasoner. In European Semantic Web Conference (pp. 263-267). Springer International Publishing.

LiFR Semantics and Syntax

LiFR initially supported fuzzy DLP (f-DLP) semantics (as seen in the aforementioned publication). f-DLP is the fuzzy extension of DLP, a tractable knowledge representation fragment, closely related to the OWL 2 RL profile, that combines classical DLs with Logic Programs (LP), thus combining ontologies with rules.

Since then, LiFR is extended beyond Horn clauses, since it supports definite clauses with complex heads. In addition, it is extended to support complex negation, therefore placing it within the - fragment, which is a sub-language of , with limited universal restrictions.

The fuzzy extension of - (f- -) lies in the support of fuzzy assertions, restricted to concepts only, with an added support for weighted concept modifiers, while role assertions are currently treated as crisp with an imposed membership degree of ≥ 1.0 . The crisp operations intersection, union and implication, are extended to fuzzy sets and performed by t-norm, t-conorm and implication functions respectively. The fuzzy set operations of LiFR follow the operators of Zadeh fuzzy logic.

LiFR's syntax follows a lisp-like variant of the KRSS ontological notation.


Usage

You can clone the entire repository as a Java project or download the exported lifr.jar and add it to your Java project's build path as a library.

Simple usage examples can be be found under lifr/util/examples. Note: examples are not included in the .jar library.

The main examples' class is Problems.java. It includes toy problems (text), employed to showcase all core LiFR services. You can stream or read from file your own KBs and use them similarly.

In the class RealWorldProblems.java another example can be found of LiFR's usage in a real-world use case, i.e. matching a user's profile to several candidate content items, based on backgroung knowledge of a real-world ontology.

Important note

LiFR uses its own KRSS syntax variant, so you cannot directly import KBs in OWL or other standardized syntaxes. In order to import large OWL TBoxes, you can use the OWL2LiFRKRSS tool. Clone it as a Java project and convert your OWL ontologies via the owl2lifrkrss/src/test/ConvertOWL2LiFRKRSS.java main class.

Concept or role declaration is not needed in LiFR. LiFR automatically keeps track of new concepts or roles, as found in KB axioms. Therefore the TBox converter ignores all declarations, as well as all annotations and everything that is beyond LiFR's supported expressivity.

ABox conversion is not available at the moment, since at the time that the converter was created, there was no standardized syntax available in OWL to express fuzzy assertions (or weight modifiers - typically part of the TBox). Therefore concept & role assertions (as well as weight modifiers) must be created externally as a String (or text file), based on the syntax described in the relevant publication, and then merged with the rest of the KB.

Changelog

05 July 2023

  • Usage examples commented
  • Added real-world use case example

01 July 2023

  • Updated usage examples
  • LiFR as library (jar) exported

Planned upcoming features

  • Documentation update and upload
  • Usage examples with real-world problem KB
  • Provide LiFR as a library in Maven
  • LiFR core algorithm update: Toggle automatic KB complements induction.
    • In order to maintain soundness and completeness within LiFR's expressivity fragment, all concept complements and required related axioms are automatically added to the KB for every concept in the KB. I.e. for every concept A, the concept ¬A and the axiom A ∧ ¬A → ⊥ is inserted in the KB, which significanlty increases the TBox size. However, in many real-world use cases, complements are never asserted or inferred (reduced problem expressivity, no negation), therefore complement induction is redundant. To this end, the option to toggle the complement induction, upon internal KB creation, will be offered. This can critically reduce computational complexity, without compromising inferencing, in problems of corresponding expressivity.
  • LiFR core algorithm update: Decision explanation via semantic branch tracking.
    • Provides the entire path of the semantic branch(es) that led to a given inferred predicate.