Expressivity and Application Bijan Parsia bparsia@cs.man.ac.uk - - PowerPoint PPT Presentation

expressivity and application
SMART_READER_LITE
LIVE PREVIEW

Expressivity and Application Bijan Parsia bparsia@cs.man.ac.uk - - PowerPoint PPT Presentation

Expressivity and Application Bijan Parsia bparsia@cs.man.ac.uk COMP60421 30 Nov. 2012 Friday, 30 November 2012 1 Some Logics Friday, 30 November 2012 2 Names of Logics Description logics A family of (generally) decidable


slide-1
SLIDE 1

Expressivity and Application

Bijan Parsia bparsia@cs.man.ac.uk COMP60421 30 Nov. 2012

1 Friday, 30 November 2012

slide-2
SLIDE 2

Some Logics

2 Friday, 30 November 2012

slide-3
SLIDE 3

Names of Logics

  • Description logics

– A family of (generally) decidable (generally fragments of first

  • rder) logic[s]

– TBox, ABox, (RBox, DataBox) – Different logics have

  • Different expressivity
  • Different cognitive complexity
  • Trade offs!
  • TBox (historically) was the focus

– So, DLs were characterized by their class expression language

  • or class constructors

3 Friday, 30 November 2012

slide-4
SLIDE 4

A Base Logic

  • Classically, we start with “AL”

– “Attribute logic” – This is the “concept” (class expression) language Syntax DL name OWL name A Atomic concept Class name/entity ⊤ Universal/top concept owl:Thing ⊥ Bottom concept

  • wl:Nothing

¬A Atomic negation complementOf ⊓ intersection/ conjunction intersection

4 Friday, 30 November 2012

slide-5
SLIDE 5

All about AL

  • Historical

– Logical reading of “frames”/semantic nets

  • Universal interpretation of “slots”
  • “Typing” reading

– “Smallest” “sensible” DL

  • FL is smaller :)
  • EL is more sensible!
  • Computational

– Subsumption between concepts is polynomial, but... – ...gets much harder with (non-empty) TBoxes!

  • Orthogonality

– ...

  • Usability

– Low (universal is not the right choice, generally)

Cat Animal Meat is-a eats Birds kills Dogs hates is-a is-a is-a

5 Friday, 30 November 2012

slide-6
SLIDE 6

AL on the Design Triangle?

Expressivity (Representational Adequacy) Usability (Weak Cognitive Adequacy vs. Cognitive Complexity) Computability (vs. Computational and Implementational Complexity)

6 Friday, 30 November 2012

slide-7
SLIDE 7

A More Expressive Logic

  • ALC

– “Attribute logic with complement”; C and D are expressions – Contains propositional logic – What about AL + C? Syntax DL name OWL name “Letter” A Atomic concept Class name/entity C ⊓ D Intersection/conjunction intersectionOf C ⊔ D Union/disjunction unionOf U (ALU) ¬C Concept negation complementOf C (ALC) ∃P.C Existential Restriction someValuesFrom E (ALE) ∀P. C Universal Restriction allValuesFrom

7 Friday, 30 November 2012

slide-8
SLIDE 8

A More Expressive Logic

  • ALC

– Concept negation brings everything else – AL + C = ALC = ALUEC Syntax AL + C translation A A AL (when we add atomic C ⊓ D C ⊓ D add atomic negation and ∀P. C ∀P. C negation and top) ¬C ¬C C (ALC) C ⊔ D ¬(¬ C ⊓ ¬ D) U (ALU) ∃P.C ¬∀P.¬C E (ALE) ⊤ A ⊔ ¬A For some new “A” ⊥ A ⊓ ¬A “A”

8 Friday, 30 November 2012

slide-9
SLIDE 9

All about ALC

  • Smallest propositionally closed DL

– “Boolean” DL – First “very expressive” DL

  • Computational

– Contains Propositional Logic so NP-Hard!

  • PSpace-Complete for Concept Satisfiability

– TBoxes can make it EXPTIME-Complete

  • Orthogonality (we saw)
  • Usability

– Not terrible – Still missing a ton

  • Can’t count
  • No transitivity

– Property language is weak overall!

9 Friday, 30 November 2012

slide-10
SLIDE 10

ALC TBoxes

  • Two major kinds

– “Definitorial”

  • Every TBox axiom is an equivalence
  • Every TBox axiom has at least one atomic side
  • No cycles
  • (and a secret one!)

– “General”

  • Any expression on either side
  • No other restrictions!
  • Big jump in expressivity and complexity

– ALC + Definitorial TBoxes is PSPACE-Complete

  • No harder than concept satisfiability!

– ALC + General TBoxes is EXPTIME-Complete

  • Axiom shape matters a lot!

10 Friday, 30 November 2012

slide-11
SLIDE 11

Two Expressivities/Complexities

  • Constructors (concept expression language)

– AL vs. ALC – Not all new constructors = new expressive power

  • ALUC vs. ALEC vs. ALEUC
  • Axioms and axiom “shape”

– Non-empty TBoxes – Definitorial

  • Breaks the “everywhere there was a name, replace with an expression”
  • Irregular (but regularly so)

– General

  • More uniform, but computationally harder
  • Interactions betwixt the two

– The secret one! – What happens if we have A ≡ B ⊓ C. and A ≡ E ⊔ F?

  • ⊨ B ⊓ C ≡ E ⊔ F (a GCI!)

11 Friday, 30 November 2012

slide-12
SLIDE 12

A Simple Example

12 Friday, 30 November 2012

slide-13
SLIDE 13

A Case of Disjointness

  • In ALC we can force two classes to be disjoint

– Tree SubClassOf: not Human – Contrast: Tree EquivalentTo: not Human

  • Slight syntactic extension: DisjointWith:

– Tree DisjointWith: Human – What’s the effect on expression, computation, and cognition? – Issue! Common to have sets of disjoint classes

  • E.g., siblings (for covering)
  • Require ≈n2 (really?) disjointness axioms for n classes
  • Files dominated by disjointness axioms

– Hard to edit – Hard to read – Significant load time issues

Computability (vs. Computational and Implementational Complexity)

13 Friday, 30 November 2012

slide-14
SLIDE 14

(Flat) Disjointness (N classes)

  • For just a set of classes

– No other axioms

  • To make them all (pairwise) disjoint

– Need N*(N+1)/2 disjointWith axioms

  • Still sorta quadraticy
  • Not a realistic case!

– Often we have hierarchy!

!" #!!" $!!!" $#!!" %!!!" %#!!" &!!!" &#!!" '!!!" $" &" #" (" )" $$"$&"$#"$("$)"%$"%&"%#"%("%)"&$"&&"&#"&("&)"'$"'&"'#"'("')"#$"#&"##"#("#)" *+,-.+/01+02," 3456756+8"

14 Friday, 30 November 2012

slide-15
SLIDE 15

N-ary Disjointness

  • Introduce an n-ary construct: DisjointClasses:
  • Very compact

– DisjointClasses: Cat, Dog, Hedgehog, Tree – Expression of size n for n classes

  • Must take care in measuring size!
  • Rather “DRY”

– Where does it get more complicated? – Does it ever get more complicated than the alternatives?

  • Tradeoffs for expression/computation/cognition?

– Does this change expressivity? – Change WWC? BCC? ACC?

  • What if we implement it by preprocessing into pairwise disjointness?
  • What does it do to the input?

– Is one more usable?

15 Friday, 30 November 2012

slide-16
SLIDE 16

!" !#" !##" !###" !####" !#####" !######" !#######" !########" !$%#&" !$%!#" !" '" (" )" *" +" ,"

  • "

&" !#" !!" !'" !(" !)" !*" !+" !," !-" !&" '#" '!" ''" '(" ')" '*" '+" '," '-" '&" (#" ./01" 234560708"9:3" !" !#" !##" !###" !####" !#####" !######" !#######" !########" !$%#&" !$%!#" !$%!!" !" '" (" )" *" +" ,-." /01234546"780"

Ont size (ALC) Reasoning Time Ont size (ALnC) Reasoning Time

16 Friday, 30 November 2012

slide-17
SLIDE 17

Lessons Learned

  • n-ary and pairwise disjointness

– Are polynomially interreducible

  • Thus no change in the asymptotic complexity classes
  • Can have large effect in practice

– (Potentially) Affect different parts of processing

  • Big effect on cognition

– But not 100% obvious – Size issues dominate

  • But, also, repetition

– Performance effects can be high (on cognitive issues)

  • Waiting to download/load == wasted time for little gain

– Workarounds helpful

  • But built in support best

17 Friday, 30 November 2012

slide-18
SLIDE 18

Complexity interlude

  • What is “having the same” complexity?

– Having exactly the same resource function? – Being “polynomially reducible”

  • A problem P is polynomially reducible to problem Q iff

– there is a function, f, s.t. for every instance of P, p – f(p) is in Q – |f(p)| is (at most) “polynomially bigger” than |p| » I.e., |p| = some polynomial over |f(p)|

  • Consider ALC with n-ary disjointness (“ALnC”)

– f = for any KB in ALnC

  • For each DisjointClasses: axiom
  • replace with ≈quadratic DisjointWith: axioms

– Thus, ALnC is polynomially reducible to ALC

  • Thus, we don’t have a fundamental change in complexity
  • Though we might have a notable change!

18 Friday, 30 November 2012

slide-19
SLIDE 19

A more complex example

19 Friday, 30 November 2012

slide-20
SLIDE 20

Two new constructors: min & max

  • Consider:

– loves some Person – loves min 1 Person – loves max 1 Person – loves exactly 1 Person

  • More elaborate:

– loves min 3 Person – loves max 2 Person – (loves min 3 Person) and (loves max 2 Cat) – (loves min 3 Person) and (loves max 2 Person)

  • ALCQ

– ALC + min and max, the “counting quantifiers” – Expressivity ++ – “The same” computational complexity (more implementation burden) – Cognitive complexity...

20 Friday, 30 November 2012

slide-21
SLIDE 21

New Axiom Type: Transitivity

  • ALC + Transitive = S

– loves Characteristics: Transitive – knows Characteristics: Transitive

  • Bijan knows Sean. Sean knows Claire. ==> Bijan knows Claire.

– trusts Characteristics: Transitive – locatedIn Characteristics: Transitive – partOf Characteristics: Transitive

  • These can be combined with quantifiers

– knows some Person – knows some (knows some Person)

  • We can add another axiom type

– S + SubPropertyOf: = SH

  • No worries!

21 Friday, 30 November 2012

slide-22
SLIDE 22

Transitivity + Counting!

  • ALC + Transitive + min & max

– hasPart Characteristics: Transitive – Hand SubClassOf:

  • (hasPart exactly 4 Finger) and (hasPart exactly 1 Thumb)

– Person SubClassOf hasPart exactly 2 Hands – We’d like to infer:

  • Person SubClassOf:

– (hasPart exactly 8 Fingers) and (hasPart exactly 2 Thumb)

  • PROBLEM

–ALC + Transitive + Counting = Semi-decidable

22 Friday, 30 November 2012

slide-23
SLIDE 23

What to do?

  • Give up one or the other

– But both are very useful – Transitivity: Part-Of or Located-In! – Number Restrictions: 4 fingers and 1 thumb!

  • Live with undecidability

– ALCQ and SH are already EXPTIME Complete

  • “Practically” undecidable?

– What is the impact on implementation design? – What is the impact on user interaction?

  • Find a middle ground

– Can have transitive roles and counting in the same ontology

  • But not intertwined
  • Can only count non-transitive, i.e., simple roles

– This is the choice that OWL (DL 1&2) made

  • Pattern of use restriction

23 Friday, 30 November 2012

slide-24
SLIDE 24

The Restriction

  • Only simple roles in the scope of a number restriction

– P exactly 1 C – P exactly 1 C. P Characteristics: Transitive

  • An ObjectProperty is simple iff it is not transitive and

has no transitive subroles

– P exactly 1 C. Q SubPropertyOf: P. – P exactly 1 C. Q SubPropertyOf: P Characteristics: Transitive

  • No! Why subproperties?
  • Fairly severe restriction!

– Bijan hasPart exactly 2 Legs. – Legs SubClassOf hasPart exactly 1 Foot – Those feet can’t be (implied to be) part of me!

  • And I can’t count them!

24 Friday, 30 November 2012

slide-25
SLIDE 25

Cognitive Complexity

  • There are workarounds

– Two properties: hasPart and hasDirectPart – hasPart is transitive – Only count the latter – Manually propagate

  • Burdens

– We don’t get what we want

  • Can’t count my thumbs!
  • We do get that my thumbs are part of me

– Workarounds distort the modelling – Workarounds for lacking either are generally worse – Not a “motivated” or regular restriction

  • Combining two legal ontologies can yield an illegal one

– Thus, not closed under union

25 Friday, 30 November 2012

slide-26
SLIDE 26

A Policy Use Case

If (we have time) then (do this bit)

26 Friday, 30 November 2012

slide-27
SLIDE 27

Applications: Beyond terminological

  • WS-Policy

–Represent conditions for service use –Sets of policy alternatives

  • Conjunctions of basic propositions
  • The policy is a disjunction of the conj.
  • XML representation

–Represents the standard syntax

  • http://www.w3.org/2007/02/ws-policy.xsd

–Semantics given in prose

  • http://www.w3.org/TR/ws-policy/

http://www.mindswap.org/2005/services-policies/

27 Friday, 30 November 2012

slide-28
SLIDE 28

Example Policy

<wsp:Policy xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702" xmlns:wsp="http://www.w3.org/ns/ws-policy"> <wsp:ExactlyOne> <wsp:All> <sp:SignedParts> <sp:Body/> </sp:SignedParts> </wsp:All> <wsp:All> <sp:EncryptedParts> <sp:Body/> </sp:EncryptedParts> </wsp:All> </wsp:ExactlyOne> </wsp:Policy>

http://www.w3.org/TR/ws-policy/#Normal_Form_Policy_Expression

28 Friday, 30 November 2012

slide-29
SLIDE 29

What Services?

  • XML Services

– Policy document is valid

  • Policy Services

– A message conforms to the policy

  • What else?

29 Friday, 30 November 2012

slide-30
SLIDE 30

Encoding in OWL

  • (OWL is “semantical”, why not?)
  • Two ways:

– Encode the XML directly

  • I.e., an OWL based description of the semantics
  • OWL qua XML schema languages

– Map the policy constructs

  • To similar meaninged OWL constructs

30 Friday, 30 November 2012

slide-31
SLIDE 31

Syntactic Mapping

<ClassAssertion> <Class IRI="ExactlyOne"/> <NamedIndividual IRI="MyPolicy"/></> <ClassAssertion> <Class IRI="All"/> <NamedIndividual IRI="All1"/></> <ObjectPropertyAssertion> <ObjectProperty IRI="hasAlt"/> <NamedIndividual IRI="MyPolicy"/> <NamedIndividual IRI="All1"/></> <ObjectPropertyAssertion> <ObjectProperty IRI="hasProposition"/> <NamedIndividual IRI="All1"/> <NamedIndividual IRI="SignedPart"/></>

31 Friday, 30 November 2012

slide-32
SLIDE 32

Worth it?

  • We could add constriants

–“Every Policy hasAlt only ExactlyOnes” –But we wouldn’t get validation

  • Like Schematron, what isn’t forbidden is permitted
  • Consider,

– Axiom: Parents must have at least one child – Axiom: Sally is a Parent – In XML, the latter isn’t valid – In OWL, it is consistent » We just don’t know who the child is »Open World Assumption (OWA)

32 Friday, 30 November 2012

slide-33
SLIDE 33

Semantic Mapping

  • Note:

– All = conjunction = IntersectionOf – ExactlyOne = Disjunction = UnionOf* – Propositions = Named Classes – Policies can be seen as a class

  • With conforming things members of that class
  • Translate Policies into Classes

* Cheating a bit: it’s exclusive or

Demo

33 Friday, 30 November 2012

slide-34
SLIDE 34

Services!

  • Policy conformance

– Class membership

  • Policy containment

– Subsumption – Conforming to A => conforming to B

  • Equivalence
  • Incoherence

– No one can conform to my policy

34 Friday, 30 November 2012

slide-35
SLIDE 35

A New Style of Development

  • Two new aspects

– Possibility of rich background knowledge

  • Ontologies!

– Iterative, ontologicalish development style

  • Policies as classes!
  • They interact

– Consider an integration scenario

  • One organization requires “Retry-On-Failure” messaging
  • The other requires “Retry-Until-Succeed”
  • The integrator can mark these as forms of ReliableMessaging

– Subclasses! Not disjoint per se, but not equivalent

  • The general policy of “use some form of ReliableMessaging” holds

– But we can also see that they are not using the same policy

– General policies can be specialized

  • The general policy might be a law or regulation
  • Verify that changes comply with the law!

35 Friday, 30 November 2012

slide-36
SLIDE 36

Additional Flexibility

  • As well as prescription, description

– Alternative hierarchies of policies provide interesting analytics

  • Which can interact with non-policy background knowledge
  • “Which dept. with a new manager in the past year has a conforming

policy?”

– Factor interests

  • Degrees of privacy vs. degrees of reliability
  • Who doesn’t have access?
  • Policies can remain simple

– while the background knowledge expands

36 Friday, 30 November 2012

slide-37
SLIDE 37

Benefits

  • We have a policy checker!

– And so much more – But...slow?

  • The so much more

– Very, very useful at development time

  • Worth the computation time!

– Up to a point

– Deployment time has other constraints

  • Restrict our logic to development time

– Compile to simpler representations at deployment

  • Sometimes may want logic at deployment

– E.g., if the system need to be extensible.

37 Friday, 30 November 2012