Weighted Tree Automata in Description Logics Pavlos Marantidis - - PowerPoint PPT Presentation

weighted tree automata in description logics
SMART_READER_LITE
LIVE PREVIEW

Weighted Tree Automata in Description Logics Pavlos Marantidis - - PowerPoint PPT Presentation

Weighted Tree Automata in Description Logics Pavlos Marantidis Technische Universit at Dresden pavlos.marantidis@tu-dresden.de March 15, 2017 Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 1 / 32 Overview


slide-1
SLIDE 1

Weighted Tree Automata in Description Logics

Pavlos Marantidis

Technische Universit¨ at Dresden pavlos.marantidis@tu-dresden.de

March 15, 2017

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 1 / 32

slide-2
SLIDE 2

Overview

1

Description Logics

2

Representation of languages

3

Weighted Tree Automata

4

Future Work

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 2 / 32

slide-3
SLIDE 3

Description Logics Description Logics

are a family of knowledge representation languages with a formal, logic-based semantics. Description comes from concept description, i.e. a formal expression that determines a set of individuals with common properties. Logics comes from the fact that the semantics of concept descriptions can be defined using logic.

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 3 / 32

slide-4
SLIDE 4

Description Logics

Concepts Constructors for building concept descriptions out of atomic concepts (unary predicates) and roles (binary predicates). Interpretation I assigns sets C I to concept descriptions C according to the semantics of the constructors. Syntax Semantics top concept ⊤ ⊤I = ∆I concept name A AI ⊆ ∆I conjunction C ⊓ D (C ⊓ D)I = C I ∩ DI disjunction C ⊔ D (C ⊔ D)I = C I ∪ DI existential ∃r.C (∃r.C)I = {d ∈ ∆I| restriction ∃e ∈ ∆I.(d, e) ∈ rI ∧ e ∈ C I} value restriction ∀r.C (∀r.C)I = {d ∈ ∆I| ∀e ∈ ∆I.(d, e) ∈ rI→e ∈ C I}

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 4 / 32

slide-5
SLIDE 5

Subsumption and Equivalence

Subsumption and equivalence

C ⊑ D iff C I ⊆ DI for all interpretations C ≡ D iff C ⊑ D and D ⊑ C

Examples

C = Human ⊓ ∀hasChild.Smart ⊓ ∀hasChild.Strong D = Human ⊓ ∀hasChild.(Smart ⊓ Strong) It can be deduced that C ⊑ Human C ≡ D

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 5 / 32

slide-6
SLIDE 6

Unification

Check whether two concepts can be made equivalent Woman ⊓ ∀hasChild.Woman Person ⊓ Female ⊓ ∀hasChild.(Person ⊓ Female) Woman → Person ⊓ Female Human ⊓ Male⊓∃loves.ExtremeSports Man⊓∃loves.(Sport ⊓ Dangerous) Man → Human ⊓ Male ExtremeSports → Sport ⊓ Dangerous

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 6 / 32

slide-7
SLIDE 7

Unification

Using some concept names as variables we can define concept patterns.

An assignment is a mapping σ : variable → concept

It can be extended to a mapping σ : pattern → concept.

The unification problem

Given concept patterns C, D, Check whether ∃σ, s.t. σ(C) ≡ σ(D).

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 7 / 32

slide-8
SLIDE 8

Approximate Unification

Suppose there is no solution. What is the “best” we can do?

  • Define best: An assignment that is least “bad” wrt some measure.

A concept distance measure (CDM)

is a mapping m : concept × concept → [0, ∞] s.t.

  • m(C, D) = 0 iff C ≡ D,
  • m(C, D) = m(D, C),
  • C ≡ D =

⇒ m(C, E) = m(D, E).

The approximate unification problem

Given concept patterns C, D, CDM m, threshold t ∈ [0, ∞], Check whether ∃σ, s.t. m(σ(C), σ(D)) < t.

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 8 / 32

slide-9
SLIDE 9

Knowledge base

Knowledge base K

A knowledge base K consists of a TBox T , a finite set of terminological axioms, i.e. properties of concepts of the form C ⊑ D and C ≡ D, an ABox A, a finite set of factual assertions of the form C(d) and r(d, e).

Talk ≡∃has-subject.⊤ Speaker ≡Participant ⊓ ∃gives.Talk Logic ⊑Mathematics BoringTalk ≡Talk ⊓ ∀attended-by.Bored BoringSpeaker ≡Speaker ⊓ ∀gives.BoringTalk Speaker(Pavlos) ∃has-subject.Logic(wtA-in-DL) gives(Pavlos, wtA-in-DL)

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 9 / 32

slide-10
SLIDE 10

Knowledge base

Knowledge base K

A knowledge base K consists of a TBox T , a finite set of terminological axioms, i.e. properties of concepts of the form C ⊑ D and C ≡ D, an ABox A, a finite set of factual assertions of the form C(d) and r(d, e).

An interpetation I is a model of K if

C I ⊆ DI for every C ⊑ D ∈ T , dI ∈ C I for every C(d) ∈ A, (dI, eI) ∈ rI for every r(d, e) ∈ A.

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 10 / 32

slide-11
SLIDE 11

Instance Queries

The instance query problem

Given knowledge base K = (T , A), element d, concept C, Check whether K | = C(d).

Talk ≡∃has-subject.⊤ Speaker ≡Participant ⊓ ∃gives.Talk Logic ⊑Mathematics BoringTalk ≡Talk ⊓ ∀attended-by.Bored BoringSpeaker ≡Speaker ⊓ ∀gives.BoringTalk Speaker(Peter) ∃has-subject.Logic(wtA-in-DL) gives(Pavlos, wtA-in-DL) K | = Talk(wtA-in-DL) K | = ∃has-subject.Mathematics(wtA-in-DL) K | = Participant(Pavlos) K | = BoringTalk(wtA-in-DL) K | = BoringSpeaker(Pavlos)

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 11 / 32

slide-12
SLIDE 12

Relaxed Instance Queries

What if d is not an element of C but of a concept “similar” to C?

A concept similarity measure (CSM)

is a mapping m : concept × concept → [0, 1] s.t.

  • m(C, C) = 1 for every C ∈ C,
  • C ≡ D =

⇒ m(C, E) = m(D, E).

The relaxed instance query problem

Given knowledge base K = (T , A), element d, concept C, CSM m, Given threshold t ∈ [0, 1], Check whether ∃D ∈ C, s.t. K | = D(d) and m(C, D) > t.

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 12 / 32

slide-13
SLIDE 13

Concept Comparison Measures

A concept distance measure (CDM)

is a mapping m : C × C → [0, ∞] s.t.

  • m(C, D) = 0 iff C = D,
  • m(C, D) = m(D, C),
  • C ≡ D =

⇒ m(C, E) = m(D, E).

A concept similarity measure (CSM)

is a mapping m : C × C → [0, 1] s.t.

  • m(C, C) = 1 for every C ∈ C,
  • C ≡ D =

⇒ m(C, E) = m(D, E).

A concept comparison measure (CSM)

is a mapping m : C × C → (S, ≤) s.t. C ≡ D = ⇒ m(C, E) = m(D, E).

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 13 / 32

slide-14
SLIDE 14

The Description Logic FL0

Constructors

value restriction ∀r.C, conjunction ⊓, top concept ⊤

Value restriction sets

LT (C, A) = {r1 . . . rn ∈ N∗

R | C ⊑ ∀r1 . . . ∀rn.A}

Example

C := A ⊓ ∀s.A D := ∀s.A T = {A ⊑ ∀r.A} LT (C, A) = r∗ ∪ sr∗ LT (D, A) = sr∗

Theorem

C ≡ D iff LT (C, A) = LT (D, A) for every A in C, D, T .

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 14 / 32

slide-15
SLIDE 15

CCMs for FL0

C ≡ D

  • LT (C, A1), . . . , LT (C, An)

LT (D, A1), . . . , LT (D, An)

  • (L1, . . . , Ln)

= = ⇒ To obtain equivalence invariant CCMs for FL0, it is sufficient to define measures that compare tuples of formal languages.

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 15 / 32

slide-16
SLIDE 16

From languages to ???

How does one finitely represent an infinite language? Using a finite automaton! Can we represent all of them? No...But luckily!

Theorem (Pensel, 2015)

Given concept C, TBox T , and concept name A, the value restriction set LT (C, A) is a regular language. How does one finitely represent a tuple of infinite languages? Using a tuple of finite automata! Using a single object?

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 16 / 32

slide-17
SLIDE 17

Σ∗ as an infinite tree

Σ = {a, b}

ε

(1, 1)

a

(1, 0)

b

(0, 0)

aa

(0, 1)

ab

(1, 1)

ba

(0, 0)

bb

(1, 0)

aaa

. . .

(0, 0)

aab

. . .

(0, 1)

aba

. . .

(0, 0)

abb

. . .

(1, 0)

baa

. . .

(0, 1)

bab

. . .

(1, 1)

bba

. . .

(0, 1)

bbb

. . .

(1, 1)

L1 = {ε, a, ab, bb, abb, bab, bbb, . . . } L2 = {ε, aa, ab, aab, baa, bab, bba, bbb, . . . }

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 17 / 32

slide-18
SLIDE 18

Regular trees

L = {0, 1} × {0, 1}

(1, 1) (1, 0)

1

(0, 0) (0, 1)

1

(1, 1) (0, 0) (1, 0)

1

(0, 0)

. . .

(0, 1)

. . .

1

(0, 0)

. . .

(1, 0)

. . .

1

(0, 1)

. . .

1

(1, 1)

. . .

(0, 1)

. . .

1

(1, 1)

. . .

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 18 / 32

slide-19
SLIDE 19

Looping Tree Automata

Automata

  • n words

Automata

  • n trees

Automata

  • n infinite words

Automata

  • n infinite trees

see blackboard!

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 19 / 32

slide-20
SLIDE 20

Weighted Looping Tree Automata

Weighted automata

  • n words

Weighted automata

  • n trees

Weighted automata

  • n infinite words

Weighted automata

  • n infinite trees

see blackboard!

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 20 / 32

slide-21
SLIDE 21

Semirings

Semiring S = (S, ⊕, ⊗, O, 1) where:

1 (S, ⊕, O) a commutative monoid, 2 (S, ⊗, 1) a monoid, 3 multiplication distributes over addition from left and right, 4 O ⊗ a = a ⊗ O = O for all a ∈ S.

A semiring is called commutative if a ⊗ b = b ⊗ a for all a, b ∈ S totally complete commutative if ⊕ →

i∈I

and ⊗ →

i≥0

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 21 / 32

slide-22
SLIDE 22

Semirings

Examples

(N ∪ {+∞}, +, ·, 0, 1) ({0, 1}, ∨, ∧, 0, 1) (N ∪ {+∞}, min, +, +∞, 0) (N ∪ {−∞}, max, +, −∞, 0) (R≥0 ∪ {+∞}, min, +, +∞, 0) (R≥0 ∪ {−∞}, max, +, −∞, 0) ([0, 1], max, ·, 0, 1) (Natural numbers) (Boolean) (Arctic) (Tropical) (Viterbi)

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 22 / 32

slide-23
SLIDE 23

Discounting

Definition

Let S = (S, ⊕, ⊗, O, 1) be a semiring. An endomorphism is a mapping f : S → S s.t. f (a ⊕ b) = f (a) ⊕ f (b) and f (a ⊗ b) = f (a) ⊗ f (b) for all a, b ∈ S, and f (O) = O, f (1) = 1. For Rsup, Rinf, p ∈ [0, +∞) ← → p(a) = p · a For Viterbi, p ∈ [0, +∞) ← → ˜ p(a) = ap

Definition

Let Σ = {σ1, . . . , σk} be a finite set of symbols and S a semiring. A discounting for Σ and S is a tuple Φ of k endomorphisms. For discounting Φ = (φ1, . . . , φk) and w = σi1σi2 . . . σin ∈ Σ∗, we define φw =

  • id,

if w = ε φi1 ◦ φi2 ◦ · · · ◦ φin, if w = σi1σi2 . . . σin.

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 23 / 32

slide-24
SLIDE 24

Φ-weighted Looping Tree Automata

A Weigthed looping tree automaton with discounting Φ over S

is a tuple M = (Σ, Q, L, in, wt) where Q is a finite state set, L is a finite set of labels, Σ = {σ1, . . . , σk} is a finite set of symbols, in : Q → S is the initial distribution, and wt : Q × L × Qk → S is a mapping assigning weights to the transitions of the automaton.

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 24 / 32

slide-25
SLIDE 25

Φ-weighted Looping Tree Automata

Given Φ-wLTA M = (Σ, Q, L, in, wt) over S, a run of M on t ∈ T ω

Σ,L is a mapping r : Σ∗ → Q.

The weight of run r at w ∈ Σ∗ is wt(r, w) := wt(r(w), t(w), r(wσ1), . . . , r(wσk)). The Φ-weight of r is weight(r) := in(r(ε)) ⊗

  • w∈Σ∗

φw(wt(r, w)). The Φ-behavior of M is the infinitary tree series ||M|| : tree → S, where for every t (||M||, t) :=

  • r∈RM(t)

weight(r).

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 25 / 32

slide-26
SLIDE 26

Combining a tree and a wLTA

How do you “feed” an infinite tree t to the automaton?

Theorem

Given FL0 concepts C, D and TBox T , we can construct a looping tree automaton AC,D that accepts the singleton set {tC,D}.

Theorem

Given regular tree t, we can construct a looping tree automaton At that accepts the singleton set {t}. How do you compute (||M||, t)? Combine M and At into an “equivalent” single automaton MA over the unlabeled tree tul.

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 26 / 32

slide-27
SLIDE 27

Combining a tree and a wLTA

Theorem

Given M = (Σ, Q, L, in, wt) and LTA At = (Σ, P, L, ∆, {ps}), one can construct MA over S working on the unlabeled tree tul such that (||M||, t) = (||MA||, tul). We define the Φ-wLTA MA = (Σ, Q × P × L, in′, wt′) over S as follows:

in′(q, p, l) :=

  • in(q)

if p = ps and l = lps O

  • therwise

wt′ (q0, p0, l0),(q1, p1, l1), . . . , (qk, pk, lk)

  • :=
  • wt(q0, l0, q1, . . . , qk)

if (p0, l0, p1, . . . , pk) ∈ ∆ O

  • therwise

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 27 / 32

slide-28
SLIDE 28

Computing the behavior on the unlabeled tree

We restrict ourselves to Rinf. A q-run r is a run s.t. r(ε) = q. The running weight of a q-run is rweight(r) :=

  • w∈Σ∗

pw · wt(r, w), Thus weight(r) = in(q) + rweight(r). If we set µ(q) := inf

r∈R(q) rweight(r)

we obtain (M, tul) = min

q∈Q {in(q) + µ(q)} .

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 28 / 32

slide-29
SLIDE 29

Computing the behavior on the unlabeled tree

Lemma

For every state q ∈ Q it holds that µ(q) = min

(q1,...,qk)∈Qk

  • wt(q, q1, . . . , qk) +

k

  • i=1

pi · µ(qi)

  • .

Non-decreasing discounting: (pi ≥ 1) weight(r) < ∞ = ⇒ wt(r, w) = 0 for every node from some depth on = ⇒ ∃q ∈ Q with q-run of weight 0

1 Compute the “zero-states” 2 For every state, compute the “best” way to get to zero-states

(Dynamic Programming/Dijkstra-based algorithm)

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 29 / 32

slide-30
SLIDE 30

Computing the behavior on the unlabeled tree

Lemma

For every state q ∈ Q it holds that µ(q) = min

(q1,...,qk)∈Qk

  • wt(q, q1, . . . , qk) +

k

  • i=1

pi · µ(qi)

  • .

Contracting discounting: (pi < 1

k )

1 Banach’s fixed point theorem to prove existence of solution 2 Linear Programming to compute solution fast Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 30 / 32

slide-31
SLIDE 31

Future Work

Other kinds of discounting Syntactic restrictions on automata s.t. the induced functions satisfy extra properties

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 31 / 32

slide-32
SLIDE 32

Thank you for your attention!

Pavlos Marantidis (TU Dresden) Weighted Tree Automata in DLs March 15, 2017 32 / 32