Some Logical Nitty Gritty COMP34512 Uli Sattler - - PowerPoint PPT Presentation

some logical nitty gritty comp34512
SMART_READER_LITE
LIVE PREVIEW

Some Logical Nitty Gritty COMP34512 Uli Sattler - - PowerPoint PPT Presentation

Some Logical Nitty Gritty COMP34512 Uli Sattler ulrike.sattler@manchester.ac.uk (slides by Bijan Parsia bparsia@cs.man.ac.uk ) Wednesday, 12 March 14 Recall: RDFS--: Semantics Two possible approaches Direct Model Theory (an


slide-1
SLIDE 1

Some Logical Nitty Gritty COMP34512

Uli Sattler ulrike.sattler@manchester.ac.uk

(slides by Bijan Parsia bparsia@cs.man.ac.uk )

Wednesday, 12 March 14

slide-2
SLIDE 2

Recall: RDFS--: Semantics

  • Two possible approaches

– Direct Model Theory (an interpretation function) – By Translation (a translation function)

2

Syntax Translation to FOL Interpretation (assuming Δ) fluffy fluffy fluffyI ∈ Δ Cat Cat/1 i.e., Cat(x) CatI ⊆ Δ Cat(fluffy) fluffy:Cat Cat(fluffy) fluffyI ∈ CatI Cat ⊑ Mammal ∀x(Cat(x) → Mammal(x)) CatI ⊆ MammalI Animal ≡ Animalia ∀x(Animal(x) ↔ Animalia(x)) AnimalI = AnimaliaI

Wednesday, 12 March 14

slide-3
SLIDE 3

ALC: Semantics of expressions

3

Syntax Translation to FOL Interpretation (assuming Δ) f f fI ∈ Δ A A/1 i.e., A(var) AI ⊆ Δ p p/2 i.e., p(var1, var2) pI ⊆ Δ ╳ Δ C ⊓ D T(C,var) ∧ T(D,var) CI ∩ DI C ⊔ D T(C,var) ∨ Trans(D,var) CI ∪ DI ∃p.C ∃var’(p(var,var’) ∧ T(C,var’)) {x | ∃y: <x,y> ∈ pI and y ∈ CI} ∀P. C ∀var’(p(var, var’) → T(C,var’)) {x | ∀y: if <x,y> ∈ pI then y ∈ CI}

var is always the variable or constant passed in var’ is always a new variable

Wednesday, 12 March 14

slide-4
SLIDE 4

ALC: Semantics of axioms

4

Syntax Translation to FOL Interpretation (assuming Δ) C ⊑ D ∀x(T(C,x) → T(D,x)) CI ⊆ DI C ≡ D ∀x(T(C,x) ↔ T(D,x)) CI = DI C(f) f:C T(C, f) f ∈ CI p(f,s) <f,s>:p T(p, f, s) <fI,sI> ∈ pI

Note that we start the translation at the axiom level, which is where we set the first variable name (or constant).

Wednesday, 12 March 14

slide-5
SLIDE 5

A Simple Example

Wednesday, 12 March 14

slide-6
SLIDE 6

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 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)

6

Wednesday, 12 March 14

slide-7
SLIDE 7

Pairwise Disjointness

  • Sponge, Unicorn, Slug, Tree
  • Somewhat compact

– Sponge DisjointWith: Unicorn, Slug, Tree – Unicorn DisjointWith: Sponge, Slug, Tree – Slug DisjointWith: Sponge, Unicorn, Tree – Tree DisjointWith: Sponge, Slug, Unicorn,

  • More compact (exploiting semantics):

– Sponge DisjointWith: Unicorn, Slug, Tree – Unicorn DisjointWith: Slug, Tree – Slug DisjontWith: Tree

  • Tradeoffs for expression/computation/cognition?

– Do they differ in what they say? – In WWC? BCC? ACC? – Is one more usable?

7

Wednesday, 12 March 14

slide-8
SLIDE 8

N-ary Disjointness

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

– DisjointClasses: Sponge, Unicorn, Slug, 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?

8

Wednesday, 12 March 14

slide-9
SLIDE 9

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

9

Wednesday, 12 March 14

slide-10
SLIDE 10

A more complex example

Wednesday, 12 March 14

slide-11
SLIDE 11

Examples thus far

  • Propositional vs. FOL

– Inexpressive vs. very expressive – Decidable vs. semi-decidable

  • vs. ALC

– Expressivity: PL < ALC << FOL

  • (The more expressive contains the less)
  • ALC with and without

– binary disjoint axioms – n-ary disjointness axioms

  • Different extensions and restrictions

– Additional constructors (e.g., min/max) – Additional axiom types (SubPropertyOf) – Patterns of use or axiom shape (“definitorial” axioms) – Semantic restrictions (named individuals) – Built-in functionality (datatypes)

11

Wednesday, 12 March 14

slide-12
SLIDE 12

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...

12

Wednesday, 12 March 14

slide-13
SLIDE 13

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!

13

Wednesday, 12 March 14

slide-14
SLIDE 14

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!

14

Wednesday, 12 March 14

slide-15
SLIDE 15

Transitivity + Counting!

  • ALC + Transitive + min & max

– partOf Characteristics: Transitive – (partOf exactly 4 Finger) and (part of exactly 1 Thumb) – partOf exactly 2 Hands – We’d like to infer:

  • (partOf exactly 8 Fingers) and (partOf exactly 2 Thumb)
  • PROBLEM

–ALC + Transitive + Counting = Semi-decidable

15

Wednesday, 12 March 14

slide-16
SLIDE 16

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

16

Wednesday, 12 March 14

slide-17
SLIDE 17

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!

17

Wednesday, 12 March 14

slide-18
SLIDE 18

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

18

Wednesday, 12 March 14