UNIT-3
KNOWLEDGE REPRESENTATION
Knowledge-Based Agent in Artificial intelligence
• An intelligent agent needs knowledge about
the real world for taking decisions
and reasoning to act efficiently.
• Knowledge-base and
• Inference system.
Knowledge-base
• An agent should be able to represent states,
actions, etc.
• An agent Should be able to incorporate new
percepts
• An agent can update the internal
representation of the world
• An agent can deduce the internal
representation of the world
• An agent can deduce appropriate actions.
Architecture of knowledge-based agent
Inference system
• Inference means deriving new sentences from
old.
• Inference system allows us to add a new
sentence to the knowledge base.
• A sentence is a proposition about the world.
Inference system applies logical rules to the
KB to deduce new information.
• Forward chaining
• Backward chaining
Operations Performed by KBA
• TELL: This operation tells the knowledge base
what it perceives from the environment.
• ASK: This operation asks the knowledge base
what action it should perform.
• Perform: It performs the selected action.
Various levels of knowledge-based agent
1. Knowledge level
2. Logical level
3. Implementation level
Approaches to designing a knowledge-based
agent
1. Declarative approach: We can create a
knowledge-based agent by initializing with an
empty knowledge base and telling the agent all the
sentences with which we want to start with. This
approach is called Declarative approach.
2. Procedural approach: In the procedural
approach, we directly encode desired behavior as a
program code. Which means we just need to write
a program that already encodes the desired
behavior or agent.
Knowledge representation
• Humans are best at understanding, reasoning,
and interpreting knowledge. Human knows
things, which is knowledge and as per their
knowledge they perform various actions in the
real world. But how machines do all these
things comes under knowledge
representation and reasoning.
What to Represent
• Object: All the facts about objects in our world
domain.
• Events: Events are the actions which occur in our
world.
• Performance: It describe behavior which involves
knowledge about how to do things.
• Meta-knowledge: It is knowledge about what we
know.
• Facts: Facts are the truths about the real world and
what we represent.
• Knowledge-Base: The central component of the
knowledge-based agents is the knowledge base. It is
represented as KB. The Knowledgebase is a group of
the Sentences (Here, sentences are used as a technical
term and not identical with the English language).
Types of knowledge
Declarative Knowledge
• Declarative knowledge is to know about
something.
• It includes concepts, facts, and objects.
• It is also called descriptive knowledge and
expressed in declarative sentences.
• It is simpler than procedural language.
Procedural Knowledge
• It is also known as imperative knowledge.
• Procedural knowledge is a type of knowledge
which is responsible for knowing how to do
something.
• It can be directly applied to any task.
• It includes rules, strategies, procedures, agendas,
etc.
• Procedural knowledge depends on the task on
which it can be applied.
Meta-knowledge& Heuristic
knowledge
Meta-knowledge:
Knowledge about the other types of knowledge is
called Meta-knowledge
Heuristic knowledge:
• Heuristic knowledge is representing knowledge of
some experts in a filed or subject.
• Heuristic knowledge is rules of thumb based on
previous experiences, awareness of approaches,
and which are good to work but not guaranteed.
Structural knowledge
• Structural knowledge is basic knowledge to
problem-solving.
• It describes relationships between various
concepts such as kind of, part of, and grouping
of something.
• It describes the relationship that exists
between concepts or objects.
Techniques of knowledge representation
Logical Representation
• Propositional Logics
• Predicate logics
Semantic Network Representation
• Semantic networks are alternative of
predicate logic for knowledge representation.
In Semantic networks, we can represent our
knowledge in the form of graphical networks.
This network consists of nodes representing
objects and arcs which describe the
relationship between those objects.
• IS-A relation (Inheritance)
• Kind-of-relation
Frame Representation
• A frame is a record like structure which
consists of a collection of attributes and its
values to describe an entity in the world.
Production Rules
• Production rules system consist of (condition,
action) pairs which mean, "If condition then
action". It has mainly three parts:
• The set of production rules
• Working Memory
• The recognize-act-cycle
Propositional logic in Artificial intelligence
• Propositional logic (PL) is the simplest form of logic
where all the statements are made by propositions. A
proposition is a declarative statement which is either
true or false. It is a technique of knowledge
representation in logical and mathematical form.
• Example
a) It is Sunday.
b) The Sun rises from West (False proposition)
c) 3+3= 7(False proposition)
d) 5 is a prime number.
Following are some basic facts about
propositional logic
• Propositional logic is also called Boolean logic as it works on 0 and 1.
• In propositional logic, we use symbolic variables to represent the logic,
and we can use any symbol for a representing a proposition, such A, B, C,
P, Q, R, etc.
• Propositions can be either true or false, but it cannot be both.
• Propositional logic consists of an object, relations or function, and logical
connectives.
• These connectives are also called logical operators.
• The propositions and connectives are the basic elements of the
propositional logic.
• Connectives can be said as a logical operator which connects two
sentences.
• A proposition formula which is always true is called tautology, and it is
also called a valid sentence.
• A proposition formula which is always false is called Contradiction.
Syntax of propositional logic
• Atomic Proposition: Atomic propositions are
the simple propositions. It consists of a single
proposition symbol. These are the sentences
which must be either true or false.
• Example
a) 2+2 is 4, it is an atomic proposition as it is a
true fact.
b) "The Sun is cold" is also a proposition as it is a
false fact.
• Compound proposition: Compound
propositions are constructed by combining
simpler or atomic propositions, using
parenthesis and logical connectives.
• Example
a) "It is raining today, and street is wet."
b) "Ankit is a doctor, and his clinic is in Mumbai."
Logical Connectives
• Negation: A sentence such as ¬ P is called negation of P. A literal can be
either Positive literal or negative literal.
• Conjunction: A sentence which has ∧ connective such as, P ∧ Q is called a
conjunction.
Example: Rohan is intelligent and hardworking. It can be written as,
P= Rohan is intelligent,
Q= Rohan is hardworking. → P∧ Q.
• Disjunction: A sentence which has ∨ connective, such as P ∨ Q. is called
disjunction, where P and Q are the propositions.
Example: "Ritika is a doctor or Engineer",
Here P= Ritika is Doctor. Q= Ritika is Doctor, so we can write it as P ∨ Q.
• Implication: A sentence such as P → Q, is called an implication.
Implications are also known as if-then rules. It can be represented as
If it is raining, then the street is wet.
Let P= It is raining, and Q= Street is wet, so it is represented as P → Q
• Biconditional: A sentence such as P⇔ Q is a Biconditional sentence,
example I am breathing, if and only if then I am alive
P= I am breathing, Q= I am alive, it can be represented as P ⇔ Q.
First-Order logic
• First-order logic is another way of knowledge
representation in artificial intelligence. It is an
extension to propositional logic.
• FOL is sufficiently expressive to represent the
natural language statements in a concise way.
• First-order logic is also known as Predicate logic
or First-order predicate logic. First-order logic is a
powerful language that develops information
about the objects in a more easy way and can
also express the relationship between those
objects.
First-Order logic
– Objects: A, B, people, numbers, colors, wars, theories,
squares, pits, wumpus, ......
– Relations: It can be unary relation such as: red, round, is
adjacent, or n-any relation such as: the sister of, brother
of, has color, comes between
– Function: Father of, best friend, third inning of, end of, ......
• As a natural language, first-order logic also has two
main parts:
– Syntax
– Semantics
Syntax of First-Order logic
Constant 1, 2, A, John, Mumbai, cat,....
Variables x, y, z, a, b,....
Predicates Brother, Father, >,....
Function sqrt, LeftLegOf, ....
Connectives ∧, ∨, ¬, ⇒, ⇔
Equality ==
Quantifier ∀, ∃
Atomic sentences
• Atomic sentences are the most basic sentences of
first-order logic. These sentences are formed
from a predicate symbol followed by a
parenthesis with a sequence of terms.
• We can represent atomic sentences as Predicate
(term1, term2, ......, term n).
Example:
Ravi and Ajay are brothers: =>
Brothers(Ravi, Ajay).
Chinky is a cat: => cat (Chinky).
Complex Sentences
• Complex sentences are made by combining
atomic sentences using connectives.
• First-order logic statements can be divided into
two parts:
• Subject: Subject is the main part of the
statement.
• Predicate: A predicate can be defined as a
relation, which binds two atoms together in a
statement.
Quantifiers in First-order logic
• Universal Quantifier,
(For all x , For each x , For every x, everyone,
everything)
Example
All man drink coffee.
∀x man(x) → drink (x, coffee)
• Existential quantifier
(for some, at least one, There exists a).
Example
Some boys are intelligent.
∃x: boys(x) ∧ intelligent(x)
Examples
1. All birds fly.
∀x bird(x) →fly(x).
2. Every man respects his parent.
∀x man(x) → respects (x, parent).
3. Some boys play cricket.
∃x boys(x) → play(x, cricket).
Example
• Let L(x,y) be the statement “x loves y” where U
for both x and y is the set of all people in the
world.
• Everybody loves Jerry.
∀xL(x,Jerry)
• Everybody loves somebody.
∀x ∃yL(x,y)
• There is somebody whom everybody loves.
∃y∀xL(x,y)
Forward Chaining
• Forward chaining is also known as a forward deduction
or forward reasoning method when using an inference
engine. Forward chaining is a form of reasoning which
start with atomic sentences in the knowledge base and
applies inference rules in the forward direction to
extract more data until a goal is reached.
• The Forward-chaining algorithm starts from known
facts, triggers all rules whose premises are satisfied,
and add their conclusion to the known facts. This
process repeats until the problem is solved.
Properties of Forward-Chaining
• It is a down-up approach, as it moves from
bottom to top.
• It is a process of making a conclusion based on
known facts or data, by starting from the initial
state and reaches the goal state.
• Forward-chaining approach is also called as data-
driven as we reach to the goal using available
data.
• Forward -chaining approach is commonly used in
the expert system, business, and production rule
systems.
Backward Chaining
• Backward-chaining is also known as a
backward deduction or backward reasoning
method when using an inference engine. A
backward chaining algorithm is a form of
reasoning, which starts with the goal and
works backward, chaining through rules to
find known facts that support the goal.
Properties of backward chaining
• It is known as a top-down approach.
• Backward-chaining is based on modus ponens
inference rule.
• In backward chaining, the goal is broken into sub-goal
or sub-goals to prove the facts true.
• It is called a goal-driven approach, as a list of goals
decides which rules are selected and used.
• Backward -chaining algorithm is used in game theory,
automated theorem proving tools, inference engines,
proof assistants, and various AI applications.
• The backward-chaining method mostly used a depth-
first search strategy for proof.
Unification
• Unification is a process of making two
different logical atomic expressions identical
by finding a substitution.
• Unification depends on the substitution
process.
• It takes two literals as input and makes them
identical using substitution.
E.g. Let's say there are two different expressions,
P(x, y), and P(a, f(z)).
• P(x, y)......... (i)
P(a, f(z))......... (ii)
• Substitute x with a, and y with f(z) in the first
expression, and it will be represented
as a/x and f(z)/y.
• With both the substitutions, the first
expression will be identical to the second
expression and the substitution set will
be: [a/x, f(z)/y].
Conditions for Unification
• Predicate symbol must be same, atoms or
expression with different predicate symbol can
never be unified.
• Number of Arguments in both expressions
must be identical.
• Unification will fail if there are two similar
variables present in the same expression.
Resolution
• Resolution is a theorem proving technique that
proceeds by building refutation proofs, i.e.,
proofs by contradictions.
• Resolution is a single inference rule which can
efficiently operate on the conjunctive normal
form or clausal form.
Resolution
• Clause: Disjunction of literals (an atomic
sentence) is called a clause. It is also known as
a unit clause.
• Conjunctive Normal Form: A sentence
represented as a conjunction of clauses is said
to be conjunctive normal form or CNF.
The resolution inference rule
• The resolution rule for first-order logic is simply a lifted
version of the propositional rule. Resolution can resolve two
clauses if they contain complementary literals, which are
assumed to be standardized apart so that they share no
variables.
• Where li and mj are complementary literals.
• This rule is also called the binary resolution rule because it
only resolves exactly two literals.
Steps for Resolution
• Conversion of facts into first-order logic.
• Convert FOL statements into CNF
• Negate the statement which needs to prove
(proof by contradiction)
• Draw resolution graph (unification).
Example:1
John likes all kind of food.
Apple and vegetable are food
Anything anyone eats and not killed is food.
Anil eats peanuts and still alive
Harry eats everything that Anil eats.
Prove by resolution that
John likes peanuts.
Step-1: Conversion of Facts into FOL
Step-2: Conversion of FOL into CNF
Eliminate all implication (→) and rewrite
• ∀x ¬ food(x) V likes(John, x)
• food(Apple) Λ food(vegetables)
• ∀x ∀y ¬ [eats(x, y) Λ ¬ killed(x)] V food(y)
• eats (Anil, Peanuts) Λ alive(Anil)
• ∀x ¬ eats(Anil, x) V eats(Harry, x)
• ∀x¬ [¬ killed(x) ] V alive(x)
• ∀x ¬ alive(x) V ¬ killed(x)
• likes(John, Peanuts).
Move negation (¬)inwards and rewrite
• ∀x ¬ food(x) V likes(John, x)
• food(Apple) Λ food(vegetables)
• ∀x ∀y ¬ eats(x, y) V killed(x) V food(y)
• eats (Anil, Peanuts) Λ alive(Anil)
• ∀x ¬ eats(Anil, x) V eats(Harry, x)
• ∀x killed(x) V alive(x)
• ∀x ¬ alive(x) V ¬ killed(x)
• likes(John, Peanuts).
• Rename variables or standardize variables
• ∀x ¬ food(x) V likes(John, x)
• food(Apple) Λ food(vegetables)
• ∀y ∀z ¬ eats(y, z) V killed(y) V food(z)
• eats (Anil, Peanuts) Λ alive(Anil)
• ∀w¬ eats(Anil, w) V eats(Harry, w)
• ∀g killed(g) V alive(g)
• ∀k ¬ alive(k) V ¬ killed(k)
• likes(John, Peanuts).
Drop Universal quantifiers.
• ¬ food(x) V likes(John, x)
• food(Apple)
• food(vegetables)
• ¬ eats(y, z) V killed(y) V food(z)
• eats (Anil, Peanuts)
• alive(Anil)
• ¬ eats(Anil, w) V eats(Harry, w)
• killed(g) V alive(g)
• ¬ alive(k) V ¬ killed(k)
• likes(John, Peanuts).
Step-3: Negate the statement to be
proved
• ¬likes(John, Peanuts)
Step-4: Draw Resolution graph
Reasoning
• Reasoning is a way to infer facts from existing
data
Types of Reasoning
• Deductive reasoning
• Inductive reasoning
• Abductive reasoning
• Common Sense Reasoning
• Monotonic Reasoning
• Non-monotonic Reasoning
Deductive reasoning
• Deductive reasoning is deducing new
information from logically related known
information. It is the form of valid reasoning,
which means the argument's conclusion must
be true when the premises are true.
Example:
Premise-1: All the human eats veggies
Premise-2: Suresh is human.
Conclusion: Suresh eats veggies.
Abductive reasoning
• Abductive reasoning is a form of logical
reasoning which starts with single or multiple
observations then seeks to find the most likely
explanation or conclusion for the observation.
• Example:
Implication: Cricket ground is wet if it is raining
Axiom: Cricket ground is wet.
Conclusion It is raining.
Inductive Reasoning
• Inductive reasoning is a form of reasoning to
arrive at a conclusion using limited sets of facts
by the process of generalization. It starts with the
series of specific facts or data and reaches to a
general statement or conclusion.
• Example:
Premise: All of the pigeons we have seen in the
zoo are white.
Conclusion: Therefore, we can expect all the
pigeons to be white.
Common Sense Reasoning
• Common sense reasoning is an informal form
of reasoning, which can be gained through
experiences.
• heuristic knowledge and heuristic rules.
• Example:
One person can be at one place at a time.
If I put my hand in a fire, then it will burn.
Monotonic Reasoning
• In monotonic reasoning, once the conclusion
is taken, then it will remain the same even if
we add some other information to existing
information in our knowledge base. In
monotonic reasoning, adding knowledge does
not decrease the set of prepositions that can
be derived.
• Example:
Earth revolves around the Sun.
Non-monotonic Reasoning
• In Non-monotonic reasoning, some
conclusions may be invalidated if we add
some more information to our knowledge
base.
• Example: Let suppose the knowledge base
contains the following knowledge:
Birds can fly
Penguins cannot fly
Pitty is a bird
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.
76
76
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)
77
77
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.
78
78
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-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>
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 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
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
97
97
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.
99
99
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.
100
100
Explicit specification
• Types of concepts used and their use
restrictions are explicitly defined.
• Accessibility
• Transparency:
– documentation of technical details
101
101
Shared understanding
• Ontologies contain consensual knowledge:
– accepted by a group of people
102
102
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.
103
103
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
104
104
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.
105
105
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
106
106
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.
107
107
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
• ...
108
108
A general example
109
109
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
110
110
An upper ontology
111
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.
112
112
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
113
113
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.
114
114
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.
115
115
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.
116
116
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.
117
117
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).
118
118
Application of ontologies to natural
language processing
119
Application of ontologies to natural
language processing
120
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
121
Application of ontologies to natural
language processing
122
Key