40
Part 7: Rules and Ontologies

Part 7: Rules and Ontologies

  • Upload
    bart

  • View
    50

  • Download
    0

Embed Size (px)

DESCRIPTION

Part 7: Rules and Ontologies. Combining rules and ontologies. We now know how to represent (possibly incomplete, evolving, etc) knowledge using rules, but assuming that the ontology is known. We also learned how to represent ontologies. The close the circle, we need to combine both. - PowerPoint PPT Presentation

Citation preview

  • Part 7: Rules and Ontologies

  • Combining rules and ontologiesWe now know how to represent (possibly incomplete, evolving, etc) knowledge using rules, but assuming that the ontology is known.We also learned how to represent ontologies.The close the circle, we need to combine both.The goal is to represent knowledge with rules that make use of an ontology for defining the objects and individuals This is still a (hot) research topic!Crucial for using knowledge represented by rules in the context of the Web, where the ontology must be made explicit

  • Full integration of rules/ontologiesAmounts to:Combine DL formulas with rules having no restrictionsThe vocabularies are the samePredicates can be defined either using rules or using DLThis approach encounters several problemsThe base assumptions of DL and of non-monotonic rules are quite different, and so mixing them so tightly is not easy

  • Problems with integrationRule languages (e.g. Logic Programming) use some form of closed world assumption (CWA)Assume negation by defaultThis is crucial for reasoning with incomplete knowledgeDL, being a subset of 1st order logics, has no closed world assumptionThe world is kept open in 1st order logics (OWA)This is reasonable when defining conceptsMostly, the ontology is desirably monotonicWhat if a predicate is both defined using DL and LP rules?Should its negation be assumed by default?Or should it be kept open?How exactly can one define what is CWA or OWA is this context?

  • CWA vs OWAConsider the program Pwine(X) whiteWine(X)nonWhiteWine(X) not whiteWine(X)wine(esporo_tinto)and the corresponding DL theoryWhiteWine WineWhiteWine nonWhiteWineesporo_tinto:WineP derives nonWhiteWine(esporo_tinto) whilst the DL does not.

  • Modeling exceptionsThe following TBox is unsatisfiableBird FliesPenguin Bird FliesThe first assertion should be seen as allowing exceptionsThis is easily dealt by nonmonotonic rule languages, e.g. logic programming, as we have seen

  • Problems with integration (cont)DL uses classical negation while LP uses either default or explicit negationDefault negation is nonmonotonicAs classical negation, explicit negation also does not assume a complete world and is monotonicBut classical negation and explicit negation are differentWith classical negation it is not possible to deal with paraconsistency!

  • Classical vs Explicit NegationConsider the program Pwine(X) whiteWine(X)wine(coca_cola)and the DL theoryWhiteWine Winecoca_cola: WineThe DL theory derives WhiteWine(coca_cola) whilst P does not.In logic programs, with explicit negation, contraposition of implications is not possible/desiredNote in this case, that contraposition would amount to assume that no inconsistency is ever possible!

  • Problems with integration (cont)Decidability is dealt differently:DL achieves decidability by enforcing restrictions on the form of formulas and predicates of 1st order logics, but still allowing for quantifiers and function symbolsE.g. it is still possible to talk about an individual without knowing who it is:hasMaker.{esporo} GoodWinePL achieves decidability by restricting the domain and disallowing function symbols, but being more liberal in the format of formulas and predicatesE.g. it is still possible to express conjunctive formulas (e.g. those corresponding to joins in relational algebra):isBrother(X,Y) hasChild(Z,X), hasChild(Z,Y), XY

  • Recent approaches to full integrationSeveral recent (and in progress) approaches attacking the problem of full integration of DL and (nonmonotonic) rules:Hybrid MKNF [Motik and Rosati 2007, to appear]Based on interpreting rules as auto-epistemic formulas (cf. previous comparison of LP and AEL)DL part is added as a 1st order theory, together with the rulesEquilibrium Logics [Pearce et al. 2006]Open Answer Sets [Heymans et al. 2004]

  • Interaction without full integrationOther approaches combine (DL) ontologies, with (nonmonotonic) rules without fully integrating them:Tight semantic integrationSeparate rule and ontology predicatesAdapt existing semantics for rules in ontology layerAdopted e.g. in DL+log [Rosati 2006] and the Semantic Web proposal SWRL [w3c proposal 2005]Semantic separationDeal with the ontology as an external oracleAdopted e.g. in dl-Programs [Eiter et al. 2005] (to be studied next)

  • Nonmonotonic dl-ProgramsExtend logic programs, under the answer-set semantic, with queries to DL knowledge basesThere is a clean separation between the DL knowledge base and the rulesMakes it possible to use DL engines on the ontology and ASP solver on the rules with adaptation for the interfacePrototype implementations exist (see dlv-Hex)The definition of the semantics is close to that of answer setsIt also allows changing the ABox of the DL knowledge base when queryingThis permits a limited form of flow of information from the LP part into the DL part

  • dl-Programsdl-Programs include a set of (logic program) rules and a DL knowledge base (a TBox and an ABox)The semantics of the DL part is independent of the rulesJust use the semantics of the DL-language, completely ignoring the rulesThe semantics of the dl-Program comes from the rulesIt is an adaptation of the answer-set semantics of the program, now taking into consideration the DL (as a kind of oracle)

  • dl-atoms to query the DL partBesides the usual atoms (that are to be interpreted on the rules), the logic program may have dl-atoms that are interpreted in the DL partSimple example:DL[Bird](tweety)It is true in the program if in the DL ontology the concept Bird includes the element tweetyUsage in a ruleflies(X) DL[Bird](X), not ab(X)The query Bird(X) is made in the DL ontology and used in the rule

  • More on dl-atomsTo allow flow of information from the rules to the ontology, dl-atoms allow to add elements to the ABox before queryingDL[Penguin my_penguin;Bird](X)First add to the ABox p:Penguin for each individual p such that my_penguin(p) (in the rule part), and then query for Bird(X)Additions can also be made for roles (with binary rule predicates) and for negative concepts and roles. Eg:DL[Penguin nonpenguin;Bird](X)In this case p:Penguin is added for each nonpenguin(p)

  • The syntax of dl-ProgramsA dl-Program is a pair (L,P) whereL is a description logic knowledge baseP is a set of dl-rulesA dl-rule is:H A1, , An, not B1, not Bm (n,m 0)where H is an atom and Ais and Bis are atoms or dl-atomsA dl-atom is:DL[S1 op1 p1, , Sn opn pn;Q](t) (n 0)where Si is a concept (resp. role), opi is either or , pi is a unary (resp. binary) predicate and Q(t) is a DL-query.

  • DL-queriesBesides querying for concepts, as in the examples, dl-atoms also allow querying for roles, and concept subsumption.A DL-query is eitherC(t) for a concept C and term tR(t1,t2) for a role R and terms t1 and t2C1 C2 for concepts C1 and C2

  • Interpretations in dl-ProgramsRecall that the Herbrand base HP of a logic program is the set of all instantiated atoms from the program, with the existing constantsIn dl-programs constants are both those in the rules and the individuals in the ABox of the ontologyAs usual a 2-valued interpretation is a subset of HP

  • Satisfaction of atoms wrt LSatisfaction wrt a DL knowledge base LFor (rule) atomsI |=L A iff A II |=L not A iff A IFor dl-atomsI |=L DL[S1 op1 p1, , Sn opn pn;Q](t) iffL A1(I) An(I) |= Q(t)whereAi(I) = {Si(c) | pi(c) I} if opi is Ai(I) = {Si(c) | pi(c) I} if opi is

  • Models of a ProgramModels can be defined for other formulas by extending |= with:I |=L not AiffI |L AI |=L F, GiffI |=L F andI |=L GI |=L H GiffI |=L A or I |L Gfor atom H, atom or dl-atom A, and formulas F and GI is a model of a program (L,P) iffFor every rule H G P,I |=L H GI is a minimal model of (L,P) iff there is no other I I that is a model of PI is the least model of (L,P) if it is the only minimal model of (L,P)It can be proven that every positive dl-program (without default negation) has a least model

  • Alternative definition of ModelsModels can also be defined similarly to what has been done above for normal programs, via an evaluation function L:For an atom A, L(A)=1 if I |=L A, and = 0 otherwiseFor a formula F, L(not F) = 1 - L(F)For formulas F and G:L((F,G)) = min(L(F), L(G))L(F G)= 1 if L(F) L(G), and = 0 otherwiseI is a model of (L,P) iff, for all rule H B of P:L(H B) = 1This definition easily allows for extensions to 3-valued interpretations and models (not yet explored!)

  • Reduct of dl-ProgramsLet (L,P) be a dl-ProgramDefine the Gelfond-Lifshitz reduct P/I as for normal programs, treating dl-atoms as regular atoms P/I is obtained from P byDeleting all rules whose body contains not A and I |=L A (being A either a regular or dl-atom)Deleting all the remaining default literals

  • Answer-sets of dl-ProgramsLet least(L,P) be the least model of P wrt L, where P is a positive program (i.e. without negation by default)I is an answer-set of (L,P) iffI = least(L,P/I)Explicit negation can be used in P, and is treated just like in answer-sets of extended logic programs

  • Some propertiesAn answer-sets of dl-Program (L,P) is a minimal model of (L,P)Programs without default nor explicit negation always have an answer-setIf the program is stratified then it has a single answer-setIf P has no DL atoms then the semantics coincides with the answer-sets semantics of normal and extended programs

  • An example (from [Eiter et al 2006]) Assume the w3c wine ontology, defining concepts about wines, and with an ABox with several winesBesides the ontology, there is a set of facts in a LP defining some persons, and their preferences regarding winesFind a set of wines for dinner that makes everybody happy (regarding their preferences)

  • Wine Preferences ExampleGet wines from the ontologywine(X) DL[Wine](X)Persons and preferences in the programperson(axel).preferredWine(axel,whiteWine).person(gibbi).preferredWine(gibbi,redWine)person(roman).preferredWine(roman,dryWine)Available bottles a person likeslikes(P,W) preferredWine(P,sweetWine), wine(W), DL[SweetWine](W).likes(P,W) preferredWine(P,dryWine), wine(W), DL[DryWine](W).likes(P,W) preferredWine(P,whiteWine), wine(W), DL[WhiteWine](W).likes(P,W) preferredWine(P,redWine), wine(W), DL[RedWine](W).Available bottles a person dislikesdislikes(P,W) person(P), wine(W), not likes(P,W)Generation of various possibilities of choosing winesbottleChosen(W) wine(W), person(P), likes(P,W), not nonChosen(P,W)nonChosen(W) wine(W), person(P), likes(P,W), not bottleChosen(P,W)Each person must have of bottle of his preferencehappy(P) bottleChosen(W), likes(P,W).false person(P), not happy(P), not false.

  • Wine example continuedSuppose that later we learn about some wines, not in the ontologyOne may add facts in the program for such new wines. Eg:white(joo_pires).dry(joo_pires).To allow for integrating this knowledge with that of the ontology, the 1st rule must be changedwine(X) DL[WhiteWinewhite,DryWinedry;Wine](X)In general more should be added in this rule (to allow e.g. for adding, red wines, non red, etc)Try more examples in dlv-Hex!

  • About other approachesThis is just one of the current proposals for mixing rules and ontologiesIs this the approach?There is currently debate on this issueIs it enough to have just a loosely coupling of rules and ontologies?It certainly helps for implementations, as it allows for re-using existing implementations of DL alone and of LP alone.But is it expressive enough in practical?

  • ExtensionsA Well-Founded based semantics for dl-Programs [Eiter et al. 2005] existsBut such doesnt yet exists for other approachesWhat about paraconsistency?Mostly it is yet to be studied!What about belief revision with rules and ontologies?Mostly it is yet to be studied!What about abductive reasoning over rules and ontologies?Mostly it is yet to be studied!What about rule updates when there is an underlying ontology?Mostly it is yet to be studied!What about updates of both rules and ontologies?Mostly it is yet to be studied!What about regarding combination of rules and ontologies?Mostly it is yet to be studied!Plenty of room for PhD theses!Currently it is a hot research topic with many applications and crying out for results!

  • Part 8: Wrap up

  • What we have studied (in a nutshell)Logic rule-based languages for representing common sense knowledgeand reasoning with those languagesMethodologies and languages for dealing with evolution of knowledgeIncluding reasoning about actionsLanguages for defining ontologiesBriefly on the recent topic of combining rules and ontologies

  • What we have studied (1)Logic rule-based languages for representing common sense knowledgeStarted by pointing about the need of non-monotonicity to reason in the presence of incomplete knowledgeThen seminal nonmonotonic languagesDefault LogicsAuto-epistemic logicsFocused in Logic Programming as a nonmonotonic language for representing knowledge

  • What we have studied (2)Logic Programming for Knowledge RepresentationThorough study of semanticsof normal logic programsof extended (paraconsistent) logic programsincluding state of the art semantics and corresponding systemsCorresponding proof procedures allowing for reasoning with Logic ProgramsProgramming under these semanticsAnswer-Set ProgrammingProgramming with tablingExample methodology for representing taxonomies

  • What we have studied (3)Knowledge evolutionMethods and semantics for dealing with inclusion of new information (still in a static world)Introduction to belief revision of theoriesBelief revision in the context of logic programmingAbductive Reasoning in the context of belief revisionApplication to model based diagnosis and debuggingMethods and languages for knowledge updates

  • What we have studied (4)Methods and languages for knowledge updatesMethodologies for reasoning about changesSituation calculusEvent calculusLanguages for describing knowledge that changesAction languagesLogic programming update languagesDynamic LP and EVOLP with corresponding implementations

  • What we have studied (5)Ontologies for defining objects, concepts, and roles, and their structureBasic notions of ontologiesOntology design (exemplified with Protg)Languages for defining ontologiesBasic notions of description logics for representing ontologiesRepresenting knowledge with rules and ontologiesTo close the circleStill a hot research topic

  • What type of issuesA mixture of:Theoretical study of classical issues, well established for several yearsE.g. default and autoepistemic logics, situation and event calculus, Theoretical study of state of the art languages and corresponding systemE.g. answer-sets, well-founded semantics, Dynamic LPs, Action languages, EVOLP, Description logics, Practical usage of state of the art systemsE.g. programming with ASP-solvers, with XSB-Prolog, XASP, Current research issues with still lots of open topicsE.g. Combining rules and ontologies

  • What next in UNL?For MCL only, sorry Semantic WebWhere knowledge representation is applied to the domain of the web, with a big emphasis on languages for representing ontologies in the webAgentsWhere knowledge representation is applied to multi-agent systems, with a focus on knowledge changes and actionsIntegrated Logic SystemsWhere you learn how logic programming systems are implementedProjectA lot can be done in this area.Just contact professors of these courses!

  • What next in partner Universities?Even more for MCL, this time 1st year only In FUBModule on Semantic Web, including course on Description LogicsIn TUDAdvanced course in KRR with seminars on various topics (this year F-Logic, abduction and induction, )General game playing, in which KRR is used for developing general game playing systemsAdvanced course in Description LogicsIn TUWCourses on data and knowledge based systems, and much on answer-set programmingIn UPMCourse on intelligent agents and multi-agent systemsCourse on ontologies and the semantic web

  • The EndFrom now onwards it is up to you!Study for the exam and do the projectIll always be available to help!