Semantic web rdf and inferencing

977 views

Published on

A presentation on using inferencing for the semantic web. Discussing RDFS propagation rules and inference methods.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Semantic web rdf and inferencing

  1. 1. "Golden Delicious" "Elstar" rdfs:label el "Conference" :lab bot:GoldenDelicious rdfs "Gala" "Fuji" rdfs:l el abel bot:Elstar :lab bot:Gala el rdfs b :la "any edible part of a plant with a sweet flavor" bot:Braeburn fs bot:Apple rdConference bot:Fuji l labe rdfs: t rdf men "Braeburn" "Fig" s:la :com be "Fruit" l rdfs:label rdfs "Pear" "Apple" l : labe rdfs cul:Fruit el bot:Fig "Pommegranate" l ab s:df :label rdfs bot:pomaceousFruit bot:accessoryFruit bot:Pommegranate "Structure of label el abhinese Pear" "Fruit" s:l rdfs: rdf el :lab el lab rdfs rdfs: " #" "Pomaceous Fruit" "Accessory Fruit" bot:Fruit bo bot:PlantStructure bot:Strawberry t:c el on ab ta l ins bot:N bo : fs t t:p rd el en ar :lab Semantic Web mm tOgkeum s f :co rdf :Seed s rd rdf fs: bot:Plant la "Strawberry" be l DON WILLEMS RDF and Inferencing "!"" bo INTELLIGENT SYSTEMS ONTOLOGY LUNCH MEETING JUNE 14TH 2011 "the ovary of a seed-bearing plant" WAGENINGEN UR/FOOD & BIOBASEDtOf :par RESEARCH bot bot:Tomato
  2. 2. based on:Chapter 5 - RDF and InferencingSemantic Web for the Working OntologistDean Allemang and Jim HendlerISBN 978-0-12-373556-0
  3. 3. Making Data SmarterIn the semantic web we have an integrated anddistributed representation of dataModeling is needed to make sense of this networkof dataBut how can a model help us make sense of thisnetwork of data?
  4. 4. Example bot:Fruit cul:FruitSuppose you find RDFdata concerning bot:accessoryFruitbot:KosuiHow would you know bot:pomaceousFruitthat Kosui is a type offruit? bot:Pear bot:EuropeanPear bot:ChinesePear bot:Conference bot:DoyenneDuComice bot:BlakesPride bot:Forelle bot:Kosui bot:Shinko bot:Whangkeum
  5. 5. Example: QuerySolution 1: Leverage the power of the query:SELECT ?super WHERE {{ bot:Kosui rdfs:subClassOf ?super. } UNION { bot:Kosui rdfs:subClassOf [rdfs:subClassOf ?super]. } UNION { bot:Kosui rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf ?super]]. } UNION { bot:Kosui rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf ?super]]]. } UNION { bot:Kosui rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf ?super]]]]. } ...}
  6. 6. Example: QuerySolution 1: Leverage the power of the query:SELECT ?super WHERE {{ bot:Kosui rdfs:subClassOf ?super. ---> bot:ChinesePear } UNION { bot:Kosui rdfs:subClassOf [rdfs:subClassOf ?super]. } UNION { bot:Kosui rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf ?super]]. } UNION { bot:Kosui rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf ?super]]]. } UNION { bot:Kosui rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf ?super]]]]. } ...}
  7. 7. Example: QuerySolution 1: Leverage the power of the query:SELECT ?super WHERE {{ bot:Kosui rdfs:subClassOf ?super. } UNION { bot:Kosui rdfs:subClassOf [rdfs:subClassOf ?super].---> bot:Pear } UNION { bot:Kosui rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf ?super]]. } UNION { bot:Kosui rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf ?super]]]. } UNION { bot:Kosui rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf ?super]]]]. } ...}
  8. 8. Example: QuerySolution 1: Leverage the power of the query:SELECT ?super WHERE {{ bot:Kosui rdfs:subClassOf ?super. } UNION { bot:Kosui rdfs:subClassOf [rdfs:subClassOf ?super]. } UNION { bot:Kosui rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf ?super]]. } UNION { ---> bot:pomaceousFruit bot:Kosui rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf ?super]]]. } UNION { bot:Kosui rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf ?super]]]]. } ...}
  9. 9. Example: QuerySolution 1: Leverage the power of the query:SELECT ?super WHERE {{ bot:Kosui rdfs:subClassOf ?super. } UNION { bot:Kosui rdfs:subClassOf [rdfs:subClassOf ?super]. } UNION { bot:Kosui rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf ?super]]. } UNION { bot:Kosui rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf ?super]]]. } UNION { ---> bot:accessoryFruit bot:Kosui rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf ?super]]]]. } ...}
  10. 10. Example: QuerySolution 1: Leverage the power of the query:SELECT ?super WHERE {{ bot:Kosui rdfs:subClassOf ?super. } UNION { bot:Kosui rdfs:subClassOf [rdfs:subClassOf ?super]. } UNION { bot:Kosui rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf ?super]]. } UNION { bot:Kosui rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf ?super]]]. } UNION { bot:Kosui rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf [rdfs:subClassOf ?super]]]]. } ...} ---> bot:Fruit ---> cul:Fruit
  11. 11. Example: InferencingSolution 2: Inferencing IFIF ?A rdfs:subClassOf ?B. ?A rdfs:subClassOf ?super. ANDAND ?B rdfs:subClassOf ?C. ?x rdf:type ?A. THENTHEN ?A rdfs:subClassOf ?C. ?x rdf:type ?super. subclass-propagationtype-propagation rule rule
  12. 12. Example: Inferencing bot:Fruit cul:Fruit IF ?A rdfs:subClassOf ?B. bot:accessoryFruit AND ?B rdfs:subClassOf ?C. THEN ?A rdfs:subClassOf ?C. bot:pomaceousFruit bot:Pear bot:EuropeanPear bot:ChinesePearbot:Conference bot:DoyenneDuComice bot:BlakesPride bot:Forelle bot:Kosui bot:Shinko bot:Whangkeum
  13. 13. Example: Inferencing bot:Fruit cul:Fruit IF ?A rdfs:subClassOf ?B. bot:accessoryFruit AND ?B rdfs:subClassOf ?C. THEN ?A rdfs:subClassOf ?C. bot:pomaceousFruit bot:Pear bot:EuropeanPear bot:ChinesePearbot:Conference bot:DoyenneDuComice bot:BlakesPride bot:Forelle bot:Kosui bot:Shinko bot:Whangkeum
  14. 14. Example: Inferencing bot:Fruit cul:Fruit IF ?A rdfs:subClassOf ?B. bot:accessoryFruit AND ?B rdfs:subClassOf ?C. THEN ?A rdfs:subClassOf ?C. bot:pomaceousFruit bot:Pear bot:EuropeanPear bot:ChinesePearbot:Conference bot:DoyenneDuComice bot:BlakesPride bot:Forelle bot:Kosui bot:Shinko bot:Whangkeum
  15. 15. Example: Inferencing bot:Fruit cul:Fruit IF ?A rdfs:subClassOf ?B. bot:accessoryFruit AND ?B rdfs:subClassOf ?C. THEN ?A rdfs:subClassOf ?C. bot:pomaceousFruit bot:Pear bot:EuropeanPear bot:ChinesePearbot:Conference bot:DoyenneDuComice bot:BlakesPride bot:Forelle bot:Kosui bot:Shinko bot:Whangkeum
  16. 16. Example: Inferencing bot:Fruit cul:Fruit IF ?A rdfs:subClassOf ?B. AND bot:accessoryFruit ?B rdfs:subClassOf ?C. THEN ?A rdfs:subClassOf ?C. bot:pomaceousFruit bot:Pear bot:EuropeanPear bot:ChinesePearbot:Conference bot:DoyenneDuComice bot:BlakesPride bot:Forelle bot:Kosui bot:Shinko bot:Whangkeum
  17. 17. Example: Inferencing bot:Fruit cul:Fruit IF ?A rdfs:subClassOf ?B. AND bot:accessoryFruit ?B rdfs:subClassOf ?C. THEN ?A rdfs:subClassOf ?C. bot:pomaceousFruit bot:Pear bot:EuropeanPear bot:ChinesePearbot:Conference bot:DoyenneDuComice bot:BlakesPride bot:Forelle bot:Kosui bot:Shinko bot:Whangkeum
  18. 18. Example: Inferencing bot:Fruit cul:Fruit How would you know bot:accessoryFruit that Kosui is a type of fruit? bot:pomaceousFruit Kosui is a subclass of Fruit bot:Pear bot:EuropeanPear bot:ChinesePearbot:Conference bot:DoyenneDuComice bot:BlakesPride bot:Forelle bot:Kosui bot:Shinko bot:Whangkeum
  19. 19. Inferencing bot:Fruit cul:Fruit bot:accessoryFruit Problem: Possible explosion of the bot:pomaceousFruit number of triples bot:Pear bot:EuropeanPear bot:ChinesePearbot:Conference bot:DoyenneDuComice bot:BlakesPride bot:Forelle bot:Kosui bot:Shinko bot:Whangkeum
  20. 20. Inferencing: asserted vs. inferred Triples bot:Fruit cul:Fruit bot:accessoryFruit Asserted Triples bot:pomaceousFruit Inferred Triples bot:Pear bot:EuropeanPear bot:ChinesePearbot:Conference bot:DoyenneDuComice bot:BlakesPride bot:Forelle bot:Kosui bot:Shinko bot:Whangkeum
  21. 21. Inferencing: asserted vs. inferred Triples Think of inferencing and queryingAsserted Triples as separate processesInferred Triples 1. Use inference rules to find all inferred triples using the asserted triples as a conditional 2. Run SPARQL query over asserted and inferred triples
  22. 22. Inferencing:when does inferencing happen?Out of range of the RDFS and OWL definitionsDepends on the implementation of the inferenceengine• As soon as a conditional pattern is identified, inference happens and inferred triples are stored in the same RDF store --> explosion risk• Never store inferred triples. Inference only happens in response to a query --> duplicate inference work
  23. 23. Inferencing:change managementOne problem (if inferred triples are stored) ischange management.• What happens when a data source changes • A triple is added --> inferencing • A triple is removed/changed --> • Which inferred triples need to be removed?
  24. 24. Example: change management cul:IngredientState of triple storebefore inference bot:Fruit cul:Vegetable bot:Tomato
  25. 25. Example:change management cul:IngredientApply subclass-propagation rule bot:Fruit cul:Vegetable bot:Tomato
  26. 26. Example: change management cul:IngredientApply subclass-propagation ruleResulting (inferred)triple already exists bot:Fruit cul:Vegetableand is not addedagain bot:Tomato
  27. 27. Example: change management cul:IngredientState of triple storeafter inference bot:Fruit cul:Vegetable bot:Tomato
  28. 28. Example: change management cul:IngredientRemove erroneoustriple(not all Fruits (in a botanical Xsense) are ingredients (in a bot:Fruit cul:Vegetableculinary sense). bot:Tomato
  29. 29. Example: change management cul:IngredientRemove triples thatwere inferred as aresult of theexistence of theerroneous triple. bot:Fruit X cul:Vegetable bot:Tomato
  30. 30. Example: change managementState after triple cul:IngredientremovalProblem: Theinferred triple shouldnot have been bot:Fruit cul:Vegetableremoved because itcould have beeninferred usinganother set of bot:Tomatoconditionals
  31. 31. Example: change managementState after triple cul:IngredientremovalProblem: Theinferred triple shouldnot have been bot:Fruit cul:Vegetableremoved because itcould have beeninferred usinganother set of bot:Tomatoconditionals
  32. 32. Example: change managementDesired state aftertriple removal cul:IngredientTwo solutions:1. Very complex inference and bot:Fruit cul:Vegetable change management2. Remove all inferred triples and re-infer bot:Tomato everything
  33. 33. Inferencing: forward vs. backward chainingUntil now we used forward chaining as inferencemethod.1. Find all existing triples that can be used as condition (the IF part) in the inference rule.2. Add a new triple specified in the result (THEN) part of the inference rule.This inference method is mostly used after (a) newfact(s) are added to the triple store.
  34. 34. Inferencing: forward vs. backward chainingBackward chaining works the other way around.1. Find all triples that can be seen as a result (THEN part) of an inference rule. cul:Ingredient IF ?A rdfs:subClassOf ?B. AND bot:Fruit cul:Vegetable ?B rdfs:subClassOf ?C. THEN ?A rdfs:subClassOf ?C. bot:Tomato
  35. 35. Inferencing: forward vs. backward chainingBackward chaining works the other way around.1. Find all triples that can be seen as a result (THEN part) of an inference rule. cul:Ingredient IF ?A rdfs:subClassOf ?B. AND bot:Fruit cul:Vegetable ?B rdfs:subClassOf ?C. THEN ?A rdfs:subClassOf ?C. bot:Tomato
  36. 36. Inferencing: forward vs. backward chaining Backward chaining works the other way around. 2. If the triple(s) in the condition do not yet exist try to fulfill the condition by other means (ask the user) Is cul:Vegetable Is Fruit a subclass a subclass cul:Ingredient cul:Ingredient of cul:Ingredient? of cul:Ingredient? ? ?bot:Fruit cul:Vegetable bot:Fruit cul:Vegetable bot:Tomato bot:Tomato
  37. 37. Inferencing: forward vs. backward chainingBackward chaining works the other way around.3. If the condition is fulfilled add the inferred triple (defined in the condition) to the triple store. cul:Ingredient NO YES bot:Fruit cul:Vegetable bot:Tomato
  38. 38. Conclusion• We want to be able to write a single query that can fetch related data from all integrated data sources.• RDF provides a consistent way to represent data so that information from multiple sources can be brought together.• Information integration is achieved by invoking inference before or during the query process.
  39. 39. Thank you!

×