240 likes | 285 Views
The SG family. Different kinds of knowledge facts , rules and constraints Generic deduction problem: given a KB K =(…) and a SG Q , is Q deducible from K ?. Different formalisms obtained depending on the composition of K and the definition of deduction.
E N D
The SG family • Different kinds of knowledge facts, rules and constraints • Generic deduction problem: given a KB K=(…) and a SG Q, is Q deducible from K? Different formalisms obtained depending on the composition of Kand thedefinition of deduction E.g. SG formalism: K={facts} deduction = projection
SREC SEC SRC inference rules evolution rules SR SGC +rules +constraints SG facts
Rules • A ruleexpresses knowledge of form «if Hypothesis then Conclusion» R1 Researcher Project member « Every researcher is member of a project » R2 Location Location near near « The relation near is symetrical (on locations) » • NB: a fact can be seen as a rule with empty hypothesis
SG bicoloré • UnSG bicoloré est un SG muni d'une coloration de ses sommets avec deux couleurs {0,1} • On impose que le sous-graphe induit par les sommets de couleur 0soit un SG syntaxiquement correct (i.e. si un sommet relation est de couleur 0, tous ses voisins aussi) sinon l'application de la règle peut produire un SG "mal formé"
emp emp poss Sommet frontière : sommet concept de couleur 0 ayant au moins un voisin (relation) de couleur 1 Manager Person role Compagny agent Employee Decision role Person object Hypothèse de la règle : sous-graphe de couleur 0 Conclusion de la règle :sous-graphe de couleur 1+ sommets frontières Salary
near near G’ near Rule application • A rule is applicable to a fact G if there is a projection from its hypothesis to G R2 Location Location near near G Office:#125 … Office:#124 • The result of the rule application is obtained by adding its conclusion to Gaccording to(each frontier node c of the conclusion is merged with P(c)) • (+normalization if necessary)
emp emp emp poss G Manager role Man:J CarBuilder: P Manager Person role Compagny R agent Employee Decision Employee role Person object Manager Salary Tc
Logical semantics F X (Y H[XY] Z C[XZ]) X: frontier node variablesY : other variables of color 0 nodesZ : variables of color 1 nodes XY(… Z…) y x Researcher Project member x (Res(x) y Project(y) member(x,y)) x Compagny Person worksIn • x ( y Person (x) (Comp(y) worksIn(x,y)) z (Salary(z) poss(x,z))) poss Salary
Définition usuelle des règles • Un lambda SG est obtenu à partir d'un SG G en distinguant certains sommets concepts génériquesc1 ... cn, n 0. On note l c1 ... cn G • F(lc1 ... cn G) : comme F(G) mais en laissant libres les variables associées à c1 ... cn • Un SG = un lambda-SG sans sommet distingué (n = 0) • Règles et contraintes : couples de lambda-SGs avec même nombre de sommets distingués • (l c11 ... c1n G1, l c21 ... c2n G2)
R = (l c11 ... c1n G1, l c21 ... c2n G2) • Application de R sur un SG G selon une projection P : G1 -> G • on ajoute G2 à G • puis on fusionne chaque c2i avec P(c1i) • Interprétation logique : • on associe la même variable à c1i et c2i notons x1 ... xn ces variables • on construit la formule :x1...xn(F(l c11 ... c1n G1) F(l c11 ... c1n G1)) Voir cas "hypothèse vide" et "conclusion vide"
SG bicoloré versus couple de lambda-SG SI Personne : *x Personne aPourEnfant ALORS Parent : *x (Plaçons-nous dans le cadre des types conjonctifs) Personne Personne aPourEnfant Il faut que la conclusion puissecomporter des liens de coréférence Parent
SR : facts + rules Deduction problem: given a KB K ={facts, rules} and a SG Q, is Q deducible from K,i.e. is there a sequence of rule applications leading to a SG answering Q (ie Q projects to it)? K facts Q P ruleapplications Forward and backward chaining mechanisms
Soundness and completenessof graph operations The forward and backward chaining mechanisms are sound and complete : Q deducible from KiffF(Q) logically deducible from F(K) F(S), F(facts),F(rules) [completeness up to normality conditions for forward chaining]
Decidability ? • Deduction in SR is only semi-decidable • SR is a computation model , ie one can simulate a Turing machine (représentation du problème de l'arrêt d'une MdT – pour une entrée particulière – dans SR) • Decidable specific cases? ex: range-restricted rule : no generic concept in conclusion (frontier nodes excepted) (1) build the full SG F from the KB KF exists! (2) check whether Q projects to F
Plus généralement: • Observation : une application de règle est inutile si elle produit un graphe équivalent au graphe d'origine • Def : un SG G est dit plein (full) par rapport à un ensemble de règles R si toute application d'une règle de R sur G produit un graphe équivalent à G. • Pté : étant donnés G et R , s'il existe une dérivation menant à un graphe plein, alors la forme irredondante de ce graphe est unique (modulo isomorphisme) • Def : ensemble de règles à expansion finie : tel que pour tout G, il existe une séquence (finie) d'applications de règles menant à un graphe plein. En ce cas, déduction décidable
SREC SEC SRC inference rules evolution rules SR SGC +rules +constraints SG facts
worksWith in in SGC: facts and constraints • A constraint expresses knowledge of form • « if A is found so must B » (C+) • « if A is found B must not » (C-) HeadOfGroup Secretary Person Person in in Office near Office Office Positive constraint C+ Negative constraint C- « The boss office must be nearall secretary offices » « Persons working togethershould not share an office »
in in in in in HeadOfGroup Secretary:K. HeadOfGroup Secretary near Office:#3 near Office:#2 Office Office near Secretary:L. C+ near near G Office:#10 "Idea" : G satisfies a positive constraint C+ if every projection from Condition(C+) to G can be extended to a projection from C+ to G on verra par la suite que cette définition doit être précisée
worksWith worksWith in in Person Person Researcher:K. Researcher in in Office Office:#3 Office C- G Def: G satisfies a negative constraint C- if no projection from Condition(C-) to G can be extended to a projection from C- to G There is no projection from C- to G
But previous definition is not good enough r r r t t t t G1 C+ G2 G1 and G2 are equivalent. Thus they should be both consistent or both inconsistent w.r.t. C+
Definition : G satisfies a positive constraint C+ if every projection from Condition(C+) to irr(G) (the irredundant form of (G)) can be extended to a projection from C+ to irr(G). Ce problème de graphes équivalents qui ne se comportent pas de la même façon face à une contrainte ne se pose pas avec les contraintes négatives. Pourquoi ?
Let C- be a negative constraint. Let G1 and G2 be equivalent SGs. G1 satisfies C- iff G2 does. • Def: two constraints C1 and C2 are equivalent if any SG that satisfies C1 also satisfies C2, and reciprocally. • Any negative constraint can be colored in 1 (interdiction part) yielding an equivalent constraint. • Any negative constraint can be transformed into an equivalent positive constraint " ifC-must [NotThere]" Les contraintes négatives peuvent donc être vues comme un cas particulier de contraintes positives
worksWith worksWith worksWith Person Person Person Person in in in in Office Office C- C'- Person Person in in C+ NotThere Office
SGC : facts and constraints KB K = {facts, constraints} SGC-Consistency: Given a KB K, is Kconsistent, ie do the facts satisfy the constraints? If K is not consistent, nothing can be deduced from it SGC-Deduction: Given a consistent KB K and a SG Q, is Qdeducible from K (is there a projection from Q to facts)? [ Variante : Etant donnés K et Q, a-t-on :(1) K consistante et (2) Q se déduit de K ? ] • Complexity • - Consistency is 2P-complete- If negative constraints only, co-NP-Complete