480 likes | 667 Views
IT3706 Knowledge Representation Course Summary. By Frode Sørmo Division of Intelligens Systems IDI, NTNU. Course Overview. Four main representational systems Logic Rule-Based Systems Semantic Networks Frames Knowledege Representation Fundamentals Fundamental Assumptions & Critiques
E N D
IT3706 Knowledge RepresentationCourse Summary By Frode Sørmo Division of Intelligens Systems IDI, NTNU
Course Overview • Four main representational systems • Logic • Rule-Based Systems • Semantic Networks • Frames • Knowledege Representation Fundamentals • Fundamental Assumptions & Critiques • Davis’ roles • Brachman’s levels • The Knowlege Level • Tradeoff between expressability and complexity • Knowledge Aquisition
Logics • Syntax based on: • Constants: my_audi, red • Variables: x, y • Predicates: color(my_audi,red) • Quantifers: x(color(my_audi,x)) • Inference is deductive (truth-preserving) to find facts that are always true given what is already known.
Logics II • There are (many) different kinds of logics • Pedicate logic • Does not have quantifiers. • In general tractible • First Order Predicate Calculus (FOPC) • Most common. Often implied when saying ”logic”. • Semi-decidable • Default Logics • Modal Logics • Descriptive Logics (Nardi & Brachman)
Advantages to Logics • Clear Semantics • Compare (x)[man(x) animal(x)] to • Expressiveness • Particularly good at incomplete knowledge • Disjunctions: ”Either my car is red or your car is green” • Something has a property: ”There exists a blue car” • All members of class has a property without specifying class membership: ”Every person has a mother” • Distingusing between a property being false or not known isa man animal
Advantages to Logics • Large number of logics • Temporal logic: Representing time-bound facts • Modal logic: Representing knowledge about different agent’s belifs • Declarative representation • Economy of storage • Generality • Flexibility and maintainability
Disadvantages of Logic • Efficiency • Expressiveness and complex reasoning comes at a cost in efficiency • Undecidability • FOPC is semidecidable – can’t say in finite time if a sentence does not follow from the premises. • Procedural Knowledge • Some knowledge more naturally stored as procedures. • Solution: Semantic attachments, e.g. Prolog’s evaluable predicates. • Problems with nondeductive reasoning: • Default Reasoning: ”Most birds can fly” • Abduction: ”If you have a fever in february, you may have the influenza”
Logics Syllabus • The KR book, chapter 3. • Predicate logic and FOPC • Model-based semantics • Reasoning Strategies (e.g. Tableu theory) • Other logics (default logics in particular) • ”Logic and Artifical Intelligence”, Nilson. • Why logic is important. • ”Rigor Mortis”, Birnbaum • Critique of logic • ”An introduction to Description Logics”, Nardi and Brachman
Rule Based Systems • Syntax based on: • Facts: Car is Italian • Rules: IF a car is Italian THEN it probably has good acceleration • Inference is applying rules to facts, deriving new facts that can trigger new rules until a fact representing a conlusion is found.
Rule-Based Systems Interpreter Conditions Changes Working Memory Rules Observed Data Rule Base
Advanteges of RBS • Naturalness of Expression • Expert knowledge can often been seen naturally as rules of thumb. • Modularity • Rules are independent of each other – new rules can be added or revised later. • Interpreter is independent from rules. • Restricted Syntax • Allows construction of rules and consistency checking by other programs. • Allows (fairly easy) rephrasing to natural language.
Advantages to RBS • The Problem-Solving Process • Frequent Rule Selection allows reasoner to continuously revise strategy, jumping from hypothesis to hypothesis • Multiple solutions is effectively pursued at one time. • Explanation • MYCIN argued that rules can serve as explanations. • HOW-explanation: Displays the rules used to derive the conclution. • WHY-explanation: Justifies a question by refering to the rule we are trying to fire.
Disadvantages of RBS • Explanations • If users don’t understand or accept the rules, they are useless as explanations. • Strategic choices (jumps) hard to explain. • Efficiency: Determining the Conflict Set • Lots of rules may potentially be in the Conflict Set, a rule base may have hundreds of rules. • When variables are used in rules, determining if they match is not trivial • Solution: Forgy’s Rete match algorithm • Rules organized in index trees by antecedent • When two rules have one part of antecedent in common, this part is only evaluated once.
Disadvantages of RBS • Efficiency problems: Conflict resolution • Saturation: Too many rules are in the conflict set to fire at once. • Solution: Refine conditions • Make sure only a few rules ever match any situation, e.g. by adding conditions of what must NOT be true for the rule to fire. • Problem: Adds dependence between rules. • Problem: Very hard to do for large rule bases. • Solution: Prune or Prioritize ”Best looking rules” • Davis: Use metarules: IF the age of the client is greater than 60 AND there are rules that mention high risk there are rules that mention low risk THEN the former should be used after the latter
Disadvantages of RBS • Efficiency problems: Conflict resolution (continued) • Solution: Split the Knowledge Base into modules • Each module has an area of expertise (A Rule Base and an Interpreter) • The modules have a common Working Memory • These systems are called ”Blackboard systems” – the Blackboard is the common Working Memory Interpreter Interpreter Blackboard Rule Base Rule Base
Disadvantages to RBS • Restricted syntax and expressibility • The restricted syntax gives rise to expressibility problems. • Structural Knowledge: IF there is a dieseae that requires treatment AND the patient suffers from meningitis AND the patient suffers from viral meningitis AND... THEN ... • Incomplete Knowledge: (x)(car(x) & ¬color(x,red))
Disadvantages to RBS • Incremental construction of knowledge base – is it really possible? • Rules must often be written with conflict resolution strategy in mind • The consequence of removing or adding a rule on reasoning competence not clear. • Control knowledge in antecedents of rules adds interdependence between rules.
Disadvantages of RBS • Consistency can not be guaranteed. RULE 1: IF it is raining THEN not (weather is sunny) RULE 2: IF location is Florida THEN not (weather is cloudy) RULE 3: IF time of day is late afternoon THEN weather is sunny or weather is cloudy FACTS: time of day is late afternoon location is Florida What if we add this rule: RULE 4: IF time of day is late afternoon and location is Florida THEN it is raining Conclusion: Facts support rule 2 and 3, the conclusion is that it is sunny.
Rule-Based Systems Syllabus • The KR book, chapter 4 • Introduction and syntax • Resoution algorithms (e.g. Rete) • Systems (e.g. MYCIN) • ”The Atomic Components of Thought”, Anderson and Lebiere • ACT-R as a rule-based system • Rule-based systems as a model of human cognition
Semantic Network: Semantics? • Semantic networks appear intuitive – the syntax is seductivly uniform • But: Different systems representing the same ”graph” have different interpretations. • What are the semantics of Semantic Networks? ”Since the semantics of any given language is dependent of the interpretation of the primitive elements and ....., the well-definedness of a network language rests heavily on the set of node and link types that it provides” (Brachman, p204, Readings in KR)
Semantic Networks has Cat Human has • Family of graph-based representations • Syntax is based on • Nodes (e.g. ”Human”) • Links (e.g. ”owns”) • Inference is spreading activation and inheritance 4 legs 2 legs is a is a is a Steve has boyfriend Mary owns Kitty
Advantages of Semantic Nets • Explicit and easy to understand. • The net is its own index – quick inference possible. • Supports default reasoning in finite time. • Allows intentional and extensional conceptualization. • Focus on bigger units of knowledge and intercontectedness.
Disadvantages of Semantic Nets • No interpretation standard – lack well-defined semantics • Expressing belifs and quantors difficult and makes net hard to read. • It proves hard to choose good primitives. • Quite limited inference possible.
Semantic Network Syllabus • The KR book, chapter 5 • Introduction to semantic networks • Spreading activation and inheritance • Problems of semantics • Extensions (Partitoned Networks) • Systems (Conceptual Dependency, SNePS, KL-ONE) • ”Why Semantic Networks”, Shastri • Graph structure allows for (very) efficent inference • Semantic networks may (easily) be realized in massively parallell systems. • ”What’s in a link?”, Woods • What does ”semantics” mean? • What is the semantics of semantic networks?
Frames <Frode <isa Person> <born 1976> <age function: (- now born)> <parents (Borghild, Skule)> <works at NTNU>> • Frames represent one concept • Either class or individual • Each frames have a number of slots. • Slots are <attribute, value> pairs. • A value can be a set of values, any primitive datatypes, a pointer to another frame or a function (procedural attachment) • Reasonign in Frame-Based Systems. • Matching (find most similar frame) • Inheritance (and multiple inheritance)
Advantages of Frames • Captures the way domain experts think about the domain (Fikes & Kehler) • Concepts are defined in specialization hierarchies – this is natural • Hierarchical structure advantagous for inference speed. • Supports default reasoning in decidable time. • Allows procedural representations where appropriate
Disadvantages of Frames • Semantics • Suffer from many of the same problems of semantics as Semantic Networks. • Perils of Inheritance • Resolving Multiple inheritance can be very complex • NP-hard to do completely, although P-space solutions with some reasonable assumptions exists. • Impossible to define concepts if everything can be overiden. • Example: A ”three-legged chair” is a chair with three legs per definition, but in frames the two-legged chair can override this...
Disadvantages of Frames • Expressive limitations • Disjunctions • Supported: Mike’s car is either red or blue <color (OR red blue)> • Not supported: Mike’s car is either red or my car is blue • Existential knowledge • We know there is a murder and that one of {butler, mistress, heir} is it. • We can’t represent things about this murderer without having a frame for it. • We should not make a new frame for the murderer – we know it matches one of three existsing frames!
Frame Syllabus • The KR book, chapter 6 • Introduction • Inference (inheritance, matching) • Systems (Scripts by Schank and Abelson) • The papers relevant for Semantic Networks are also relevant for frames.
Knowledge Representation Fundamentals • The KR Hypothesis • Critique of the KR paradigma • The Representation • Syntax • Semantics • Criteria for a good representation • Tradeoffs • Types of knowledge • The roles of a KR (Davis) • KR Analysis: Brachman’s levels
What is Knowledge Representation? The Knowledge Representation Hypothesis (Brian Smith, 1982): • ”Any mechanically embodied intelligent process will be comprised of structural ingredients that • we as external observers naturally take to represent a propositional account of the knowledge that the overall process exhibits, and • independent of such external semantic attribution, play a formal but causal and essential role in engendering the behaviour that manifests that knowledge”
What follows from the KR hypothesis? • An intelligent system’s competence is determined by its knowledge. • The system’s actions are taken after deliberation and reasoning over the system’s knowledge.
But is it true? • Not necessarily – there are other views. • Emergence: Competent behaviour emerges from interactions of many simple functions (e.g. ants, cells in our body, neurons in our brain) without explitict representation of knowledge. • Subsumption: Competence through small units of specialized control. Real world competence in real world tasks can be achived without representation. • ”Intelligence without Representation”, Brooks
The Representation • A Knowledge Represetation language is a system for encoding knowledge. • It is defined by a syntax an inference set determining the semantics. • The representation limits what kind of knowledge can be represented and reasoned about.
Syntax • The ’notational’ aspect. • How to encode knowledge explicitly. • Grammatical rules - the symbols to use and the way to combine them. • Similar to natural language where in English you have the legal sentence order: subject-verb-object. • Example: (green my-car) or green(my-car)
Semantics • Concerns the meaning of symbols. • Realised through a set of algorithms – the inference engine. • An inference engine ‘implements’ a set of inference rules. • The inference engine infers implicit knowledge. • The inference rules are abstract rules that can be applied in various domains (domain independent).
The Semantics Problem • Just representing knowledge in some language in the computer does not make the computer understand it. • The language should in some way be shared between human and computer. • The computer needs to have some way of assigning meaning to a symbol.
Semantics Human is a is a • The reason this representation means anything to us is that we know what a ”Cat” is and what ”owns” means. • What does the computer see? Steve has boyfriend Mary owns is a Kitty Cat
Semantics E002 R001 R001 • The reason this representation means anything to us is that we know what a ”Cat” is and what ”owns” means. • What does the computer ”see”? E001 R003 E003 R002 R001 E004 E005
Semantics • Semantics is discussed in first part of ”What’s in a Link”, Woods. • In logics, semantics means model-based semantics. This is explained in the KR book, chapter 3 and in Nilson.
What makes a good representation? • Completeness: I can express what I want to express. • Conciseness: I can do so without ambiguities. • Transparency: It is easy to understand, common understanding between human and computer. • Computational efficiency: The inference engine is efficient.
Efficiency vs expressability • ”Fundamental Tradeoff in Knowlege Representation”, Levesque and Brachman • There is a tradeoff between expressability and efficiency • Description Logics: • Tractable representation language • Based on KL-ONE, but using logical formalism and semantics. • Descibed in ”Introduction to Description Logics”, Nardi and Brachman
Types of Knowledge • Declarative vs Procedural • Explicit vs Implicit • Knowledge vs Meta-Knowledge • Surface (shallow) vs Deep • Domain-Dependent vs Domain-Independent • See the KR book, chapter 1-2.
Davis’ Roles • Role 1: A KR is a surrogate • How close is a this representation to the real thing? What kind of simplyfing assumptions are made? • Role II: A KR is a set of Ontological Commitments • What kind of Ontological commitments does this representation ”force” on you? • Role III : A KR is a Fragmentary Theory of Intelligent Reasoning • What are the sanctioned and recommended inferences? • Role IV: A KR is a medium for efficient computation • Role V: A KR is a medium of human expression
Brachman’s Levels Conceptual Level Actual primitives in the representation Types of knowledge representation primitives Distinction between different types of knowledge Epistemological Level Syntax Semantics Properties of inference strategies Logical Level ”What data structures are best for this kind of representation?” ”What algorithms implement this kind of inference best?” Implementational Level
Knowledge Aquisition • The Knowledge in a KR system must be aquired from an expert and put into the system. • The competence of the system is directly based on the quality of the knowledge. • Experts tend to have ”compiled” knowledge – tend to solve problems (partly) unconsiously. • Knowledge about unconsious behaviour (tacit knowledge) is hard to aquire. • Knowledge Aquisition is a constructive process of making explicit all tacit knowledge – a task shared between knowledge engineer and expert. • See ”An overview of Knowledge Aquisition”, Musen
Goals of IT3706 • To understand the capabilities and limitations of Knowledge Representations. • Experience different kinds of KRs. • Understand the fundeamental tradeoffs in designing a KR. • See beyond surface similiarities and differences in KRs.
Exam • Oral Exam, 16th of december • Each student gets 25 minutes. • Each student will be given a topic. This can be from any part of the syllabus. • Questions can be: • ”What kind of system is KL-ONE?” • ”Compare how default knowledge can be represented in logics and frames.” • ”Why do Nilson believe logics are appropriate for KR?” • Questions will NOT be: • ”Write up the Rete algorithm” • ”How, in detail, does Shastri’s system from the paper work?” • ”How many state machines are on the second level of Brooks’ Subsumption Architecture”