Are there any OWL reasoners that can work across named graphs? If so, how do they fit with SPARQL queries that involve only some of the named graphs thereby restricting some of the possibe inferences? Do any reasoners reason with the named graphs themselves, eg what happens if you say two named graph URIs are owl:sameAs one another?

asked 17 Apr '10, 17:13

Ian%20Davis's gravatar image

Ian Davis
accept rate: 13%

There was a similar/related question (and answer) on jena-dev recently: http://tech.groups.yahoo.com/group/jena-dev/message/43559. However, I think, it does not provide an answer to all your questions.

(17 Apr '10, 22:03) castagna castagna's gravatar image

  • named graphs and owl reasoning are usually and best thought of as orthogonal.

    You usually take a named graph and do the owl reasoning on the triples within the graph. The reasoning just adds new triples to the graph that were logically implied by the triples you had originally. So it is not a problem to add the new ones as you will not be changing the truth value of your graph by doing so.

  • using SPARQL to do OWL reasoning

    You can use SPARQL CONSTRUCT as a rule engine. Simon Schenk implemented a java library called networked graphs which I used as a reasoning engine, and which I tried out in my Address Book "Opening Sesame with Networked Graphs". It was not that fast at the time to tell the truth. But that was a while ago. The idea is a very good one. Really it is just an adaptation to SPARQL of how rules are in fact written out in N3 (see the N3 owl rules for example)

  • reasoning across named graphs (Lifting Rules)

    There is a very important form of non-owl reasoning that can be done across named graphs. This is the type of reasoning that can be thought of as a selection process of what you think is true in one named graph in order to construct another named graph you can then reason in with OWL. You can use SPARQL construct queries to do this type of reasoning. N3 rules are very good for that too, and the cwm repository has a lot of good examples of rules of this kind.

    They can be used for example to transform a graph that is written in a particular way into a more general way. As such they are called Lifting Rules. I have an example of these in Keeping track of Context in Life and on the Web

 @forAll :Obj, :Temp, :FetchTime, :Fmla .
    { :Fmla :fetched [ :at :FetchTime ];
         log:includes { :Obj now:temperature :Temp } .  }
         => { :Obj god:timeslice  [ tr:inCalendarClockDataType :FetchTime;
                                    god:temperature :Temp ] .  } 

( I can only post 5 links per post as a new user, so I will post the rest in the next installment...)

permanent link

answered 22 Apr '10, 07:19

Henry%20Story's gravatar image

Henry Story
accept rate: 0%

edited 22 Apr '10, 10:59

Well, this is a good "excuse" to double your points when you post a good answer. :-)

(22 Apr '10, 08:09) castagna castagna's gravatar image

First, you have to say what OWL inference over named graphs means and for that you need a semantics for named graphs. There is no standardized semantics. As a starting point you could assume the semantics in the "Named Graphs, Provenance and Trust" paper [NGPT] but I'm not aware of any discussion or attempted standardization of NG semantics.

If you do mean NGPT then OWL inference and named graphs are orthogonal. OWL inference operates over some ontology which can be represented as a collection of triples. Named graphs are simply a way of naming a set of triples [*].

So in that sense, yes Jena supports OWL inference over named graphs in that you can create a single graph which is a (dynamic) union over those named graphs you want to include and then run inference over it. However, the inference machinery does not see the named graph origins of the triples. In particular none of the Jena rule engines support named graphs directly, premises are only expressible in terms of triples and builtins operating over those triples, not quads (for any of many different interpretations of what quads are).

As to reasoning over named graphs themselves then I'm not sure what inference you are expecting here but if you go by NGPT semantics then nothing much can happen. NGPT explicitly says that the name is a rigid identification of a specific set of triples. The set of triples is fixed, closed, not changeable, not amenable to reasoning over, that's it. So if you asserted ng1 owl:sameAs ng2 then either rdfgraph(ng1) = rdfgraph(ng2) in which you are consistent but haven't learned anything or rdfgraph(ng1) != rdfgraph(ng2) in which case it is inconsistent. Due to the intensional semantics of NGPT then there is a separation between the named graph and the rdfgraph it names so the owl:sameAs does mean that any statements about the named graph resources themselves are carried across, so it isn't a completely pointless exercise, but there's no subtle interplay between those properties and the rdfgraph extension.

This would be a lot easier as an email conversation.


[*] Actually that's oversimplifying. Most applications of named graphs seem to think that the name denotes a collection of triples. In NGPT that's not quite right, you have an abstract thing which is a named graph and each such thing can map to a (unique) name and a collection of triples. Named graphs can have other properties than just their name and rdfgraph.

permanent link

answered 18 Apr '10, 09:25

Dave%20Reynolds's gravatar image

Dave Reynolds
accept rate: 46%

Since it's a good answer and your signature says Dave, I might infer which Dave you are, even if your SemanticOverflow profile says "unknown (google)". :-)

(18 Apr '10, 13:12) castagna castagna's gravatar image
  • [continued] reasoning across named graphs (Lifting Rules)

    One can use this for trust reasoning too. One may, for example only trust what someone says about themselves using a specific vocabulary. Writing out an example for that would be a bit complicated. An easy looking example

  { <access-master.public> log:semantics [
        log:includes {:x a acc:MasterKey}]
  } log:implies {:x a acc:MasterKey}.

This pulls out only the object that is the master key from the graph. This is used in the crypto directory of cwm and is described in great detail in an early paper on Trust by Tim Berners Lee. (that paper was written before foaf+ssl was discovered, and is clearly a lot more difficult to use and understand)

Simon Schenk's Networked Graphs mentioned earlier is a good tool for doing this type of thing with SPARQL. You can think of this as somewhat akin to views on tables in a relational database, except that here you are doing views on a number of graphs, the purpose being perhaps not so much to simplify access to the data, but more to give you access to data that you believe trustworthy (for a purpose). So perhaps you don't want to reason over every ontology you come across. Perhaps you really only want to reason with foaf. In that case you may want to create a networed graph of the foaf ontology and some foaf file, and use that for doing your owl reasoning.

Other tools that do reasoning across graphs are the N3 reasoners such as euler sharp.

  • OWL reasoning on graphs

    If you wanted to say that one graph is owl:sameAs another - and understanding what that means might not be so easy - you would have to implement it using one of the above tools. owl:sameAs might not be such a good example, but linking a graph to a set, say by saying

    G a VeryTrustedGraph .

    and because TrustedGraph is a superclass of VeryTrustedGraph, you could deduce that

    G a TrustedGraph

    well, that you can do in any graph that does owl reasoning. After all, that G is a graph or another object does not have any relevance to the reasoning.

permanent link

answered 22 Apr '10, 07:22

Henry%20Story's gravatar image

Henry Story
accept rate: 0%

edited 22 Apr '10, 11:25

This is a great question; and I think one of the biggest open research areas for SemWeb folk, as it links practical data concerns to heavy theory. I've not seen much yet from OWL-aware tools for reasoning about provenance.

Not a direct answer but related --

The biggest Web-scale system I know of that does simple provenance-based inference over microformats (xfn rel=me) and FOAF is Google's social graph API; it's certainly worth a look, as it thinks in simple terms like "if danbri.org says it has the same owner as twitter.com/danbri and vice, versa... that claim is someone more likely to be true; and if @iand and @danbri are reciprocal contacts on Twitter, then [...etc]". http://code.google.com/apis/socialgraph/

So not directly OWL + named graphs, but an indicator of the kind of practical logic that we'll start to see. I think of it as 'claim graph analytics' in that you're trying to figure out a bigger story from multiple descriptions of a situation making competing and/or supporting claims. For example, my self-authored FOAF file might say I worked at W3C until 2005 and have a dc:source link to a W3C-endorsed claim on an Alumni page at w3.org.

my guess is we'll see more from the logic folk on this when we improve the amount of linked data associated strongly with provenance; eg. how could we tell an RDFa page near http://www.w3.org/People/Alumni was really 'from' the organization (rather than written by me, or random others who have access to w3.org). Answering those kinds of questions (with POWDER, with OpenID, with DSig, ...) will give us more useful named graph data, just begging to be reasoned over...

permanent link

answered 18 Apr '10, 06:14

danbri's gravatar image

accept rate: 0%

Doesn't Jena, as per http://bit.ly/dptD0T

"Named Graphs as a Mechanism for Reasoning about Provenance" Rowland Watkins and Denis Nicole

"...Applying Named Graphs to our OWL-DL ontology allowed us to effectively partition metadata which could then be signed using our work on SWP. Each top-level class instance in the Document Provenance ontology is contained in a Named Graph, signed with a digital signature in a Warrant graph. The combination of digital signatures and Description Logic means at its base our online collaborative tool has two levels of internal verification: cryptographically verify the integrity of the our metadata; check the semantic consistency of our metadata using the OWL-DL Class and Property axioms.

"In addition to OWL-DL consistency checking, we have used the Jena inferencing engine because we are able to tailor its inference rules to suit our needs. Custom rules have been used to answer complex queries in our online collaborative tool. Inferences over large semantic datastores is inevitably a slow process; our strategy has been rather than update inferences incrementally, they are run as required since they are re-derivable..."


permanent link

answered 17 Apr '10, 18:10

olyerickson's gravatar image

accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 17 Apr '10, 17:13

question was seen: 8,976 times

last updated: 22 Apr '10, 11:25