Transcript ppt

Artificial Intelligence
Ontological engineering
Fall 2008
professor: Luigi Ceccaroni
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
2
networks and frames.
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
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
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.
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
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.
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.
Frames: example
• frame
Person
super-classes: Class
names:
ages:
dates-of-birth:
sexes:
readings:
sexual-preferences:
TV-preferences:
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.
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
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.)
Slots: description
• Slot
creation-time-stamp
spanish-name
value
domain (list of frames where it can appear)
range (type of values it admits: list, class…)
max-cardinality
min-cardinality (if ≥ 1, the slot is obligatory)
default-value (to be used if value is empty)
function-to-calculate-value
demons (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)
Slots: example
• Slot
age
spanish-name: edad
value: 28
domain: class Person
range: integer [0..140]
max-cardinality: 1
min-cardinality: 0
default-value:
function-to-calculate-value:
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-getmarried 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>
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.
Relations: description
• Relation
is-adjacent-to
spanish-name
domain (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>.
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>
Relations: examples
•
Relation
–
–
–
–
–
–
–
–
–
–
–
–
–
–
–
–
–
–
–
–
–
has-subtype
is-property-of
is-caused-by
has-property
has-part
has-high-level
is-antonym-of
is-conceptual-part-of
has-metaphor
uses
is-performed-by
is-function-of
has-result
has-conceptual-part
is-used-in
is-part-of
causes
has-method
has-consequence
has-commencement
is-location-of
Description
inverse of is-a relation
object with given salient character
indicates force that is the origin of something
salient property of an object
a part of a physical object
implication for the activity (e.g., intelligence)
generally used for lexical opposition
parts of other entities (in case relations)
non-literal reference to the word
a tool needing active manipulation
human actor for the event
artifact that passively performs the function
more specific type of causes
generalization of has-part
activity or some desired effect for the entity
distinguishes part from group membership
inverse of is-caused-by
method used to achieve some goal
causation due to a natural association
state that commences with the action
absolute location of an object
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).
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.
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.
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
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
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
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
26
their use.
Explicit specification
• Types of concepts used and their use
restrictions are explicitly defined.
• Accessibility
• Transparency:
– documentation of technical details
27
Shared understanding
• Ontologies contain consensual
knowledge:
– accepted by a group of people
28
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
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
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
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
32
wastewater management
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,
33
but operates on a larger scale.
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
A general example
35
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
An upper ontology
37
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
Ontological engineering
• For any special-purpose ontology, it is
possible to move toward greater
generality.
• Do all ontologies converge on a generalpurpose ontology?
– Possibly
39
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
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
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
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
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
Application of ontologies to
natural language processing
45
Application of ontologies to
natural language processing
46
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
Application of ontologies to
natural language processing
48
Application of ontologies to
natural language processing
49
Application of ontologies to
natural language processing
50
Application of ontologies to
natural language processing
51
Application of ontologies to
natural language processing
52
Application of ontologies to
natural language processing
53
Application of ontologies to
natural language processing
54
Application of ontologies to
natural language processing
55
Application of ontologies to
natural language processing
56
Application of ontologies to
natural language processing
57
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 independent
58
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
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-kslsvc.stanford.edu:5915/&service=frame-editor
60