ONTOLOGICAL ENGINEERING
Delivered by
Joel Anandraj.E
AP/IT
What is Knowledge Engineering ?
The process of building a knowledge base is called
knowledge engineering.
What is Knowledge Acquisition?
Knowledge acquisition is the process of extracting,
structuring and organizing knowledge from one
source, usually human experts
PROPERTIES OF GOOD AND BAD
KNOWLEDGE BASES
A good knowledge representation language should be
• Expressive
• Concise
• Unambiguous
• Context-insensitive,
• Effective.
• However there will be trade off between the properties.
Efficiency ??
A knowledge engineer should have some
understanding of how inference is done so that the
representation can be designed for maximum
efficiency.
Every knowledge base has two potential consumers:
Human Reader
Inference Procedures.
A common mistake is to choose predicate names that
are meaningful to the human reader.
BearOfVerySmallBrain(Pooh)
To derive Silly(Piglet) from
ShyBabyPigOfSmallBrain(Piglet), we would have to
write.
Facts that were entered for one situation should end up
being used in new situations as well.
In a Good Knowledge base
BearOfVerySmallBrain(Pooh) would be replaced by
something like the following:
1. Pooh is a bear; bears are animals; animals are
physical things.
2. Pooh has a very small brain.
3. All animals (and only animals) have a brain, which is
a part of the animal.
4. If something is part of a physical thing, then it is also
a physical thing:
5. Animals with brains that are small (or below)
relative to the normal brain size for their species are
silly.
6. Every physical thing has a size. Sizes are arranged
on a scale from Tiny to Huge. A relative size is a
ratio of two sizes.
7. The function Very maps a point on a scale to a more
extreme value. Medium is the neutral value for a
scale.
Every time one writes down a sentence, one should ask
oneself the following:
1. Why is this true?
2. How generally is it applicable?
3. Do I need a new predicate to denote this class of
objects?
KNOWLEDGE ENGINEERING vs. PROGRAMMING
A useful analogy can be made between knowledge
engineering and programming.
Both activities can be seen as consisting of four steps:
Given these similarities, what is the point of doing
"knowledge engineering" at all?
The main advantage of knowledge engineering is that
it requires less commitment, and thus less work.
The knowledge engineer specifies what is true, and the
inference procedure figures out how to turn the facts into a
solution to the problem.
KNOWLEDGE ENGINEERING
The knowledge engineer must understand.
The domain in question
Representation Language
Implementation of the inference procedure
To help focus the development of a knowledge base and
to integrate the engineer's thinking,
Decide what to talk about.
Decide on a vocabulary of predicates, functions, and
constants.
Encode general knowledge about the domain.
Encode a description of the specific problem instance
Pose queries to the inference procedure and get
answers.
Decide what to talk about.
Understand the domain well enough to know which
objects and facts need to be talked about, and which
can be ignored.
Many knowledge engineering projects have failed
because the knowledge engineers started to formalize
the domain before understanding it.
Decide what to talk about.
Cheese Tester
Decide on a vocabulary of predicates, functions, and
constants.
Translate the important domain-level concepts into
logic-level names.
Should size be function or predicate.
Would bigness be a better name than size?
Once the choices have been made, the result is a
vocabulary that is known as the ontology of the
domain.
“The Öntology is an informal list of the
concepts in a domain.”
Encode general knowledge about the domain
Writing logical sentences or axioms about the terms in
the ontology accomplishes two goals
Make the terms more precise.
Its possible to run inference procedures to
automatically derive consequences.
Encode a description of the specific problem instance.
This step involves writing simple atomic sentences
about instances of concepts that are already part of the
ontology.
Pose queries to the inference procedure and get answers.
This step let`s the inference procedure operate on the
axioms and problem-specific facts to derive the facts
we are interested in knowing.
THE ELECTRONIC CIRCUITS DOMAIN
We follow the five-step process for knowledge
engineering.
Decide what to talk about :
Our main purpose is to analyze the design of circuits to
see if they match their specification.
Thus, we need to talk about circuits, their terminals,
and the signals at the terminals
Decide on a vocabulary
The next step is to choose functions, predicates, and
constants to name them.
We will start from individual gates and move up to
circuits.
Gates can be named with constants: X1,X2, and so on
To know the type of gate use ,Type(X)=XOR
Next we consider terminals.
A function is appropriate for this; the function Out(l,X1)
denotes the first (and only) output terminal for gate Xi.
The connectivity between gates can be represented by
the predicate Connected, which takes two terminals as
arguments, as in Connected(Out(l,X1),In(l,X2)).
Finally, we need to know if a signal is on or off.
We will therefore introduce “signal values” as two
objects On or Off, and a function Signal which takes a
terminal as argument and denotes a signal value.
Encode general rules
If two terminals are connected, then they have the
same signal:
∀ t1, t2 Terminal(t1) ∧ Terminal(t2) ∧
Connected(t1, t2) ⇒ Signal(t1) = Signal(t2)
The signal at every terminal is either 1 or 0:
∀ t Terminal(t) ⇒ Signal(t)=1 ∨ Signal(t)=0
Connected is commutative:
∀ t1, t2 Connected(t1, t2) ⇔ Connected(t2, t1) .
There are four types of gates:
∀ g Gate(g) ∧ k = Type(g) ⇒ k = AND ∨ k =
OR ∨ k = XOR ∨ k = NOT
An AND gate’s output is 0 if and only if any of its
inputs is 0.
∀ g Gate(g) ∧ Type(g) = AND ⇒ Signal(Out(1,
g)) = 0 ⇔ ∃ n Signal(In(n, g)) = 0 .
An OR gate’s output is 1 if and only if any of its inputs
is 1:
∀ g Gate(g) ∧ Type(g) = OR ⇒ Signal(Out(1, g)) =
1 ⇔ ∃ n Signal(In(n, g)) = 1 .
An XOR gate’s output is 1 if and only if its inputs are
different
∀ g Gate(g) ∧ Type(g) = XOR ⇒ Signal(Out(1,
g)) = 1 ⇔ Signal(In(1, g)) ≠ Signal(In(2, g))
A NOT gate’s output is different from its input:
∀ g Gate(g) ∧ (Type(g) = NOT) ⇒ Signal(Out(1, g)) ≠
Signal(In(1, g)) .
The gates (except for NOT) have two inputs and one
output.
∀ g Gate(g) ∧ Type(g) = NOT ⇒ Arity(g, 1, 1) .
∀ g Gate(g) ∧ k = Type(g) ∧ (k = AND ∨ k = OR ∨
k = XOR) ⇒ Arity(g, 2, 1)
A circuit has terminals, up to its input and output arity,
and nothing beyond its arity.
Gates, terminals, signals, gate types, and Nothing are
all distinct.
Gates are circuits.
∀ g Gate(g) ⇒ Circuit(g)
Encode the specific instance
First, we categorize the circuit and its component
gates:
Second we show the connections between them:
Pose queries to the inference procedure
What combinations of inputs would cause the first output
of C1 (the sum bit) to be off and the second output of C1
(the carry bit) to be on?
The answers are substitutions for the variables i1, i2, and i3
What are the possible sets of values of all the terminals
for the adder circuit?
This final query will return a complete input/output
table for the device, which can be used to check that it
does in fact add its inputs correctly.
This is a simple example of circuit verification.
END