knowledge-based systems. course overview introduction knowledge representation semantic nets,...

182
Knowledge-Based Knowledge-Based Systems Systems

Upload: amber-lawson

Post on 04-Jan-2016

220 views

Category:

Documents


0 download

TRANSCRIPT

  • Knowledge-Based Systems

  • Course OverviewIntroductionKnowledge RepresentationSemantic Nets, Frames, LogicReasoning and InferencePredicate Logic, Inference Methods, ResolutionReasoning with Uncertainty Probability, Bayesian Decision MakingPattern MatchingVariables, Functions, Expressions, ConstraintsExpert System DesignES Life CycleExpert System ImplementationSalience, Rete AlgorithmExpert System ExamplesConclusions and Outlook

  • Overview Knowledge RepresentationMotivationObjectivesChapter IntroductionReview of relevant conceptsOverview new topicsTerminologyKnowledge and its MeaningEpistemologyTypes of KnowledgeKnowledge PyramidKnowledge Representation MethodsProduction RulesSemantic NetsSchemata and FramesLogicSemantic Web and KROntologiesOWL RDFImportant Concepts and TermsChapter Summary

  • MotivationKBS are useless without the ability to represent knowledgedifferent knowledge representation schemes may be appropriatedepending on tasks and circumstancesknowledge representation schemes and reasoning methods must be coordinated

  • Objectivesknow the basic principles and concepts for knowledge representationknowledge - information - datameaningbe familiar with the most frequently used knowledge representation methodslogic, rules, semantic nets, schematadifferences between methods, advantages, disadvantages, performance, typical scenariosunderstand the relationship between knowledge representation and reasoningsyntax, semanticsderivation, entailmentapply knowledge representation methodsusage of the methods for simple problems

  • Knowledge EngineeringThe process of building an expert system iscalled knowledge EngineeringIterative and incremental

  • Knowledge Engineering Phases

  • Phase 1: Assessment Phase

    Problem practicalityExpert System Creation JustificationDetermine General Project IdeaDetermine needed resources

  • Phase 2: knowledge acquisitionKnowledge Acquisition: study of knowledge , acquisition, organizationKnowledge Acquisition Knowledge base creationIdentification of knowledge resource (human or nonhuman)Design methods for knowledge extraction from resources according to resource typeExtract knowledge from resources according to designed methodsKnowledge integration

  • Phase 3: DesignRepresentation techniquesSave knowledge in knowledge baseKnowledge Processing and inferences TechniquesPrototype

  • TestFeedback to previous PhasesObjective: System general structure and extracted knowledge validation and verificationUse Expert guidance

  • Knowledge and its MeaningEpistemology( ) .Types of KnowledgeKnowledge Pyramid

  • Types of Knowledgea priori knowledge (theoretical knowledge)comes before knowledge perceived through sensesconsidered to be universally truea posteriori knowledge (empirical knowledge)knowledge verifiable through the sensesmay not always be reliableprocedural knowledgeknowing how to do somethingdeclarative knowledgeknowing that something is true or false

  • Types of KnowledgeTacit knowledge (unconscious knowledge)knowledge not easily expressed by language => => Neural NetworkCertain KnowledgeUncertain knowledge

  • Knowledge in Expert SystemsConventional Programming Knowledge-Based SystemsAlgorithms + Data Structures = ProgramsKnowledge+ Inference = Expert System

  • Knowledge PyramidNoiseDataInformationKnowledgeMeta-Knowledge

  • Knowledge Representation MethodsSuppose Access to Problem knowledgeProblem Knowledge > LKnowledge Intelligible for machines LConvert L to LInefficiency Of Conventional LanguageNeed New language

  • Knowledge Representation Methods: L PropertiesSupport knowledge representation (procedural/ declarative, certain/ uncertain)Easy

  • Knowledge Representation Methods: LProduction RulesSemantic NetsScripts and FramesLogicConceptual graphsObject-Attribute-Value TripleComparison based on superficial independence , simplicity and intelligibly

  • Production Rulesfrequently used to formulate the knowledge in expert systemsKnowledge of Problem is formulated in the form of rules:C1, c2, c3, XEach rule identify the relationship between a sequence of observations and a result

  • Production RulesObservations:Attribute - value pairResult of a ruleProcedureExample:Weather- cold, cloudy-yes RainyHoliday- yes, Rainy-yes stay at home

  • Production RulesRules have Superficial independence but can be dependent semanticallySuperficial independenceEasy management

  • Production Rules1. If the balls color isred Then I like the ball2. If I like the ballThen I will buy the ballQuestion: Balls Color?Answer: Red

  • Example1. If the balls color isred Then I like the ball2. If I like the ballThen I will buy the ball

  • Rules TypeRelationship RulesIF the battery is dead Then the car will not startRecommendation RulesIF the car will not start THEN take a cabDirective RulesIF the car will not start AND the fuel system is okTHEN check out the electrical system

  • Rules TypeStrategy RulesIF the car will not start THEN first check out thefuel system THEN check out the electrical systemHeuristic RulesIF the car will not start AND the car is a 1957Ford THEN check the float

  • Rules TypePattern Matching RulesIF ?X is Employee AND ?X Age>65 THEN ?X can retireMeta RulesIF the car will not start AND the electrical Systemis operating normally THEN use rules concerning the fuel system

  • ProductionsOne formal notation for defining productions is the BNF( Backus-Naur form)This notation is a Metalanguage for defining the syntax of a languageSyntax define formSemantic refer to meaningA metalanguage is language for describing languages

  • ProductionsMany Type of languages:Natural languages, logic languages, mathematical languages, and computer languagesBNF notation for a simple language rule that a sentence consists of a noun and a verb followed by punctuation is the following production rule: , ::= are symbols of metalanguage::= means is defined as and is BNF equivalent of Term within are nonterminal symbolsTerminal cannot be replaced by anything else and so is a constant

  • ProductionsThe following rules complete the nonterminals by specifying their possible terminalsBar means or in the metalanguage

  • ProductionsString (set of terminals)Valid Sentence( string can be derived from the start symbol)Grammar: Complete set of production rules that define a language

  • ProductionsParse Tree or Derivation Tree:Graphic representation of a sentence decomposed into all the terminals and nonterminals used to derive the sentence

  • ProductionsCompiler create a parse tree when it tries to determine whether statements in a program Conform to the valid syntax of a language

  • Production SystemKnowledge base (Production Rules)Working MemoryInterpreter (Inference Engine)Three steps called the recognize-act cycle:1. Match the variables of the antecedent of a rule in knowledge base with WM2. If more than one rule is available decide which rule to fire (a strategy for conflict resolution)3. Add new item to WM or delete old item from WM and go to step 1

  • Conflict Resolution strategiesRefractorinessSame rule could not be fired more than once when instantiated with the same set of dataSolution: discard or delete the instantiations from WM which have been used once avoid loopRecencyMost recent element of the working memory be used up for instantiating one of the rulesSpecificityRule with more number of antecedent clauses be fired than rules handling fewer antecedent clauses

  • Conflict Resolution strategiesSpecificityRule with more number of antecedent clauses be fired than rules handling fewer antecedent clausesExamplePR1: Bird(X) Fly(X)PR2: Bird(X),Not emu(X) Fly(x)Suppose: WM contains the Data Bird(X) and Not emu.Both rule are firable. However the second rule should be fired.

  • Conflict Resolution strategiesMYCYN use another approach for resolving conflicts via metarulesMetarules can be either domain-specific or domain-freeDomain-Specific metarule: applicable for identifying the rule to fire only in a specific domainsDomain-free rules: very general kind

  • Conflict Resolution strategiesDomain-Specific metarule:If 1) the infection is pelvic abscess 2)and there are rules which mention in their premise entero-bactoriae and 3) there are rules which mention in their premise gram-positive rodsThen there exists suggestive evidence (0.4) that the former should be applied before the later

  • Conflict Resolution strategiesDomain-free ruleIf 1) there are rules which do not mention the current goal in their premise and2) there are rules which mention the current goal in their premiseThen it is definite (1.0) that former should be applied before the later

  • The conflict resolution with two rules PRi and PRj has beendemonstrated in this architecture.

  • An Illustrative Production Systemwater-jug problem:Given 2 water jugs, 4 liters and 3 liters. Neither hasAny measuring marks on it. There is a pump thatcan be used to fill the jugs. How can you getexactly 2 liters of water into 4-liter jugs?

  • An Illustrative Production SystemU denote content of 4L jugV denote content of 3L jugContent of two jug will be represented by (U,V)Start up element in WM is (0,0)

  • An Illustrative Praoduction System:PR

  • An Illustrative Production Systemkeep track of the reasoning process draw a state-space for the problem. leaves generated after firing of the rules, should be stored in WM. first consider all possibilities of the solution (i.e., without resolving the conflict). Later we would fire only one rule even though more than one are fireable.

  • State Space without conflict resolution

  • Conflict Resolution Strategy Avoid doubling back, whenever possible. In other words, never attempt to generate old entries.

    Rete Match Algorithm?

  • Type of Production Systemstwo special types of production systems: i) commutative system ( )ii) decomposable system( )

  • Commutative Production SystemA production system is called commutative if for a given set of rules R and a working memory WM the following conditions are satisfiedi) Freedom in orderliness of rule firing: Arbitrary order of firing of the applicable rules selected from set S will not make a difference in the content of WM. In other words, the WM that results due to an application of a sequence of rules from S is invariant under the permutation of the sequence.

  • Commutative Production Systemii) Invariance of the pre-condition of attaining goal: If the pre-condition of a goal is satisfied by WM before firing of a rule, then it should remain satisfiable after firing of the rule.iii) Independence of rules: The firability condition of an yet unfired rule Ri with respect to WM remains unaltered, even after firing of the rule Rj for any j.

  • Decomposable Production SystemA production system is called decomposable if the goal G and the working memory can be partitioned into Gi and WMi, such thatG = ANDi (Gi ),WM = { WMi } irules are applied onto each WMi independently or concurrently to yield Gi. The termination of search occurs when all the goals Gi for all i have been identified.

  • Forward versus BackwardProduction SystemsMost of the common classical reasoning problems of AI can be solved by any of the following two techniques:i) forward reasoning or forward chaining (Top-Down)ii) backward reasoning backward chaining (Bottom-UP)

  • Forward versus BackwardProduction SystemsIn a forward reasoning problem such as 4-puzzle games or the water-jug problem, where the goal state is known, the problem solver has to identify the states by which the goal can be reached. These class of problems are generally solved by expanding states from the known starting states with the help of a domain-specific knowledge base. The generation of states from their predecessor states may be continued until the goal is reached.

  • Forward versus BackwardProduction SystemsOn the other hand, consider the problem of system diagnosis or driving a car from an unknown place to home. Here, the problems can be easily solved by employing backward reasoning, since the neighboring states of the goal node are known better than the neighboring states of the starting states. For example, in diagnosis problems, the measurement points are known better than the cause of defects.for the driving problem, the roads close to home are known better than the roads close to the unknown starting location of driving. It is thus clear that, whatever be the class of problems, system states from starting state to goal or vice versa are to be identified, which requires expanding one state to one or more states.

  • Forward versus BackwardProduction SystemsIf there exists no knowledge to identify the right offspring state from a given state, then many possible offspring states are generated from a known state. This enhances the search-space for the goal. When the distance (in arc length) between the starting state and goal state is long, determining the intermediate states and the optimal path (minimum arc length path) between the starting and the goal state becomes a complex problem.

  • Forward versus BackwardProduction SystemsForward ReasoningRule BaseForward Inference Engine211Observations3ResponseES

  • Forward Reasoning: Inference Mechanism1. Perceive Inputs2. Interpret Inputs based on observations3. Apply action in the environment

    Point No explicit input problemUse WM for observation managementRelation of inference engine and environment by using WMWM is a World model (Inference mechanism0

  • Forward Reasoning AlgorithmBased on WM search KB for rules that their condition are available in WM (loop until find something)1. If more than one rule are available select one of them (Conflict resolution)2. Execute (fire) the selected rule (transfer its consequence to WM)3. Go to step 1

    Point: Time between rule selection and execution!!!

  • Forward Reasoning AlgorithmExample:X A-1, B-2, C-3Y C - >2Z Y, D-1X D-1, M-4

    WM: [A-1, B-2, C-3, M-4, D-1]

  • Forward versus BackwardProduction SystemsBackward ReasoningRule BaseBackward Inference Engine21Problem4ResponseESObservations33

  • Inference Mechanism1. Problem trigger inference engine 2. Looking for observations which are needed for solving the problem3. Apply action in the environment

    Point Identification of the problem (correct problem)

  • Forward & Backward ComparisonForward:Observe the entire environment at any instance of timeObservation management (by using working memory)Backward:No need to observeSimple observation management mechanism

  • Forward versus BackwardProduction SystemsThe following example illustrates the principle of forward and backward reasoning with reference to the well-known farmers fox-goat-cabbage problem.

  • farmers fox-goat-cabbage problemExample : The problem may be stated as follows. A farmer wants to transfer his three belongings, a wolf, a goat and a cabbage, by a boat from the left bank of a river to its right bank. The boat can carry at most two items including the farmer. If unattended, the wolf may eat up the goat and the goat may eat up the cabbage. How should the farmer plan to transfer the items?

  • farmers fox-goat-cabbage problemThe illegal states in the problem are (W,G | | F,C) , (G,C | | F,W), (F, W | | G, C) and ( F, C | | W, G) where F, G, | |, W and C denote the farmer, the goat, the river, the wolf and the cabbage respectively.

  • part of the knowledge basePR 1: (F, G, W, C | | Nil ) ( W, C | | F, G)PR 2: (W, C | | F, G) ( F, W, C | | G)PR 3: (F, W, C | | G) (C | | F, W, G)PR 4: (C | | F, W, G) ( F, G, C | | W)PR5: (F, G, C | | W) (G | | F, W, C)PR 6: ( G | | F, W, C) ( F, G | | W, C)PR 7: ( F, G, | | W, C) ( Nil | | F,G, W, C)PR 8 ( F, W, C | | G) ( W | | F, G, C)PR 9: ( W | | F, G, C) ( F, G, W | | C)PR 10: ( F, G, W | | C) ( G | | F, W, C)PR 11: ( G | | F, W, C) ( F, G | | W,C)PR 12: ( F, G | | W, C) ( Nil | | F, G, W, C)

  • Forward ReasoningStarting state: ( F, G, W, C | | Nil) Goal state (Nil | | F, G, W, C)one may expand the state-space, starting with (F,G,W,C | | Nil) by the supplied knowledge base, as follows:

  • Backward ReasoningThe backward reasoning scheme can also be invoked for the problem. The reasoning starts with the goal and identifies a rule whose right-hand side contains the goal. It then generates the left side of the rule in a backward manner. The resulting antecedents of the rules are called sub-goals. The sub-goals are again searched among the consequent part of the rules and on a successful match the antecedent parts of the rule are generated as the new sub-goals. The process is thus continued until the starting node is obtained.

  • A caution about backward reasoningBackward reasoning1 in many circumstances does not support the logical semantics of problem solving. It may even infer wrong conclusions, when a goal or sub-goal (any intermediate state leading to the goal ) has multiple causes for occurrence, and by backward reasoning we miss the right cause and select a wrong cause as its predecessor in the state-space graph.

  • ExampleExample 3.4: Consider the following knowledge base, the starting state and the goal state for a hypothetical problem. The , in the left-hand side of the production rules PR 1 through PR 4 denotes joint occurrence of them.PR 1: p, q sPR 2: s, t uPR 3: p, q, r wPR 4: w vPR 5 : v, t uStarting state: p and qGoal state: u.Other facts: t.

  • The state-space graph for the hypothetical problem indicates that the goal can be correctly inferred by forward reasoning. However, backward reasoning may infer a wrong conclusion: p and q and r, if PR 5, PR 4 and PR 3 are used in order starting with the goal. Note that r is an extraneous premise, derived by backward reasoning. But in practice the goal is caused due to p, q and t only. Hence, backward reasoning may sometimes yield wrong inferences.

  • Bi-directional ReasoningInstead of employing either forward or backward reasoning, both of them may be used together in automated problem solving. This is required especially in situations when expanding from either direction leads to a large state-space.

  • Bi-directional Reasoning

  • Advantages of Production Rulesexpressivenesscan relevant aspects of the domain knowledge be stated through rules?computational efficiencyeasy to understand?can humans interpret the ruleseasy to generate?how difficult is it for humans to construct rules that reflect the domain knowledge

  • Advantages of Production Rulesstraightforward implementation in computers possible

  • Problems with Production Rulessimple implementations are very inefficientsome types of knowledge are not easily expressed in such ruleslarge sets of rules become difficult to understand and maintain

  • Semantic NetworkMuch human information is organized in terms of concepts that are linked to each other.Nouns are organized in terms of kind and part relations.E.g. a spaniel is a kind of dog which is a kind of animal.E.g. a claw is part of a foot which is part of a leg which is part of a dog.Verbs are organized in terms of ways of doing, e.g. digging is one way of removing.

  • Semantic Netsgraphical representation for propositional informationoriginally developed by M. R. Quillian as a model for human memoryKnowledge Representation using graph composed of nodes and edgesnodes represent objects, concepts, or situationslabels indicate the namenodes can be instances (individual objects) or classes (generic nodes)links represent relationshipsthe label indicates the type of the relationshipwithout relationships, knowledge is an unrelated collection of facts

  • Types of Relationshipsrelationships can be arbitrarily defined by the knowledge engineerallows great flexibilityfor reasoning, the inference mechanism must know how relationships can be used to generate new knowledgeinference methods may have to be specified for every relationshipfrequently used relationshipsIS-A relates an instance (individual node) to a class (generic node)

  • Objects and AttributesAKO (a-kind-of)relates one class (subclass) to another class (superclass)attributes provide more detailed information on nodes in a semantic networkoften expressed as properties combination of attribute and valueattributes can be expressed as relationshipse.g. has-attribute

  • Semantic NetsPoints: Bird has wings Move with fly canary is-a bird direction is importantGraph has three attributes: Has, Is-A, Travel

  • Semantic NetworksSemantic Networks can extend bySame ConceptsSpecializeGeneralize

  • Semantic Networks

  • InheritanceIs an important attribute in Semantic NetworksMeans that Concept or attribute inherit from a nodeRepresent by Is-AExample: Bird has all attributes of animalsInheritance decrease knowledge base, prevent repetition

  • Semantix Net Example GaulAstrixOblixIdfixDogAbraracourcixPanoramixOrdralfabetixCtautomatixis-ais-ais-ais-ais-ais-ais-abarks-attakes-care-ofis-friend-ofis-boss-ofis-boss-offights-withsells-tobuys-fromlives-withHumanAKO[http://www.asterix.tm.fr]

  • Semantix Net Example

  • Problems Semantic Netsexpressivenessno internal structure of nodesrelationships between multiple nodesno easy way to represent heuristic informationbest suited for binary relationshipsefficiencymay result in large sets of nodes and linksusabilitylack of standards for link types naming of nodesclasses, instances

  • Semantic networkUnsuitableDeclarative KnowledgeProcedural KnowledgeSuperficial Knowledge Structure

  • Semantic NetworkSuperficial Knowledge StructureKnowledge structured in the form of relationship and semantic network nodesDeep Knowledge Structurecausal relationships between a percept or action and its outcomeExplain why events occurred

  • Semantic NetworksMedicine Expert SystemSuperficial KnowledgeFirst ruleIF a person has a fever then take an asprinBiochemical Bases of human body? Why asprin decreases feverIf a person has a pink monkey then take a refrigerator

  • Semantic NetworksSuperficial aspect of the knowledge of expert system depends on combination of sentences not their meaningsYou can replace every two words with X,Y in the Following Rule:If a person has a x then take a yX and Y arent variables but identify any Two Words

  • Semantic NetworksMedicos have causal knowledgeVarious careers and have many experiencesIf a method doesnt work Medico can reason and replace method with another methodKnowledge Of real environments often cant represent by semantic networksWe need more complicated Structures

  • Semantic NetworksKnowledge Structure and Data StructureInstead of data an ordered set of knowledge considered

  • There are other kinds of links between concepts representing other kinds of links, e.g. STUDENT islinked to COURSES because students TAKE courses.Exercise: draw a semantic network for UNIVERSITY, including part, kind, and other relations

  • Object-Attribute-ValueSemantic NetOne problem: No standard definition of link namesIS-A (IS-A and AKO)IS-A and Instance-ofART Expert system: IS-A (AKO) and Instance-of

  • Object-Attribute-ValueAnother common link is HAS-AHAS-A( class to subclass opposite AKO)IS-A relate a value to an attribute whereas a HAS-A relates an object to an attribute

  • Object-Attribute-ValueThree items of object-attribute-value( OAV) occur frequently build simple semantic net using themThe semantic net for such as system consists of nodes for objects, attributes and values connected by HAS-A and IS-A links

  • Schematasuitable for the representation of more complex knowledgecausal relationships between a percept or action and its outcomedeeper knowledge than semantic networksnodes can have an internal structurefor humans often tacit knowledgerelated to the notion of records in computer science

  • Concept Schemaabstraction that captures general/typical properties of objectshas the most important properties that one usually associates with an object of that typemay be dependent on task, context, background and capabilities of the user, similar to stereotypesmakes reasoning simpler by concentrating on the essential aspectsmay still require relationship-specific inference methods

  • SchemaSchemata Has internal structures for nodesunlike semantic networks (labels says every thing)Semantic networks data structures that search is based on the data saved in the nodesSchemata is same as a data structure that nodes contains records

  • Schema Examplesthe most frequently used instances of schemata areframes [Minsky 1975]scripts [Schank 1977]frames consist of a group of slots and fillers to define a stereotypical objectsscripts are time-ordered sequences of frames

  • . : (IS-A) . . ==> : .

  • UML . ==> ==> lisp . procedure ==>

  • :

  • . => : => : 1 x =>

  • ( --> ) ( --> ) . . .

  • : 1 : (concept ) (instance )

  • : ( ) . .

  • : : : string(30) : :

  • : ....( ) .(slot )

  • 01X11/11/2004250 ( slot ( ))

  • if-needed if-changed .

  • Framerepresents related knowledge about a subjectprovides default values for most slotsframes are organized hierarchically allows the use of inheritanceknowledge is usually organized according to cause and effect relationshipsslots can contain all kinds of itemsrules, facts, images, video, comments, debugging info, questions, hypotheses, other framesslots can also have procedural attachmentsprocedures that are invoked in specific situations involving a particular sloton creation, modification, removal of the slot value

  • Simple Frame Example

    Slot NameFillernameAstrixheightsmallweightlowprofessionwarriorarmorhelmetintelligencevery highmarital statuspresumed single

  • Overview of Frame Structuretwo basic elements: slots and facets (fillers, values, etc.); typically have parent and offspring slotsused to establish a property inheritance hierarchy (e.g., specialization-of) descriptive slotscontain declarative information or data (static knowledge) procedural attachmentscontain 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 [Rogers 1999]

  • Slotseach slot contains one or more facetsfacets may take the following forms: values defaultused if there is not other value present rangewhat kind of information can appear in the slot if-addedprocedural 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-neededprocedural attachment which triggers a procedure which goes out to get information which the slot doesn't have (expectation-driven; top-down reasoning) othermay contain frames, rules, semantic networks, or other types of knowledge [Rogers 1999]

  • Usage of Framesfilling slots in framescan 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]

  • Restaurant Frame Examplegeneric template for restaurantsdifferent typesdefault valuesscript for a typical sequence of activities at a restaurant[Rogers 1999]

  • Generic RESTAURANT Frame

    Specialization-of: Business-EstablishmentTypes: 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 MondaysPayment-Form: range: (Cash, CreditCard, Check, Washing-Dishes-Script)Event-Sequence: default: Eat-at-Restaurant ScriptAlternatives: range: all restaurants with same Foodstyle if-needed: (Find all Restaurants with the same Foodstyle)[Rogers 1999]

  • Restaurant ScriptEAT-AT-RESTAURANT Script

    Props: (Restaurant, Money, Food, Menu, Tables, Chairs)Roles: (Hungry-Persons, Wait-Persons, Chef-Persons)Point-of-View: Hungry-PersonsTime-of-Occurrence: (Times-of-Operation of Restaurant)Place-of-Occurrence: (Location of Restaurant)Event-Sequence: first: Enter-Restaurant Script then: if (Wait-To-Be-Seated-Sign or Reservations) then Get-Maitre-d's-Attention Script then: Please-Be-Seated Script then: Order-Food-Script then: Eat-Food-Script unless (Long-Wait) when Exit-Restaurant-Angry Script then: if (Food-Quality was better than Palatable) then Compliments-To-The-Chef Script then: Pay-For-It-Script finally: Leave-Restaurant Script[Rogers 1999]

  • Frame Advantagesfairly intuitive for many applicationssimilar to human knowledge organizationsuitable for causal knowledgeeasier to understand than logic or rulesvery flexible

  • Frame Problemsit is tempting to use frames as definitions of conceptsnot appropriate because there may be valid instances of a concept that do not fit the stereotypeexceptions can be used to overcome thiscan get very messyinheritancenot all properties of a class stereotype should be propagated to subclassesalteration of slots can have unintended consequences in subclasses

  • Logichere: emphasis on knowledge representation purposeslogic and reasoning is discussed in the next chapter

  • Representation, Reasoning and Logictwo parts to knowledge representation language: syntaxdescribes the possible configurations that can constitute sentences semanticsdetermines the facts in the world to which the sentences refer tells us what the agent believes [Rogers 1999]

  • Reasoningprocess of constructing new configurations (sentences) from old onesproper reasoning ensures that the new configurations represent facts that actually follow from the facts that the old configurations represent this relationship is called entailment and can be expressed as KB |= alpha knowledge base KB entails the sentence alpha [Rogers 1999]

  • Inference Methodsan inference procedure can do one of two things: given a knowledge base KB, it can derive new sentences that are (supposedly) entailed by KB KB |- ==> KB |= given a knowledge base KB and another sentence alpha, it can report whether or not alpha is entailed by KB KB ==> KB |= an inference procedure that generates only entailed sentences is called sound or truth-preserving the record of operation of a sound inference procedure is called a proof an inference procedure is complete if it can find a proof for any sentence that is entailed

    [Rogers 1999]

  • KR Languages and Programming Languageshow is a knowledge representation language different from a programming language (e.g. Java, C++)? programming languages can be used to express facts and states what about "there is a pit in [2,2] or [3,1] (but we don't know for sure)" or "there is a wumpus in some square" programming languages are not expressive enough for situations with incomplete informationwe only know some possibilities which exist [Rogers 1999]

  • KR Languages and Natural Languagehow is a knowledge representation language different from natural languagee.g. English, Spanish, German, natural languages are expressive, but have evolved to meet the needs of communication, rather than representation the meaning of a sentence depends on the sentence itself and on the context in which the sentence was spokene.g. Look! sharing of knowledge is done without explicit representation of the knowledge itself ambiguous (e.g. small dogs and cats) [Rogers 1999]

  • Good Knowledge Representation Languagescombines the best of natural and formal languages: expressive concise unambiguous independent of context what you say today will still be interpretable tomorrowefficientthe knowledge can be represented in a format that is suitable for computerspractical inference procedures exist for the chosen formateffectivethere is an inference procedure which can act on it to make new sentences[Rogers 1999]

  • Example: Representation Methods[Guinness 1995]

  • Ontologiesprinciplesdefinition of terms lexicon, glossaryrelationships between termstaxonomy, thesauruspurposeestablishing a common vocabulary for a domaingraphical representationUML, topic maps, examplesIEEE SUO, SUMO, Cyc, WordNet

  • Terminologyontologyprovides semantics for conceptswords are used as descriptors for conceptslexiconprovides semantics for all words in a language by defining words through descriptions of their meaningsthesaurusestablishes relationships between wordssynonyms, homonyms, antonyms, etc.often combined with a taxonomytaxonomyhierarchical arrangement of conceptsoften used as a backbone for an ontology

  • What is the Semantic Web?Based on the World Wide WebCharacterized by resources, not text and imagesMeant for software agents, not human viewersDefined by structured documents that reference each other, forming potentially very large networksUsed to simulate knowledge in computer systemsSemantic Web documents can describe just about anything humans can communicate about

  • Ontologies and the Semantic WebOntologies are large vocabulariesDefined within Semantic Web documents (OWL)Define languages for other documents (RDF)Resources can be instances of ontology classesUpper Ontologies define basic, abstract conceptsLower Ontologies define domain-specific conceptsMeta-ontologies define ontologies themselves

  • Ontology Termsprecisiona term identifies exactly one conceptexpressivenessthe representation language allows the formulation of very flexible statementsdescriptors for conceptsideally, there should be a one-to-one mapping between a term and the associated concept (and vice versa): high precision, and high expressivenessthis is not the case for natural languagesparasitic interpretation of terms often implies meaning that is not necessarily specified in the ontology

  • IEEE Standard Upper Ontologyproject to develop a standard for ontology specification and registrationbased on contributions of three SUO candidate projectsIFFOpenCyc/CycLSUMOStandard Upper Ontology Working Group (SUO WG), Cumulative Resolutions, 2003, http://suo.ieee.org/SUO/resolutions.html

  • OpenCycderived from the development of Cyca very large-scale knowledge based systemCycorp, The Syntax of CycL, 2002, http://www.cyc.com/cycdoc/ref/cycl-syntax.html

  • SUMOstands for Suggested Upper Merged OntologyNiles, Ian, and Adam Pease, Towards a Standard Upper Ontology, 2001Standard Upper Ontology Working Group (SUO WG), Cumulative Resolutions, 2003, http://suo.ieee.org/SUO/resolutions.html

  • WordNetonline lexical reference system design is inspired by current psycholinguistic theories of human lexical memoryEnglish nouns, verbs, adjectives and adverbs organized into synonym sets, each representing one underlying lexical conceptrelated efforts for other languages

  • Lojbanartificial, logical, human language derived from a language called Loglanone-to-one correspondence between concepts and wordshigh precisionhigh expressivenessaudio-visually isomorphic natureonly one way to write a spoken sentence only one way to read a written sentenceLogical Language Group, Official Baseline Statement, 2005http://www.lojban.org/llg/baseline.html

  • What is Lojban?A constructed/artificial languageDeveloped from LoglanDr. James Cooke BrownIntroduced between 1955-1960Maintained by The Logical Language GroupAlso known as la lojbangirz.Branched Lojban off from Loglan in 1987[Brandon Wirick, 2005]

  • Main Features of LojbanUsable by Humans and ComputersCulturally NeutralBased on LogicUnambiguous but FlexiblePhonetic SpellingEasy to LearnLarge VocabularyNo ExceptionsFosters Clear ThoughtVariety of UsesDemonstrated with Prose and Poetry[Brandon Wirick, 2005]

  • Lojban at a GlanceExample sentence in English: Wild dogs bite.Translation into Lojban: loi cicyge'u cu batcicilce (cic) - x1 is wild/untamedgerku (ger, ge'u) - x1 is a dog/canine of species/breed x2batci (bat) - x1 bites/pinches x2 on/at specific locus x3 with x4cilce gerku (cic) (ge'u) cicyge'u

    [Brandon Wirick, 2005]

  • How Would Lojban and the Semantic Web Work Together?Currently, most upper ontologies use EnglishNot really English, but arbitrary class namesClasses meanings cannot be directly inferred from their names, nor vice-versaTranslating English prose into Semantic Web documents would be difficultClass choices depend on context within proseEnglish prose is highly idiomaticLojban does not have these problems[Brandon Wirick, 2005]

  • English v. Lojban[Brandon Wirick, 2005]

  • OWL to the RescueXML-based. RDF on steroids.Designed for inferencing.Closer to the domain.Dont need a PhD to understand it.Information sharing. RDF-compatible because it is RDF.Growing number of published OWL ontologies.URIs make it easy to merge equivalent nodes.Different levelsOWL liteOWL DL (description logics)OWL full (predicate logic)

    [Frank Vasquez, 2005]

  • Description LogicClassesThings, categories, concepts.Inheritance hierarchies via subclasses.PropertiesRelationships, predicates, statements.Can have subproperties.IndividualsInstances of a class.Real subjects and objects of a predicate. [Frank Vasquez, 2005]

  • Visualizing the Data ModelVenn Diagrams and Semantic Networks.

    Images from University of Manchester[Frank Vasquez, 2005]

  • RDF OntologiesDublin CoreFOAFRDF vCardRDF Calendar

    SIMILE LocationSIMILE JobSIMILE Apartment

    [Frank Vasquez, 2005]

    dc:title

    loc:state

    loc:city

    dc:date

    job:Job

    literal

    literal

    job:company

    job:link

    loc:country

    loc:coordinates

    literal

    literal

    literal

    literal

    literal

    literal

  • Fixing Modeling Conflicts1. mapAL = Match(MA, ML)[Frank Vasquez, 2005]

    loc:address

    apt:rent

    rdfs:label

    dc:date

    apt:bedrooms

    apt:brokerage

    apt:pets-allowed

    loc:coordinates

    apt:url

    apt:Apartment

    literal

    literal

    literal

    literal

    literal

    literal

    literal

    literal

    literal

    2

    mapAL

    loc:city

    loc:zip-code

    loc:state

    loc:Property

    loc:coordinates

    literal

    literal

    literal

    literal

    1

    loc:address

    literal

    loc:postal-code

    loc:district

    literal

    literal

    literal

    loc:neighborhood

    loc:province

    loc:continent

    literal

    literal

    literal

    loc:country

  • Post-Test

  • EvaluationCriteria

  • Important Concepts and Termsattributecommon-sense knowledgeconceptdataderivationentailmentepistemologyexpert system (ES)expert system shellfacetframegraphIf-Then rulesinferenceinference mechanisminformationknowledgeknowledge baseknowledge-based systemknowledge representationlinklogicmeta-knowledgenodenoiseobjectproduction rulesreasoningrelationshipruleschemascriptsemantic netslot

  • Summary Knowledge Representationknowledge representation is very important for knowledge-based systempopular knowledge representation schemes arerules, semantic nets, schemata (frames, scripts), logicthe selected knowledge representation scheme should have appropriate inference methods to allow reasoninga balance must be found betweeneffective representation, efficiency, understandability

  • ******************* . . .

    **********************************************