logical aspects of artificial intelligence: knowledge logics

120
Logical Aspects of Artificial Intelligence: Knowledge Logics St´ ephane Demri [email protected] September 22nd, 2021

Upload: others

Post on 24-Oct-2021

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Logical Aspects of Artificial Intelligence: Knowledge Logics

Decision problems relatively to a knowlegde base

I K is consistent def, there is some I such that I j = K.

I C is satis�able with respect to K def, there is I such thatI j = K and CI 6= ; .

I C is subsumed by D with respect to K def, K j = C v D.

I C and D are equivalent with respect to K def,T j= C � D.

I a is an instance of C with respect to K def, K j = a : C.

I K j= C v D also written C v K D.K j= C � D also written C � K D.

79

Page 2: Logical Aspects of Artificial Intelligence: Knowledge Logics

Decision problems relatively to a knowlegde base

I K is consistent def, there is some I such that I j = K.

I C is satis�able with respect to K def, there is I such thatI j = K and CI 6= ; .

I C is subsumed by D with respect to K def, K j = C v D.

I C and D are equivalent with respect to K def,T j= C � D.

I a is an instance of C with respect to K def, K j = a : C.

I K j= C v D also written C v K D.K j= C � D also written C � K D.

80

Page 3: Logical Aspects of Artificial Intelligence: Knowledge Logics

Decision problems relatively to a knowlegde base

I K is consistent def, there is some I such that I j = K.

I C is satis�able with respect to K def, there is I such thatI j = K and CI 6= ; .

I C is subsumed by D with respect to K def, K j = C v D.

I C and D are equivalent with respect to K def,T j= C � D.

I a is an instance of C with respect to K def, K j = a : C.

I K j= C v D also written C v K D.K j= C � D also written C � K D.

81

Page 4: Logical Aspects of Artificial Intelligence: Knowledge Logics

Subsumption problem w.r.t a TBox

I T j= C v D def, for all interpretations I ,I j = T implies I j = C v D.

I T j= C v D also written C v T D.

I Subsumption problem w.r.t. a TBox:

Input: TBox T , concepts C, D

Question: Does T j= C v D?

82

Page 5: Logical Aspects of Artificial Intelligence: Knowledge Logics

Relationships between reasoning problems

I C and D are equivalent w.r.t. K iff C is subsumed by Dw.r.t. K and D is subsumed by C w.r.t. K.

I C v K D iff C u : D is not satis�able w.r.t. K.

I C is satis�able w.r.t. K iff C 6vK ? .

I C is satis�able w.r.t. K iff (T ; A [ f b : Cg) is consistent.(b is fresh)

I K j= a : C iff (T ; A [ f a : : Cg) is not consistent.

83

Page 6: Logical Aspects of Artificial Intelligence: Knowledge Logics

Relationships between reasoning problems

I C and D are equivalent w.r.t. K iff C is subsumed by Dw.r.t. K and D is subsumed by C w.r.t. K.

I C v K D iff C u : D is not satis�able w.r.t. K.

I C is satis�able w.r.t. K iff C 6vK ? .

I C is satis�able w.r.t. K iff (T ; A [ f b : Cg) is consistent.(b is fresh)

I K j= a : C iff (T ; A [ f a : : Cg) is not consistent.

84

Page 7: Logical Aspects of Artificial Intelligence: Knowledge Logics

Relationships between reasoning problems

I C and D are equivalent w.r.t. K iff C is subsumed by Dw.r.t. K and D is subsumed by C w.r.t. K.

I C v K D iff C u : D is not satis�able w.r.t. K.

I C is satis�able w.r.t. K iff C 6vK ? .

I C is satis�able w.r.t. K iff (T ; A [ f b : Cg) is consistent.(b is fresh)

I K j= a : C iff (T ; A [ f a : : Cg) is not consistent.

85

Page 8: Logical Aspects of Artificial Intelligence: Knowledge Logics

Relationships between reasoning problems

I C and D are equivalent w.r.t. K iff C is subsumed by Dw.r.t. K and D is subsumed by C w.r.t. K.

I C v K D iff C u : D is not satis�able w.r.t. K.

I C is satis�able w.r.t. K iff C 6vK ? .

I C is satis�able w.r.t. K iff (T ; A [ f b : Cg) is consistent.(b is fresh)

I K j= a : C iff (T ; A [ f a : : Cg) is not consistent.

86

Page 9: Logical Aspects of Artificial Intelligence: Knowledge Logics

Relationships between reasoning problems

I C and D are equivalent w.r.t. K iff C is subsumed by Dw.r.t. K and D is subsumed by C w.r.t. K.

I C v K D iff C u : D is not satis�able w.r.t. K.

I C is satis�able w.r.t. K iff C 6vK ? .

I C is satis�able w.r.t. K iff (T ; A [ f b : Cg) is consistent.(b is fresh)

I K j= a : C iff (T ; A [ f a : : Cg) is not consistent.

87

Page 10: Logical Aspects of Artificial Intelligence: Knowledge Logics

C is satis�able w.r.t. K iff (T ; A [ f b : Cg) is consistentI Suppose that C is satis�able w.r.t. K.

I There is I such that I j = K and C I 6= ; , say a 2 C I .

I Let I 0 be the variant of I such that bI 0 def= a.

I As b does not appear in K and C, we have I 0 j= K.

I Furthermore, I 0 j= b : C as C I = C I 0.

I Consequently, I 0 j= ( T ; A [ f b : Cg).

I Now, suppose that (T ; A [ f b : Cg) is consistent.I There is I such that I j = T , I j = A and I j = b : C.

I Consequently, bI 2 C I .

I So, there is some I such that I j = K and C I is non-empty.

88

Page 11: Logical Aspects of Artificial Intelligence: Knowledge Logics

C is satis�able w.r.t. K iff (T ; A [ f b : Cg) is consistentI Suppose that C is satis�able w.r.t. K.

I There is I such that I j = K and C I 6= ; , say a 2 C I .

I Let I 0 be the variant of I such that bI 0 def= a.

I As b does not appear in K and C, we have I 0 j= K.

I Furthermore, I 0 j= b : C as C I = C I 0.

I Consequently, I 0 j= ( T ; A [ f b : Cg).

I Now, suppose that (T ; A [ f b : Cg) is consistent.I There is I such that I j = T , I j = A and I j = b : C.

I Consequently, bI 2 C I .

I So, there is some I such that I j = K and C I is non-empty.

89

Page 12: Logical Aspects of Artificial Intelligence: Knowledge Logics

C is satis�able w.r.t. K iff (T ; A [ f b : Cg) is consistentI Suppose that C is satis�able w.r.t. K.

I There is I such that I j = K and C I 6= ; , say a 2 C I .

I Let I 0 be the variant of I such that bI 0 def= a.

I As b does not appear in K and C, we have I 0 j= K.

I Furthermore, I 0 j= b : C as C I = C I 0.

I Consequently, I 0 j= ( T ; A [ f b : Cg).

I Now, suppose that (T ; A [ f b : Cg) is consistent.I There is I such that I j = T , I j = A and I j = b : C.

I Consequently, bI 2 C I .

I So, there is some I such that I j = K and C I is non-empty.

90

Page 13: Logical Aspects of Artificial Intelligence: Knowledge Logics

C is satis�able w.r.t. K iff (T ; A [ f b : Cg) is consistentI Suppose that C is satis�able w.r.t. K.

I There is I such that I j = K and C I 6= ; , say a 2 C I .

I Let I 0 be the variant of I such that bI 0 def= a.

I As b does not appear in K and C, we have I 0 j= K.

I Furthermore, I 0 j= b : C as C I = C I 0.

I Consequently, I 0 j= ( T ; A [ f b : Cg).

I Now, suppose that (T ; A [ f b : Cg) is consistent.I There is I such that I j = T , I j = A and I j = b : C.

I Consequently, bI 2 C I .

I So, there is some I such that I j = K and C I is non-empty.

91

Page 14: Logical Aspects of Artificial Intelligence: Knowledge Logics

Classi�cationI Deduce implicit knowledge from the explicitly represented

knowledge.

I For all A; B in K, check whether A v K B.

I For all A in K, check whether A is satis�able w.r.t. K.If not for some B, a modelling error is probable.

I For all a and C in K, check whether K j= a : C.

I Classifying a knowledge base K.1. Check whether K is consistent, if yes, go 2.2. For each pair A; B of concept names (plus > , ? ), check

whether K j= A v B.3. For all individual names a and concepts C in K, check

whether K j= a : C.

leading to K's inferred class hierarchy .

92

Page 15: Logical Aspects of Artificial Intelligence: Knowledge Logics

Classi�cationI Deduce implicit knowledge from the explicitly represented

knowledge.

I For all A; B in K, check whether A v K B.

I For all A in K, check whether A is satis�able w.r.t. K.If not for some B, a modelling error is probable.

I For all a and C in K, check whether K j= a : C.

I Classifying a knowledge base K.1. Check whether K is consistent, if yes, go 2.2. For each pair A; B of concept names (plus > , ? ), check

whether K j= A v B.3. For all individual names a and concepts C in K, check

whether K j= a : C.

leading to K's inferred class hierarchy .

93

Page 16: Logical Aspects of Artificial Intelligence: Knowledge Logics

Complexity results for ALC

I Concept satis�ability and subsumption problems arePSPACE-complete. (no knowledge base involved)

I Knowlegde base consistency problem isEXPTIME-complete.

NP � PSPACE � EXPTIME � 2EXPTIME � N2EXPTIME

I Recall that C v K D iff (T ; A [ f b : C u : Dg) is notconsistent.

94

Page 17: Logical Aspects of Artificial Intelligence: Knowledge Logics

Complexity results for ALC

I Concept satis�ability and subsumption problems arePSPACE-complete. (no knowledge base involved)

I Knowlegde base consistency problem isEXPTIME-complete.

NP � PSPACE � EXPTIME � 2EXPTIME � N2EXPTIME

I Recall that C v K D iff (T ; A [ f b : C u : Dg) is notconsistent.

95

Page 18: Logical Aspects of Artificial Intelligence: Knowledge Logics

Digression: closed world / open world assumptions

I Standard semantics for K = ( T ; A ) makes an Open WorldAssumption (OWA).

I No assumption that all information is known about allindividuals in a domain.

I Elements in the interpretation domain may not correspondto interpretations of individual names.

I Closed World Assumption (CWA) enforces that the onlyelements in the domain are named elements (by individualnames).

I Standard databases make the CWA: facts that are notexplicitly stated are false.

96

Page 19: Logical Aspects of Artificial Intelligence: Knowledge Logics

Several extensions of ALC (Part I)

97

Page 20: Logical Aspects of Artificial Intelligence: Knowledge Logics

Extensions: a feature of DLsI Concepts/assertions in ALC have a limited expressive

power.I How to express simple arithmetical constraints such as

“Alice teaches at least three courses”?I How to enforce constraints between roles?

For instance, r I = ( sI ) � 1 or r I � sI .

I The expressive power of ALC concepts can becharacterised precisely, thanks to the notion of bisimulation(not presented today).

B Trade-off between the expressive power and thecomputational properties of the extensions.

I In the other direction: study of ALC fragments to reducethe complexity while preserving the expression ofinteresting properties, see e.g. EL, FL 0 or DL-Lite.

98

Page 21: Logical Aspects of Artificial Intelligence: Knowledge Logics

Extensions: a feature of DLsI Concepts/assertions in ALC have a limited expressive

power.I How to express simple arithmetical constraints such as

“Alice teaches at least three courses”?I How to enforce constraints between roles?

For instance, r I = ( sI ) � 1 or r I � sI .

I The expressive power of ALC concepts can becharacterised precisely, thanks to the notion of bisimulation(not presented today).

B Trade-off between the expressive power and thecomputational properties of the extensions.

I In the other direction: study of ALC fragments to reducethe complexity while preserving the expression ofinteresting properties, see e.g. EL, FL 0 or DL-Lite.

99

Page 22: Logical Aspects of Artificial Intelligence: Knowledge Logics

Extensions: a feature of DLsI Concepts/assertions in ALC have a limited expressive

power.I How to express simple arithmetical constraints such as

“Alice teaches at least three courses”?I How to enforce constraints between roles?

For instance, r I = ( sI ) � 1 or r I � sI .

I The expressive power of ALC concepts can becharacterised precisely, thanks to the notion of bisimulation(not presented today).

B Trade-off between the expressive power and thecomputational properties of the extensions.

I In the other direction: study of ALC fragments to reducethe complexity while preserving the expression ofinteresting properties, see e.g. EL, FL 0 or DL-Lite.

100

Page 23: Logical Aspects of Artificial Intelligence: Knowledge Logics

Inverse roles

Course v : PersonTeacher v Person u 9Teaches :Course9Teaches :> v PersonStudent v Person u 9Attends :Course9Attends :> v Person

Professor v TeacherCourse v 8 TaughtBy :: Professor

I Extending NR with inverse roles :

NR [ f r � j r 2 NRg

I Given I = (� I ; �I ), (r � )I def= ( r I ) � 1 where

R � 1 def= f (b; a) j (a; b) 2 Rg

101

Page 24: Logical Aspects of Artificial Intelligence: Knowledge Logics

Inverse roles

Course v : PersonTeacher v Person u 9Teaches :Course9Teaches :> v PersonStudent v Person u 9Attends :Course9Attends :> v PersonProfessor v TeacherCourse v 8 TaughtBy :: Professor

I Extending NR with inverse roles :

NR [ f r � j r 2 NRg

I Given I = (� I ; �I ), (r � )I def= ( r I ) � 1 where

R � 1 def= f (b; a) j (a; b) 2 Rg

102

Page 25: Logical Aspects of Artificial Intelligence: Knowledge Logics

Inverse roles

Course v : PersonTeacher v Person u 9Teaches :Course9Teaches :> v PersonStudent v Person u 9Attends :Course9Attends :> v PersonProfessor v TeacherCourse v 8 TaughtBy :: Professor

I Extending NR with inverse roles :

NR [ f r � j r 2 NRg

I Given I = (� I ; �I ), (r � )I def= ( r I ) � 1 where

R � 1 def= f (b; a) j (a; b) 2 Rg

103

Page 26: Logical Aspects of Artificial Intelligence: Knowledge Logics

Elimination of the role name TaughtBy

I Back to the previous example.

Professor v TeacherCourse v 8 Teaches � :: Professor

I Given a logic L, LI is de�ned as L except that inverseroles are added. B Symbol I ' overloaded here

(N�a�m�es �f�o�r� �d�es��c�r�ip�t�i�o�n� �l�o�g�i�cs �a�r�e �d�es��i�g�n�e�d� �b�y

�a�c�c�u�m�u�l�a�t�i�o�n� �o�f s��y�m�b�o�ls �f�r�o�m� �a� �r�o�o�tL .)

I Concept satis�ability for ALCI remains PSPACE-completeand knowledge consistency remains EXPTIME-complete.

104

Page 27: Logical Aspects of Artificial Intelligence: Knowledge Logics

Elimination of the role name TaughtBy

I Back to the previous example.

Professor v TeacherCourse v 8 Teaches � :: Professor

I Given a logic L, LI is de�ned as L except that inverseroles are added. B Symbol I ' overloaded here

(N�a�m�es �f�o�r� �d�es��c�r�ip�t�i�o�n� �l�o�g�i�cs �a�r�e �d�es��i�g�n�e�d� �b�y

�a�c�c�u�m�u�l�a�t�i�o�n� �o�f s��y�m�b�o�ls �f�r�o�m� �a� �r�o�o�tL .)

I Concept satis�ability for ALCI remains PSPACE-completeand knowledge consistency remains EXPTIME-complete.

105

Page 28: Logical Aspects of Artificial Intelligence: Knowledge Logics

Elimination of the role name TaughtBy

I Back to the previous example.

Professor v TeacherCourse v 8 Teaches � :: Professor

I Given a logic L, LI is de�ned as L except that inverseroles are added. B Symbol I ' overloaded here

(N�a�m�es �f�o�r� �d�es��c�r�ip�t�i�o�n� �l�o�g�i�cs �a�r�e �d�es��i�g�n�e�d� �b�y

�a�c�c�u�m�u�l�a�t�i�o�n� �o�f s��y�m�b�o�ls �f�r�o�m� �a� �r�o�o�tL .)

I Concept satis�ability for ALCI remains PSPACE-completeand knowledge consistency remains EXPTIME-complete.

106

Page 29: Logical Aspects of Artificial Intelligence: Knowledge Logics

Elimination of the role name TaughtBy

I Back to the previous example.

Professor v TeacherCourse v 8 Teaches � :: Professor

I Given a logic L, LI is de�ned as L except that inverseroles are added. B Symbol I ' overloaded here

(N�a�m�es �f�o�r� �d�es��c�r�ip�t�i�o�n� �l�o�g�i�cs �a�r�e �d�es��i�g�n�e�d� �b�y

�a�c�c�u�m�u�l�a�t�i�o�n� �o�f s��y�m�b�o�ls �f�r�o�m� �a� �r�o�o�tL .)

I Concept satis�ability for ALCI remains PSPACE-completeand knowledge consistency remains EXPTIME-complete.

107

Page 30: Logical Aspects of Artificial Intelligence: Knowledge Logics

Number restrictions

I How to express in ALC that a student attends to at leastthree courses?

Student v 9 Attends :(Course u A)Student v 9 Attends :(Course u : A u B)Student v 9 Attends :(Course u : A u : B)

(W h�y �is��n�'�t �i�t s��a�t�is��f�a�c�t�o�r�y?)

I How to express in ALC that a student attends to at most10 courses?

I There is no concept C in ALC such that for allinterpretations I , for all a 2 � I ,

a 2 CI iff card(f b j (a; b) 2 Attends I g) � 3

108

Page 31: Logical Aspects of Artificial Intelligence: Knowledge Logics

Number restrictions

I How to express in ALC that a student attends to at leastthree courses?

Student v 9 Attends :(Course u A)Student v 9 Attends :(Course u : A u B)Student v 9 Attends :(Course u : A u : B)

(W h�y �is��n�'�t �i�t s��a�t�is��f�a�c�t�o�r�y?)

I How to express in ALC that a student attends to at most10 courses?

I There is no concept C in ALC such that for allinterpretations I , for all a 2 � I ,

a 2 CI iff card(f b j (a; b) 2 Attends I g) � 3

109

Page 32: Logical Aspects of Artificial Intelligence: Knowledge Logics

Number restrictions

I How to express in ALC that a student attends to at leastthree courses?

Student v 9 Attends :(Course u A)Student v 9 Attends :(Course u : A u B)Student v 9 Attends :(Course u : A u : B)

(W h�y �is��n�'�t �i�t s��a�t�is��f�a�c�t�o�r�y?)

I How to express in ALC that a student attends to at most10 courses?

I There is no concept C in ALC such that for allinterpretations I , for all a 2 � I ,

a 2 CI iff card(f b j (a; b) 2 Attends I g) � 3

110

Page 33: Logical Aspects of Artificial Intelligence: Knowledge Logics

Number restrictions

I How to express in ALC that a student attends to at leastthree courses?

Student v 9 Attends :(Course u A)Student v 9 Attends :(Course u : A u B)Student v 9 Attends :(Course u : A u : B)

(W h�y �is��n�'�t �i�t s��a�t�is��f�a�c�t�o�r�y?)

I How to express in ALC that a student attends to at most10 courses?

I There is no concept C in ALC such that for allinterpretations I , for all a 2 � I ,

a 2 CI iff card(f b j (a; b) 2 Attends I g) � 3

111

Page 34: Logical Aspects of Artificial Intelligence: Knowledge Logics

(Unquali�ed) number restriction

I Extending the concepts with number restrictions (� n r )and (� m r).

I Given I def= (� I ; �I ),

(� n r )I def= f a 2 � I j card(f b j (a; b) 2 r I g) � ng

(� m r)I def= f a 2 � I j card(f b j (a; b) 2 r I g) � mg

I Given a logic L, LN is de�ned as L except that(unquali�ed) number restrictions are added.

I In ALCN , (� 3 Attends ) u (� 10 Attends ) does the job.

112

Page 35: Logical Aspects of Artificial Intelligence: Knowledge Logics

(Unquali�ed) number restriction

I Extending the concepts with number restrictions (� n r )and (� m r).

I Given I def= (� I ; �I ),

(� n r )I def= f a 2 � I j card(f b j (a; b) 2 r I g) � ng

(� m r)I def= f a 2 � I j card(f b j (a; b) 2 r I g) � mg

I Given a logic L, LN is de�ned as L except that(unquali�ed) number restrictions are added.

I In ALCN , (� 3 Attends ) u (� 10 Attends ) does the job.

113

Page 36: Logical Aspects of Artificial Intelligence: Knowledge Logics

Quali�ed number restrictionI Generalising the number restrictions (� n r ).

I Quali�ed number restrictions : (� n r � C), (� m r � C).

I Given I = (� I ; �I ),

(� n r �C)I def= f a 2 � I j card(f b j (a; b) 2 r I and b 2 CI g) � ng

(� m r �C)I def= f a 2 � I j card(f b j (a; b) 2 r I and b 2 CI g) � mg

I (� n r ) = ( � n r � > ).

I Given a logic L, LQ is de�ned as L except that quali�ednumber restrictions are added.

I Concept satis�ability for ALCIQ is PSPACE-complete andknowledge base consistency is EXPTIME-complete.

114

Page 37: Logical Aspects of Artificial Intelligence: Knowledge Logics

Quali�ed number restrictionI Generalising the number restrictions (� n r ).

I Quali�ed number restrictions : (� n r � C), (� m r � C).

I Given I = (� I ; �I ),

(� n r �C)I def= f a 2 � I j card(f b j (a; b) 2 r I and b 2 CI g) � ng

(� m r �C)I def= f a 2 � I j card(f b j (a; b) 2 r I and b 2 CI g) � mg

I (� n r ) = ( � n r � > ).

I Given a logic L, LQ is de�ned as L except that quali�ednumber restrictions are added.

I Concept satis�ability for ALCIQ is PSPACE-complete andknowledge base consistency is EXPTIME-complete.

115

Page 38: Logical Aspects of Artificial Intelligence: Knowledge Logics

Quali�ed number restrictionI Generalising the number restrictions (� n r ).

I Quali�ed number restrictions : (� n r � C), (� m r � C).

I Given I = (� I ; �I ),

(� n r �C)I def= f a 2 � I j card(f b j (a; b) 2 r I and b 2 CI g) � ng

(� m r �C)I def= f a 2 � I j card(f b j (a; b) 2 r I and b 2 CI g) � mg

I (� n r ) = ( � n r � > ).

I Given a logic L, LQ is de�ned as L except that quali�ednumber restrictions are added.

I Concept satis�ability for ALCIQ is PSPACE-complete andknowledge base consistency is EXPTIME-complete.

116

Page 39: Logical Aspects of Artificial Intelligence: Knowledge Logics

Recapitulation

117