openhpi 5.2 - dl inference and reasoning

27
This file is licensed under the Creative Commons Attribution-NonCommercial 3.0 (CC BY-NC 3.0 ) Dr. Harald Sack Hasso Plattner Institute for IT Systems Engineering University of Potsdam Spring 2013 Semantic Web Technologies Lecture 5: Knowledge Representations II 02: DL Inference and Reasoning

Upload: harald-sack

Post on 16-Jan-2015

302 views

Category:

Documents


5 download

DESCRIPTION

 

TRANSCRIPT

Page 1: OpenHPI 5.2 - DL Inference and Reasoning

This file is licensed under the Creative Commons Attribution-NonCommercial 3.0 (CC BY-NC 3.0)

Dr. Harald Sack

Hasso Plattner Institute for IT Systems Engineering

University of Potsdam

Spring 2013

Semantic Web Technologies

Lecture 5: Knowledge Representations II02: DL Inference and Reasoning

Page 2: OpenHPI 5.2 - DL Inference and Reasoning

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

2

Lecture 5: Knowledge Representations II

Open HPI - Course: Semantic Web Technologies

Page 3: OpenHPI 5.2 - DL Inference and Reasoning

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

3

02 DL Inference and ReasoningOpen HPI - Course: Semantic Web Technologies - Lecture 5: Knowledge Representations II

Page 4: OpenHPI 5.2 - DL Inference and Reasoning

Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13

4

Open World Assumption - OWA

•When we have an empty DL ontology, everything is possible

•We then constrain an ontology iteratively, making it more restrictive as we go

•We state what is not possible, what is forbidden or excluded

Sheep ⊑ Animal ⊓ ∀hasLimbs.Leg

Page 5: OpenHPI 5.2 - DL Inference and Reasoning

Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13

5

Open World Assumption - OWA

• Can Sheep fly?

• No idea, but probably yes (according to our knowledge base)

Sheep ⊑ Animal ⊓ ∀hasLimbs.Leg

• In the OWA, unless we have a statement (or we can infer) “sheep can/cannot fly” we return “don’t know”

• In the real world, we are used to deal with incomplete information

Page 6: OpenHPI 5.2 - DL Inference and Reasoning

Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13

6

Open World Assumption - OWA

• In the Semantic Web we expect people to extend our own models (but we don‘t worry in advance how)

• The OWA assumes incomplete information by default

• Therefore, we can intentionally underspecify our models and allow others to reuse and extend

further ext

ension possi

ble

Sheep ⊑ Animal ⊓ ∀hasLimbs.Leg ⊓ canFly

Page 7: OpenHPI 5.2 - DL Inference and Reasoning

Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13

7

Closed World Assumption - CWA

• Closed World Systems require a place to put everything

• You can’t say anything until there’s somewhere to say it, as e.g. a slot on a frame, field on an OO class, column in a DB

• In Close World Systems, we state what is possible and have to specify all knowledge

• the CWA holds that anything that cannot be shown to be true is false; no explicit declaration of falsehood is needed.

Sheep can‘t fly

!

Page 8: OpenHPI 5.2 - DL Inference and Reasoning

Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13

8

Open World vs. Closed World Assumption

• OWA: Open World AssumptionThe existence of further individuals is possible, if they are not explicitly excluded.

Page 9: OpenHPI 5.2 - DL Inference and Reasoning

Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13

8

Open World vs. Closed World Assumption

• OWA: Open World AssumptionThe existence of further individuals is possible, if they are not explicitly excluded.

• CWA: Closed World AssumptionIt is assumed that the knowledge base contains all individuals.

Page 10: OpenHPI 5.2 - DL Inference and Reasoning

Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13

8

Open World vs. Closed World Assumption

• OWA: Open World AssumptionThe existence of further individuals is possible, if they are not explicitly excluded.

• CWA: Closed World AssumptionIt is assumed that the knowledge base contains all individuals.

if we assume that we know everything about Bill then all of his children are male

child(Bill,Bob)Man(Bob)

are all childrenof Bill male?

? ⊨ ∀child.Man(Bill)

no idea sincewe do not knowall children of Bill

DL answersdon‘t know

PROLOG answersyes

Page 11: OpenHPI 5.2 - DL Inference and Reasoning

Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13

8

Open World vs. Closed World Assumption

• OWA: Open World AssumptionThe existence of further individuals is possible, if they are not explicitly excluded.

• CWA: Closed World AssumptionIt is assumed that the knowledge base contains all individuals.

if we assume that we know everything about Bill then all of his children are male

child(Bill,Bob)Man(Bob)

are all childrenof Bill male?

? ⊨ ∀child.Man(Bill)

no idea sincewe do not knowall children of Bill

DL answersdon‘t know

PROLOG answersyes

≤1 child.⊤(Bill) ? ⊨ ∀child.Man(Bill) yesnow we knoweverything aboutBill‘s children

Page 12: OpenHPI 5.2 - DL Inference and Reasoning

Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13

9

Problems of Inference (1)

• Global (In)Consistency of the knowledge base

• Does the knowledge base make sense? KB ⊨ !?

• Class(in)consistency C ≡ ! ?• Must class C be empty?

• Class inclusion (Subsumption) C ⊑ D?

• Structuring the knowledge base

• Class equivalency C ≡ D?

• Are two classes the same?

Page 13: OpenHPI 5.2 - DL Inference and Reasoning

Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13

10

• Class disjointness C ⊓ D = !?• Are two classes disjunctive?

• Class membership C(a)?• Is individual a contained in class C?

• Instance generation (Retrieval) „find all x with C(x)“

• Find all (known!) Individuals of class C.

Problems of Inference (2)

Page 14: OpenHPI 5.2 - DL Inference and Reasoning

Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13

11 • Decidability: for each inference problem there always exists an algorithm that terminates in finite time

• DLs are fragments of FOL, therefore (in principle) FOL inference algorithms (Resolution, Tableaux) can be applied.

• But FOL algorithms do not always terminate!

• Problem: Find algorithms that always terminate!

• There might be no „naive“ solutions!

Description Logics and Inference

Page 15: OpenHPI 5.2 - DL Inference and Reasoning

Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13

12

Decidability and DL

• FOL inference algorithms (Tableaux algorithm and Resolution) must be adapted for DLs

• (for the lecture we will restrict to ALC tableaux algorithm)

• Tableaux algorithm and resolution show unsatisfiability of a theory (knowledge base)

• Adaption of entailment problems to the detection of contradictions in the knowledge base, i.e. proof of the unsatisfiability of the knowledge base!

Page 16: OpenHPI 5.2 - DL Inference and Reasoning

Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13

13

Reduction to Unsatisfiability (1)

• Class (in)consistency C ≡ !• iff KB⋃{C(a)} unsatisfiable (a new)

Page 17: OpenHPI 5.2 - DL Inference and Reasoning

Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13

13

Reduction to Unsatisfiability (1)

• Class (in)consistency C ≡ !• iff KB⋃{C(a)} unsatisfiable (a new)

• Class inclusion (Subsumption) C ⊑ D

Page 18: OpenHPI 5.2 - DL Inference and Reasoning

Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13

13

Reduction to Unsatisfiability (1)

• Class (in)consistency C ≡ !• iff KB⋃{C(a)} unsatisfiable (a new)

• Class inclusion (Subsumption) C ⊑ D

• iff KB⋃{(C⊓¬D)(a)} unsatisfiable (a new)

Page 19: OpenHPI 5.2 - DL Inference and Reasoning

Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13

13

Reduction to Unsatisfiability (1)

• Class (in)consistency C ≡ !• iff KB⋃{C(a)} unsatisfiable (a new)

• Class inclusion (Subsumption) C ⊑ D

• iff KB⋃{(C⊓¬D)(a)} unsatisfiable (a new)

• Class equivalency C ≡ D

Page 20: OpenHPI 5.2 - DL Inference and Reasoning

Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13

13

Reduction to Unsatisfiability (1)

• Class (in)consistency C ≡ !• iff KB⋃{C(a)} unsatisfiable (a new)

• Class inclusion (Subsumption) C ⊑ D

• iff KB⋃{(C⊓¬D)(a)} unsatisfiable (a new)

• Class equivalency C ≡ D• iff C ⊑ D and D ⊑ C

Page 21: OpenHPI 5.2 - DL Inference and Reasoning

Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13

14

Reduction to Unsatisfiability (2)

• Class disjointness C ⊓ D = !• iff KB⋃{(C⊓D)(a)} unsatisfiable (a new)

Page 22: OpenHPI 5.2 - DL Inference and Reasoning

Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13

14

Reduction to Unsatisfiability (2)

• Class disjointness C ⊓ D = !• iff KB⋃{(C⊓D)(a)} unsatisfiable (a new)

• Class membership C(a)

Page 23: OpenHPI 5.2 - DL Inference and Reasoning

Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13

14

Reduction to Unsatisfiability (2)

• Class disjointness C ⊓ D = !• iff KB⋃{(C⊓D)(a)} unsatisfiable (a new)

• Class membership C(a)

• iff KB⋃{¬C(a)} unsatisfiable

Page 24: OpenHPI 5.2 - DL Inference and Reasoning

Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13

14

Reduction to Unsatisfiability (2)

• Class disjointness C ⊓ D = !• iff KB⋃{(C⊓D)(a)} unsatisfiable (a new)

• Class membership C(a)

• iff KB⋃{¬C(a)} unsatisfiable

• Instance generation (Retrieval) „find all x with C(x)“

Page 25: OpenHPI 5.2 - DL Inference and Reasoning

Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13

14

Reduction to Unsatisfiability (2)

• Class disjointness C ⊓ D = !• iff KB⋃{(C⊓D)(a)} unsatisfiable (a new)

• Class membership C(a)

• iff KB⋃{¬C(a)} unsatisfiable

• Instance generation (Retrieval) „find all x with C(x)“

• Check class membership for all individuals

Page 26: OpenHPI 5.2 - DL Inference and Reasoning

Lecture: Semantic Web Technologies, Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam, WS 2012/13

14

Reduction to Unsatisfiability (2)

• Class disjointness C ⊓ D = !• iff KB⋃{(C⊓D)(a)} unsatisfiable (a new)

• Class membership C(a)

• iff KB⋃{¬C(a)} unsatisfiable

• Instance generation (Retrieval) „find all x with C(x)“

• Check class membership for all individuals

• but: efficiency...?

Page 27: OpenHPI 5.2 - DL Inference and Reasoning

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

15

03 Tableaux Algorithm for ALCOpen HPI - Course: Semantic Web Technologies - Lecture 5: Knowledge Representations II