1 / 77

Knowledge representation

Knowledge representation. Plan. Knowledge representation and reasoning Logics Rules Frames Knowledge representation in logics First order logic Description logics Non-monotonic logics. Adam Mickiewicz. What we say and what we think.

emera
Download Presentation

Knowledge representation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Knowledge representation Dr hab.inż. Joanna Józefowska, prof. PP

  2. Plan • Knowledge representation and reasoning • Logics • Rules • Frames • Knowledge representation in logics • First order logic • Description logics • Non-monotonic logics Dr hab. inż. Joanna Józefowska, prof. PP

  3. Adam Mickiewicz What we say and what we think Time flies like an arrow but fruit flies like a banana. Chodzi mi o to aby język giętki powiedział wszystko co pomyśli głowa Dr hab. inż. Joanna Józefowska, prof. PP

  4. What we say and what we think I wish my tongue could express everything that my head can imagine Adam Mickiewicz Dr hab. inż. Joanna Józefowska, prof. PP

  5. General goal of knowledge representation develop formalisms for providing high-level descriptions of the world that can be effectively used to build intelligent applications • formalisms – formal syntax + formal and unambiguous semantics Dr hab. inż. Joanna Józefowska, prof. PP

  6. General goal of knowledge representation develop formalisms for providing high-level descriptions of the world that can be effectively used to build intelligent applications • formalisms – formal syntax + formal and unambiguous semantics • high level descriptions – which aspects should be represented and which left out Dr hab. inż. Joanna Józefowska, prof. PP

  7. General goal of knowledge representation develop formalisms for providing high-level descriptions of the world that can be effectively used to build intelligent applications • formalisms – formal syntax + formal and unambiguous semantics • high level descriptions – which aspects should be represented and which left out • intelligent applications – are able to infere new knowledge from given knowledge Dr hab. inż. Joanna Józefowska, prof. PP

  8. General goal of knowledge representation develop formalisms for providing high-level descriptions of the world that can be effectively used to build intelligent applications • formalisms – formal syntax + formal and unambiguous semantics • high level descriptions – which aspects should be represented and which left out • intelligent applications – are able to infere new knowledge from given knowledge • effectively used – reasoning techniques should allow „usable” implementation Dr hab. inż. Joanna Józefowska, prof. PP

  9. Mapping between facts and representation REASONING PROGRAMS INTERNAL REPRESENTATION FACTS NATURAL LANGUAGE REPRESENTATION Dr hab. inż. Joanna Józefowska, prof. PP

  10. Mapping between facts and representation required real reasoning INITIAL FACTS FINAL FACTS foreward representation mapping backward representationmapping program operation INTERNAL REPRESENTATION OF INITIAL FACTS INTERNAL REPRESENTATION OF FINAL FACTS Dr hab. inż. Joanna Józefowska, prof. PP

  11. Spot FACTS REPRESENTATION INFERENCE Every kanguro has a tail. Spot is a kanguro. kanguro(X) => hastail(X) kanguro(spot) X/spot Modus ponens hastail(spot) Spot has a tail Dr hab. inż. Joanna Józefowska, prof. PP

  12. Ambiguity of the mapping All kanguros have tails. Every kanguro has a tail. Every kanguro has exactly one tail. Dr hab. inż. Joanna Józefowska, prof. PP

  13. ... . Representation and effectiveness of reasoning White squares: 32 Black squares: 30 Dr hab. inż. Joanna Józefowska, prof. PP

  14. Knowledge representation techniques Relations between objects (databases) – weak inferencial capabilities. Student File number Score Course Abacki 123456 4.0 Mathematics Babacki 123457 3.5Management Cabacki 123567 3.0 Management Dabacki 123444 4.5Physics ................................................................................................................. Dr hab. inż. Joanna Józefowska, prof. PP

  15. Knowledge representation techniques Inheritance–- corresponds to a set of attributes and associated values that together describe objects of the knowledge base. person(age, sex) ISA student (age, sex, course, file number, average score) ISA student_passing_exam (age, sex, course, file number, average score,score) INSTANCE Abacki (age, sex, course, file number, average score,score) Dr hab. inż. Joanna Józefowska, prof. PP

  16. Universal attributes ISA ISPART INSTANCE Dr hab. inż. Joanna Józefowska, prof. PP

  17. Knowledge representation techniques Inferential knowledge – knowledge about mechanisms that can be used to infere new knowledge from the knowledge base. Examples: deduction, resolution, ... Dr hab. inż. Joanna Józefowska, prof. PP

  18. Knowledge representation techniques Procedural knowledge – „what to do when” delta:= b*b – 4*a*c if delta>0 then begin X[1]:= (-b - sqrt(delta))/2 X[2]:= (-b + sqrt(delta))/2 end ax2 + bx + c = 0 D = b2 - 4ac x1 = (-b - sqrt(D))/2 x2 = (-b + sqrt(D))/2 Dr hab. inż. Joanna Józefowska, prof. PP

  19. Classification of knowledge representation systems • Logics • Predicate logic • Description logics • Nonmonotonic logics • Procedural schemas • Production rules • Structural schemas • Weak slot-and-filler structures • Semantic networks • Frames • Strong slot-and-filler structures • Conceptual dependencies • Stereotypes • Scripts Dr hab. inż. Joanna Józefowska, prof. PP

  20. What’s wrong with predicate logic? • It is undecidable • Reasoning is based only on syntax • Complexity: determining whether a set of statements is satisfiable is NP-complete • Monotonicity: after adding a new fact we can still inferre the same conclusions as from the „smaller” set Dr hab. inż. Joanna Józefowska, prof. PP

  21. Production rules Research conducted in psychology showed that people formulate complex knowledge in the form of production rules IFA THENB IF the car does not start, THEN... Dr hab. inż. Joanna Józefowska, prof. PP

  22. Production rules Research conducted in psychology showed that people formulate complex knowledge in the form of production rules IFA THENB IF the car does not start, THEN... call the assistance center. Dr hab. inż. Joanna Józefowska, prof. PP

  23. Production rules Procedural rules: IF situation THEN action Eg: If you are hungry then eat something. Declarative rules: IF antecendent THEN consequent Eg: If X is an elephant, then X is a mammal. Dr hab. inż. Joanna Józefowska, prof. PP

  24. Expert system architecture Inference mechanism Knowledge base Working memory agenda Knowledge acquisition mechanism Explanation mechanism User interface Dr hab. inż. Joanna Józefowska, prof. PP

  25. Reasoning with rules Inference mechanism Working memory c b a c Knowledge base 1. ba ab 2. ca ac 3. cb bc agenda Knowledge acquisition mechanism Explanation mechanism User interface Dr hab. inż. Joanna Józefowska, prof. PP

  26. Reasoning with rules Inference mechanism Working memory c b a c Knowledge base 1. ba ab 2. ca ac 3. cb bc agenda 3 Knowledge acquisition mechanism Explanation mechanism User interface Dr hab. inż. Joanna Józefowska, prof. PP

  27. Reasoning with rules Inference mechanism Working memory c b a c Knowledge base 1. ba ab 2. ca ac 3. cb bc agenda 3, 1 Knowledge acquisition mechanism Explanation mechanism User interface Dr hab. inż. Joanna Józefowska, prof. PP

  28. Reasoning with rules Inference mechanism Working memory c a b c Knowledge base 1. ba ab 2. ca ac 3. cb bc agenda 2 Knowledge acquisition mechanism Explanation mechanism User interface Dr hab. inż. Joanna Józefowska, prof. PP

  29. Reasoning with rules Inference mechanism Working memory a c b c Knowledge base 1. ba ab 2. ca ac 3. cb bc agenda 3 Knowledge acquisition mechanism Explanation mechanism User interface Dr hab. inż. Joanna Józefowska, prof. PP

  30. Reasoning with rules Inference mechanism Working memory a b c c Knowledge base 1. ba ab 2. ca ac 3. cb bc agenda Knowledge acquisition mechanism Explanation mechanism User interface Dr hab. inż. Joanna Józefowska, prof. PP

  31. Reasoning algorithm (situation-action) while not stop select the rule with the highest priority perform consecutively actions from the right hand side of the rule update the agenda adding rules with left hand side in the working memory If the stop condition is true then stop Conflict resolution: Action: Matching: Stop condition: end while Dr hab. inż. Joanna Józefowska, prof. PP

  32. Description logics DL focus: representation of terminological logic or conceptual logic • formalize the basic terminology of the modelled domain • store it in an ontology / terminology / TBox for reasoning • enable reasoning on that knowledge Dr hab. inż. Joanna Józefowska, prof. PP

  33. Description logics Core part of any DL: concept language • Concept names assign a name to groups of objects • Role names assign a name to relations between objects • Constructors allow to relate concept names and role names Person enrolled_at.University  attends.UnderGradCourse Different sets of constructors give rise to different concept languages Dr hab. inż. Joanna Józefowska, prof. PP

  34. The description logic ALC Concept names – (unary predicates, classes) Example: Student {x | Student(x)} Married {x | Married(x)} Role names – (binary predicates, relations) Example: FRIEND {<x; y> | FRIEND(x; y)} LOVES {<x; y> | LOVES(x; y)} Dr hab. inż. Joanna Józefowska, prof. PP

  35. The description logic ALC Constructors C negation C  D conjunction C  D disjunction R.C existencial restriction R.C value restriction Abbreviations C  D = C  D implication C  D = C  D  D  C bi-implication Ttop concept  bottom concept Dr hab. inż. Joanna Józefowska, prof. PP

  36. Examples Person  Female Person  attends.Course Person  attends.(Course  Easy) Person  teaches.(Course  attended_by.(Bored  Sleeping)) Dr hab. inż. Joanna Józefowska, prof. PP

  37. Interpretations Semantics based on interpretations (DI,  I) DI - is non-epmty set (the domain) I– is the interpretation function mapping each concept name A to a subset AI of DI and each role name R to a binary relation RI over DI. Intuition: interpretation is a complete description of the world. Technically: interpretation is a first order structure with only unary and binary predicates. Dr hab. inż. Joanna Józefowska, prof. PP

  38. Semantics of complex concepts (C)I = DI \ CI (C  D)I = CI DI (C  D)I = CI  DI (R.C)I = {d | there is e  DI with (d,e)  RI and e  CI} (R.C)I = {d | for all e  DI, (d,e)  RI implies e  CI} Dr hab. inż. Joanna Józefowska, prof. PP

  39. Person Lecturer Course teaches attends attends attends Student Sleeping Person Course Difficult Student Person Example Person  attends.Course Person  attends.(Course Difficult) Dr hab. inż. Joanna Józefowska, prof. PP

  40. TBoxes TBoxes are used to store concept definitions Syntax Finite set of concept equations A = C where A – concept name and C – left hand side must be unique! Semantics Interpretation I satisfies A = C iff AI = CI I is a model of T ifit satisfies all definitions in T Two kinds of concepts: defined and primitive. Lecturer = Person  teaches.Course Dr hab. inż. Joanna Józefowska, prof. PP

  41. Person Lecturer Course teaches attends attends attends Student Sleeping Person Course Difficult Student Person TBoxes Tbox restricts the set of admissible interpretations. Student Lecturer = Person  teaches.Course Student = Person  attends.Course Dr hab. inż. Joanna Józefowska, prof. PP

  42. C T D C T D Reasoning task: sumsumption C is subsumed by D with respect to T Iff CI DI holds for all models I of T Intuition If then D is more general than C. Lecturer = Person  teaches.Course Student = Person  attends.Course Lecturer  attends.Course T Student Dr hab. inż. Joanna Józefowska, prof. PP

  43. Person Student Lecturer PhDStudent Reasoning task: classification Arrange all defined objects from TBox in a hierarchy with respect to generality. Lecturer = Person  teaches.Course Student = Person  attends.Course PhDStudent = teaches.Course Student Can be computed using multiple subsumption tests. Dr hab. inż. Joanna Józefowska, prof. PP

  44. C T D iff C   D is not satisfiable w.r.t. T C is satisfiable w.r.t. T iff not C T Reasoning task: satisfiability C is satisfiable w.r.t. T iff T has a model with CI . Intuition: If unsatisfiable the concept contains a contradiction. Woman = Person  Female Man = Person  Female Then sibling.Womansibling.Man Is unsatisfiable w.r.t. T. Subsumption can be reduced to (un)satisfiability and vice versa. Dr hab. inż. Joanna Józefowska, prof. PP

  45. Description logics are more than concept language Knowledge base TBox terminological knowledge background knowledge Use concept language DL Reasoner ABox knowledge about individuals Dr hab. inż. Joanna Józefowska, prof. PP

  46. Definitorial TBoxes • A primitive interpretation for TBox T interprets • the primitive concept names • all role names A TBox is called definitorial if every primitive interpretation for T can be uniquely extended to a model of T. i.e. primitive concepts (and roles) uniquely determine defined concepts. Not all TBoxes are definitorial Person = parent.Person Non-definitorial TBoxes describe constraints, e.g. from background knowledge. Dr hab. inż. Joanna Józefowska, prof. PP

  47. Acyclic TBoxes TBox is acyclic if there are no definitorial cycles. Lecturer = Person  teaches.Course Course = hastitle.Title  tought-by.Lecturer Expansion of acyclic TBox T exhaustively replace defined concept name with their definition (terminates due to acyclicity) Acyclic TBoxes are always definitorial first expand then set AI := CI for all A = C  T Dr hab. inż. Joanna Józefowska, prof. PP

  48. C T D C D Acyclic TBoxes II • For reasoning acyclic TBoxes can be eliminated • to decide with T acyclic • expand T • replace defined concept names in C, D with their definition • decide • analogously for satisfiability May yield an exponential blow-up. Dr hab. inż. Joanna Józefowska, prof. PP

  49. ABoxes An ABox is a finite set of assertions a : C (a – individual name, C – concept) (a,b) : R (a, b – individual names, R – role name) E.g. {peter : Student, (ai-course, joanna) : tought-by} Interpretations I map each individual name a to an element of DI. I satisfies an assertion a : C iff aI CI (a,b) : R iff (aI,bI )  RI I is a model for an Abox A if I satisfies all assertions in A. Dr hab. inż. Joanna Józefowska, prof. PP

  50. ABoxes • Interpretations describe the state of the world in a complete way • ABoxes describe the state of the world in an incomplete way • An ABox has many models • An ABox constraints the set of admissible models similar to a TBox Dr hab. inż. Joanna Józefowska, prof. PP

More Related