Common Sense Reasoning Humans use their common sense all the time – what is it? – can we instill it in our AI programs? – if not, what are the consequences.

Slides:



Advertisements
Similar presentations
Semantics Static semantics Dynamic semantics attribute grammars
Advertisements

Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 11.
OR, WHY DO SOME THINGS FLOAT WHILE OTHERS SINK.
Knowledge Representation CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :
Knowledge Representation
Representations One of the major distinctions between ordinary software and AI is the need to represent domain knowledge (or other forms of worldly knowledge)
1 Ontology Language Comparisons doug foxvog 16 September 2004.
Inheritance Inheritance Reserved word protected Reserved word super
Describing Syntax and Semantics
Meaning and Language Part 1.
Ontology Mapping with Cyc doug foxvog 14 July 2004
Knowledge representation methods جلسه سوم. KR is AI bottleneck The most important ingredient in any expert system is knowledge. The power of expert systems.
Wheeler Lower School Mathematics Program Grades 4-5 Goals: 1.For all students to become mathematically proficient 2.To prepare students for success in.
DEDUCTIVE DATABASE.
Knowledge representation
Protege OWL Plugin Short Tutorial. OWL Usage The world wide web is a natural application area of ontologies, because ontologies could be used to describe.
 Knowledge Acquisition  Machine Learning. The transfer and transformation of potential problem solving expertise from some knowledge source to a program.
Artificial intelligence project
Artificial Intelligence
ISBN Chapter 3 Describing Semantics -Attribute Grammars -Dynamic Semantics.
1 Reasoning Under Uncertainty Artificial Intelligence Chapter 9.
1 Knowledge Representation CS 171/CS How to represent reality? Use an ontology (a formal representation of reality) General/abstract domain Specific.
Artificial Intelligence Chapter 18. Representing Commonsense Knowledge.
Albert Gatt LIN3021 Formal Semantics Lecture 4. In this lecture Compositionality in Natural Langauge revisited: The role of types The typed lambda calculus.
1 CS 2710, ISSP 2610 Chapter 12 Knowledge Representation.
Copyright © 2006 Addison-Wesley. All rights reserved. Ambiguity in Grammars A grammar is ambiguous if and only if it generates a sentential form that has.
Some Thoughts to Consider 8 How difficult is it to get a group of people, or a group of companies, or a group of nations to agree on a particular ontology?
1 Inheritance Reserved word protected Reserved word super Overriding methods Class Hierarchies Reading for this lecture: L&L 9.1 – 9.4.
Knowledge Structure Vijay Meena ( ) Gaurav Meena ( )
Cyc Jaehui Park Summarized by Jaehui Park, IDS Lab., Seoul National University Presented by Jaehui Park, IDS Lab., Seoul National University.
Artificial Intelligence Knowledge Representation.
 Knowledge Acquisition  Machine Learning. The transfer and transformation of potential problem solving expertise from some knowledge source to a program.
Lecture 14. Recap Problem Solving GA Simple GA Examples of Mutation and Crossover Application Areas.
Knowledge Representation Part I Ontology Jan Pettersen Nytun Knowledge Representation Part I, JPN, UiA1.
JavaScript: Conditionals contd.
WHAT IS THE NATURE OF SCIENCE?
K-6 Geometry Progression In Practice
Data and Knowledge Representation Lecture 6
Knowledge Representation Techniques
Design by Contract Jim Fawcett CSE784 – Software Studio
Design by Contract Jim Fawcett CSE784 – Software Studio
Lecture 1 Introduction Richard Gesick.
ece 720 intelligent web: ontology and beyond
Knowledge Representation and Reasoning
Philosophy of Mathematics 1: Geometry
Knowledge Representation
Knowledge Representation
Survey of Knowledge Base Content
Ontology.
K-6 Geometry Progression In Practice
OOP Paradigms There are four main aspects of Object-Orientated Programming Inheritance Polymorphism Abstraction Encapsulation We’ve seen Encapsulation.
Ontology.
Software Construction Lecture 2
Copyright © Cengage Learning. All rights reserved.
KNOWLEDGE REPRESENTATION
Use Case Model Use case diagram – Part 2.
Back to “Serious” Topics…
Ontology.
Semantic Nets and Frames
Defining Classes and Methods
Copyright © Cengage Learning. All rights reserved.
Properties, Changes, and Classification of Matter
CMPE212 – Reminders Assignment 2 due next Friday.
ONTOMERGE Ontology translations by merging ontologies Paper: Ontology Translation on the Semantic Web by Dejing Dou, Drew McDermott and Peishen Qi 2003.
CGS 2545: Database Concepts Summer 2006
Ch. 3 - Thinking About Theory and Research
Habib Ullah qamar Mscs(se)
Presentation transcript:

Common Sense Reasoning Humans use their common sense all the time – what is it? – can we instill it in our AI programs? – if not, what are the consequences for AI? We might think of common sense reasoning as the knowledge accumulated through experience that gives us the ability to – reason with defaults – reason over uncertainty – reason over multiple domains even those we are not experts in – reason naively over such domains a physics, time, space, etc There have been two general approaches to common sense reasoning – naïve physics – cyc

Types of Common Sense Reasoning There are many different forms of common sense – understanding when to employ an assumption – using non-expertly acquired knowledge – recognizing when an assumption is being violated (two people “not being on the same page”) – knowing when you can employ shallow knowledge versus needing deeper knowledge – identifying whether knowledge/data can be trusted – ability to move from one context to another without being told or prompted to There is also a notion of what context we might be in so that we can use context-specific knowledge and assumptions

A Lack of Common Sense AI systems in general (including nearly all expert systems) lack common sense of any kind – it is difficult to enumerate common sense – it is difficult to know when to use common sense Example: Conversation between medical diagnostic system and Human – System: How old is the patient? – Human (looking at 1957 Chevrolet): 33 – System: Are there any spots on the patient’s body? – Human (noticing rust spots): Yes – System: What color are the spots? – Human: Reddish-brown – System: The patient has measles (probability 0.9)

Naïve Reasoning Approaches Humans often reason naively over such issues as physics, time (events) and spatial relationships without understanding underlying mechanisms or reasoning very deeply – what comes up must come down – an object that is propelled will eventually slow down unless it is in a vacuum (because of friction or air resistance) – if an event occurs from time x1 to time x2 and a second event occurs from time y1 to time y2 and x2 < y1 then the first event occurs entirely before the second event Equipping an AI program with such knowledge and reasoning abilities can improve the AI system’s capabilities

Naïve (Qualitative) Physics As in physics, we have variables and equations, but our equations do not use numeric values (instead, we employ qualitative states) – a container will be: Empty, Between, Full Empty + Empty = Empty Empty + Full = Full Empty + Between = Between Between + Between = {Between, Full} Full + Between = Overflow Full + Full = Overflow – a reasoner might simulate state changes what happens to this ball when I drop it from the air? what happens to the liquid if the pipe is cracked? will the glass be full when I pour some wine into it?

Temporal Relationships As with qualitative physics, we temporal relationship: – before/after – meets/is met by – overlaps/is overlapped by – starts/is started by – ends/is ended by – equals We might reason over such relationships in a problem like medical diagnosis where need to understand distinct events and overlapping events

Spatial Relationships There are similar spatial relationships to reason about objects in space and how they might interact without having to result to actual physics – these relationships can help us naively reason about friction, obstructions, weight, etc – for instance, if object A is on top of object B and you lift B, you are lifting A – but, if object A is on top of object B and object A is too heavy to lift, you cannot lift B Temporal relationships are 2 dimensional (before and after) but spatial relationships are 3 dimensional – therefore there are far more relationships (13 3 by one person’s reasoning)

Continued Fortunately, many of the possible 13 3 relationships will not be necessary – for instance, if an object is solid, we don’t have to worry about situations where another object is inside this one Some spatial relationships – adjacency, along, perpendicular, parallel, across from, contains, distance, direction, equals, meets if X contains Y then X is larger than Y if X is parallel to Y then X does not touch Y We can also define shapes of which some relationships are important and others are not – circular, oval, square, rectangular/oblong, triangle, line, ribbon And shape features – angle, line, curve, node, terminal, etc

Material Properties Since different materials have properties special to them, we might use frames/objects to represent such items where they can inherit the properties useful in reasoning about them – liquids and gases can seep into things, solids cannot – liquids are naturally still, but can flow when put under pressure (including gravity) – solids can be rigid or flexible, but do not usually move unless energy is exerted on them We could also include attributes for these properties – weight/mass, friction/viscosity, cost/worth/value – but recall that we are reasoning naively, we do not want to enumerate properties at the level of chemistry or physics

Cyc Attempt to construct a common sense knowledge- base – effort of about 30+ years of coding, – 5,000,000 common sense facts and rules – general-purpose knowledge-base to be used with other applications CYC is an underlying bed of knowledge for applications to use if and when necessary Originally, Cyc knowledge was merely a collection of rules – later, the rules were grouped into various domains and areas (called theories) – now, Cyc is predominantly a collection of ontologies

Cyc vs OpenCyc The full version of Cyc is an enterprise system that must be purchased A reduced version of Cyc is available called OpenCyc which is open source – OpenCyc comes with an API and can be used to support the semantic web, wikipedia and other open source community endeavors and has an Oracle interface – OpenCyc (as of 2012) consists of ~239,000 terms and over 2 million triples (unique pieces of knowledge) – Cyc has built-in reasoners while OpenCyc does not and does not include any specific instance data requires 3G RAM, 64 bit system, 1G hard disk space

CycL Cyc was originally written in Lisp but was later rewritten using a predicate calculus-like language called CycL – Some of the terms to define information available in CycL are #$Collection – define a class that has instances #$Individual – define an instance which can include relations, strings, numbers #$isa – instance of (not child) #$genls – subclass of – Many built-in operators such as #$and, #$or, #$not, #$implies, #$arity, #$thereexists, #$assertedSentence, #$knownSentence, #$arg1Isa, #$resultIsa – Assertions placed into ( ) as in Lisp (isa FrankZappa Individual)

Sample CycL Code Instance data: – (#$and (#$isa #$NeilArmstrong #$Astronaut) (#$performedBy #$FirstLunarLanding #$NeilArmstrong) (#$eventOccursAt #$FirstLunarLanding #$MoonOfEarth)) Class/subclass relationship as a rule – (#$implies (#$isa X #$Person) (#$isa X #$Primate)) Family relationship rule – (#$implies (#$and (#$father X Y) (#$siblings Y Z) (#$isa Z #$FemalePerson)) (#$daughter Z X)) More complex rule – (#$implies (#$orbits X Y) (#$thereExists Z (#$thereExists Q (#$and (#$isa Z #$OrbitalPath) (#$surrounds-Ringlike Z Y) (#$traverses-Complete Q Z) (#$objectMoving Q X)))))

Cyc Ontology Cyc has 3 levels of ontologies – Upper: abstract concepts (such as categories), universal truths events, collections, quotes, relationships – Middle: truths attached to contexts, relationships, every day items types of events, types of collections, types of entities – Lower: domain specific knowledge and specific instances including scripts Examples – (isa BurningOfPapalBull SocialGathering) – (dateOfEvent BurningOfPapalBull (DayFn 10 (MonthFn December (YearFn 1520)))) – (relationInstanceExistsMin BurningOfPapalBull attendees UniversityStudent 40)

Part of Cyc’s Ontology

Cyc Inferencing Cyc primarily uses logical deduction using a best- first search strategy and a set of proprietary heuristics – modus ponens – modus tollens – universal and existential quantification Cyc also uses inheritance and automatic classification to reason over taxonomic relationships Special-purpose inferences and heuristics (for efficiency) are applied to specific domains and contexts (micro-theories) – temporal and spatial reasoning – domain specific axioms (e.g., medical diagnostic rules) – inferences for specific syntactic structures – general-purpose axioms to be applied when special- purpose axioms are not available or do not work

Micro Theories Microtheories (contexts) partition CYC’s knowledge base into different (but possibly overlapping) domains/concepts/problems and belief states Examples include: – medical diagnosis, manufacturing, weather during the winter, what to look for when buying a car, northern hemisphere, the 1960s, etc… Information can be “lifted” from one context to another Each microtheory has its own categories, predicates (although many are shared between microtheories but they may have different parameters), inference rules, assumptions Reasoning within a microtheory might be thought of as a separate belief state (although in fact it is just a separate namespace)

Using Context Assertions are true within a given context but not universally – the rules behind dining in restaurants differ from those of dining at home The context is specified in a statement A statement may be true in one context and false in another – for instance, an assumption that gas costs $2+ a gallon is valid today but if we are reasoning about the 1960s, it is an invalid assumption We might have to “lift” elements from one context into another – this provides a mechanism for reasoning about items in different contexts – when “lifting” items from one context to another, assumptions, vocabulary, axioms and other elements that differ must be resolved in the new context For example: – a mother with a child will be expected to behave a certain way but she would be expected to behave like anyone else in a grocery store – under exceptional situations, we lift behavior from the mother/child context to override the behavior in the grocery store

Sample Cyc Inferences You have to be awake to eat You can usually see people’s noses but not their hearts You cannot remember events that have not yet happened yet If you cut a lump of peanut butter in half, each half is also a lump of peanut butter, but if you cut a table in half, neither half is a table If you are carrying a container that's open on one side, you should carry it with the open end up Vampires don’t exist (but one microtheory states that “Dracula is a vampire”) The U.S.A. is a big country When people die, they stay dead