Download presentation
Presentation is loading. Please wait.
Published byPierre-Antoine Barrette Modified over 5 years ago
1
Adding Uncertainty to a RETE-OO Rule Engine
RuleML 08 Adding Uncertainty to a RETE-OO Rule Engine Authors : D.Sottara M. Proctor P. Mello Speaker : D. Sottara
2
Objectives (long term)
“Intelligent” supervision of complex Systems Example: bio-chemical processes (water treatment) Tasks for a Knowledge-Based system: Monitoring Control Diagnostics Available Resources: Real-Time Data from probes Knowledge (partial) from human experts Chosen Architecture: Rule – Based Expert System Convenient to encode knowledge Models expert behaviour Possibly Interactive Uncertainty in both Data and Knowledge 25/08/2019
3
Rule-Based Expert System
Standard architecture: Rules Link “Premises” to “Conclusions” If P then C When P then C P → C <Head>C</Head> </Body>P</Body> Knowledge Short Term (Facts) Long Term (Rules) User Interface Engine “Preconditions” trigger “Consequences” RETE RETE-OO (Drools) Engine 25/08/2019
4
Example When Then $t: Tank( temperature = 25 & level < 80% )
$s: Sample( source = $t & (pH < 7 || orp > –100)) Then /* sub-optimal conditions */ a b Tank Temp = 25° Sample Level < 80% pH < 7 orp = -100 #r.source = #l 25/08/2019
5
Example / with Uncertainty
When $t: Tank ( temperature ~= 25 and level is not full ) and $s: Sample ( source = $t and (pH ~< 7 or orp ~> –100 ) Then /* conditions are inadequate in some degree */ Uncertainty should be handled automatically 25/08/2019
6
Benefits of Uncertainty
Robustness Input may not be accurate What if tank temperature is not available? Threshold values are arbitrary… Is 7.8 different from 7.7? … and may change Convenience Expert Knowledge is rarely precise Rules may not be always valid Unexpected Exceptions 25/08/2019
7
“Uncertainty comes in different forms”
Types of Uncertainty “Uncertainty comes in different forms” The most commonly used are: Reliability (Confidence) Eg: T = 25° (70/100) Measures the “strength” of the estimate, especially w.r.t. to alternatives Aleatority (Probability, “prior”) Both subjective (bayesian) and objective (frequentist) Eg: T = 25° (70%) 30% probability the value is different. May be completely different Graduality (Fuzzy, “posterior”) Eg: T ≈ 25° (0.7) The value, e.g. 22°, is known to be “similar” to the reference 25°. 25/08/2019
8
Truth Degrees The “degree” of uncertainty can be modelled in different ways Does not depend (entirely) on the type of uncertainty More complicated representations may account for several types at the same time Real Value [0,1] Interval [0,1]2 Distribution [0,1] [0,1] Type II fuzzy set Imprecise Distribution [0,1] [0,1]3 Type III fuzzy set “false” 1 “true” “false” 1 “true” “false” 1 “true” “false” 1 “true” 25/08/2019
9
Evaluators Given some arguments X and a property P:
P(X) reads “X are P?” E.g.: [Tank.temperature, ‘25°’] are Equal “P(X)” generalizes the concept of characteristic function P : symbolic name X : arguments Needs a definition (semantics) Output: Truth Degree An Evaluator is any implementation of the interface P(X) Mathematical function Map Neural network Logic program … Should be invoked at run-time 25/08/2019
10
Operators Operators are special Evaluators Aggregate properties
E.g. n-ary “or” checks whether any of its argument properties hold Truth-functionality Output depends only on the output of the individual args Usually requires independence Standard “families” exist for different logics Language support is needed Custom operators may be defined and used Does not depend (entirely) on the type of truth degrees 25/08/2019
11
when Rain (hard) then Run (fast) 25/08/2019
12
State of the Art Flexible languages and tools are needed
Expressiveness Customizability Fuzzy-RuleML has been created with similar goals at the language level Built for “narrow” fuzzy logic Compatible with other standards No equivalent mainstream, open-source engine Most are RETE-based No unified support for uncertainty Special purpose engines (e.g. fuzzy logic) are common 25/08/2019
13
Example t: Tank( temperature ~= 25 level ~is full )
s: Sample( source ~= t (pH ~< 7 orp ~> –100 )) a b a 25/08/2019
14
RETE+U : a-network ~= a ~< a ~>
Constraint nodes enclose modular evaluators Simple == , != , > , … Complex (custom) contains, high, … Partial matching type-checking Explicit Operator nodes are added Nested operators supported Uncertainty is optional Cast to boolean ~= Temp a full Level is Tank ~< pH a ~> orp is Sample 25/08/2019
15
When to filter an object / tuple ?
RETE+U : b-network Join nodes use Evaluators for constraints An operator is applied at the end of the b chain Problem: When to filter an object / tuple ? Discard on false no longer applies Different Strategies: Never discard False rules still fire Performance issues Discard on most-likely false Also on custom threshold Heuristics and many others… a b = Identity? Equality? 25/08/2019
16
<P(x), P(X) C(Y)> / C(y)
RETE+U : Terminal Node In classical Modus Ponens <P(x), P(X) C(Y)> / C(y) both Premise and Implication are taken into account Rules have an associated truth degree Confidence factors Associative rules (support, coverage) Gradual rules Can be learned Using the Implication operator Terminal nodes yield the truth degree of the Premise : To compute the degree of activation, the Implication degree must be considered as well. Using the Deduction operator If a rule is True, it coincides with the Premise 25/08/2019
17
Terminal Network Implication (rule) truth degree is usually a fact
May be stored in a-memory May be asserted dynamically Premise is joined to Implication Conclusion is entailed Consequence depends on the activation degree Uncertain Facts may be asserted a b = 25/08/2019
18
RETE+U : Multiple Evaluation
Information on a constraint comes from different sources: (possibly at different times due to rule chaining) Facts : “a priori” information Evaluator : in the a-node Rules : other parts of the network Equal to the activation degree Degrees are merged Think of intervals… Propagate again on actual updates … and cached an object may be stored in several memories Need conflict resolution strategies Backward chaining may help ? Constraint Deg 1) Fld, Eval, Args 2) … 25/08/2019
19
RETE+U : State vs Justify
TMS distinguish between facts: Stated : provided externally Justified : entailed logically Justifications add support and (usually) information Two different insertions: State : previous information is overridden Evaluators are disabled Justifications are ignored Justify : previous information is combined 25/08/2019
20
Conclusions and Future Works
RETE has to be modified to support Uncertainty Few “structural” modifications Many “policy” modifications Node behaviour Interactions between nodes Goal : support different logics Customizability : many orthogonal degrees of freedom Evaluators Truth degrees Operator types More inference mechanisms Quantifiers Learning by Induction Drawback : Risk of Incoherence Use high – level “packages” 25/08/2019
21
Prototype applications
Several experiments are being carried out: Standard Fuzzy controller Real Time Signal Analysis “Expert Committee” using different evaluators Statistical Neural Logical Declarative programming Emulation of the Self-Organizing Map training algorithm 25/08/2019
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.