netweaver:concepts:fuzzy_logic

Although the term, FuzzyLogic, has a distinctly esoteric ring to it, the concept is actually fairly simple. FuzzyLogic provides a metric for expressing the degree to which an observation on some variable belongs to a set that represents a concept. Alternatively, one might say that FuzzyLogic is concerned with “aboutness.” To make the concept clear, let’s consider a simple example.

Everyone has some concept of what it means to be an adult. For legal purposes, an adult, in western cultures at least, is often defined to be a person that is 21 years old or older. A rule-based system dealing with legal issues can easily accommodate this bivalent definition: if a person is 20 years, 11 months, and 30 days old, they are not an adult, but if the person is one or more days older they are an adult. This characterization of adultness is sufficient if the concept of adult is limited to a simplistic legal one. However, if by adultness we instead are really interested in expressing something more complex such as an individual’s emotional maturity, then the simple bivalent rule for determining adultness is no longer adequate. Most people would agree that a 5-year-old has no, or best at minimal, adult qualities. In a 13-year-old, however, we might begin to see at least some early signs of adult characteristics. Many 18-year-olds demonstrate many adult qualities (they act very “grown up”). Conversing, most people can think of at least a few 25-year-olds they have met in their life who could not be called particularly emotionally mature. So, as a first step toward improving the characterization of adultness, one might construct a simple (fuzzy) curve that translates age into degree of membership in the set “adult”.

We indicated that FuzzyLogic allowed a more parsimonious knowledge representation than that which is possible with rule-based systems. The reason is simple. A single fuzzy curve is sufficient to express the full spectrum of adultness. In contrast, rule-based systems are inherently bivalent, meaning that a rule is either true or false. To more precisely characterize adultness in a rule-based system, one would need to define, say, five age categories corresponding to different levels of adultness, and each category would require a rule. Moreover, if our rule base also dealt with intelligence and this attribute similarly had five categories (ranging from brilliant to dumb as a doorknob, for example), then to jointly consider both adultness and intelligence in our rule base could require as many as 25 additional rules. In contrast, in a FuzzyLogic-based representation of this more complex situation, we only need one more fuzzy curve and perhaps a new network object to jointly evaluate the two fuzzy curves. So, in our example, two fuzzy curves have an expressive power that is equal to or better than 35 (10 + 25) rules. To summarize, the number of rules needed to adequately represent possible outcomes explodes approximately exponentially, whereas the number of fuzzy curves and related objects needed to describe the same problem in an object-oriented FuzzyLogic representation only increases approximately linearly.

NetWeaver uses OR, AND, NOT, and XOR and SOR logic nodes to define the logical dependency of a network on antecedent networks and data links. If no data links antecedent to a network use fuzzy arguments, then the operation of these nodes conforms quite closely to their usage in conventional logic. The only real difference in this context between these nodes, as used in NetWeaver, and standard logic is that true = 1, false = -1 in NetWeaver.

NetWeaver allows simple or calculated data links to take fuzzy arguments to determine a data value’s membership in a fuzzy set. In order for fuzzy set membership to be propagated through a knowledge base, the definitions of the conventional logical operators OR, AND, NOT, and XOR have been extended to handle measures of fuzzy set membership. The SOR node object is a unique to NetWeaver.

An OR node evaluates to the maximum truth value associated with a set of antecedents connected to the OR node. For example, if A, B, and C are immediate antecedents of an OR node, and they have truth values of 0.8, 0, and -1.0, respectively, then OR evaluates to 0.8.

An expression containing the conventional logical AND is true if all conditions joined by AND are true, and false otherwise. In NetWeaver, when the antecedents of a fuzzy AND node are either all fully true or at least one is fully false, the node behaves like the conventional AND. More generally, the fuzzy AND is calculated as:

AND(t) = min(t) + ~[average(t) - min(t)]*~[min(t)+1] / 2

in which AND(t) is the truth value of the AND node, min(t) is the minimum truth value of the AND node’s antecedents, and average(t) is a weighted average of the truth values of the AND node’s antecedents. The equation for calculating the value of a fuzzy AND is designed to produce a conservative estimate of truth in the presence of missing or partial negative evidence. For example, if data links A and B have truth values of 1 (completely true) and 0 (undetermined), respectively, then AND(A, B) evaluates to 0.25. In other words, there is a penalty for missing information that prevents the evaluation of the AND from being overly optimistic. The justification for this conservative formulation is intuitively appealing. When there is no evidence concerning the truth of B, as in our example, the conservative value of 0.25 is preferable to the simple average of truth values for A and B (0.5) because B might later be found to be completely false in which case the fuzzy AND should evaluate to completely false, regardless of with the evaluation is based on crisp or fuzzy logic.

The NOT node is a unary operator (can have only one immediate antecedent) that negates the truth value of its antecedent. Networks are constructed to evaluate whether some condition is true, but at times it also can be useful to test that something is not true. Negating data links is generally not necessary because it is always possible to construct an argument that directly evaluates the negative condition. On the other hand, the fuzzy NOT is a convenient way of inverting the truth value of data link rather than constructing another argument. For example, if a data link for percent slope has already been created that evaluates data input against the argument “≤10”, and a new reference to the data link now needs to evaluate the alternative condition “>10”, then the data link reference can be attached to the fuzzy NOT node.

The function of XOR is to evaluate the degree to which one and only one of its immediate antecedents is true. Three rules specify the behavior of XOR (Table 1):

- XOR evaluates to 1 (completely true) if one, and only one, immediate antecedent is completely true, and all other immediate antecedents are completely false.
- XOR evaluates to -1 (completely false) if all immediate antecedents are completely true or completely false.
- In general, the value returned by XOR is a measure of the value difference between the two most true antecedents. However, XOR is completely false if any two antecedents are fully true.

Incoming truth values | |||
---|---|---|---|

A | B | C | XOR |

1.0 | -1.0 | -1.0 | 1.0 |

1.0 | 0.5 | 0.2 | 0.5 |

0.5 | 0.5 | 0.2 | 0.0 |

1.0 | 1.0 | 0.2 | -1.0 |

1.0 | 1.0 | 1.0 | -1.0 |

1.0 | -1.0 | -1.0 | -1.0 |

The sequential OR node (SOR) provides a mechanism for choosing among alternative networks and data sources as input to a knowledge base. The leftmost antecedent of the SOR node is the most preferred source, the second antecedent from the left is the next most preferred source, and so on.

A SOR node selects data values as input from the first antecedent or node (reading from left to right) whose absolute truth value is at least equal to its weight. Since weight defaults to 1, the SOR typically uses the first topic or node that is fully true or fully false. If no immediate antecedent of a SOR node satisfies this condition, then SOR remains undetermined.