280 likes | 521 Views
Knowledge-based Systems. Alternatives to Rules. Knowledge-based Systems. Rule-based heuristic (expert) knoweldge encoded in rules. Model-based reasoning is based on a model of a device/system. Case-based knowledge is provided by many examples of solutions to previous cases.
E N D
Knowledge-based Systems Alternatives to Rules Dip HI KBS
Knowledge-based Systems • Rule-based • heuristic (expert) knoweldge encoded in rules. • Model-based • reasoning is based on a model of a device/system. • Case-based • knowledge is provided by many examples of solutions to previous cases. Dip HI KBS
Problems with Rules • Fail to work if problem is not anticipated by rules. • Heuristic rules can be applied inappropriately if some condition is omitted. • With some understanding of the problematic system these inadequacies could be overcome. Dip HI KBS
Model-based Reasoning • Just as experts revert to first principles when confronted with new or difficult problems… • Model-based reasoners are based on a representation of the structure and behaviour of the system under analysis. • Used especially in diagnosis of equipment malfunctions. Dip HI KBS
MBR : Diagnosis • Simulate behaviour of components of device/system. • Represent component interactions. • Represent known failure modes of components and interconnections. • Compare actual device performance with that predicted by the model. • If there is a discrepancy, reason about what failures could account for observed bahaviour. Dip HI KBS
MBR Example Predicted outputs MULT-1 A=3 ADD-1 (F=12) Actual F is 10 B=3 MULT-2 C=2 ADD-2 (G=10) D=2 MULT-3 E=3 Fig 6.14 of Luger and Stubblefield, Third Edition. Dip HI KBS
Reasoning phase • Generate hypotheses • either ADD-1, MULT-1 or MULT-2 is faulty • Test each hypothesis • find MULT-2 appears to be OK (since ADD-2’s output is good). • Discriminate between surviving hypotheses with further observations. • E.g. check the actual output of MULT-1. Dip HI KBS
Problems with MBR • Intensive knowledge acquisition. • Requires an explicit domain model, a well-defined theory. • Excludes some medical specialties, financial applications, ... • Complex and detailed reasoning, slow?. • Ignores (possibly valuable) experiential knowledge. Dip HI KBS
Problems cont/ • Can only handle problems explained by the model. • A model is a representation of some reality. It leaves out many aspects. If the things that left out are the cause of the problem, the MBR won’t work. Dip HI KBS
Advantages of MBR • More robust and flexible reasoning • Can provide causal explanations. May serve a tutorial role. • Knowledge may be transferable to related tasks. Dip HI KBS
Case-based Reasoning • Rules and models may be difficult to devise for natural domains (e.g. medicine). • In CBR “knowledge” is held in a case base of real prior problems and their solutions. • Case-based diagnosis is common • physician matches new case with one seen previously and uses the diagnosis of the old case as a starting point. Dip HI KBS
Application domains • Technical support help desks • Classification type problems • see Machine Learning lecture • Case-based design • Fraud detection • Legal planning • much law is precedent (case) based Dip HI KBS
Components • Representation • Retrieval • Matching engine retrieves cases similar to target case. • Adaptation • Remembering Dip HI KBS
Breathalyser Example cases • Duration is duration of drinking session. • Perhaps elapsed time should be added as a case feature? Dip HI KBS
Case Representation • The knowledge engineering task is focused on deciding how to represent cases • what features best characterise cases • i.e. predictive features • may require expert analysis • e.g. for image classification the bitmap may need to be converted to an edge map. • e.g. height and weight may not be useful in themselves for classifying apples and pears,but height/weight ratio is. Dip HI KBS
Case retrieval • Based on some similarity measure. • e.g number of matching features • e.g. distance measure based on difference between numeric features • Indexes may be used to speed the retrieval Dip HI KBS
Case indexing - Example Dip HI KBS
k-Decision Tree • Tree can be built automatically (see later). • What if no. of bedrooms is less important (predictive) than age of house? Dip HI KBS
Case Adaptation • Breathalyser • if actual consumption is 2 more than in retrieved case add 0.5 to blood alcohol count. • Property Valuation • for extra bedroom add x% to price • More complex adaptation may be needed where solutions are plans or designs, rather than single values. Dip HI KBS
Retrieval revisited • Objective: to find the case most applicable to the current one. • Applicable ? • If there is no adaptation, find case whose solution we are most confident of reusing • i.e. whose differences don’t invalidate the solution • With adaptation, find case whose solution is easiest to adapt to current problem • use an adaptation cost measure instead of similarity measure. Dip HI KBS
Advantages of CBR • May work better than inductive and deductive methods for natural domains. • Does not require extensive analysis of domain knowledge. • Existing data and knowledge - case histories, repair logs - are leveraged. • Shortcuts complex reasoning - may be quicker than rule-based or model-based. Dip HI KBS
Problems with CBR • Lack of deep knowledge - • poor explanation • danger of misapplication of cases. • Large case base can slow things down • (compute-store tradeoff) • Knowledge engineering can still be arduous • designing and selecting features • similarity matching algorithms Dip HI KBS
Hybrid Systems • Integrate two or more reasoning methods to get a cooperative effect. • See Protos system • builds a model from cases with “teacher” help • better explanation and more convincing Dip HI KBS
References and Acknowledgements • Padraig Cunningham provided much of the material on CBR. • Luger and Stubblefield: Third Edition of “Artificial Intelligence” has a lot more than the previous edition. Dip HI KBS