An LPG multiedge reification use case

A multi-edge reification use case to improve interoperability of RDF and LPG


The WG discussions naturally center around the issue of edge-annotations but RDF/LPG interoperability should consider that there is a second prominent modelling primitive in LPG that distinguishes it from RDF and that adds to its intuitiveness: the "object with attributes" concept. RDF people tend to dismiss that as "yeah, yeah, like RDF, just without object properties", but it is much more than that: the "object with attributes" primitive helps structure the information space - which in any graph of reasonable complexity can be pretty overwhelming and unwieldy - into smaller units of more digestable size. 

How would one represent the "object with attributes" in RDF? 
One can’t simply assume that all outgoing edges of an IRI belong to that entity because that would also include "edges" in the LPG sense, i.e. relations, possibly attributed, between such "objects with attributes" (again in the LPG sense). 
One also can’t simply assume that all un-annotated relations are "object attributes" whereas attributed relations are always "edges" between "objects" - that may work in some cases, but certainly not always. 
What one actually needs to do to safe the "object with attributes" primitive when moving from LPG to RDF is to annotate the object attributes with the object they annotate, or at least with a type "not an edge but an object attribute o the thing in the subject position of this statement". 

This is a prototypical use case of grouping, or, in the context of current discussions, one-to-many reification - one reifier reifying all statements that together comprise the "object with attributes".


For eaxmple,

take the following RDF, where the comments allude to a way this might be modeled in  LPG. Obviously, those LPG intuitions aren’t reflected in RDF:

# John - attributed object
:John :born 1990 ;
      :studied :CS ;
      :degree :PhD .
# teaching - attributed edge
      :teaches :CS_101 
      :from 2020 ;
      :to 2023 .

# CS_101 - attributed object
:CS_101 a :Course ;
        :at :MIT .


Now let's change the :teaches relation to an attributed edge (using the annotation syntax) and add multi-edge reifiers to clarify what the objects are (using NTriples syntax):

:John :born 1990 ;
      :studied :CS ;
      :degree :PhD .

:CS_101 a :Course ;
        :at :MIT .

:John :teaches :CS_101 {| :from 2020 ; :to 2023 |}

:JohnObject rdf:reifies <<( :John :born 1990 )>> ,
                        <<( :John :studied :CS )>> ,
                        <<( :John :degree :PhD )>> ;
            a :AttributedObject .

:CS_101Object rdf:reifies <<( :CS_101 a :Course )>> ,
                          <<( :CS_101 :at :MIT )>> ;
              a :AttributedObject .

Using different syntaxes for different uses - edges with annotation syntax versus objects with NTriples syntax - might help when switching back and forth between RDF and LPG. It certainly is not too pretty, but it works, and it guarantees that what I assume is an important aspect of LPG to its users is not lost in translation. 


W.r.t. to our discussion about the value of multi-edge reifications I think it illustrates how ubuquituous the grouping use case is and that it is useful even for RDF/LPG interoperability.

IMO grouping is one of the most basic primitives in knowledge representation. It really doesn’t need any specific use case, from business or otherwise. The suggestion that its availability should be artificially constrained for the sake of not irritating newcomers to RDF just makes me wonder.
Sure, there will be frustrated expectations because KR is harder than it looks and intuitions are often less founded than they seem. People coming from LPG might ask why RDF uses the same mechanism to annotate edges and demarcate objects (thats why I used different syntaxes in the example above). People used to RDF reification and longing for succinct edge annotations might ask why we even bother with sets of statements. People used to named graphs might wonder why we don’t use those to model them objects (but they have no semantics, are cumbersome to query and designed as an out-of-band application specific means).

In the end, after the initial iritations have passed, I imagine that everybody will get used to it, or might at least be equally unhappy with this solution.

The other arguments w.r.t. semantic soundness, basic RDF mechanics, the annotation syntax as a way to nudge people towards an LPG-style use of edge annotations, best practices, etc all still apply. As do other use cases like semantically equivalent statements, entities described by multiple statements, etc. It really isn’t that hard to wrap your head around it once you let go of that fixation on _one_ statement/edge. Any set of statements has _one_ meaning, and that’s what we are concerned with in RDF. That’s why RDF is harder but also more powerful than application/database formalisms.


Best,
Thomas

Received on Tuesday, 23 April 2024 21:18:38 UTC