• Aucun résultat trouvé

February8th,2016 AntoineAmarilli ,PierreBourhis ,PierreSenellart ProbabilitiesandProvenanceonTreesandTreelikeInstances

N/A
N/A
Protected

Academic year: 2022

Partager "February8th,2016 AntoineAmarilli ,PierreBourhis ,PierreSenellart ProbabilitiesandProvenanceonTreesandTreelikeInstances"

Copied!
175
0
0

Texte intégral

(1)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Probabilities and Provenance on Trees and Treelike Instances

Antoine Amarilli1, Pierre Bourhis2, Pierre Senellart1,3

1Télécom ParisTech

2CNRS CRIStAL

3National University of Singapore

February 8th, 2016

(2)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Query evaluation

Relational signatureσ

Example: R(arity 1),S(arity 2),T(arity 1)

Class I of instances

Example: all instances; acyclic instances; treelike instances; ... Fragment Q ofBoolean constant-free queries

Example: Boolean conjunctive queries

(= existentially quantified conjunction of atoms)

Example of CQ:q:x y R(x)S(x,y)T(y)

Query evaluationproblem for Q andI: Fix aqueryq∈ Q

Given an inputinstanceI∈ I

Determine whetherIsatisfiesq(writtenI|=q)

Complexity as afunction ofI, notq(=data complexity)

(3)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Query evaluation

Relational signatureσ

Example: R(arity 1),S(arity 2),T(arity 1) ClassI of instances

Example: all instances; acyclic instances; treelike instances; ...

Fragment Q ofBoolean constant-free queries

Example: Boolean conjunctive queries

(= existentially quantified conjunction of atoms)

Example of CQ:q:x y R(x)S(x,y)T(y)

Query evaluationproblem for Q andI: Fix aqueryq∈ Q

Given an inputinstanceI∈ I

Determine whetherIsatisfiesq(writtenI|=q)

Complexity as afunction ofI, notq(=data complexity)

(4)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Query evaluation

Relational signatureσ

Example: R(arity 1),S(arity 2),T(arity 1) ClassI of instances

Example: all instances; acyclic instances; treelike instances; ...

Fragment Q ofBoolean constant-free queries

Example: Boolean conjunctive queries

(= existentially quantified conjunction of atoms)

Example of CQ:q:x y R(x)S(x,y)T(y)

Query evaluationproblem for Q andI: Fix aqueryq∈ Q

Given an inputinstanceI∈ I

Determine whetherIsatisfiesq(writtenI|=q)

Complexity as afunction ofI, notq(=data complexity)

(5)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Query evaluation

Relational signatureσ

Example: R(arity 1),S(arity 2),T(arity 1) ClassI of instances

Example: all instances; acyclic instances; treelike instances; ...

Fragment Q ofBoolean constant-free queries

Example: Boolean conjunctive queries

(= existentially quantified conjunction of atoms)

Example of CQ:q:x y R(x)S(x,y)T(y)

Query evaluationproblem for Q andI: Fix aqueryq∈ Q

Given an inputinstanceI∈ I

Determine whetherIsatisfiesq(writtenI|=q)

Complexity as afunction ofI, notq(=data complexity)

(6)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Query evaluation example

Signatureσ, class Qofconjunctive queries, classI of all instances.

q:∃x y R(x)∧S(x,y)∧T(y)

R a b c

S a a b v

b w

T v w b

(7)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Query evaluation example

Signatureσ, class Qofconjunctive queries, classI of all instances.

q:∃x y R(x)∧S(x,y)∧T(y)

R a b c

S a a b v

b w

T v w b

(8)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Query evaluation example

Signatureσ, class Qofconjunctive queries, classI of all instances.

q:∃x y R(x)∧S(x,y)∧T(y)

R a b c

S a a b v

b w

T v w b

(9)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Query evaluation example

Signatureσ, class Qofconjunctive queries, classI of all instances.

q:∃x y R(x)∧S(x,y)∧T(y)

R a b c

S a a b v

b w

T v w b

(10)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Query evaluation example

Signatureσ, class Qofconjunctive queries, classI of all instances.

q:∃x y R(x)∧S(x,y)∧T(y)

R a b c

S a a b v

b w

T v w b

(11)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Query evaluation example

Signatureσ, class Qofconjunctive queries, classI of all instances.

q:∃xyR(x)∧S(x,y)∧T(y)

R a b c

S a a b v

b w

T v w b

(12)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Probabilistic query evaluation

Signatureσ, classQ of queries, classI of instances.

Probabilistic query evaluation problem forQ andI: Fix aqueryq∈ Q

Given an inputinstanceI∈ I

Andgiven a probability valuationπ mapping facts ofIto probabilities in[0,1] Compute theprobabilitythatI|=q

Data complexity: measured as a function ofIandπ Semantics: (I, π) gives a probability distribution onI ⊆I:

Each factFIis eitherpresentorabsentwith probabilityπ(F) Facts areindependent

(13)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Probabilistic query evaluation

Signatureσ, classQ of queries, classI of instances.

Probabilistic query evaluation problem forQ andI: Fix aqueryq∈ Q

Given an inputinstanceI∈ I Andgiven a probability valuationπ mapping facts ofIto probabilities in[0,1]

Compute theprobabilitythatI|=q

Data complexity: measured as a function ofIandπ Semantics: (I, π) gives a probability distribution onI ⊆I:

Each factFIis eitherpresentorabsentwith probabilityπ(F) Facts areindependent

(14)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Probabilistic query evaluation

Signatureσ, classQ of queries, classI of instances.

Probabilistic query evaluation problem forQ andI: Fix aqueryq∈ Q

Given an inputinstanceI∈ I Andgiven a probability valuationπ mapping facts ofIto probabilities in[0,1]

Compute theprobabilitythatI|=q

Data complexity: measured as a function ofIandπ Semantics: (I, π) gives a probability distribution onI ⊆I:

Each factFIis eitherpresentorabsentwith probabilityπ(F) Facts areindependent

(15)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Probabilistic query evaluation

Signatureσ, classQ of queries, classI of instances.

Probabilistic query evaluation problem forQ andI: Fix aqueryq∈ Q

Given an inputinstanceI∈ I Andgiven a probability valuationπ mapping facts ofIto probabilities in[0,1]

Compute theprobabilitythatI|=q

Data complexity: measured as a function ofIandπ

Semantics: (I, π) gives a probability distribution onI ⊆I: Each factFIis eitherpresentorabsentwith probabilityπ(F) Facts areindependent

(16)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Probabilistic query evaluation

Signatureσ, classQ of queries, classI of instances.

Probabilistic query evaluation problem forQ andI: Fix aqueryq∈ Q

Given an inputinstanceI∈ I Andgiven a probability valuationπ mapping facts ofIto probabilities in[0,1]

Compute theprobabilitythatI|=q

Data complexity: measured as a function ofIandπ Semantics: (I, π) gives a probability distribution onI ⊆I:

Each factFIis eitherpresentorabsentwith probabilityπ(F)

(17)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Example of a probabilistic instance

S

a a 1

b v .5 b w .2

This(I, π) represents the followingprobability distribution: .5×.2

S

a a

b v

b w

.5×(1−.2) S

a a

b v

(1−.5)×.2 S

a a

b w

(1−.5)×(1−.2) S

a a

(18)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Example of a probabilistic instance

S

a a 1

b v .5 b w .2

This(I, π) represents the followingprobability distribution:

.5×.2 S

a a

b v

b w

.5×(1−.2) S

a a

b v

(1−.5)×.2 S

a a

b w

(1−.5)×(1−.2) S

a a

(19)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Example of a probabilistic instance

S

a a 1

b v .5 b w .2

This(I, π) represents the followingprobability distribution:

.5×.2 S

a a

b v

b w

.5×(1−.2) S

a a

b v

(1−.5)×.2 S

a a

b w

(1−.5)×(1−.2) S

a a

(20)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Example of a probabilistic instance

S

a a 1

b v .5 b w .2

This(I, π) represents the followingprobability distribution:

.5×.2 S

.5×(1−.2) S

(1−.5)×.2 S

a a

b w

(1−.5)×(1−.2) S

a a

(21)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Example of a probabilistic instance

S

a a 1

b v .5 b w .2

This(I, π) represents the followingprobability distribution:

.5×.2 S

a a

b v

b w

.5×(1−.2) S

a a

b v

(1−.5)×.2 S

a a

b w

(1−.5)×(1−.2) S

a a

(22)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Example of a probabilistic instance

S

a a 1

b v .5 b w .2

This(I, π) represents the followingprobability distribution:

.5×.2 S

.5×(1−.2) S

(1−.5)×.2 S

(1−.5)×(1−.2) S

(23)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Example of probabilistic query evaluation

Signatureσ, class Qofconjunctive queries, classI of all instances.

q:∃x y R(x)∧S(x,y)∧T(y)

R

a 1

b .4 c .6

S

a a 1

b v .5 b w .2

T v .3 w .7

b 1

The query is true iff R(b) is here and one of: S(b,v)andT(v)are here

S(b,w)andT(w)are here

Probability: .4×(1(1−.5×.3)×(1−.2×.7)) =.1076

(24)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Example of probabilistic query evaluation

Signatureσ, class Qofconjunctive queries, classI of all instances.

q:∃x y R(x)∧S(x,y)∧T(y)

R

a 1

b .4 c .6

S

a a 1

b v .5 b w .2

T v .3 w .7

b 1

The query is true iff R(b) is here and one of: S(b,v)andT(v)are here

S(b,w)andT(w)are here

Probability: .4×(1(1−.5×.3)×(1−.2×.7)) =.1076

(25)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Example of probabilistic query evaluation

Signatureσ, class Qofconjunctive queries, classI of all instances.

q:∃x y R(x)∧S(x,y)∧T(y)

R

a 1

b .4 c .6

S

a a 1

b v .5 b w .2

T v .3 w .7

b 1

The query is true iff R(b) is here and one of: S(b,v)andT(v)are here

S(b,w)andT(w)are here

Probability: .4×(1(1−.5×.3)×(1−.2×.7)) =.1076

(26)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Example of probabilistic query evaluation

Signatureσ, class Qofconjunctive queries, classI of all instances.

q:∃x y R(x)∧S(x,y)∧T(y)

R

a 1

b .4 c .6

S

a a 1

b v .5 b w .2

T v .3 w .7

b 1

The query is true iff R(b) is here and one of: S(b,v)andT(v)are here

S(b,w)andT(w)are here

Probability: .4×(1(1−.5×.3)×(1−.2×.7)) =.1076

(27)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Example of probabilistic query evaluation

Signatureσ, class Qofconjunctive queries, classI of all instances.

q:∃x y R(x)∧S(x,y)∧T(y)

R

a 1

b .4 c .6

S

a a 1

b v .5 b w .2

T v .3 w .7

b 1

The query is true iff R(b) is here and one of: S(b,v)andT(v)are here

S(b,w)andT(w)are here

Probability: .4×(1(1−.5×.3)×(1−.2×.7)) =.1076

(28)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Example of probabilistic query evaluation

Signatureσ, class Qofconjunctive queries, classI of all instances.

q:∃xyR(x)∧S(x,y)∧T(y)

R

a 1

b .4 c .6

S

a a 1

b v .5 b w .2

T v .3 w .7

b 1

The query is true iff R(b) is here and one of: S(b,v)andT(v)are here

S(b,w)andT(w)are here

Probability: .4×(1(1−.5×.3)×(1−.2×.7)) =.1076

(29)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Example of probabilistic query evaluation

Signatureσ, class Qofconjunctive queries, classI of all instances.

q:∃xyR(x)∧S(x,y)∧T(y)

R

a 1

b .4 c .6

S

a a 1

b v .5 b w .2

T v .3 w .7

b 1

The query is true iff R(b) is here and one of: S(b,v)andT(v)are here

S(b,w)andT(w)are here

Probability: .4×(1(1−.5×.3)×(1−.2×.7)) =.1076

(30)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Example of probabilistic query evaluation

Signatureσ, class Qofconjunctive queries, classI of all instances.

q:∃x y R(x)∧S(x,y)∧T(y)

R

a 1

b .4 c .6

S

a a 1

b v .5 b w .2

T v .3 w .7

b 1

The query is true iff R(b) is here and one of:

S(b,v)andT(v)are here S(b,w)andT(w)are here

Probability: .4×(1(1−.5×.3)×(1−.2×.7)) =.1076

(31)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Example of probabilistic query evaluation

Signatureσ, class Qofconjunctive queries, classI of all instances.

q:∃x y R(x)∧S(x,y)∧T(y)

R

a 1

b .4 c .6

S

a a 1

b v .5 b w .2

T v .3 w .7

b 1

The query is true iff R(b) is here and one of:

S(b,v)andT(v)are here

S(b,w)andT(w)are here

Probability: .4×(1(1−.5×.3)×(1−.2×.7)) =.1076

(32)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Example of probabilistic query evaluation

Signatureσ, class Qofconjunctive queries, classI of all instances.

q:∃x y R(x)∧S(x,y)∧T(y)

R

a 1

b .4 c .6

S

a a 1

b v .5 b w .2

T v .3 w .7

b 1

The query is true iff R(b) is here and one of:

Probability: .4×(1(1−.5×.3)×(1−.2×.7)) =.1076

(33)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Example of probabilistic query evaluation

Signatureσ, class Qofconjunctive queries, classI of all instances.

q:∃x y R(x)∧S(x,y)∧T(y)

R

a 1

b .4 c .6

S

a a 1

b v .5 b w .2

T v .3 w .7

b 1

The query is true iff R(b) is here and one of:

S(b,v)andT(v)are here S(b,w)andT(w)are here

Probability:

.4×(1(1−.5×.3)×(1−.2×.7)) =.1076

(34)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Example of probabilistic query evaluation

Signatureσ, class Qofconjunctive queries, classI of all instances.

q:∃x y R(x)∧S(x,y)∧T(y)

R

a 1

b .4 c .6

S

a a 1

b v .5 b w .2

T v .3 w .7

b 1

The query is true iff R(b) is here and one of:

(1(1−.5×.3)×(1−.2×.7)) =.1076

(35)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Example of probabilistic query evaluation

Signatureσ, class Qofconjunctive queries, classI of all instances.

q:∃x y R(x)∧S(x,y)∧T(y)

R

a 1

b .4 c .6

S

a a 1

b v .5 b w .2

T v .3 w .7

b 1

The query is true iff R(b) is here and one of:

S(b,v)andT(v)are here S(b,w)andT(w)are here

Probability: .4×(1

(1−.5×.3)×(1−.2×.7)) =.1076

(36)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Example of probabilistic query evaluation

Signatureσ, class Qofconjunctive queries, classI of all instances.

q:∃x y R(x)∧S(x,y)∧T(y)

R

a 1

b .4 c .6

S

a a 1

b v .5 b w .2

T v .3 w .7

b 1

The query is true iff R(b) is here and one of:

×(1−.2×.7)) =.1076

(37)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Example of probabilistic query evaluation

Signatureσ, class Qofconjunctive queries, classI of all instances.

q:∃x y R(x)∧S(x,y)∧T(y)

R

a 1

b .4 c .6

S

a a 1

b v .5 b w .2

T v .3 w .7

b 1

The query is true iff R(b) is here and one of:

S(b,v)andT(v)are here S(b,w)andT(w)are here

Probability: .4×(1(1−.5×.3)×(1−.2×.7))

=.1076

(38)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Example of probabilistic query evaluation

Signatureσ, class Qofconjunctive queries, classI of all instances.

q:∃x y R(x)∧S(x,y)∧T(y)

R

a 1

b .4 c .6

S

a a 1

b v .5 b w .2

T v .3 w .7

b 1

The query is true iff R(b) is here and one of:

(39)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Complexity of probabilistic query evaluation (PQE)

Question: what is thecomplexityof probabilistic query evaluation depending on the classQof queries and classI ofinstances?

Existing dichotomy result: [Dalvi and Suciu, 2012] Qare (unions of) conjunctive queries,I is all instances There is a classS ⊆ Qofsafe queries

PQE isPTIMEfor anyq∈ S on all instances PQE is#P-hardfor anyq∈ Q\S on all instances q:x y R(x)S(x,y)T(y)isunsafe!

Is there asmaller classI such that PQE is tractable for a largerQ? Probabilistic XML: [Cohen et al., 2009]

Qaretree automata,I aretrees PQE isPTIME

(40)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Complexity of probabilistic query evaluation (PQE)

Question: what is thecomplexityof probabilistic query evaluation depending on the classQof queries and classI ofinstances?

Existing dichotomy result: [Dalvi and Suciu, 2012]

Qare (unions of) conjunctive queries,I is all instances There is a classS ⊆ Q ofsafe queries

PQE isPTIMEfor anyq∈ S on all instances PQE is#P-hardfor anyq∈ Q\S on all instances q:x y R(x)S(x,y)T(y)isunsafe!

Is there asmaller classI such that PQE is tractable for a largerQ? Probabilistic XML: [Cohen et al., 2009]

Qaretree automata,I aretrees PQE isPTIME

(41)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Complexity of probabilistic query evaluation (PQE)

Question: what is thecomplexityof probabilistic query evaluation depending on the classQof queries and classI ofinstances?

Existing dichotomy result: [Dalvi and Suciu, 2012]

Qare (unions of) conjunctive queries,I is all instances There is a classS ⊆ Q ofsafe queries

PQE isPTIMEfor anyq∈ S on all instances

PQE is#P-hardfor anyq∈ Q\S on all instances q:x y R(x)S(x,y)T(y)isunsafe!

Is there asmaller classI such that PQE is tractable for a largerQ? Probabilistic XML: [Cohen et al., 2009]

Qaretree automata,I aretrees PQE isPTIME

(42)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Complexity of probabilistic query evaluation (PQE)

Question: what is thecomplexityof probabilistic query evaluation depending on the classQof queries and classI ofinstances?

Existing dichotomy result: [Dalvi and Suciu, 2012]

Qare (unions of) conjunctive queries,I is all instances There is a classS ⊆ Q ofsafe queries

PQE isPTIMEfor anyq∈ S on all instances PQE is#P-hardfor anyq∈ Q\S on all instances

q:x y R(x)S(x,y)T(y)isunsafe!

Is there asmaller classI such that PQE is tractable for a largerQ? Probabilistic XML: [Cohen et al., 2009]

Qaretree automata,I aretrees PQE isPTIME

(43)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Complexity of probabilistic query evaluation (PQE)

Question: what is thecomplexityof probabilistic query evaluation depending on the classQof queries and classI ofinstances?

Existing dichotomy result: [Dalvi and Suciu, 2012]

Qare (unions of) conjunctive queries,I is all instances There is a classS ⊆ Q ofsafe queries

PQE isPTIMEfor anyq∈ S on all instances PQE is#P-hardfor anyq∈ Q\S on all instances q:x y R(x)S(x,y)T(y)isunsafe!

Is there asmaller classI such that PQE is tractable for a largerQ? Probabilistic XML: [Cohen et al., 2009]

Qaretree automata,I aretrees PQE isPTIME

(44)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Complexity of probabilistic query evaluation (PQE)

Question: what is thecomplexityof probabilistic query evaluation depending on the classQof queries and classI ofinstances?

Existing dichotomy result: [Dalvi and Suciu, 2012]

Qare (unions of) conjunctive queries,I is all instances There is a classS ⊆ Q ofsafe queries

PQE isPTIMEfor anyq∈ S on all instances PQE is#P-hardfor anyq∈ Q\S on all instances q:x y R(x)S(x,y)T(y)isunsafe!

Is there asmaller classI such that PQE is tractable for a largerQ?

Probabilistic XML: [Cohen et al., 2009] Qaretree automata,I aretrees PQE isPTIME

(45)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Complexity of probabilistic query evaluation (PQE)

Question: what is thecomplexityof probabilistic query evaluation depending on the classQof queries and classI ofinstances?

Existing dichotomy result: [Dalvi and Suciu, 2012]

Qare (unions of) conjunctive queries,I is all instances There is a classS ⊆ Q ofsafe queries

PQE isPTIMEfor anyq∈ S on all instances PQE is#P-hardfor anyq∈ Q\S on all instances q:x y R(x)S(x,y)T(y)isunsafe!

Is there asmaller classI such that PQE is tractable for a largerQ? Probabilistic XML: [Cohen et al., 2009]

Qaretree automata,I aretrees PQE isPTIME

(46)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Trees and treelike instances

Goal: find an instance class I where PQE is tractable

Idea: takeI to betreelike instances

Treelike: thetreewidthis bounded by aconstant Treeshave treewidth1

Cycleshave treewidth2

k-cliquesand(k1)-gridshave treewidthk1

For non-probabilistic query evaluation [Courcelle, 1990]: I: treelikeinstances; Q: monadic second-order(MSO) queries

non-probabilistic QE is inlinear time

Does this extend to probabilistic QE?

(47)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Trees and treelike instances

Goal: find an instance class I where PQE is tractable Idea: takeI to betreelike instances

Treelike: thetreewidth is bounded by aconstant

Treeshave treewidth1 Cycleshave treewidth2

k-cliquesand(k1)-gridshave treewidthk1

For non-probabilistic query evaluation [Courcelle, 1990]: I: treelikeinstances; Q: monadic second-order(MSO) queries

non-probabilistic QE is inlinear time

Does this extend to probabilistic QE?

(48)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Trees and treelike instances

Goal: find an instance class I where PQE is tractable Idea: takeI to betreelike instances

Treelike: thetreewidth is bounded by aconstant Treeshave treewidth1

Cycleshave treewidth2

k-cliquesand(k1)-gridshave treewidthk1

For non-probabilistic query evaluation [Courcelle, 1990]: I: treelikeinstances; Q: monadic second-order(MSO) queries

non-probabilistic QE is inlinear time

Does this extend to probabilistic QE?

(49)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Trees and treelike instances

Goal: find an instance class I where PQE is tractable Idea: takeI to betreelike instances

Treelike: thetreewidth is bounded by aconstant Treeshave treewidth1

Cycleshave treewidth2

k-cliquesand(k1)-gridshave treewidthk1

For non-probabilistic query evaluation [Courcelle, 1990]:

I: treelikeinstances; Q: monadic second-order(MSO) queries

non-probabilistic QE is inlinear time

Does this extend to probabilistic QE?

(50)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Trees and treelike instances

Goal: find an instance class I where PQE is tractable Idea: takeI to betreelike instances

Treelike: thetreewidth is bounded by aconstant Treeshave treewidth1

Cycleshave treewidth2

k-cliquesand(k1)-gridshave treewidthk1

For non-probabilistic query evaluation [Courcelle, 1990]:

I: treelikeinstances; Q: monadic second-order(MSO) queries

non-probabilistic QE is inlinear time

(51)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Our results

Aninstance-based dichotomy result:

Upper bound. ForI thetreelikeinstances and QtheMSO queries

PQE is in linear timemodulo arithmetic costs

Also for expressiveprovenance representations Also with bounded-treewidthcorrelations Lower bound. For anyunbounded-tw family I andQ FO queries

PQE is#P-hard under RP reductionsassuming Signaturearity is 2(graphs)

High-tw instances inI areeasily constructible

(52)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Our results

Aninstance-based dichotomy result:

Upper bound. ForI thetreelikeinstances and QtheMSO queries

PQE is in linear timemodulo arithmetic costs Also for expressive provenance representations Also with bounded-treewidth correlations

Lower bound. For anyunbounded-tw family I andQ FO queries

PQE is#P-hard under RP reductionsassuming Signaturearity is 2(graphs)

High-tw instances inI areeasily constructible

(53)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Our results

Aninstance-based dichotomy result:

Upper bound. ForI thetreelikeinstances and QtheMSO queries

PQE is in linear timemodulo arithmetic costs Also for expressive provenance representations Also with bounded-treewidth correlations Lower bound. For anyunbounded-tw family I andQ FO queries

PQE is #P-hard under RP reductionsassuming Signaturearity is 2(graphs)

High-tw instances inI areeasily constructible

(54)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Table of contents

1 Introduction

2 Upper bounds

3 Semiring provenance

4 Correlations

5 Lower bounds

(55)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Technical tool: provenance

Theprovenanceof a query q on an instance I:

Boolean function ϕwhose variables are the facts ofI A subinstance ofIsatisfiesq iff ϕis true for that valuation

For allν:I→ {0,1} we haveν(ϕ) = 1 iff{FI|ν(F) = 1} |=q Example query: ∃x y z R(x,y)∧R(y,z)

R

a b

b c

d e

e d

f f

Provenance: (f1∧f2)(f3∧f4)∨f5

(56)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Technical tool: provenance

Theprovenanceof a query q on an instance I:

Boolean function ϕwhose variables are the facts ofI A subinstance ofIsatisfiesq iff ϕis true for that valuation

For allν:I→ {0,1}we haveν(ϕ) = 1 iff{FI|ν(F) = 1} |=q

Example query: ∃x y z R(x,y)∧R(y,z) R

a b

b c

d e

e d

f f

Provenance: (f1∧f2)(f3∧f4)∨f5

(57)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Technical tool: provenance

Theprovenanceof a query q on an instance I:

Boolean function ϕwhose variables are the facts ofI A subinstance ofIsatisfiesq iff ϕis true for that valuation

For allν:I→ {0,1}we haveν(ϕ) = 1 iff{FI|ν(F) = 1} |=q Example query: ∃x y z R(x,y)∧R(y,z)

R

a b f1

b c f2

d e f3

e d f4

f f f5

Provenance: (f1∧f2)(f3∧f4)∨f5

(58)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Technical tool: provenance

Theprovenanceof a query q on an instance I:

Boolean function ϕwhose variables are the facts ofI A subinstance ofIsatisfiesq iff ϕis true for that valuation

For allν:I→ {0,1}we haveν(ϕ) = 1 iff{FI|ν(F) = 1} |=q Example query: ∃x y z R(x,y)∧R(y,z)

R

a b f1

b c f2

d e f3

e d f

Provenance: (f1∧f2)(f3∧f4)∨f5

(59)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Technical tool: provenance

Theprovenanceof a query q on an instance I:

Boolean function ϕwhose variables are the facts ofI A subinstance ofIsatisfiesq iff ϕis true for that valuation

For allν:I→ {0,1}we haveν(ϕ) = 1 iff{FI|ν(F) = 1} |=q Example query: ∃x y z R(x,y)∧R(y,z)

R a b f1 b c f2

d e f3

e d f4

f f f5

Provenance: (f1∧f2)

(f3∧f4)∨f5

(60)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Technical tool: provenance

Theprovenanceof a query q on an instance I:

Boolean function ϕwhose variables are the facts ofI A subinstance ofIsatisfiesq iff ϕis true for that valuation

For allν:I→ {0,1}we haveν(ϕ) = 1 iff{FI|ν(F) = 1} |=q Example query: ∃x y z R(x,y)∧R(y,z)

R

a b f1

b c f2

d e f3

e d f

∨f5

(61)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Technical tool: provenance

Theprovenanceof a query q on an instance I:

Boolean function ϕwhose variables are the facts ofI A subinstance ofIsatisfiesq iff ϕis true for that valuation

For allν:I→ {0,1}we haveν(ϕ) = 1 iff{FI|ν(F) = 1} |=q Example query: ∃x y z R(x,y)∧R(y,z)

R

a b f1

b c f2

d e f3 e d f4

f f f5

Provenance: (f1∧f2)(f3∧f4)

∨f5

(62)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Technical tool: provenance

Theprovenanceof a query q on an instance I:

Boolean function ϕwhose variables are the facts ofI A subinstance ofIsatisfiesq iff ϕis true for that valuation

For allν:I→ {0,1}we haveν(ϕ) = 1 iff{FI|ν(F) = 1} |=q Example query: ∃x y z R(x,y)∧R(y,z)

R

a b f1

b c f2

d e f3

e d f

(63)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

Technical tool: provenance

Theprovenanceof a query q on an instance I:

Boolean function ϕwhose variables are the facts ofI A subinstance ofIsatisfiesq iff ϕis true for that valuation

For allν:I→ {0,1}we haveν(ϕ) = 1 iff{FI|ν(F) = 1} |=q Example query: ∃x y z R(x,y)∧R(y,z)

R

a b f1

b c f2

d e f3

e d f4

f f f5

Provenance: (f1∧f2)(f3∧f4)∨f5

(64)

Introduction Upper bounds Semiring provenance Correlations Lower bounds Conclusion

General roadmap

Useprovenance for probabilistic query evaluation:

Compute a provenance representationefficiently

Probability of theprovenance= probability of the query

Compute the provenance probabilityefficiently (show it is not#P-hard as in the general case)

To solve the PQE problem on treelike instancesfor MSO First solve the problem ontreeswithtree automata Then use the results of [Courcelle, 1990]

Références

Documents relatifs

The recent standardization of the SPARQL 1.1 Entailment Regimes [2], which extend the SPARQL Query Language [3] with the capability of querying also for implicit knowledge makes

Proof idea: extract instances of a hard problem as topological minors using recent polynomial bounds [Chekuri and Chuzhoy, 2014]..

Formally, we showed that the evaluation of monadic second-order (MSO) queries is tractable (in data complexity) over several probabilistic database formalisms, assuming that

Pour toute union de requêtes conjonctives q fixée et k ∈ N , pour toute instance d’entrée I de largeur d’arbre ≤ k, on peut construire en temps linéaire.. un circuit de

→ Linear time provenance circuit computation on trees and treelike instances:.. for

Regret lower bounds and extended Upper Confidence Bounds policies in stochastic multi-armed bandit problem... Regret lower bounds and extended Upper Confidence Bounds policies

Our last result of this section relates exponential boolean circuit complexity with a class defined in terms of time and oracle space bounds of Turing machines... amount of oracle

We bring bounds of a new kind for kernel PCA: while our PAC bounds (in Section 3) were assessing that kernel PCA was efficient with a certain amount of confidence, the two