1 / 34

Querying Probabilistic XML Databases

Querying Probabilistic XML Databases. Asma Souihli. Oct . 24 th 2012. Network and Computer Science Department. XML for semi-structured data ( tree-like structure). Probabilistic Data - PrXML. Jung- Hee Yun and Chin-Wan Chung, 2012. Context. Un certainty. Context.

hagop
Télécharger la présentation

Querying Probabilistic XML Databases

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Querying Probabilistic XML Databases AsmaSouihli Oct. 24th2012 Network and Computer Science Department

  2. XMLfor semi-structured data (tree-like structure)

  3. Probabilistic Data - PrXML Jung-Hee Yun and Chin-Wan Chung, 2012.

  4. Context Uncertainty

  5. Context • In many of these tasks, information is described in a semi-structured manner • Especially when the source (e.g., XML or HTML) is already in this form • Representation by means of a hierarchy of nodes is natural

  6. Outline • PrXML Models Local Dependency Long-distance Dependency • Querying P-documents Types of Queries Probabilistic Lineage Complexity of Queries • The ProApproX System Computation Algorithms Lineage Decomposition Techniques Evaluation Plans Experiments • Conclusions

  7. PrXML Models –Local Dependency Local dependency (muxand indnodes)

  8. PrXML Models –Long-distance Dependency Long-distance dependency (Conjunction of independent events  cie) Local dependency (muxand indnodes) Ancestor node Parent node Tractable translation Parent node . . . ¬e1 e1 0.3 0.7 Child Parent node Child . . . Child Child Parent node (With e1 = 0.3) e3 Λe4 e2 PrXML{ind,mux} Child Child e2 PrXML{cie} PrXML{cie} Child S. Abiteboul, B. Kimelfeld, Y. Sagiv, and P. Senellart. 2009

  9. Example Repository • Pr (e1)=.9 • Pr (e2)= .8 • Pr (e3)= .4 • Pr (e4)= .1 • Pr (e5)= .6 • Pr (e6) = .3 • Pr (e7)= .2 • Pr (e8)= .8 . . . Employee Details e2 Name t2 t1 AsmaSouihli . . . work Contact e8 e3 e1 e6 • e4Λ¬e5 e1 Place e7 Place Phone e-mail e-mail address Paris 13 souihli@enst.fr +33(0)611220099 e5 address asma.souihli@gmail.com Telecom Paristech K&K World Paris 15

  10. Outline • PrXML Models Local Dependency Long-distance Dependency • Querying P-documents Types of Queries Probabilistic Lineage Complexity of Queries • The ProApproX System Computation Algorithms Lineage Decomposition Techniques Evaluation Plans Experiments • Conclusions

  11. Querying P-documents –Types of Queries • Tree Pattern Queries (TPQ) • Tree Pattern Queries with joins (TPQJ) A B C A B C D A B C D

  12. Example • Q1: / Employee [Name= "Asma Souihli"] // e-mail / text() enst.fr: e2Λ e8Λ e1 C1 gmail.com: e2Λ e8Λ e6 C2 senellart.com: e2Λ e9Λe10 C3 gmail.com : e2Λ e9Λ e6 C4 Repository • e1 =.9 • e2 = .8 • e9 = .6 • e10 = .7 • e6 = .3 • e8 = .8 Employee e2 Details Name t1 t2 AsmaSouihli e9 e8 Contact Contact e1 e6 e10 e6 e-mail e-mail e-mail e-mail souihli@enst.fr souihli@senellart.com asma.souihli@gmail.com asma.souihli@gmail.com

  13. Querying PrXML –Probabilistic Lineage • Probability to find an e-mail: Pr(Q1) = Pr( C1 V C2 V C3 V C4 ) • Possible results: Pr(asma.souihli@gmail.com) = Pr(C2VC4) Pr(souihli@enst.fr) = Pr(C1) Pr(souihli@senellart.com) =Pr(C3) Probabilistic lineage (DNF shape)

  14. Querying PrXML –Probabilistic Lineage • When is a linear computation possible? • if C1 and C2 are independent, then: Pr(C1∧ C2) = Pr(C1) × Pr(C2) Pr(C1 ∨ C2) = 1 − ( (1 − Pr(C1) ) × (1 − Pr(C2)) ) • if C1 and C2 are inconsistent (mutually exclusive), then: Pr(C1 ∨ C2) = Pr(C1) + Pr(C2) + V Λ

  15. Back to the Example • e1 =.9 • e2 = .8 • e9 = .6 • e10 = .7 • e6 = .3 • e8 = .8 Pr(@enst.fr) = Pr(C1) = Pr(e2Λ e8Λ e1 ) = .8 x .8 x.9 = 0.576 Pr(@sap.com) =Pr(C3) = 0.336 Pr(@gmail.com)= Pr(C2VC4) = (e2Λ e8Λe6)V (e2Λ e9Λe6) Factorization: Pr(@gmail.com) = (e2 Λe6) Λ (e8 V e9) = .8 x .3 x (1 -(1-.8)(1-.6)) = 0.2208

  16. Querying PrXML –Probabilistic Lineage • e1 =.9 • e2 = .8 • e9 = .6 • e10 = .7 • e6 = .3 • e8 = .8 Pr(Q1) = Pr( C1 V C2 V C3 V C4 ) = Pr [ (e2Λe8Λ e1) V (e2Λe8Λe6) V (e2Λe9Λ e10 ) V (e2Λe9Λe6) ] Factorization: = Pr [e2 Λ ( (e8Λ (e1 Ve6 ) ) V (e9Λ (e10 V e6) ) ) ] Difficult to evaluate !

  17. Solutions.. • One possible (naïve) way, is to find the truth value assignments that satisfy the propositional formula (probabilistic lineage) (out of 2#literals possible assignments/worlds !) • And sum the probabilities of these satisfying assignments to get the answer

  18. Querying PrXML –Complexity of Queries • Probabilities of the satisfying assignments for the DNF (lineage formula) : #P-Hard problem • No polynomial time algorithm for the exact solution if P≠NP • #P problems ask "how many" rather than "are there any“ How many graph coloring using k colors are there for a particular graph G?

  19. Outline • PrXML Models Local Dependency Long-distance Dependency • Querying P-documents Types of Queries Probabilistic Lineage Complexity of Queries • The ProApproX System Computation Algorithms Lineage Decomposition Techniques Evaluation Plans Experiments • Conclusions

  20. The ProApproX System and [CIKM 2012, SIGMOD 2011] • Translates into a probabilistic database with only cie nodes • Translates the user query into a lineage query • Is built on top of a native XML DBMS • Processes the lineage formula to get the probability of the query (and of each matching answer) User input : XPath Query Q 1 2 3 Query translation BaseX(querying) PrXML database 4 5 Result Pr(Q) Answer ProApproX (Processing) User Interface

  21. The ProApproX System –Computation Algorithms • Additive approximation: • For a fixed error ε and a DNF F, A(F) is an additive ε-approximation of Pr(F) with a probability of at least δ (a fixed reliability factor) if: Pr(F)-ε≤ A(F) ≤ Pr(F)+ε • Multiplicative Approximation • For a fixed error ε, a DNF F, A(F) is an multiplicative ε-approximation of Pr(F) with a probability of at least δ if: (1-ε) Pr(F) ≤ A(F) ≤ (1+ε) Pr(F)

  22. The ProApproX System –Computation Algorithms • Exact Computations: • The naïve algorithm – Possible worlds Finding the satisfying assignments out of 2#variablespossible truth value assignments 𝑂(2n) • The sieve algorithm – The inclusion-exclusion principle Exponential in the number of clauses m 𝑂(2m)

  23. The ProApproX System –Computation Algorithms • Approximations: • Naïve Monte Carlo sampling for additive app. : Linear but could take exponentially many samples to converge to a good approximation for low probabilities • Biased Monte Carlo sampling for multiplicative app. : Running time grows in 𝑂(𝑛3ln 𝑛) in the number of clauses • Self-Adjusting Coverage Algorithm for the DNF probability problem: Linear in the length of F times ln(1/𝛿) /𝜀2 Kimelfeld, Kosharovsky, and Sagiv. 2009 M. Karp, M. Luby, and N. Madras. 1989

  24. The ProApproX System –Computation Algorithms • Possibility to derive a multiplicative approximation from an additive approximation (and vice versa) • Cost models and cost constants:

  25. The ProApproX System –Lineage Decomposition Techniques Pr(F) F= V V V V V V • (e8) (¬e3) (e1Λ e2) (e3Λ e5) (e6 Λ e8) (e3Λ e4) (e6Λ e7) Exact /naïve Algo. OR Approximation + V V e3 Λ (e4 V e5) Λ Λ Factorization F= V V V V V V

  26. The ProApproX System – Evaluation Plans • Propagation of 𝜀 (and 𝛿) : • Many possible values for 𝜀1 and 𝜀2 can be found • Best assignments are not always obvious Proposition1. Let 𝜙= 𝜓1 𝜓2, and assume p̃1 and p̃2are additive approximations of Pr(𝜓1) and Pr(𝜓2), to a factor of 𝜀1and 𝜀2, respectively. Then 1-(1- p̃1)(1- p̃2) is an additive approximation of Pr(𝜙) to a factor of 𝜀if: 𝜀1+ 𝜀2+ 𝜀1 𝜀2≤𝜀 V

  27. The ProApproX System –Possible Evaluation Plans Deterministic exploration: cost𝜙=200 cost𝜓1=1 cost𝜓2=35 cost𝜓8=15 cost𝜓3=8 cost𝜓9=8 cost𝜓10=12 cost𝜓4=6 cost𝜓7=1 cost𝜓11=10 cost𝜓12=9 cost𝜓6=2 cost𝜓5=3

  28. The ProApproX System –Experiments Running time of the different algorithms on the MondialDB dataset

  29. The ProApproX System –Experiments Running time of the different algorithms on the synthetic dataset

  30. Outline • PrXML Models Local Dependency Long-distance Dependency • Querying P-documents Types of Queries Probabilistic Lineage Complexity of Queries • The ProApproX System Lineage Decomposition Techniques Computation Algorithms Demo Evaluation Plans Experiments • Conclusions

  31. Contributions • We have introduced an original optimizer-like approach to evaluating query results over probabilistic XML • Over a more expressive PrXML model • Positive tree-pattern queries, possibly with joins

  32. Contributions • Main observation - optimal probability evaluation algorithm to use depends on the characteristics of the formula: • Few variables naïve algorithm • Few clauses sieve algorithm • Monte-Carlo is very good at approximating high probabilities • Sometimes the structure of a query makes the probability of a query easy to evaluate (EvalDP) • Refined approximation methods best when everything else fails (coverage)

  33. Perspectives • Exploiting the structure of the query to obtain factorized lineage • Most evaluation algorithms scale effortlessly (with the exception of the self-adjusting coverage algorithm, which requires synchronization) • distribute the probability computation over multi-core or distributed architectures • Processing DNFs, but the technique could probably be extended to arbitrary formulas • Define the range of negated TPQ queries having a DNF lineage

  34. Thank you.

More Related