60
Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

  • View
    216

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Artificial IntelligenceOntological engineering

Fall 2008

professor: Luigi Ceccaroni

Page 2: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

2

Ontological engineering

• What content to put into an agent’s knowledge base?

• How to represent facts about the world?• An ontology organizes everything in the

world into a hierarchy of categories.• Categories are the primary building blocks of

any large-scale knowledge representation scheme.

• Ontologies are an evolution of semantic networks and frames. 2

Page 3: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

3

Reasoning systems for categories

• Semantic networks are systems specially designed for organizing and reasoning with categories.

• They provide:– graphical aid for visualizing a knowledge base– efficient algorithms for inferring properties of

an object on the basis of its category membership.

• They are an evolution of existential graphs (Charles Peirce, 1909) 3

Page 4: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

4

Reasoning systems for categories

• Another closely related family of systems are description logics, which provide:– a formal language for constructing and

combining category definitions– efficient algorithms for deciding subset and

superset relationships between categories.

4

Page 5: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Semantic networks

• Logic, as representation language, has practical difficulties.

• More intuitive and easy to use representation schemes are necessary.

• According to cognitive psychology, knowledge representation and retrieval is based on its relations and this is formalized, for example, through semantic networks.

• A semantic network is a graph in which:– nodes represent concepts;– (directed) arcs represent relations between concepts.

Page 6: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Semantic networks

• They allow to represent the elements of a domain in a declarative way.

• Specific reasoning mechanisms can be established, which allow to answer questions on the representation:– Are two concepts related?– What relates two concepts?– Which is the closest concept that relates two other concepts?

• If a richer semantics is defined for relations, more complex questions can be answered about:– taxonomy among concepts (class, subclass, instance)– generalization / specialization

Page 7: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Limitations and problems

• Many different formalisms exist, with different capabilities.

• There is no standard reasoning model.• Difficulties exist associated to the mechanisms

of property inheritance:– values of properties inherited by different parent

nodes can be in conflict.

• It is difficult (but not impossible) to express disjunctions (and therefore implications) and negations.

Page 8: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Frames

• Frames are a version of semantic networks proposed by Marvin Minsky in 1975.

• A frame is a representation of an object or concept, with descriptors (slots) and relations to other objects or concepts.

• Relations and slots have a structure, too, which helps to describe their semantics.

• A procedural part can be associated to frames.

Page 9: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Frames: example

• framePersonsuper-classes: Classnames:ages:dates-of-birth:sexes:readings:sexual-preferences:TV-preferences:

Page 10: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Frames: elements

• A frame is usually made of a declarative part (slots) and a procedural one (demons o methods).

• The demons allow to obtain information about a frame or to make operations about its characteristics and relations.

• The description of the slots is structured, too.

• Slot’s descriptors are called facets.

Page 11: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Frames: elements

• Relations allow to connect frames.• Relations have a description that defines

their semantics and functioning.• Slot inheritance is based on relations.• Relations are divided into two simple

classes:– taxonomic relations: IS-A (subclass/class)

and INSTANCE-OF (instance/class)– non-taxonomic relations

Page 12: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Slots

• Slots describe the characteristics of frames.• Their facets (e.g., domain, range, cardinality,

default value) allow to define their semantics.• They are where the demons are defined.• Demons can be of the following types:

– if-needed (They activate when the slot is read.)– if-added (They activate when a value is added to the

slot.)– if-removed (They activate when a value is removed

from the slot.)– if- modified (They activate when a slot’s value is

modified.)

Page 13: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Slots: description• Slot creation-time-stamp

spanish-name valuedomain (list of frames where it can appear)

range (type of values it admits: list, class…)

max-cardinalitymin-cardinality (if ≥ 1, the slot is obligatory)

default-value (to be used if value is empty)

function-to-calculate-valuedemons (functions with conditional activation)

inheritance conditions (slot + value) (yes/no) (default: tax. r. = yes; non-tax. r. = no)

To access the value of a slot, the following syntax is used:

<name frame>.<name slot> (value or list of values)

Page 14: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Slots: example

• Slot agespanish-name: edadvalue: 28domain: class Personrange: integer [0..140]max-cardinality: 1min-cardinality: 0default-value:function-to-calculate-value:

Page 15: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Slots: demons

• Demons are inheritable (can be invoked from within descendants) or non inheritable (can be solely invoked from within the frame where they are defined) actions or functions.

• Example of if-modified demon:– If Deunan.age has value of 28 and is modified to 32, the demon

activates and change the value of the slot Deunan.desire-to-get-married from 1 to 5.

• Demons can be invoked with or without parameters.

• Predefined Boolean functions:– <slot-1>?(<frame>): returns true if <frame> has the slot <slot-1>

Page 16: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Relations

• Their semantics is defined through a set of properties.

• Procedural demons can be defined within relations, too. They activate in correspondence to certain events:– if-added: when the relation is established among

frames;– if-removed: when the relation is removed.

• The behavior of relations with respect to inheritance can be defined, i.e., which slots they allow to inherit.

Page 17: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Relations: description• Relation is-adjacent-to

spanish-namedomain (list of frames)

range (list of frames)

cardinality (1 or N)

inverse <name> (cardinality: 1 or N)

transitivity yes/no (default is no)

composition (no / description of composition)

demons ({if-added / if-removed} action <name.action>)

conditions of inheritance (list of slots) (default: empty list)

• Actions associated to demons have no parameters.• The expression <name frame>.<name relation> returns the frame (if

cardinality is 1) or the list of frames (if cardinality is N) with which <name frame> is connected via <name relation>.

Page 18: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Relations: description

• To consult the cardinality, the function card(<name frame>.<name relation>) is used, which returns an integer.

• Predefined relations:– IS-A (inverse: has-subtype)

• transitive

– INSTANCE-OF (inverse: has-instance)• It can be obtained by composition: INSTANCE-OF IS-A⊕

• Predefined Boolean functions:– <relation-1>?(<frame>): returns true if <frame> is connected to

some other frame through the relation <relation-1>– <relation-2>?(<frame-o>,<frame-d>): returns true if there is a

relation tagged <relation-2> between <frame-o> and <frame-d>

Page 19: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Relations: examples• Relation Description

– has-subtype inverse of is-a relation

– is-property-of object with given salient character

– is-caused-by indicates force that is the origin of something

– has-property salient property of an object

– has-part a part of a physical object

– has-high-level implication for the activity (e.g., intelligence)

– is-antonym-of generally used for lexical opposition

– is-conceptual-part-of parts of other entities (in case relations)

– has-metaphor non-literal reference to the word

– uses a tool needing active manipulation

– is-performed-by human actor for the event

– is-function-of artifact that passively performs the function

– has-result more specific type of causes

– has-conceptual-part generalization of has-part

– is-used-in activity or some desired effect for the entity

– is-part-of distinguishes part from group membership

– causes inverse of is-caused-by

– has-method method used to achieve some goal

– has-consequence causation due to a natural association

– has-commencement state that commences with the action

– is-location-of absolute location of an object

Page 20: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Inheritance

• In the case of taxonomic relations, inheritance (of slots and values) is given by default.

• In the rest of relations, it has to be explicitly defined.

• There are slots inherently non inheritable, e.g.:– has-instance

• It is possible that a frame inherits a value through multiple relations (multiple inheritance).

Page 21: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Simple and multiple inheritance

• If the taxonomy is a tree, the inheritance is simple.

• The inheritance is multiple if:– the taxonomy is a graph;– there are other (non taxonomic) relations,

which allow inheritance.– If there is inheritance of slots and values,

there may be conflict of values.

Page 22: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Multiple inheritance: example

• What are the Size, Weight and Color of Clyde?

• The inferential distance algorithm allows to define from which other frame a given frame inherits.

Page 23: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

23

Inferential distance

Is the cause of the several species' possessing a given property the middle which is next to the universal, or the middle which is next to the species? Clearly it is that which is nearest to the particular species which is its subject, because this middle is the cause of the proximate subject's falling under the universal. E.g., C is the cause of D's being B; then C is the cause of D's being A, and B is the cause of being A for both C and itself.– Aristotle, from The Categories 23

Page 24: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Inferential distance

1. Create the set of frames from which the value of the slot can be explicitly inherited → Candidates.

2. Remove from Candidates all frames which are parents of other frames of the set.

3. If the resulting number of candidates is:• 0 → The slot cannot be inherited• 1 → This is the value to be inherited• N > 1 → There is a multiple-inheritance problem, if

slot’s cardinality is not at least N

Page 25: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

25

Ontologies

• An ontology is nothing exotic, at least in artificial intelligence.

• It is a formal explicit representation of a shared understanding of the important concepts in some domain of interest.

• In philosophy the term ‘ontology’ refers to a more delicate, but related, concept: – the study of being as such.

25

Page 26: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

26

Formality

• Ontologies are formal: they are readable by computers.

• Level of formality:– from “highly informal”: natural language– to “rigorously formal”: terms with formal

semantics and axioms

• In mature ontologies, the descriptions allowed to users are required to be consistent with a set of axioms limiting their use. 26

Page 27: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

27

Explicit specification

• Types of concepts used and their use restrictions are explicitly defined.

• Accessibility• Transparency:

– documentation of technical details

27

Page 28: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

28

Shared understanding

• Ontologies contain consensual knowledge:– accepted by a group of people

28

Page 29: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

29

Conceptualization

• Ontologies are an abstract model of some “existing” domain of the world.

• Commitment: – make as few claims as possible about the

domain being modeled, – giving ontology reusers freedom to

specialize and instantiate as needed.

29

Page 30: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

30

Why ontologies are useful?

• Sharing: – “communication” among people / agents with

different needs and viewpoints due to their different contexts•unified framework within an “organization” to

reduce conceptual and terminological confusion

– inter-operability among systems by “translating” between different modeling methods, languages and software tools•ontologies as inter-lingua• integration of ontologies 30

Page 31: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

31

Why ontologies are useful?

• Modeling• System engineering:

– re-usability•Use of standards•Highly configurable ontologies and libraries of

ontologies support re-usability among different software systems.

– reliability•Formal ontologies enable the use of consistency

checking resulting in more reliable systems.31

Page 32: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

32

Ontological engineering

• In toy domains, the choice of representation is not important.– It is easy to come up with a consistent

vocabulary.

• Complex domains require more general and flexible representations:– shopping on the Internet– controlling a robot in a changing environment– diagnosing problematic situations in

wastewater management 32

Page 33: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

33

Ontological engineering

• Ontological engineering consists of representing the abstract concepts that occur in many different domains:– Actions– Time– Physical Objects– Beliefs– ...

• It is related to knowledge engineering, but operates on a larger scale. 33

Page 34: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

34

Ontological engineering

• Representing everything in the world can be a problem.

• We leave placeholders where new knowledge can fit in.

• For example, we can define what it means to be a physical object.– The different types of object can be filled later:

• robots

• televisions

• books

• ... 34

Page 35: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

35

A general example

35

Page 36: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

36

Ontological engineering

• The general framework of concepts is called an upper ontology,– because of the convention of drawing graphs

with:• the general concepts at the top• the more specific concepts below them

36

Page 37: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

37

An upper ontology

Page 38: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

38

Ontological engineering

• Certain aspects of the real world are hard to capture in FOL:– Almost all generalizations have exceptions– They hold only to a degree

• Example:– “Tomatoes are red” is a useful rule, but...– Some tomatoes are green, yellow or orange.

• The ability to handle exceptions and uncertainty is extremely important.

38

Page 39: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

39

Ontological engineering

• For any special-purpose ontology, it is possible to move toward greater generality.

• Do all ontologies converge on a general-purpose ontology?– Possibly

39

Page 40: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

40

Ontological engineering

• Main characteristics of general-purpose ontologies that distinguish them from collections of special-purpose ontologies:– A general-purpose ontology should be

applicable in any special-purpose domain.– In any sufficiently demanding domain,

different areas of knowledge have to be unified.•Reasoning and problem solving could involve

several areas simultaneously.40

Page 41: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

41

Categories and objects

• Concepts are organized in taxonomies, linked by relations and conforming to axioms.

• Axioms can be very general, e.g.: “a fox is not a shifty deceptive person” or “a Firefox is not a fox”.

• The organization of objects into categories is a vital part of knowledge representation.

41

Page 42: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

42

Categories and objects

• Interaction with the world takes place at the level of individual objects, but:– much reasoning takes place at the level of

categories.

• Example:– A shopper might have the goal of buying a

mouse, rather than a particular mouse such as a V470 Cordless Laser Mouse.

42

Page 43: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

43

Categories and objects

• Categories can serve to make predictions about objects, once they are classified.– Inferring the presence of certain objects from

perceptual input– Inferring category membership from the

perceived properties of the object

• Example:– From an object being a watermelon, one infers

that it would be useful for fruit salad.

43

Page 44: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

44

Ontology builders

• Knowledge engineers (KEs) build ontologies:– based on consensual knowledge – about a domain – to enable a stipulated group of people (users

of the ontology) to share and reuse that knowledge

– within the chosen area of work (the domain).

44

Page 45: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Application of ontologies to natural language processing

45

Page 46: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Application of ontologies to natural language processing

46

Page 47: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Application of ontologies to natural language processing

• Current AI challenges:– Natural language understanding

•Software requirements understanding

– Image/video understanding– Process/agents/services understanding– Database understanding– Web understanding

47

Page 48: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Application of ontologies to natural language processing

48

Page 49: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Application of ontologies to natural language processing

49

Page 50: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Application of ontologies to natural language processing

50

Page 51: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Application of ontologies to natural language processing

51

Page 52: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Application of ontologies to natural language processing

52

Page 53: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Application of ontologies to natural language processing

53

Page 54: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Application of ontologies to natural language processing

54

Page 55: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Application of ontologies to natural language processing

55

Page 56: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Application of ontologies to natural language processing

56

Page 57: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Application of ontologies to natural language processing

57

Page 58: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

Application of ontologies to natural language processing

• CIRCA technology– Ontology with millions

of words, meanings and relationships

– Created by a team of experienced lexicographers and computational linguists

– Automatic expansion coupled with manual quality supervision

– Includes slang, pop, and nonstandard usages

– Language independent58

Page 59: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

59

Guidelines

• A number of guidelines and methodologies for ontology construction are available.

• Refer to the work of:– Mike Uschold– Michael Grüninger– Asunción Gómez-Pérez

59

Page 60: Artificial Intelligence Ontological engineering Fall 2008 professor: Luigi Ceccaroni

60

Collaborative construction

• Offline tools:– Protégé (Stanford University)

•http://protege.stanford.edu/

– OntoStudio (Ontoprise)•http://www.ontoprise.com

• Online tools:– Ontolingua Ontology Editor (Stanford

University)•http://www-ksl-svc.stanford.edu:5915/

&service=frame-editor60