1 / 37

IMAT3406 Fuzzy Logic and Knowledge Based Systems (AI)

IMAT3406 Fuzzy Logic and Knowledge Based Systems (AI). Inferencing. Introduction. Inferencing is the 3 rd stage of a KBS design and often linked to reasoning

nike
Download Presentation

IMAT3406 Fuzzy Logic and Knowledge Based Systems (AI)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. IMAT3406 Fuzzy Logic and Knowledge Based Systems (AI) Inferencing

  2. Introduction • Inferencing is the 3rd stage of a KBS design and often linked to reasoning • Inferencing is the process of deriving correct & appropriate answers and drawing correct conclusions for problems from knowledge that is maintained in a KBS • There are different types of Inferencing • In this lecture we cover some of the most popular and commonly used types of Inferencing

  3. Topics of Discussion • Basic Components • Backward chaining • Forward chaining • Opportunistic Inferencing • Logical Inferencing • Closed World Assumption (CWA) • Logical contradiction • Other techniques

  4. Basic Components: • An Expert System can be described as Expert system = inference engine + knowledge base + working memory + (external) data

  5. Basic Components: The knowledge base • The knowledge base contains the know-how of the human experts in a particular field. Such know-how is of two types: • Facts - "deep knowledge". • Heuristics - "surface knowledge". • Knowledge base is derived and implemented by means of knowledge acquisition and representation.

  6. Basic Components: The knowledge base: Heuristics • Heuristic - a strategy to find the solution to a problem which is not guaranteed to work. • One sort of heuristic usually gives you the right answer but sometimes gives you the wrong answer • Another sort gives you an answer which isn’t 100% accurate.

  7. Basic Components: The knowledge base: Heuristics • Humans use heuristics a great deal in their problem solving. Of course, if the heuristic does fail, it is necessary for the problem solver to either pick another heuristic, or know that it is appropriate to give up. • The rules, found in the knowledge bases of rule-based systems, are very often heuristics.

  8. Basic Components: The inference engine • The inference engine has two primary tasks: • Inference: the inference engine employs reasoning to examine existing facts and rules. It also updates stored knowledge and draws conclusions. • Control: the inference engine's mechanism for controlling the search of the knowledge base.

  9. Basic Components: Working memory • An area of the Computer's RAM reserved for storing information regarding the current status of the problem e.g. conclusions reached so far, data input by the user and details of items within the knowledge base which have been checked.

  10. Basic Components: External Data Source: • Some expert systems receive input data from external sources other than the user. Common forms of this data - known as sensor data – include some biomedical test results (e.g., red cell count in blood), audible sounds and visual images. The system interprets the data and makes inferences based on that data.

  11. Inference in a KBS • Two control strategies • forward chaining • backward chaining

  12. Backward chaining • Backward chaining: from the conclusion to the facts. Sometimes called a goal-driven approach • To chain backward, match a goal in working memory against 'conclusions' of rules in the rule-base. We start from an expectation of what is to happen (hypothesis), then seek evidence that supports (or contradicts) your expectation. • When one of them fires, this is liable to produce more goals. • So the cycle continues. • Often this entails formulating and testing intermediate hypotheses (or sub-hypotheses). • Backward chaining may use either depth first and breadth first search algorithms

  13. Backward chaining • Example: IF Customer wants comfort and Customer has enough_money THEN Salesperson recommends Rolls Royce •  And assume you are the sales person, and your question is ‘do I recommend Rolls Royce to this customer or not?’

  14. Forward chaining • Forward chaining: working from the facts to a conclusion. Sometimes called a data-driven approach. • In this approach we start from available information as it comes in, or from a basic idea, then try to draw conclusions. • The computer analyses the problem by looking for the facts that match the IF portion of its IF-THEN rules.

  15. Forward chaining • If we take the sales person example again, forward chaining would be the approach to use if the question was ‘the customer wants comfort and has enough money, what shall I recommend to him?’

  16. Backward and Forward chaining • Here are two rules: If corn is grown on poor soil, then it will rot. If soil hasn't enough nitrogen, then it is poor soil. • Forward chaining: This soil is low in nitrogen; therefore this is poor soil; therefore corn grown on it will rot. • Backward chaining: This corn is rotten; therefore it must have been grown on poor soil; therefore the soil must be low in nitrogen.

  17. Forward chaining • More realistically, • the forward chaining reasoning would be: there's something wrong with this corn. So I test the soil. It turns out to be low in nitrogen. If that’s the case, corn grown on it will rot. Therefore the problem is rot caused by low nitrogen.

  18. Backward chaining • More realistically, • the backward chaining reasoning would be: there's something wrong with this corn. Perhaps it is rotten; if so, it must have been grown on poor soil; if so, the soil must be low in nitrogen. So test for low nitrogen content in soil, and then we'll know whether the problem is rot.

  19. Forward & backward chaining • The choice of strategy depends on the nature of the problem. • Assume the problem is to get from facts to a goal (e.g. symptoms to a diagnosis).

  20. Forward & backward chaining Backward chaining is the best choice if: • The goal is given in the problem statement, or can sensibly be guessed at the beginning of the consultation; or: • The system has been built so that it sometimes asks for pieces of data (e.g. "please now do the gram test on the patient's blood, and tell me the result"), rather than expecting all the facts to be presented to it.

  21. Forward & backward chaining Backward chaining … • This is because (especially in the medical domain) the test may be • expensive, • or unpleasant, • or dangerous for the human participant so one would want to avoid doing such a test unless there was a good reason for it.

  22. Forward & backward chaining Forward chaining is the best choice if: • All the facts are provided with the problem statement; or: • There are many possible goals, and a smaller number of patterns of data; or: • There isn't any sensible way to guess what the goal is at the beginning of the consultation.

  23. Forward & backward chaining • Note also that • a backwards-chaining system tends to produce a sequence of questions which seems focussed and logical to the user, • a forward-chaining system tends to produce a sequence which seems random & unconnected. • If it is important that the system should seem to behave like a human expert, backward chaining is probably the best choice.

  24. Forward & backward chaining • Some systems use mixed chaining, where some of the rules are specifically used for chaining forwards, and others for chaining backwards. The strategy is for the system to chain in one direction, then switch to the other direction, so that: • the diagnosis is found with maximum efficiency; • the system's behaviour is perceived as "human".

  25. Backward and Forward Chaining • Both backward and forward chaining techniques have their advantages and disadvantages and are often used in permutations. • Compare advantages and disadvantages of both techniques. • When this happens, a technique that is called opportunistic Inferencing is used.

  26. Opportunistic Inferencing • The idea behind Opportunistic Inferencing is that some asserted facts in the working memory might lead to the firing of set of rules, which leads to speed up the Inferencing process. • The Inferencing engine in FUZZYCLIPS can be used FuzzyCLIPS is an extension of the CLIPS (C Language Integrated Production System) expert system shell. Further details can be found on http://www.iit.nrc.ca/IR_public/fuzzy/fuzzyClips/fuzzyCLIPSIndex2.html

  27. Logical Inferencing • Logical Inferencing, which is sometimes referred to as problem solver or automated proof system, uses the logical representation to derive or entail conclusions. • Logic Inferencing is usually computationally complicated. Therefore, several assumptions are used in logic Inferencing. • The most famous assumption that is often used in logic-based models and systems is Closed World Assumption (CWA).

  28. Closed World Assumption (CWA) • CWA assumes that the logical system is closed and therefore there are no possible external effects to change the composition of this system • CWA simply declares that all relevant facts are stored in the database, so that any statement that is true about the actual world can/should be deduced from facts in the KBS. • As a result anything that cannot be proved to be true in the model we can assume that it is false. • CWA is employed by programs written in the programming language PROLOG. • This sometimes leads to difficulties. For an example, missing symptoms of an illness does not mean that the patient does not have that illness. However, that is exactly what the system may conclude using the CWA.

  29. Closed World Assumption (CWA) • There are at least two situations where the CWA is used • (1) It is assumed that a knowledge base contains all relevant facts (The information that the KB contains is assumed to be complete) • (2) It is known that the knowledge base is incomplete (does not have enough information to produce an answer to a question) and a decision must be made without complete information - a situation familiar to most people. • The CWA is designed to solve reasoning problems in both of these situations. The idea is that if you cannot prove P or not P, assume it is false.

  30. Closed World Assumption (CWA) vs Open World Assumption (OWA) • The opposite assumption, the Open World Assumption (OWA), assumes that if something cannot be proved we do not know its truth status. This is the normal assumption for logic • Example • Statement: “Michael” “is a citizen of” “UK” • Question: Is Michael a citizen of USA? • Answers: • "CWA" answer : NO • "OWA" answer : unknown as Michael could have dual citizenship

  31. CWA vs OWA • The opposite assumption, the Open World Assumption (OWA), assumes that if something cannot be proved we do not know its truth status. This is the normal assumption for logic • OWA is much less prone to trigger an error, and much more likely to generate new statements based on the fact that can be found in the model, hoping to be able to regenerate the knowledge when new information comes along • Example • Statement: “Michael” “is a citizen of” “UK” • Question: Is Michael a citizen of USA? • Answers: • "CWA" answer : NO • "OWA" answer : unknown as Michael could have dual citizenship

  32. More Logical Inferencing • There are several logic-based models: e.g. default logic, non-monotonic logic and situation calculus. • The logic-models are often very complicated to be translated into computable models. • We always seek that our models are sound and complete. • What do you think we mean by soundness and completeness?

  33. Logical contradiction • One of the weaknesses, beside complexity, is that the logic-based systems suffer from is usually Logical Contradiction. • Logical contradiction happens when the system, for example, allows us to entail X and not X at the same time. Sometimes logical contradiction is defined within the context of KBS to be the case in which the system reaches a conclusion that is known by the user to be false.

  34. Other Inferencing techniques • There are several Inferencing techniques may be used depending on the system domain. Here are some of the commonly used techniques: • Model-based reasoning. • Case-based reasoning. • Monotonic and non-monotonic reasoning. • Truth maintenance systems. • Hypothetical reasoning. • Analogical reasoning. • Procedural reasoning. • Hierarchical reasoning. • Inductive and deductive reasoning. • Pattern matching.

  35. Conclusion • In this lecture we looked at the 3rd aspect of knowledge based systems, namely, Inferencing. • There are different types of Inferencing (e.g., backward & forward chaining/ inferencing and logical inferencing) • Search algorithms are often used in Inferencing.

  36. References • Lecture notes part 2. • E. Turban, Expert Systems and Applied Artificial Intelligence. New York: Macmillan Publishing Company, 1992.

  37. Next Steps • Next … • Modelling uncertainty

More Related