Knowledge Representation (II)
Martin Molina
Department of Artificial Intelligence
Technical University of Madrid
Constraints
Representation
The knowledge base is a collection constraints. Each constraint represents an equilibrium relation for the values of qualitative variables.
VARIABLES
X1 = {a1, a2, a3, ...} X2 = {b1, b2, b3, ...} ... Xn = {c1, c2, c3, ...} CONSTRAINTS R1: X1 + X2 = X5 R2: X2 < X3 * X4 ... Rm: X2 > X4 + X5 + X6
Inference
Constraint satisfaction algorithms are applied. For example, the Waltz algorithm progressively refines domains of variables to reach steady states.
Advantages and disadvantages
+ It is a concise representation+ It does not impose direction on the reasoning
- Efficiency
- Must be completed with modularization
Behavior of a chemical reactor: VARIABLES:
Inputs to the chemical reactor:
tendency of ammonia: dNH3 {+,0,-}
tendency of propylene: dC3H6 {+,0,-}
tendency f the air: dAire {+,0,-}
Internal state of the reactor:
tendency of the temperature: dQ {+,0,-} Outputs of the reactor:
tendency of oxygen: dO2 {+,0,-}
tendency of carbon monoxide: dCO {+,0,-}
tendency of cyanide: dCNH {+,0,-} CONSTRAINTS: R1: dO2 = dAir + dNH3 R2: dCNH = dAir - dC3H6 R3: dCO = dC3H6 - dNH3 R4: dQ = dAir * dNH3 OPERATORS: + | + 0 - ... + | + + ? 0 | + 0 - - | ? - -
Example
O2 CO CNH NH3 C3 H6 Air QApproximate reasoning
In the real world, people usually solve problems using approximate statements such as:It is almost certain that at 8:00 you will meet a traffic jam at the entrance to the city. Normally, the inflammation of the gums is due to a lack of vitamins.
The approach provided by the bi-valuated logic handles only two values (true and false) and it is not appropriate in these situations.
Models for approximate reasoning in AI:
- Empirical models: MYCIN, Prospector, Dempster and Shafer - Probability-based: Bayesian Networks
- Logic-based: Fuzzy logic
Martin Molina Technical University of Madrid
Representation
Certainty factor CF(h) between -1 and +1.
MYCIN
InferenceCertainty of composite formulas: CF(A & B) = min(CF(A), CF(B)) CF(A o B) = max(CF(A), CF(B))
Propagation:
CF(h,E) = CF(h,e). max(0,CF(e,E))
Accumulation: CF1,CF2 > 0 CF=CF1+CF2-CF1.CF2 CF1,CF2 < 0 CF=CF1+CF2+CF1.CF2 CF1.CF2 < 0 CF=(CF1+CF2)/(1-min(|CF1|,|CF2|)) Advantages
– Intuitive, easy knowledge acquisition – Simple and efficient computation. – Unique value for the unknown CF = 0. (distinguishes uncertainty from ignorance).
h1 r1 CF(h1, e) CF(h1, e) h2 h3 h4 CF(h2) CF(h5) CF(h6) CF(h1, e) CF(h4) r1 h5 h6 r2
# RISK ASSESSMENT FOR BANK LOANS # client image
#---
IF (client) financial group = interesting,(client) seniority in the bank = old THEN [1.00] (client) image = positive
IF (client) financial group = interesante,(client) seniority in the bank = medium THEN [1.00] (client) image = positive
IF (client) financial group = interesting,(client) seniority in the bank = recent THEN [0.75] (client) image = positive
IF (client) financial group = acceptable,(client) seniority in the bank = old THEN [0.75] (client) image = positive
IF (client) financial group = acceptable,(client) seniority in the bank = recent THEN [0.50] (client) image = positive
IF (client) financial group = non-existent,(client) seniority in the bank = old THEN [0.75] (client) image = positive
IF (client) financial group = non-existent,(client) seniority in the bank = recent THEN [0.25] (client) image = positive
IF (client) financial group = rejectable,(client) seniority in the bank = NON - recent THEN [0.25] (client) image = positive
MYCIN rule base
Remaining problems
•
Low level
: The system to be build initially is described in terms not
directly transferable to representations. Progressive refinement is
needed to achieve the required detail.
•
Uniformity
: The use of a uniform tecnique (as rules) can hide the
different types of knowledge involved in the system.
•
Need for combination
: The combined use of various techniques of
representation (when the system is complex) requires proper
organization and structure.
Traditional solutions for structuring
• Contexts
• Multiple representation
• Meta-rules
• Agendas
• Blackboard
• Problem spaces
• Generic tasks
The management of contexts is a partition in the knowledge base according to a division in knowledge areas of phases of reasoning. They are usually associated with production rules.
Knowledge base:
They facilitate the understanding of the organization of the knowledge base and improve the efficiency of the inference process.
In general, contexts have a flat structure, even though recent approaches raise the possibility of using hierarchical organizations with heritage management.
Contexts
R0: If – Then - R1: If - Then - R2: If - Then - R3: If - Then - R4: If - Then - Context 1 R5: If - Then - R6: If - Then - R7: If - Then - R8: If - Then - R9: If - Then - Context 2 R10: If - Then - R11: If - Then - R12: If - Then - R13: If - Then - R14: If - Then - Context 3 9This method adds various representation tecniques into a single knowledge base.
For example:
Rules+ Restrictions+ Frames+ MYCIN
The combined use of these representations can help select the best representation for each case. It can introduce an improvement in the organization, given that one representation (such as frames) may facilitate the structuring of another (such as rules).
However, this method itself does not provide a context appropriate to carry out an appropriate organization. It can lead to heterogeneous databases with a high degree of complexity.
Multiple representation
The meta-rules are based on the idea of formulating knowledge about knowledge (meta-knowledge).
They are rules that make statements about elements of the knowledge base. Example:
IF the culture of the current body was not in vain and there are rules that relate the current body with possible previous infections,
THEN
such rules should not be considered
In general the meta-rules represent strategies of the use of domain knowledge (control knowledge).
Meta-rules are formulated at a higher level of abstraction, which facilitates a more structured vision of the knowledge base. However, the use of meta-rules usually does not provide a clear separation between domain knowledge and control, which can lead to complex databases difficult to maintain.
Meta-rules
The agenda is a first step in the explicit presentation of a dynamic component of control. The agenda follows the intuitive idea of explicit formulation of the tasks that are pending to be realized, organized by various degrees of priority, which is updated dynamically during the process of reasoning.
The agenda considers the existence of tasks to perform which may correspond to sets of rules. Sample format:
Priority 1: Task 1, Task 2, Task 3 Priority 2: Task 4, Task 5
Priority 3: Task 6, Task 7, Task 8 Priority 4: Task 9, Task 10
Each task can include information such as:
<Precondition,Action,Insertion,Elimination,etc.>
The agenda focuses more on aspects of control in the modular organization of knowledge, but is a step ahead in the separation of control knowledge from the domain knowledge.
Agenda
The blackboard is a more evolved control structure that separates the control knowledge and provides the possibility to modularize the knowledge in different areas. It includes the following components:
This is a model that does not always coincide with the perception of problems by experts, so it is seen more as a computing solution than a description of a form of reasoning.
Blackboard
Control Fuente de Conocimiento Fuente de Conocimiento Fuente de Conocimiento Fuente de Conocimiento Pizarra Control Blackboard Knowledge source Knowledge source Knowledge source Knowledge sourceThe problem areas organize knowledge based on goals to be achieved at different levels of depth. They basically follows the following process of reasoning:
1. Each problem space develops a local search using an area of modular knowledge to achieve a particular goal.
2. When for a given space it is not possible to find the solution, there is a sub-goal which is analyzed in a space problem of greater depth.
This tecnique provides a modularization of knowledge at different levels of depth with ability to apply learning tecniques.
Problem spaces
Space Problem Space Problem Space Problem Space Problem sub-goaling sub-goaling sub-goalingA generic task is a module that associates to a class of problems (for ex. design) a knowledge representation and an inference strategy.
The arquitecture of a final system is seen as structured collection of instances of these tasks in a particular domain.
One of the main contributions of this concept is that the system presents a modularization of components with their own methods of inference and knowledge bases.
The resulting sysem provides an organization to a higher level of abstraction in classes of tasks.
Generic tasks
Gener ic Task KB Inference Gener ic Task KB Inference Gener ic Task KB Inference Gener ic Task KB InferenceLimitations
The previous structuring techniques represent a major step in the modular
organization of knowledge to build complex systems.
However, they are solutions which are close to a model of computing in
general, following a computable model instead of a close imitation of a
process of reasoning.
Consequently, the resulting architectures do not necessarily follow the
steps in solving the problem that the experts handle.
It is necessary to have models that focus more on making an overall
process of reasoning and the role that plays the knowledge in that process
in more abstract terms.