1 / 83

Knowledge Representation

Knowledge Representation. دكترمحسن كاهاني http://www.um.ac.ir/~kahani/. Knowledge and its Meaning. Epistemology Types of Knowledge Knowledge Pyramid. Epistemology. the science of knowledge EPISTEMOLOGY ( Gr. episteme, "knowledge"; logos, "theory"),

mead
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 دكترمحسن كاهاني http://www.um.ac.ir/~kahani/

  2. Knowledge and its Meaning • Epistemology • Types of Knowledge • Knowledge Pyramid سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  3. Epistemology • the science of knowledge EPISTEMOLOGY ( Gr. episteme, "knowledge"; logos, "theory"), branch of philosophy concerned with the theory of knowledge. The main problems with which epistemology is concerned are the definition of knowledge and related concepts, the sources and criteria of knowledge, the kinds of knowledge possible and the degree to which each is certain, and the exact relation between the one who knows and the object known. سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  4. Knowledge Definitions knowlaedge \'nS-lij\ n [ME knowlege, fr. knowlechen to acknowledge, irreg. fr. knowen ] (14c) 1 obs : cognizance 2 a (1) : the fact or condition of knowing something with familiarity gained through experience or association (2) : acquaintance with or understanding of a science, art, or technique b (1) : the fact or condition of being aware of something (2) : the range of one's information or understanding <answered to the best of my 4> c : the circumstance or condition of apprehending truth or fact through reasoning : cognition d : the fact or condition of having information or of being learned <a man of unusual 4> 3 archaic : sexual intercourse 4 a : the sum of what is known : the body of truth, information, and principles acquired by mankind b archaic : a branch of learning syn knowledge, learning, erudition, scholarship mean what is or can be known by an individual or by mankind. knowledge applies to facts or ideas acquired by study, investigation, observation, or experience <rich in the knowledge of human nature>. learning applies to knowledge acquired esp. through formal, often advanced, schooling <a book that demonstrates vast learning >. erudition strongly implies the acquiring of profound, recondite, or bookish learning <an erudition unusual even in a scholar>. scholarship implies the possession of learning characteristic of the advanced scholar in a specialized field of study or investigation <a work of first-rate literary scholarship >. سيستمهاي خبره و مهندسي دانش-دكتر كاهاني [Merriam-Webster, 1994]

  5. Types of Knowledge • a priori knowledge • comes before knowledge perceived through senses • considered to be universally true • a posteriori knowledge • knowledge verifiable through the senses • may not always be reliable • procedural knowledge • knowing how to do something • declarative knowledge • knowing that something is true or false • tacit knowledge • knowledge not easily expressed by language سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  6. Conventional Programming Knowledge-Based Systems Knowledge in Expert Systems Knowledge + Inference = Expert System Algorithms + Data Structures = Programs سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  7. Review of Knowledge Representation Criteria • Definition of Knowledge Representation: A formalism for representing in a computer, facts and other kinds of knowledge about a subject or specialty such that these facts and knowledge can be used in reasoning. سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  8. Criteria of Adequacy:Metaphysical Adequacy • The representation scheme cannot contradict the actual, real world circumstance, either by ignoring certain things that actually happen or by allowing things to happen that do not. • An expert system is a representation of the real world, therefore it must reflect the real world. سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  9. Epistemic Adequacy • The K.R. scheme must be able to represent facts, usually about individuals and their relations and attributes. سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  10. Heuristic Adequacy • The K.R. scheme must be able to express the reasoning used to solve a problem. Probably the most difficult of these criteria to meet. سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  11. Computational Tractability • The K.R. scheme must be able to manipulate the representation using a computer system. سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  12. Expressiveness • These criteria are "nice", but not necessary. • Adequacy criteria are necessary سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  13. Lack of Ambiguity • only one interpretation سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  14. Clarity • Can humans understand what is being said as well as the computer? • Can take this further: we would like the use of the KR to increase or clarify our knowledge of the domain. سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  15. Uniformity • Able to handle all types of knowledge we need to represent in a uniform fashion. • Difficult to represent every type of knowledge (heuristic vs fact, etc) in a different manner. سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  16. Notational convenience • does the knowledge fit the representation? • is the developer comfortable with the representation scheme? سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  17. Declarativeness • not procedural, "processing" should not change or impact the meaning. • A representation is declarative if: • the meanings of the statements are independent of the use made of the statements • referential transparency also exists. Referential transparency exists when equivalent expressions can always be substituted for one another while preserving the truth value of the statements in which they occur. سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  18. Knowledge Representation Methods • Production Rules • Structured Objects • Semantic Nets • Frames • Logic سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  19. Production Rule Representations • Consists of <condition,action> pairs • Agent checks if a condition holds • If so, the production rule “fires” and the action is carried out • This is a recognize-act cycle • Given a new situation (state) • Multiple production rules will fire at once • Call this the conflict set • Agent must choose from this set • Call this conflict resolution • Production system is any agent • Which performs using recognize-act cycles سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  20. Case Studies Production Rules • sample domains • e.g. theorem proving, determination of prime numbers, distinction of objects (e.g. types of fruit, trees vs. telephone poles, churches vs. houses, animal species) • suitability of production rules • basic production rules • no salience, certainty factors, arithmetic • rules in ES/KBS • salience, certainty factors, arithmetic • e.g. CLIPS, Jess • enhanced rules • procedural constructs • e.g. loops • objects • e.g. COOL, Java objects • fuzzy logic • e.g. FuzzyCLIPS, FuzzyJ سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  21. Advantages of Production Rules • simple and easy to understand • straightforward implementation in computers possible • formal foundations for some variants سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  22. Problems with Production Rules • simple implementations are very inefficient • some types of knowledge are not easily expressed in such rules • large sets of rules become difficult to understand and maintain سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  23. Semantic Nets • graphical representation for propositional information • originally developed by M. R. Quillian as a model for human memory • labeled, directed graph • nodes represent objects, concepts, or situations • labels indicate the name • nodes can be instances (individual objects) or classes (generic nodes) • links represent relationships • the relationships contain the structural information of the knowledge to be represented • the label indicates the type of the relationship سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  24. Example سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  25. Relationships • without relationships, knowledge is an unrelated collection of facts • reasoning about these facts is not very interesting • inductive reasoning is possible • relationships express structure in the collection of facts • this allows the generation of meaningful new knowledge • generation of new facts • generation of new relationships سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  26. Types of Relationships • relationships can be arbitrarily defined by the knowledge engineer • allows great flexibility • for reasoning, the inference mechanism must know how relationships can be used to generate new knowledge • inference methods may have to be specified for every relationship • frequently used relationships • IS-A • relates an instance (individual node) to a class (generic node) • AKO (a-kind-of) • relates one class (subclass) to another class (superclass) سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  27. Objects and Attributes • attributes provide more detailed information on nodes in a semantic network • often expressed as properties • combination of attribute and value • attributes can be expressed as relationships • e.g. has-attribute سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  28. Implementation Questions • simple and efficient representation schemes for semantic nets • tables that list all objects and their properties • tables or linked lists for relationships • conversion into different representation methods • predicate logic • nodes correspond variables or constants • links correspond to predicates • propositional logic • nodes and links have to be translated into propositional variables and properly combined with logical connectives سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  29. OAV-Triples • object-attribute-value triplets • can be used to characterize the knowledge in a semantic net • quickly leads to huge tables سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  30. Problems Semantic Nets • expressiveness • no internal structure of nodes • relationships between multiple nodes • no easy way to represent heuristic information • extensions are possible, but cumbersome • best suited for binary relationships • efficiency • may result in large sets of nodes and links • search may lead to combinatorial explosion • especially for queries with negative results • usability • lack of standards for link types • naming of nodes • classes, instances سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  31. Frame • represents related knowledge about a subject • provides default values for most slots • frames are organized hierarchically • allows the use of inheritance • knowledge is usually organized according to cause and effect relationships • slots can contain all kinds of items • rules, facts, images, video, comments, debugging info, questions, hypotheses, other frames • slots can also have procedural attachments • procedures that are invoked in specific situations involving a particular slot • on creation, modification, removal of the slot value سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  32. Simple Frame Example سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  33. Overview of Frame Structure • two basic elements: slots and facets (fillers, values, etc.); • typically have parent and offspring slots • used to establish a property inheritance hierarchy (e.g., specialization-of) • descriptive slots • contain declarative information or data (static knowledge) • procedural attachments • contain functions which can direct the reasoning process (dynamic knowledge) (e.g., "activate a certain rule if a value exceeds a given level") • data-driven, event-driven ( bottom-up reasoning) • expectation-drive or top-down reasoning • pointers to related frames/scripts - can be used to transfer control to a more appropriate frame سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  34. Slots • each slot contains one or more facets • facets may take the following forms: • values • default • used if there is not other value present • range • what kind of information can appear in the slot • if-added • procedural attachment which specifies an action to be taken when a value in the slot is added or modified (data-driven, event-driven or bottom-up reasoning) • if-needed • procedural attachment which triggers a procedure which goes out to get information which the slot doesn't have (expectation-driven; top-down reasoning) • other • may contain frames, rules, semantic networks, or other types of knowledge سيستمهاي خبره و مهندسي دانش-دكتر كاهاني [Rogers 1999]

  35. Usage of Frames • filling slots in frames • can inherit the value directly • can get a default value • these two are relatively inexpensive • can derive information through the attached procedures (or methods) that also take advantage of current context (slot-specific heuristics) • filling in slots also confirms that frame or script is appropriate for this particular situation سيستمهاي خبره و مهندسي دانش-دكتر كاهاني [Rogers 1999]

  36. Restaurant Frame Example • generic template for restaurants • different types • default values • script for a typical sequence of activities at a restaurant سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  37. Generic Restaurant Frame Generic RESTAURANT Frame Specialization-of: Business-Establishment Types: range: (Cafeteria, Fast-Food, Seat-Yourself, Wait-To-Be-Seated) default: Seat-Yourself if-needed: IF plastic-orange-counter THEN Fast-Food, IF stack-of-trays THEN Cafeteria, IF wait-for-waitress-sign or reservations-made THEN Wait-To-Be-Seated, OTHERWISE Seat-Yourself. Location: range: an ADDRESS if-needed: (Look at the MENU) Name: if-needed: (Look at the MENU) Food-Style: range: (Burgers, Chinese, American, Seafood, French) default: American if-added: (Update Alternatives of Restaurant) Times-of-Operation: range: a Time-of-Day default: open evenings except Mondays Payment-Form: range: (Cash, CreditCard, Check, Washing-Dishes-Script) Event-Sequence: default: Eat-at-Restaurant Script Alternatives: range: all restaurants with same Foodstyle if-needed: (Find all Restaurants with the same Foodstyle) سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  38. Frame Advantages • fairly intuitive for many applications • similar to human knowledge organization • suitable for causal knowledge • easier to understand than logic or rules • very flexible سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  39. Frame Problems • it is tempting to use frames as definitions of concepts • not appropriate because there may be valid instances of a concept that do not fit the stereotype • exceptions can be used to overcome this • can get very messy • inheritance • not all properties of a class stereotype should be propagated to subclasses • alteration of slots can have unintended consequences in subclasses سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  40. Introduction to Logic • expresses knowledge in a particular mathematical notation All birds have wings --> x. Bird(x) -> HasWings(x) • rules of inference • guarantee that, given true facts or premises, the new facts or premises derived by applying the rules are also true All robins are birds -->  x Robin(x) -> Bird(x) • given these two facts, application of an inference rule gives:  x Robin(x) -> HasWings(x) سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  41. Logic and Knowledge • rules of inference act on the superficial structure or syntax of the first 2 formulas • doesn't say anything about the meaning of birds and robins • could have substituted mammals and elephants etc. • major advantages of this approach • deductions are guaranteed to be correct to an extent that other representation schemes have not yet reached • easy to automate derivation of new facts • problems • computational efficiency • uncertain, incomplete, imprecise knowledge سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  42. Summary of Logic Languages • propositional logic • facts • true/false/unknown • first-order logic • facts, objects, relations • true/false/unknown • temporal logic • facts, objects, relations, times • true/false/unknown • probability theory • facts • degree of belief [0..1] • fuzzy logic • degree of truth • degree of belief [0..1] سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  43. Syntax of Propositional Logic • A BNF (Backus-Naur Form) grammar of sentences in propositional logic Sentence -> AtomicSentence | ComplexSentence AtomicSentence -> True | False | P | Q | R | ... ComplexSentence -> (Sentence) | Sentence Connective Sentence | ~Sentence Connective -> ^ | V | <=> | => سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  44. Inference Rules • more efficient than truth tables سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  45. Modus Ponens • eliminates => (X => Y), X ______________ Y • If it rains, then the streets will be wet. • It is raining. • Infer the conclusion: The streets will be wet. (affirms the antecedent) سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  46. Modus tollens (X => Y), ~Y _______________ ¬ X • If it rains, then the streets will be wet. • The streets are not wet. • Infer the conclusion: It is not raining. • NOTE: Avoid the fallacy of affirming the consequent: • If it rains, then the streets will be wet. • The streets are wet. • cannot conclude that it is raining. • If Bacon wrote Hamlet, then Bacon was a great writer. • Bacon was a great writer. • cannot conclude that Bacon wrote Hamlet. سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  47. Syllogism • chain implications to deduce a conclusion) (X => Y), (Y => Z) _____________________ (X => Z) سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  48. Resolution (X v Y), (~Y v Z) _________________ (X v Z) • basis for the inference mechanism in the Prolog language and some theorem provers سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  49. Complexity issues • truth table enumerates 2n rows of the table for any proof involving n symbol • it is complete • computation time is exponential in n • checking a set of sentences for satisfiability is NP-complete • but there are some circumstances where the proof only involves a small subset of the KB, so can do some of the work in polynomial time • if a KB is monotonic (i.e., even if we add new sentences to a KB, all the sentences entailed by the original KB are still entailed by the new larger KB), then you can apply an inference rule locally (i.e., don't have to go checking the entire KB) سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

  50. Predicate Logic • new concepts (in addition to propositional logic) • complex objects • terms • relations • predicates • quantifiers • syntax • semantics • inference rules • usage سيستمهاي خبره و مهندسي دانش-دكتر كاهاني

More Related