35
Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California, Berkeley School of Information Management and Systems SIMS 202: Information Organization and Retrieval Lecture author: Warren Sack

30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

Embed Size (px)

Citation preview

Page 1: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

Artificial Intelligence, Ontologies,

and Common Sense

Ray Larson & Warren Sack

University of California, Berkeley

School of Information Management and Systems

SIMS 202: Information Organization and Retrieval

Lecture author: Warren Sack

Page 2: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

Last Time

• Metadata is:– “data about data” (database systems)– Information about Information– Structures and Languages for the Description of

Information Resources and their elements (components or features)

– “Metadata is information on the organization of the data, the various data domains, and the relationship between them” (Baeza-Yates p. 142)

Page 3: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

Examples of Metadata

• Bibliographic Metadata (traditional Library cataloging)

• Dublin Core

Page 4: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

Today

• What is Cognitive Science?

• What is Artificial Intelligence?– Knowledge Representation

• Languages

– Representing Common Sense• Common Sense Interfaces• Story Understanding, Story Generation, and

Common Sense

Page 5: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

Cognitive Science/The Next Four Lectures

• 10/30/01 – AI, knowledge representation and common sense

• 11/01/01 – Computational Linguistics, Cognitive Psychology and Lexical Knowledge

• 11/06/01 – AI and information extraction• 11/08/01 – Linguistics, Philosophy,

Psychology, categories, and cognition

Page 6: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

What is Cognitive Science?Definition by “symptoms”

• A definition from Howard Gardner (1986) The Mind’s New Science; the five “symptoms of cognitive science”; the first two are central, the next three are strategic– (1) mental representations– (2) computers– (3) emphasis– (4) epistemology– (5) interdisciplinarity

Page 7: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

Symptom 1 of Cognitive Science: Mental Representations

• To study human cognition it is necessary to posit mental representations and examine those representations separately from the “low level” biological or neurological, on one hand, and also separately from the “high level” social or cultural, on the other hand.

(adapted from Gardner, 1986)

Page 8: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

Symptom 2 of Cognitive Science: Computers

• Computers are central to any understanding of the human mind. They are essential both as tools, but also as models of how the mind works.

(adapted from Gardner, 1986)

Page 9: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

Symptom 3 of Cognitive Science:Emphasis

• Cognitive scientists deliberately de-emphasis certain factors which may be important for cognitive functioning but whose inclusion would unnecessarily complicate the cognitive-scientific enterprise. These de-emphasized factors include emotional affect, historical, cultural, and other types of context (e.g., issues of embodiment and the senses).

(adapted from Gardner, 1986)

Page 10: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

Symptom 4 of Cognitive Science: Epistemology

• Cognitive science is concerned with an area that has historically been a part of philosophy, namely the domain of epistemology.

(adapted from Gardner, 1986)

Page 11: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

Symptom 5 of Cognitive Science: Interdisciplinarity

• Cognitive science is an interdisciplinary enterprise.

(adapted from Gardner, 1986)

Page 12: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

The disciplines of cognitive science

• Philosophy

• Psychology

• Artificial Intelligence

• Linguistics

• Anthropology

• Neuroscience

Page 13: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

The birth of Cognitive Science

• Symposium on Information Theory, MIT, 10-12 September 1956– Allen Newell & Herbert Simon, “Logic

Theory Machine”– Noam Chomsky, “Three Models of

Language”– George Miller, “The Magical Number

Seven”

Page 14: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

The birth of AI

• Rockefeller-sponsored Institute at Dartmouth College, Summer 1956– John McCarthy, Dartmouth (->MIT->Stanford)– Marvin Minsky, MIT (geometry)– Herbert Simon, CMU (logic)– Allen Newell, CMU (logic)– Arthur Samuel, IBM (checkers)– Alex Bernstein, IBM (chess)– Nathan Rochester, IBM (neural networks)– Etc.

Page 15: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

Definition of AI

“... artificial intelligence [AI] is the science of making machines do things that would require intelligence if done by [humans]” (Minsky, 1963)

Page 16: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

Some areas of AI

• Knowledge Representation• Programming Languages• Natural Language Understanding• Speech Understanding• Vision• Robotics• Planning• Machine Learning• Expert Systems• Qualitative Simulation

Page 17: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

Common Sense (according to AI)

• The advice taker is a proposed program for solving problems by manipulating sentences in formal languages. The main advantages we expect the advice taker to have is that its behavior will be improvable merely by making statements to it, telling it about its symbolic environment and what is wanted from it. To make these statements will require little if any knowledge of the program or the previous knowledge of the advice taker. One will be able to assume that the advice taker will have available to it a fairly wide class of immediate logical consequences of anything it is told and its previous knowledge. This property is expected to have much in common with what makes us describe certain humans as having common sense. We shall therefore say that a program has common sense if it automatically deduces for itself a sufficiently wide class of immediate consequences of anything it is told and what it already knows. John McCarthy, “Programs with Common Sense,” 1959

Page 18: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

Common Sense: The original motivation

Before describing the advice taker in any detail, I would like to describe more fully our motivation for proceeding in this direction. Our ultimate objective is to make programs that learn from their experience as effectively as humans do.John McCarthy, “Programs with Common Sense,” 1959

Page 19: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

Commonsense as Interface

• To make our computers easier to use, we must make them more sensitive to our needs. That is, make them understand what we mean when we try to tell them what we want. … If we want our computers to understand us, we’ll need to equip them with adequate knowledge.

Marvin Minsky, “Commonsense-based Interfaces,” 2000

Page 20: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

What is common sense?Whenever we speak about "commonsense thought," we're referring to things that most people can do, often not even knowing they're doing them. Thus, when you hear a sentence like: "Fred told the waiter he wanted some chips,“ you will infer all sorts of things. Here are just a few of these…

• The word "he" means Fred. That is, it's Fred who wants the chips, not the waiter.• This event took place in a restaurant. Fred was a customer dining there at that

time. Fred and the waiter were a few feet apart at the time. The waiter was at work there, waiting on Fred at that time. Fred wants potato chips, not wood chips, cow chips, or bone chips. There's no particular set of chips he wants.

• Fred wants and expects the waiter to bring him a single portion (1–5 ounces, 5–25 chips) in the next few minutes. Fred will start eating the chips very shortly after he gets them.

• Fred accomplishes this by speaking words to the waiter. Fred and the waiter speak the same language. Fred and the waiter are both human beings. Fred is old enough to talk (2+ years of age). The waiter is old enough to work (4+ years, probably 15+). This event took place after the date of invention of potato chips (in 1853).

• Fred assumes the waiter also infers all those things. Marvin Minsky, “Commonsense-based Interfaces,” 2000

Page 21: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

Can common sense be coded?

• www.openmind.org

• ThoughtTreasure: www.signiform.com

Page 22: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

Attempts to code large bodies of knowledge:

some previous examples• 18th C.: The French Encyclopediasts: Denis Diderot

& Jean D’Alembertsize: 20.8 million words, 400,000 unique forms, 18,000 pages of text, 17 volumes of articles, 11 volumes of plate legends, 140 contributors

• 19th C.: Thesaurus: Peter Mark Rogetsize: (third edition) 35,000 synonyms and over 250,000 cross-references

• 20th C.: Paul Otlet: Répertoire Bibliographique Universel (RBU)size: (1930) 16 millions entries (authors and subjects)

Page 23: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

Knowledge Representation

In AI, a representation of knowledge is a combination of

• data structures and

• interpretative procedures

that, if used in the right way in a program, will lead to “knowledgeable” behavior.

(Barr and Feigenbaum, 1981, p. 143)

Page 24: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

“Interpretative Procedures” aka Inference• Deduction

– Universal instantiation: If something is true of everything, then it is true for any particular thing.

– Modus ponens:• Known: (1) the rule if P then Q; and, (2) the fact, P is true;• Infer: Q is true

• Abduction– Known: (1) the rule if P then Q; and, (2) the fact, Q

is true;– Infer: P is true

• Induction: Machine Learning– Known: P(a) is true; P(b) is true; …– Infer: Forall X, P(X) is true

Page 25: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

Knowledge Representation and

Programming Paradigms• Applicative

• Functional

• Logical

• Rule-based

• Constraint-based

• Object-oriented

• Frame-based

Page 26: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

Applicative

define author-of (title)

if (title == “Modern Information Retrieval”)

then author [“Baeza-Yates”, “Ribeiro”]

Page 27: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

Functional

define author-of (title)

if (title == “Modern Information Retrieval”)

then return([“Baeza-Yates”, “Ribeiro”])

else return([])

Page 28: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

Logical/Declarative

define author-of (“Modern Information Retrieval”, “Baeza-Yates”).

define author-of (“Modern Information Retrieval”, “Ribeiro”).

define author-of(“The Organization of Information”,

“Taylor”).

/* backward chaining */

define publication(Author,Title) :- author-of(Title,Author).

Page 29: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

Rule-Based

assert author-of (“Modern Information Retrieval”, “Baeza-Yates”).

assert author-of (“Modern Information Retrieval”, “Ribeiro”).

assert author-of(“The Organization of Information”,

“Taylor”).

/* forward chaining */

author-of(Title,Author) assert publication(Author,Title).

Page 30: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

Object-orienteddefine author (Name, Publications)

Name isa String

Publications isa List

define get-publications

return Publications

/* and/or the other way around */

define publication (Title, Authors)

Title isa String

Authors isa List

define get-author

return Authors

courseText = new publication(“Modern Information Retrieval”, [“Baeza-Yates”, “Ribeiro”]);

Page 31: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

Frame-basedhas-prototype(publications, list)has-prototype(authors,list)has-prototype(inverse,singleton)inverse(inverse,inverse)inverse(authors,publications)has-prototype(Modern-Information-Retrieval, singleton)has-prototype(Baeza-Yates,singleton)has-prototype(Ribeiro,singleton)authors(Modern-Information-Retrieval,Baeza-Yates)authors(Modern-Information-Retrieval,Ribeiro)? get(ribeiro,publications)

Page 32: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

Cyc’s top-level Ontology

• http://www.cyc.com/cyc-2-1/toc.html

Page 33: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

Common Sense Knowledge Representation: Examples

• Example 1: Story Understanding: SAM, Cullingford et al., 1979www.sims.berkeley.edu/~sack/Code/Lisp/micro-sam.lisp

• Example 2: Story Generation: Talespin, 1976www.sims.berkeley.edu/~sack/Code/Lisp/micro-talespin.lisp

Page 34: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

Examples of Talespin’s missing common sense

(Meehan, 1976)• Answers to questions can take more than one

form.• Don’t always take answers literally.• You can notice things without being told about

them.• Gravity is not a living creature.• Stories aren’t really stories if they don’t have a

central problem.• Sometimes enough is enough.• Schizophrenia can disfunctional.

Page 35: 30 Oct 2001IS202: Information Organization and Retrieval Artificial Intelligence, Ontologies, and Common Sense Ray Larson & Warren Sack University of California,

Next Time

• Cognitive Science continued: WordNet