Querying Trust in RDF Data with tSPARQL

42
Querying Trust in RDF Data with tSPARQL Olaf Hartig http://olafhartig.de/foaf.rdf#olaf

description

With these slides I presented my paper on "Querying Trust in RDF Data with tSPARQL" at the European Semantic Web Conference 2009 (ESWC) in Heraklion, Crete. Actually, this slideset is an extended version of the slides I used for the talk (more examples and evaluation).

Transcript of Querying Trust in RDF Data with tSPARQL

  • 1.Querying Trust in RDF Data with tSPARQLOlaf Hartig http://olafhartig.de/foaf.rdf#olaf

2. The Semantic Web is a reality Large amount of semantically interlinked data Applications emerge Olaf Hartig - Querying Trust in RDF Data with tSPARQL2 3. Is the data trustworthy?Olaf Hartig - Querying Trust in RDF Data with tSPARQL 3 4. SELECT ?hotel ?hotelNameWHERE {?hotel rdf:type umbel:HotelBuilding ; p:location dbpedia:Heraklion ; rdfs:label ?hotelName .TRUST AS ?t}ORDER BY ?t Returns a list of hotels in Heraklion ordered by the trustworthiness of the data.Olaf Hartig - Querying Trust in RDF Data with tSPARQL4 5. SELECT ?hotelName ?reviewTextWHERE { ?hotel rdf:typeumbel:HotelBuilding ; p:location dbpedia:Heraklion ; rdfs:label ?hotelName . {?hotel rev:hasReview ?review .?review rev:text?reviewText . SELECT ?hENSURE TRUST ( 0.7 , 1.0 ) ?name WHERE { ?h rdf:type umbel:HotelBuilding ; }p:location dbpedia:Heraklion ;} rdfs:label ?name . TRUST AS ?t } ORDER BY ?t Returnstrustworthy reviews of hotels in Heraklion. Olaf Hartig - Querying Trust in RDF Data with tSPARQL 5 6. Outline Trust modelfor RDF dataTrust-awaretSPARQL query processingEvaluating trustrequirements Query optimization Olaf Hartig - Querying Trust in RDF Data with tSPARQL 6 7. Trustworthiness of RDF Data The trustworthiness of RDF statements is the subjectivebelief or disbelief in the truth of the statements. Represented by trust values in the interval [-1,1] rdfs:label Aldemar Knossos Royal Villageex:loc rdate f:td Att 5.5378geo:layp e geo:lumbel:HotelBuilding ong 0.2274 Olaf Hartig - Querying Trust in RDF Data with tSPARQL7 8. Atomic Trust A trust function associates single RDF statements with asubjective trust value.TrustFct (,) = 0.8 rdf:typ eumbel:HotelBuildingTrust weighted statement Trust weighted RDF graphrdfs:label Aldemar Knossos Royal Village [0.9] ex: [0.1]loc rdate[0.75] f:t [0.8]dAt5.5378 tgeo:layp egeo:lumbel:HotelBuildingong 0.2274[0.75] Olaf Hartig - Querying Trust in RDF Data with tSPARQL 8 9. Aggregated Trust A trust aggregation function calculates an aggregatedtrust value for a trust weighted RDF graph. Minimum (cautious): tamin = 0.1 Median (more optimistic):tamedian = 0.75rdfs:label Aldemar Knossos Royal Village[0.9] ex: [0.1]loc rdate [0.75] f:t [0.8]dAt 5.5378 tgeo:layp e geo:lumbel:HotelBuilding ong 0.2274 [0.75] Olaf Hartig - Querying Trust in RDF Data with tSPARQL9 10. Outline Trust modelfor RDF dataTrust-awaretSPARQL query processingEvaluating trustrequirements Query optimization Olaf Hartig - Querying Trust in RDF Data with tSPARQL 10 11. Trust-aware query processing SPARQL does not consider trust values Basic idea: Extend the notion of solutions Redefine the algebra operators Olaf Hartig - Querying Trust in RDF Data with tSPARQL 11 12. Basic graph pattern matching rev:hasReview re vrd:ha revsR :texf:t e vie typ w e What a lovely ...umbel:HotelBuilding rev:text A surprisingly ...BGP rev:hasReview?r rev:text ?t Solution mappings?r ?tthat are solutions:http://revyu.../R457quot;What a lovely ...quot; http://revyu.../R337quot;A surprisingly ...quot; Olaf Hartig - Querying Trust in RDF Data with tSPARQL 12 13. Basic graph pattern matching rev:hasReview re vrd:ha revsR :texf:t e vie typ w e What a lovely ...umbel:HotelBuilding rev:text A surprisingly ...BGP rev:hasReview?r rev:text ?t Solution mappings?r ?tthat are solutions:http://revyu.../R457quot;What a lovely ...quot; http://revyu.../R337quot;A surprisingly ...quot; Olaf Hartig - Querying Trust in RDF Data with tSPARQL 13 14. Basic graph pattern matching rev:hasReview re v [0.86]rd:ha revsR [0.86]:tex [0.7]f:t[0.8] evityp ew e What a lovely ...umbel:HotelBuilding [0.2] rev:text A surprisingly ...BGP rev:hasReview?r rev:text ?t Trust weighted t solution mappings?r?tthat are solutions:http://revyu.../R457quot;What a lovely ...quot; http://revyu.../R337quot;A surprisingly ...quot; Olaf Hartig - Querying Trust in RDF Data with tSPARQL 14 15. Basic graph pattern matching rev:hasReview re v [0.86]rd:ha revsR [0.86]:tex [0.7]f:t[0.8] evityp ew e What a lovely ...umbel:HotelBuilding [0.2] rev:text A surprisingly ...BGP rev:hasReview?r rev:text ?t Trust weighted t solution mappings?r?tthat are solutions:http://revyu.../R457quot;What a lovely ...quot; http://revyu.../R337quot;A surprisingly ...quot; Olaf Hartig - Querying Trust in RDF Data with tSPARQL 15 16. Basic graph pattern matching rev:hasReview rev[0.86]rd :hare vsRe[0.86] :tex [0.7]f:t[0.8]vtypiew e What a lovely ...umbel:HotelBuilding [0.2] rev:text A surprisingly ...BGP rev:hasReview?r rev:text ?t Trust weighted t solution mappings?r?tthat are solutions:http://revyu.../R457quot;What a lovely ...quot; 0.7 http://revyu.../R337quot;A surprisingly ...quot; Olaf Hartig - Querying Trust in RDF Data with tSPARQL 16 17. Basic graph pattern matching rev:hasReview re v [0.86]rd:ha revsR [0.86]:tex [0.7]f:t[0.8] evityp ew e What a lovely ...umbel:HotelBuilding [0.2] rev:text A surprisingly ...BGP rev:hasReview?r rev:text ?t Trust weighted t solution mappings?r?tthat are solutions:http://revyu.../R457quot;What a lovely ...quot; 0.7 http://revyu.../R337quot;A surprisingly ...quot;0.2 Olaf Hartig - Querying Trust in RDF Data with tSPARQL 17 18. Trust-aware query processing SPARQL does not consider trust valuesBasic idea: Extend the notion of solutions Redefine the algebra operators Olaf Hartig - Querying Trust in RDF Data with tSPARQL 18 19. Redefining the SPARQL algebra{{?h rdf:type umbel:HotelBuilding ; p:location dbpedia:Heraklion .} {?h rev:hasReview [ rev:text ?txt1 ]}}JoinBGPBGP?h rdf:type umbel:HotelBuilding . ?h rev:hasReview [ rev:text ?r ]?h p:location dbpedia:Heraklion . Olaf Hartig - Querying Trust in RDF Data with tSPARQL 19 20. Redefining the SPARQL algebra?h?rex:KnossosRoyal quot;What a lovely quot;ex:KnossosRoyal quot;A surprisingly quot;ex:SheratonTenerife quot;Located direct...quot;Join ?h?r?hex:KnossosRoyal quot;What a lovely quot;ex:KnossosRoyal ex:KnossosRoyal quot;A surprisingly quot;ex:SheratonTenerife ex:SheratonTenerife quot;Located direct...quot;BGP BGP?h rdf:type umbel:HotelBuilding . ?h rev:hasReview [ rev:text ?r ]?h p:location dbpedia:Heraklion . Olaf Hartig - Querying Trust in RDF Data with tSPARQL20 21. Redefining the SPARQL algebra t?h?rex:KnossosRoyal quot;What a lovely quot;ex:KnossosRoyal quot;A surprisingly quot;ex:SheratonTenerife quot;Located direct...quot;Joint t?h?r?hex:KnossosRoyal quot;What a lovely quot; 0.9ex:KnossosRoyal 0.7 ex:KnossosRoyal quot;A surprisingly quot; 0.2ex:SheratonTenerife 0.1 ex:SheratonTenerife quot;Located direct...quot; 0.8BGP BGP?h rdf:type umbel:HotelBuilding . ?h rev:hasReview [ rev:text ?r ]?h p:location dbpedia:Heraklion . Olaf Hartig - Querying Trust in RDF Data with tSPARQL21 22. Redefining the SPARQL algebra A trust merge function calculates a merged trust value fortwo trust weighted solution mappings. t Minimum: tmmin?h ?rex:KnossosRoyal quot;What a lovely quot; 0.7ex:KnossosRoyal quot;A surprisingly quot; 0.2ex:SheratonTenerife quot;Located direct...quot; 0.1Join t t?h ?r?hex:KnossosRoyal quot;What a lovely quot; 0.9ex:KnossosRoyal 0.7 ex:KnossosRoyal quot;A surprisingly quot; 0.2ex:SheratonTenerife 0.1 ex:SheratonTenerife quot;Located direct...quot; 0.8BGP BGP?h rdf:type umbel:HotelBuilding . ?h rev:hasReview [ rev:text ?r ]?h p:location dbpedia:Heraklion . Olaf Hartig - Querying Trust in RDF Data with tSPARQL22 23. Basic idea SPARQL does not consider trust valuesBasic idea: Extend the notion of solutions Redefine the algebra operators What is the impact ofprocessing trust values on query execution times ? Olaf Hartig - Querying Trust in RDF Data with tSPARQL23 24. Evaluation tSPARQL query engine (extension of SPARQL engine ARQ) Berlin SPARQL Benchmark (BSBM)Simulates e-commerce scenarioMix of 12 SPARQL queriesGenerates datasets of different sizes (scaling factor)3 avg. execution time (in sec.) per query mix ARQ SPARQL tSPARQL engine 2,5 engine with2 precomputedtrust values 1,51 0,50 0100 (31800)200 (60424) 300 (92337) 400 (124305) 500BSBM Scaling Factor (# of triples)Olaf Hartig - Querying Trust in RDF Data with tSPARQL24 25. EvaluationSimple provenance-based trust function Assumes existence of trust assessments for RDF graphs Adopts these trust values for all triples in the graph ARQ SPARQL tSPARQL engine tSPARQL engine avg. execution time (in sec.) per query mix engine with + determiningprecomputedtrust valuestrust values10 8 6 4 2 0 0100 (31800) 200 (60424)300 (92337) 400 (124305)500 BSBM Scaling Factor (# of triples) Olaf Hartig - Querying Trust in RDF Data with tSPARQL25 26. Outline Trust modelfor RDF dataTrust-awaretSPARQL query processingEvaluating trustrequirements Query optimization Olaf Hartig - Querying Trust in RDF Data with tSPARQL 26 27. Evaluating trust requirements Goal: ensuring a certain trustworthiness for the solutionsof a specific graph pattern SELECT ?hotelName ?reviewTextWHERE {?hotel rdf:typeumbel:HotelBuilding ; p:location dbpedia:Heraklion ; rdfs:label ?hotelName .{?hotel rev:hasReview ?review .?review rev:text ?reviewText .ENSURE TRUST ( 0.7 , 1.0 )}}Olaf Hartig - Querying Trust in RDF Data with tSPARQL 27 28. Evaluating trust requirements Goal: ensuring a certain trustworthiness for the solutionsof a specific graph pattern t?h ?rex:KnossosRoyal quot;What a lovely quot; 0.9ex:SheratonTenerife quot;Located direct...quot; 0.8EnTrust 0.5 , 1.0 t?h ?rex:KnossosRoyal quot;What a lovely quot; 0.9ex:KnossosRoyal quot;A surprisingly quot; 0.2ex:SheratonTenerife quot;Located direct...quot; 0.8EnTrust l , u , = { , t , t lt u }**Olaf Hartig - Querying Trust in RDF Data with tSPARQL28 29. Evaluating trust requirementsJoin {{ ?h rdf:type umbel:HotelBuilding ; p:location dbpedia:Heraklion . }{ ?h rev:hasReview [ rev:text ?txt1 ]ENSURE TRUST ( 0.5 , 1.0 ) }}EnTrust 0.5 , 1.0BGP BGP?h rdf:type umbel:HotelBuilding .?h rev:hasReview [ rev:text ?r ]?h p:location dbpedia:Heraklion . Olaf Hartig - Querying Trust in RDF Data with tSPARQL29 30. Evaluating trust requirementsJoin {{ ?h rdf:type umbel:HotelBuilding ; p:location dbpedia:Heraklion . }{ ?h rev:hasReview [ rev:text ?txt1 ]ENSURE TRUST ( 0.5 , 1.0 ) }}EnTrust 0.5 , 1.0 t t ?h ?r?h ex:KnossosRoyal quot;What a lovely quot; 0.9ex:KnossosRoyal 0.7ex:KnossosRoyal quot;A surprisingly quot; 0.2ex:SheratonTenerife 0.1ex:SheratonTenerife quot;Located direct...quot; 0.8BGPBGP?h rdf:type umbel:HotelBuilding .?h rev:hasReview [ rev:text ?r ]?h p:location dbpedia:Heraklion . Olaf Hartig - Querying Trust in RDF Data with tSPARQL 30 31. Evaluating trust requirements t?h ?rex:KnossosRoyal quot;What a lovely quot; 0.7ex:SheratonTenerife quot;Located direct...quot; 0.8Join { t{ ?h rdf:type umbel:HotelBuilding ;?h ?r p:location dbpedia:Heraklion . } ex:KnossosRoyal{ ?h rev:hasReview [ rev:text ?txt1 ] quot;What a lovely quot; 0.9ENSURE TRUST ( 0.5 , 1.0 ) }ex:SheratonTenerife quot;Located direct...quot; 0.8} EnTrust0.5 , 1.0 t t?h ?r?h ex:KnossosRoyal quot;What a lovely quot; 0.9ex:KnossosRoyal 0.7ex:KnossosRoyal quot;A surprisingly quot; 0.2ex:SheratonTenerife 0.1ex:SheratonTenerife quot;Located direct...quot; 0.8BGP BGP?h rdf:type umbel:HotelBuilding .?h rev:hasReview [ rev:text ?r ]?h p:location dbpedia:Heraklion . Olaf Hartig - Querying Trust in RDF Data with tSPARQL 31 32. Evaluating trust requirements t ?h ?r ex:KnossosRoyal quot;What a lovely quot; 0.7 ex:SheratonTenerife quot;Located direct...quot; 0.8 EnTrust 0.5 , 1.0{{ ?h rdf:type umbel:HotelBuilding ; p:location dbpedia:Heraklion . }{ ?h rev:hasReview [ rev:text ?txt1 ]ENSURE TRUST ( 0.5 , 1.0 ) }ENSURE TRUST ( 0.5 , 1.0 )} JoinBGPBGP?h rdf:type umbel:HotelBuilding . ?h rev:hasReview [ rev:text ?r ]?h p:location dbpedia:Heraklion . Olaf Hartig - Querying Trust in RDF Data with tSPARQL 32 33. Evaluating trust requirementst ?h?r ex:KnossosRoyal quot;What a lovely quot; 0.7 ex:SheratonTenerife quot;Located direct...quot; 0.8 EnTrust 0.5 , 1.0{{ ?h rdf:type umbel:HotelBuilding ; p:location dbpedia:Heraklion . }{ ?h rev:hasReview [ rev:text ?txt1 ]ENSURE TRUST ( 0.5 , 1.0 ) }ENSURE TRUST ( 0.5 , 1.0 )} Join t t?h ?r?hex:KnossosRoyal quot;What a lovely quot; 0.9ex:KnossosRoyal 0.7 ex:KnossosRoyal quot;A surprisingly quot; 0.2ex:SheratonTenerife 0.1 ex:SheratonTenerife quot;Located direct...quot; 0.8BGP BGP?h rdf:type umbel:HotelBuilding . ?h rev:hasReview [ rev:text ?r ]?h p:location dbpedia:Heraklion . Olaf Hartig - Querying Trust in RDF Data with tSPARQL33 34. Evaluating trust requirements t t ?h?r?h?rex:KnossosRoyal quot;What a lovely quot; 0.7ex:KnossosRoyal quot;What a lovely quot; 0.7 ex:SheratonTenerife quot;Located direct...quot; 0.8 EnTrust 0.5 , 1.0{{ ?h rdf:type umbel:HotelBuilding ;t p:location dbpedia:Heraklion . ?h} ?r{ ?h rev:hasReview [ rev:text ?txt1 ] ex:KnossosRoyal quot;What a lovely quot; 0.7ENSURE TRUST ( 0.5 , 1.0 ) }ex:KnossosRoyalquot;A surprisingly quot; 0.2ENSURE TRUST ( 0.5 , 1.0 ) ex:SheratonTenerife quot;Located direct...quot; 0.1} Join t t?h ?r?hex:KnossosRoyal quot;What a lovely quot; 0.9ex:KnossosRoyal 0.7 ex:KnossosRoyal quot;A surprisingly quot; 0.2ex:SheratonTenerife 0.1 ex:SheratonTenerife quot;Located direct...quot; 0.8BGP BGP?h rdf:type umbel:HotelBuilding . ?h rev:hasReview [ rev:text ?r ]?h p:location dbpedia:Heraklion . Olaf Hartig - Querying Trust in RDF Data with tSPARQL34 35. Evaluating trust requirements t t ?h?r?h?rex:KnossosRoyal quot;What a lovely quot; 0.7ex:KnossosRoyal quot;What a lovely quot; 0.7 ex:SheratonTenerife quot;Located direct...quot; 0.8 EnTrust 0.5 , 1.0 Position of the tENSURE TRUST?h ?rclause matters! ex:KnossosRoyal quot;What a lovely quot; 0.7ex:KnossosRoyal quot;A surprisingly quot; 0.2ex:SheratonTenerife quot;Located direct...quot; 0.1Join t t?h ?r?hex:KnossosRoyal quot;What a lovely quot; 0.7ex:KnossosRoyal 0.9 ex:KnossosRoyal quot;A surprisingly quot; 0.2ex:SheratonTenerife 0.1 ex:SheratonTenerife quot;Located direct...quot; 0.8BGP BGP?h rdf:type umbel:HotelBuilding . ?h rev:hasReview [ rev:text ?r ]?h p:location dbpedia:Heraklion . Olaf Hartig - Querying Trust in RDF Data with tSPARQL35 36. Accessing trust values Goal: accessing the trust value for the solution of aspecific graph pattern SELECT ?hotel ?hotelNameWHERE {?hotel rdf:type umbel:HotelBuilding ; p:location dbpedia:Heraklion ; rdfs:label ?hotelName . TRUST AS ?t}ORDER BY ?t Olaf Hartig - Querying Trust in RDF Data with tSPARQL36 37. Accessing trust values Goal: accessing the trust value for the solution of aspecific graph pattern Again: position of the t TRUST AS clause ?h?r?t matters!ex:KnossosRoyal quot;What a lovely quot; 0.9 0.9 ex:SheratonTenerife quot;Located direct...quot; 0.8 0.8 PrTrust ?t t ?h ?r ex:KnossosRoyal quot;What a lovely quot; 0.9 ex:SheratonTenerife quot;Located direct...quot; 0.8PrTrust v , * = { ' , t , t * '={ v , lt } } Olaf Hartig - Querying Trust in RDF Data with tSPARQL 37 38. Outline Trust modelfor RDF dataTrust-awaretSPARQL query processingEvaluating trustrequirements Query optimization Olaf Hartig - Querying Trust in RDF Data with tSPARQL 38 39. Rewrite Rules Rewriting algebra expressions to improve query execution E.g., for join operators that employthe trust merge function tmmin holds:EnTrustEnTrust l,ul,u Join Equivalence JoinEnTrustEnTrustl , 1.0l , 1.0Olaf Hartig - Querying Trust in RDF Data with tSPARQL 39 40. Evaluation Equivalent BSBM-based setup with 6 tSPARQL queries100 avg. exec.time (in sec.) per query mixtSPARQL engine tSPARQL engine 90 without rewritingwith rewriting 80 70 60 50 40 30 20 1000 100 (31800) 200 (60424) 300 (92337) 400 (124305)500BSBM Scaling Factor (# of triples) Olaf Hartig - Querying Trust in RDF Data with tSPARQL 40 41. Take-away summaryTrust model for RDF data Trust model Trust functiontSPARQL Trust-aware query processing Trust aggregation functionEvaluating trust requirements Trust in SPARQL query processingQuery optimization Trust weighted solutions Trust-aware algebra SPARQL extension for trust requirements ENSURE TRUST TRUST AS tSPARQL query engine available: http://trdf.sourceforge.net Olaf Hartig - Querying Trust in RDF Data with tSPARQL41 42. These slides have been created by Olaf Hartig http://olafhartig.deThis work is licensed under aCreative Commons Attribution-Share Alike 3.0 License(http://creativecommons.org/licenses/by-sa/3.0/) Olaf Hartig - Querying Trust in RDF Data with tSPARQL 42