Topics 1 2
Topics 1 2
KNOWLEDGE ENGINEERING
Instructor:
KHUAT Thanh Tung
University of Technology Sydney
Subject’s Outline
5
References
TOPIC 1
Objectives of this topic
8
Agenda
¨ What is knowledge?
¨ Types of knowledge
¨ Knowledge engineering
¨ Knowledge engineers
9
Philosophical Basis
¨ Traditional questions that have been analyzed by
philosophers, psychologists, and linguist:
¤ What is knowledge?
¤ What do people have inside their head when they know
something?
¤ Is knowledge expressed in words?
¤ If so, how could one know things that are easier to do than to say,
like tying a shoestring or hitting a baseball?
¤ If knowledge is not expressed in words, how can it be transmitted
in language?
¤ How is knowledge related to the world?
¤ What are the relationships between the external world,
knowledge in the head, and the language used to express
knowledge about the world?
10
Philosophical Basis
¨ With the advent of computers, the questions
addressed by the field of artificial intelligence (AI)
are:
¤ Can knowledge be programmed in a digital computer?
¤ Can computers encode and decode that knowledge in
ordinary language?
¤ Can they use it to interact with people and with other
computer systems in a more flexible or helpful way?
11
Information Processing Views of
Knowledge
¨ Hierarchical view: data information knowledge
¤ Data are streams of raw facts representing events before they
have been arranged into a form that people can understand and use
¤ Information is the input or raw material of new knowledge
¤ Knowledge is authenticated/personalized information
¨ Reversed hierarchical view: knowledge information data
¤ Knowledge must exist before information can be formulated and
before data can be collected
¨ Non-hierarchical view: data information
Knowledge
¤ Knowledge is needed in converting data into information
¤ Knowledge is the accumulation of experiences vs. knowledge is
created through conjectures and refutations.
12
Information Processing Views of
Knowledge
¨ The movement from data to knowledge implies a shift from facts
and figures to more abstract concepts
¨ From a knowledge engineering perspective, knowledge can be
considered as something that can be expressed as a rule or useful to
assist a decision
13
Alternative Perspectives on Knowledge
¨ Knowledge can be defined as a justified belief that
increases an entity’s capacity for effective action.
¨ It may be viewed from several perspectives:
(1) a state of mind – knowledge is the state of knowing and
understanding
(2) an object – knowledge is an object to be stored and
manipulated
(3) a process – knowledge is a process of applying expertise
(4) a condition – knowledge is organized access to and
retrieval of content
(5) a capability – knowledge is the potential to influence
action
14
Taxonomies of Knowledge
¨ Tacit vs. explicit
¤ Explicit knowledge refers to knowledge that is
transmittable in formal, systematic language
¤ Tacit knowledge is deeply rooted in actions, experience,
and involvement in a specific context. It consists of cognitive
element (mental models) and technical element (know-how
and skills applicable to specific work).
¨ Individual vs. social
¤ Individual knowledge is created by and exists in the
individual whereas social knowledge is created by and
exists in the collective actions of a group.
15
Taxonomies of Knowledge
¨ Five Types of Knowledge
¤ Declarative knowledge
n Know-about
¤ Procedural knowledge
n Know-how
¤ Causal knowledge
n Know-why
¤ Conditional knowledge
n Know-when
¤ Relational knowledge
n Know-with
¨ Meta-knowledge
¤ Knowledge about knowledge
16
Four Modes of Knowledge Conversion
(Nonaka, 1991)
Tacit knowledge Explicit knowledge
To
Tacit
Socialization Externalization
knowledge
From
18
Five Steps of Knowledge Engineering
¨ Knowledge acquisition
¨ Knowledge validation
¨ Knowledge representation
¨ Inferencing
19
Five Steps of Knowledge Engineering
20
Two Main Views of Knowledge
Engineering
¨ Transfer view – This is the traditional view. In this
view, the key idea is to apply conventional
knowledge engineering techniques to transfer
human knowledge into the computerized system.
¨ Modeling view – In this view, the knowledge
engineer attempts to model the knowledge and
problem solving techniques of the domain expert
into the computerized system.
21
Knowledge Engineering (KE) vs.
Knowledge Management (KM)
¨ KE is primarily concerned with constructing a
knowledge-bases system while KM is primarily
concerned with identifying and leveraging
knowledge to the organization’s benefit.
¨ KE and KM activities are inherently interrelated.
22
Knowledge Engineers
¨ A knowledge engineer is responsible for obtaining knowledge
from human experts and then entering this knowledge into
some form of KBS.
¨ In developing KBS, the knowledge engineer must apply
methods, use tools, apply quality control and standards, plan
and manage projects, and take into account human, financial,
and environmental constraints.
¨ Required skills of a knowledge engineer
¤ Knowledge representation
¤ Fact finding (knowledge elicitation)
¤ Human skills
¤ Visualization skills
¤ Analysis
¤ Creativity
¤ Managerial
23
An example of a KBS Project
qThe goal: assist the clinician in the intensive care unit (ICU)
qProblems need to be addressed:
q interpretation of measurement values with respect to historical
information about changes in a patient’s status and therapy.
q The difficulty of directly relating measurement values to a
therapeutic recommendation
q Tasks of the system:
q Predict the initial setting of the mechanical ventilator to assist
the patient to breathe
q Suggest adjustments to treatment by continuous reassessment
of the patient’s condition
q Summarize the patient’s physiological status
q Maintain a set of patient’s specific expectations and goals for
future evaluations
q Aid in the stabilization of the patient’s condition 24
An example of a KBS Project
qKBS development process
25
An example of a KBS Project
qOne of the main queries in the project was from the experts
providing knowledge for the system
q it was essential that the system provided accurate answers,
otherwise patients lives could be at risk
qExperts providing the knowledge did not want to be blamed if
an incorrect response was given by the KBS
26
An example of a KBS Project
27
An example of a KBS Project
28
KNOWLEDGE-BASED SYSTEMS
TOPIC 2
29
Objectives of this topic
¨ Case-based reasoning
¨ Genetic algorithms
¨ Intelligent agents
31
What are KBSs?
¨ A knowledge based system is a system that uses
artificial intelligence techniques in problem-solving
processes to support human decision-making, learning,
and action.
¨ Two central components of KBSs are
¤ Knowledge base
n Consists of a set of facts and a set of rules, frames, or procedures
¤ Inference engine
n Responsible for the application of knowledge base to the problem on hand.
¨ Case-based reasoning
¨ Genetic algorithms
¨ Intelligent agents
33
Expert Systems
¨ An expert system is a computer program designed
to emulate the problem-solving behavior of an
expert in a specific domain of knowledge
¨ In order to qualify as an expert system, a system
must have the capability of explaining or justifying
its conclusions.
¨ A system which can explain its reasoning process is
said to demonstrate meta-knowledge (knowledge
about its own knowledge).
34
Features of Problem Solvers
¨ Human experts exhibit certain characteristics and
techniques which help them perform at a high level
in solving problems in their domain.
q Solve the problem
q Explain the results
q Learn
q Restructure knowledge
q Break rules
q Determine relevance
q Degrade gracefully
35
Characteristics of Expert Systems
q The system performs at a level generally recognized as
equivalent to that of a human expert or specialist in the
field.
qThe system is highly domain specific.
qThe system can explain its reasoning.
qIf the information with which it is working is
probabilistic or fuzzy, the system can correctly
propagate uncertainties and provide a range of
alternative solutions with associated likelihoods.
36
Applications of Expert Systems
¨ DENDRAL
¤ Applied knowledge (i.e., rule-based reasoning)
¤ Deduced likely molecular structure of compounds
¨ MYCIN
¤ A rule-based expert system
¤ Used for diagnosing and treating bacterial infections
¨ XCON
¤ A rule-based expert system
¤ Used to determine the optimal information systems
configuration
¨ New applications: Credit analysis, Marketing, Finance,
Manufacturing, Human resources, Science and
Engineering, Education, …
37
Components of Expert Systems
¨ Knowledge base
¤ Consists of facts and rules
¤ Rules are commonly expressed in if-then structure (production rules)
n If-premise then conclusion
n If-condition then action
¨ Inference engine
¤ Responsible for rule interpretation and scheduling
¤ Forward chaining vs. backward chaining
¨ User interface
¨ Working memory
¨ Explanation facility
38
Conceptual Architecture of a
Typical Expert System
Modeling of Manufacturing Systems
Abstract
ajshjaskahskaskjhakjshakhska akjsja s
askjaskjakskjas
Expert(s)
Printed Materials
Expertise Information
Knowledge
Control Engineer Structured
Structure Knowledge
Inference
External Engine Knowledge Knowledge
Interfaces Base(s)
Working
Memory
User
Interface
39
Expert System Building Tools
¨ Programming language
¤ An expert system can be implemented using a general
purpose programming language. However, the
programming language LISP and PROLOG are typically
used in expert systems implementation, in particular
Artificial intelligence applications.
¨ Shells
¤ A shell consists mainly of an inference engine and an editor
to assist developers in building their knowledge base.
¤ Example: CLIPS is an expert system shell developed by
NASA
40
Strengths and Limitations of Expert
Systems
qStrengths
q Human expertise can be expensive
q Expert Systems only require the costs of hardware to run
q Human advice can be inconsistent
q Human advice may be adversely affected by tiredness, busy
diaries, personal problems, etc.
q Computer advice will always be based on the rules within the
expert system, and those rules can be checked by other experts to
ensure their validity.
q Human knowledge may be lost
q humans tend to die eventually
q Human knowledge may be lost in other ways such as brain disease
or simply changing jobs
q Human knowledge can only be accessed in one place at one time
q where the expert happens to be
41
Strengths and Limitations of Expert
Systems
qLimitations
q Lack of common sense
q humans may draw conclusions based on their overall view of the
world; expert systems do not have this information
q Lack of inspiration or intuition
q Lack of flexibility to apply their knowledge outside a relevant
domain
q Humans understand the limits of their knowledge and will seek help
when confronted by complex or novel situations
q Unless programmed specifically, expert systems will not recognise
their limitations and fail when confronted with new situations
42
Where Are Expert Systems Used?
qThe problem is important to business
q time or money or both can be saved by using the expert system
qThe expertise required is available and stable
q Able to build the expert system rule base
qThe knowledge required is scarce
q at least in terms of human experts available to provide answers
qThe problem is recurrent
qThe problem is at the right level of difficulty
qThe domain is well defined and of a manageable size
q Particularly large domains or domains with no easily defined
limits (e.g., object identification systems in the autonomous cars)
are difficult to program due to the large number of required rules
q The solution depends on logical reasoning, not ‘common sense’ or
general knowledge
43
Machine Learning Methods
¨ Machine learning
The process by which a computer learns from experience
(e.g., using programs that can learn from historical cases)
Machine learning
Explanation Case-
Statistical Inductive Neural Genetic
based based
regression learning networks algorithms
learning reasoning 44
An examples of Machine Learning
49
Basic Concepts of Neural Networks
¨ The human brain is composed of special cells called nuerons.
¨ Neural network elements
¤ Nucleus
The central processing portion of a neuron
¤ Soma
The main body of the neuron in which the cell nucleus is contained
¤ Dendrite (sợi nhánh)
The part of a biological neuron that provides inputs to the cell
¤ Axon (sợi trục)
An outgoing connection (i.e., terminal) from a biological neuron
¤ Synapse
The connection (where the weights are) between processing elements
in a neural network 50
Structure of a Biological Neural
Network
51
Artificial Neural Network
53
The Relationship Between Biological
and Artificial Neural Networks
Biological Ar tificial
Soma Node
Dendrites Input
Axon Output
Synapse Weight
Slow speed Fast speed
Many neurons (109) Few neurons (a dozen to
hundreds of thousands)
54
Neural Network with One Hidden
Layer
55
Example of ANN Functions
56
Learning in ANN
q Supervised learning
q Uses a set of inputs for which the desired outputs are known
q Example: Backpropagation algorithm
q Unsupervised learning
q Uses a set of inputs for which NO desired output are known
q The system is self-organizing; that is, it organizes itself
internally. A human must examine the final categories to assign
meaning and determine the usefulness of the results.
q Example: Self-organizing map
57
Learning in ANN
q Supervised learning
q Uses a set of inputs for which the desired outputs are known
q Example: Backpropagation algorithm
q Unsupervised learning
q Uses a set of inputs for which NO desired outputs are
known.
q The system is self-organizing; that is, it organizes itself
internally. A human must examine the final categories to
assign meaning and determine the usefulness of the results
q Example: Self-organizing map.
58
Characteristics of ANNs
¨ Adaptive learning
¨ Self-organization
¨ Error tolerance
¨ Real-time operation
59
Benefits and Limitations of Neural
Networks
¨ Benefits
¤ Abilityto tackle new kinds of problems
¤ Robustness
¨ Limitations
¤Performs less well at tasks humans tend to find difficult
¤ Lack of explanation facilities
60
Case-Based Reasoning (CBR)
q A case has two parts: a problem and a solution
q Cases represent experience; that is, they record how a
problem was solved in the past
q CBR is a methodology in which knowledge and/or
inferences are derived from historical cases. It is based on
the premise that new problems are often similar to
previously encountered problems and that, past solutions
may be of use in the current situations.
q CBR is particularly applicable to problems in which the
domain is NOT understood well enough for a robust
statistical model or system of equations to be formulated.
61
Process of CBR
1. Retrieve
§ Given a target problem, retrieve the most similar cases
2. Reuse
§ Map the solution and reuse the best old solution to solve the
current case
3. Revise
§ Test the solution and, if necessary, revise the old case to come
up with the solution
4. Retain
§ After the solution has been successfully adapted to the
target problem, store the resulting experience as a new
case 62
Step-by-Step Process of CBR
63
Similarity Computation
64
CBR Examples
¨ Intelligent customer support and sales support
¨ Retrieval of tour packages from travel catalogs
¨ Conflict resolution in air traffic control
¨ Conceptual building design aid
¨ Conceptual design aid for electronic devices
¨ Medical diagnosis
¨ Aircraft troubleshooting
¨ Heuristic retrieval of legal knowledge
¨ Computer supported conflict resolution through negotiation or
mediation
65
Advantages and Disadvantages of
Using CBR
q Advantages
q Improved knowledge acquisition
q Reduced development time
q Easier explanation
q Learning over time
q Disadvantages
q Storing of cases in the Knowledge base
q Implicit link between problem and solution
q Access and retrieval speed.
66
Genetic Algorithms
67
Genetic Algorithm Fundamentals
¨ Chromosome
A candidate solution for a genetic algorithm
¨ Fitness function
A measure of the objective to be obtained.
¨ Generation
An iteration of the genetic algorithmic process
in which candidate solutions are combined to
produce offspring
68
Processes within Genetic Algorithm
¨ Reproduction
¤ Through reproduction, genetic algorithms produce new generations
of improved solutions by selecting parents with higher fitness
ratings or by giving such parents a greater probability of being
contributors and by using random selection.
¨ Crossover
¤ The combining of parts of two superior solutions by a genetic
algorithm in an attempt to produce an even better solution
¨ Mutation
¤ A genetic operator that causes a random change in a potential
solution
69
Genetic Algorithm Process
70
Genetic Algorithm Parameters
71
Genetic Algorithm Benefits and
Limitations
q Genetic algorithms are particularly useful for complex
problems that require rapid development of set of good
solutions
q Limitations
q Not all problems can be framed in the mathematical
manner that genetic algorithms demand.
q Development of a genetic algorithm is complex.
q In some situations, the “genes” from a few comparatively
highly fit (but not optimal) individuals may come to
dominate the population, causing it to converge on a local
maximum
q Most genetic algorithms rely on random number generators
that produce different results each time the model runs
72
Genetic Algorithm Applications
q Genetic algorithms provide a set of efficient, domain-
independent search heuristics for a broad spectrum of
applications including
q Dynamic process control
q Complex design of engineering structures
q Scheduling
q Transportation and routing
q Layout and circuit design
q Telecommunications
q Discovery of new connectivity typologies
73
Intelligent Agents
74
Features of Intelligent Agents
q Reactivity
q Agents perceive their environment and respond in a timely
fashion to changes that occur in it.
q Proactiveness
q Agents are able to exhibit goal-directed behavior by
taking initiative
q Social ability
q Agents are capable of interacting with other agents in
order to satisfy their design objectives.
q Autonomy
q Agents must have control over their own actions and be
able to work and launch actions independently of the user
or other actors 75
Why Use Intelligent Agents
q The Gartner Group findings on information overload:
q The amount of data collected by large enterprises doubles
every year
q Knowledge workers can analyze only about 5% of this data
q Most of the knowledge workers’ efforts are spent in trying to
discover important patterns in the data (60% or more), a much
smaller percentage in determining what these patters mean
(20% or less), and very little time (10% or less) is spend
actually doing something about the patterns.
q Information overload reduces our decision-making capabilities
by 50 percent.
q A major value of intelligent agents is that they are able to
assist in searching through all the data.
q Intelligent agents save time by making decisions about what is
relevant to the user as well as by automating routine tasks. 76
Intelligent Agents: How Smart Are
They?
¨ Intelligence levels
¤ Level 0 - Agents retrieve documents for a user under
straight orders
¤ Level 1 - Agents provide a user-initiated searching
facility for finding relevant Web pages
¤ Level 2 - Agents maintain users’ profiles
77
Intelligent Agents Vs. Expert Systems
¤ Supporting e-commerce
¨ Multiagents
¨ Cost justification
¨ Ethical issues
¨ Acceptance
80