<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>Santiago, Chile
$ luigi.bellomarini@bancaditalia.it (L. Bellomarini); andrea.gentili@bancaditalia.it (A. Gentili);
eleonora.laurenza@bancaditalia.it (E. Laurenza); sallinger@dbai.tuwien.ac.at (E. Sallinger)</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Model-Independent Design of Knowledge Graphs</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Luigi Bellomarini</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Andrea Gentili</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Eleonora Laurenza</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Emanuel Sallinger</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Bank of Italy (Italy)</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Technische Universität Wien (Austria)</string-name>
        </contrib>
      </contrib-group>
      <pub-date>
        <year>2023</year>
      </pub-date>
      <volume>000</volume>
      <fpage>0</fpage>
      <lpage>0001</lpage>
      <abstract>
        <p>Knowledge Graphs (KGs) can be seen as knowledge bases combining an extensional component, a database of facts, typically a property graph, and an intensional component, a formal specification of the available business experience, to derive new knowledge from those facts, often as new nodes and edges. Capitalizing on our experience in KGs and model management for the rollout of financial KGs for the Central Bank of Italy, in this work we present KGModel, a model-independent design framework for KGs. The framework adopts a meta-level approach: the data engineer visually designs the extensional component of the KG at a conceptual level and augments it with intensional specifications in MetaLog, a new logical model-independent language. This high-level specification of the KG is then translated into enforceable schema definitions for the target database and executable logical rules for a target reasoner. Our framework ofers (i) a model-independent visual modeling language; (ii) MetaLog, a new language of the Datalog+/- family for the intensional component; (iii) new complementary software tools for the translation of meta-level specifications into their executable versions. We present the main ideas behind KGModel and show the suitability of the framework for real-world scenarios.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;knowledge graphs</kwd>
        <kwd>Datalog</kwd>
        <kwd>conceptual design</kwd>
        <kwd>data modeling</kwd>
        <kwd>schema and data translation</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Knowledge Graphs (KGs) can be seen as models for knowledge representation and reasoning,
that combine an extensional component—a database of facts, typically a property graph (PG) [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]—
and an intensional component, a formal specification of business experience, to derive new
knowledge from those facts, often as new nodes and edges [
        <xref ref-type="bibr" rid="ref2 ref3">2, 3</xref>
        ]. Capitalizing on our experience
in the construction of large KGs, especially in the financial and economic realms [ 4, 5, 6, 7], we
observe that the need for a KG design methodology is clearly emerging.
      </p>
      <p>Such a methodology: 1 Should provide conceptual data models, enabling a simple,
nontechnical, high-level, visual representation of the domain. 2 Should be implementation-independent,
i.e., it should be possible to deploy the extensional component into any Graph Database
Management System, relational, triple-store system, etc., and it should be possible to express the
intensional components regardless of the target systems. 3 Should provide a set of constructs
to define graph schemas. 4 Should allow encoding the intensional component specification with
a reasoning language that is graph-ergonomic and expressive enough to handle KGs. Reflecting
the UC2RPQs literature stream [8], navigational expressions should be intuitively supported
by the syntax. Reasoning to the extent of tractable description logic should be feasible (e.g.,
DL-Lite). In other terms, the language should be expressive enough to cover any SPARQL
query over RDF datasets, under the entailment regime of OWL 2 QL [9]. 5 Should adopt a
model-driven approach [10]: an enforceable graph schema and an executable version of the
intensional components should directly derive from a high-level conceptual representation of
the domain given by the data engineer.</p>
      <p>To the best of our knowledge, there is no comprehensive methodology for KG design and
none of the existing approaches satisfies the illustrated desiderata.</p>
      <p>Contribution. In this short version of a recent EDBT paper [11], we present KGModel, a
model-independent framework for Knowledge Graphs design, comprising a methodology and a set
of support tools. The framework is described in Section 2 and some insights on the designer’s
perspective are given in Section 3. For space reasons, for a detailed presentation, including a
discussion of all the KGModel components, the patterns of the design methodology, and the
analysis of related literature, the reader is referred to the long version of the paper.</p>
    </sec>
    <sec id="sec-2">
      <title>2. The KGModel Framework</title>
      <p>KGModel adopts a layered approach to data representation, in Figure 1 (left-hand side). It is
organized into three stacks of representations: model, schema, and instance, where each level
contains a set of constructs that specialize (or are specialized by) the constructs of the level
above (below). The instance stack instantiates the schema stack, which instantiates the model.</p>
      <p>In the model stack, we adopt the idea of a super-model grouping the super-constructs that
can be used to define diferent Knowledge Graph models, which are all specializations of the
super-model. Examples are the models of Neo4J PG, Amazon Neptune, OrientDB, or even
non-graph-like models. At the highest level, a meta-model contains the foundational
metaconstructs, namely, MM_Entity (an abstract entity of the domain), MM_Link (a connection
between entities), as well as their properties. The super-model, visualized in Figure 1, contains
super-constructs that specialize those of the meta-model and subsumes, i.e., generalizes, any
possible KG model. Examples of super-constructs are SM_Node, SM_Edge. The various models
comprise constructs that specialize the super-constructs for a specific use. Example of PG
constructs are Node, Relationship, and Label, instantiating SM_Node, SM_Relationship,
and SM_Type.</p>
      <p>In the schema stack, schemas capture the type of specific nodes, edges, and properties of a
given domain of interest, in the same sense that a relational database schema is an instance of
the relational model. As the super-model generalizes every model, a schema can be expressed
in either a model-dependent way, as an instance of a model, or in a model-independent way, as
an instance of the super-model, in which case we call it super-schema. A super-schema 1 can
be cast into a schema 2 of a model  by a specific set of translation rules, namely, mappings,
which apply the needed simplifications, when the case eliminating constructs of the super-model
that are not supported by the specific target model, and finally instantiate the super-constructs
into  constructs, accordingly. We define the mappings as MetaLog rules. MetaLog is
our new variant of the Vadalog language [12] for graphs. Vadalog extends Datalog with
existential quantification and other useful features, while introducing mild syntactic restrictions
to guarantee decidability and tractability of the reasoning task. Vadalog reasoning programs
can be processed by the Vadalog System, a state-of-the-art reasoner. MetaLog inherits the
Vadalog (and thus Datalog) semantics and expressive power, enriching its syntax with the
possibility to use pattern-matching graph exploration primitives. It is model-independent, as it
operates at meta-level, it is expressive and eficient enough to support ontological reasoning, it is
model aware and ergonomic, as incorporates syntactic elements to exploit schema information.</p>
      <p>The instance stack represents the extensional component, i.e., both the ground data and
those derived by materializing the intensional component.</p>
      <p>The Design Approach. With KGModel, we ofer the data engineer a model-driven design
approach to KGs. The data engineer is provided with a conceptual visual modeling language,
named Graph Schema Language (GSL) to design a graph schema as a super-schema. A GSL
diagram defines an instance of the super-model, with visual graphemes denoting instances of the
super-constructs. The business knowledge is encoded by the data engineer in the intensional
component, with MetaLog programs acting on the super-model constructs.</p>
      <p>To deploy the designed schemas into the target systems, KGModel translates the
superschemas provided by the engineer into instances of the target models by applying the translation
mappings. Schemas then contain all the information needed to be deployed and enforced, with
diferent methods, depending on the target systems: for relational systems, for instance, they
can be rendered as DDL statements, which include the respective constraints such as keys,
foreign keys, domain constraints, and so on; for RDF stores, schemas can be rendered as RDF-S
(RDF Schema) documents, to be validated by dedicated tools; for schema-less systems, schemas
can be enforced with ad-hoc methodologies [13].</p>
      <p>The Tools. Our framework incorporates (a) Graph Dictionaries: A set of graph databases to store
the instances of the super-model and of the models. (b) Knowledge Graph Schema Environment:
A tool to graphically design GSL schemas and store them in the super-model dictionary. (c)
MetaLog to Vadalog Translator (MTV): A compiler to generate Vadalog programs from
MetaLog code. (d) Super-Schema to Schema Translator (SSST): A module that takes as input a
super-schema , a super-model-level intensional component Σ expressed as MetaLog rules, a
MetaLog mapping ℳ( ) for the translation of a super-schema into a schema of the target
model  , and generates: (i) the instance ′ of  , i.e., the target schema; (ii) a new version of
the intensional component that can be applied to ′ instances. SSST uses MTV to compile and
run MetaLog.</p>
      <p>The Language. MetaLog combines Warded Datalog± [14], at the core of Vadalog, and graph
pattern matching. A MetaLog program is a set Σ of existential rules  (¯, ¯) → ∃¯  (¯, ¯) ,
where ¯, ¯, and ¯ are tuples of variables,  is a conjunction of atoms denoting nodes, path
patterns, conditions, and expressions and  is a conjunction of node atoms and path patterns.
A path pattern  individuates all the pairs of nodes ⟨, ⟩ connected by a semi-path that
conforms to the regular language () defined by . The semantics of MetaLog descends
from the Vadalog one. Given a graph , for each fact of  (¯, ¯′), that is, a conjunction of 
paths, there exists a tuple ¯′′ of constants and new symbols to satisfy existential quantification,
such that the paths  (¯, ¯′′) are also in . Given a set Σ of MetaLog rules, the chase alters 
by adding new paths, until Σ( ) satisfies all of them.</p>
    </sec>
    <sec id="sec-3">
      <title>3. The Designer’s Perspective</title>
      <p>We used KGModel to design the Company KG of the Bank of Italy. Let us try to narratively
simulate a small fragment of that modeling journey. The domain revolves around the notions
of physical persons, i.e., individuals, or legal persons. These two entities share many features,
but participate in diferent relationships.</p>
      <p>I will capture the structure by introducing distinct SM_Nodes for persons, i.e., PhysicalPerson
and LegalPerson, with a distinct set of SM_Attributes.</p>
      <p>I will introduce an SM_Generalization, where a Person generalizes and collects the common
features of PhysicalPerson and LegalPerson.</p>
      <p>A person can withhold stakes in a company capital, and multiple persons may have diferent
rights upon the same portion of company capital.</p>
      <p>I will introduce a Share SM_Node and the HOLDS-BELONGS_TO SM_Edges decoupling
ownerowned SM_Nodes so that multiple Persons can HOLD a Share each with right and percentage.</p>
      <p>Figure 2 shows a portion of the designed KG. The entities of the extensional component are
represented by solid lines. The following program gives an idea of how MetaLog captures the
intensional knowledge (dashed lines). Clearly, for space reasons, here we show only a minimal
fragment of the KG, which actually has tens of entities and many MetaLog snippets.
( : Business) → ∃ ()[ : CONTROLS]()
( : Business)[: CONTROLS]( : Business)</p>
      <p>[: OWNS; percentage : ]( : Business),
 = sum(, ⟨⟩),  &gt; 0.5 → ∃ ()[ : CONTROLS]()
(1)
(2)</p>
      <p>A business  controls a business , if: (i)  controls itself; or, (ii) the sum of the shares  of 
owned by companies  (possibly including ), over all companies  controlled by , is above the
50% threshold.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusion</title>
      <p>We could appreciate how a technology-independent super-model guides the designer through
the modeling activity, ofering a toolkit of lenses to capture real-world objects, understand their
characteristics and relationships, and communicate the design choices with stakeholders. Our
methodology fulfills the presented desiderata and extends existing meta-level approaches [ 15, 16]
to the KG realm.</p>
    </sec>
    <sec id="sec-5">
      <title>5. Acknowledgments</title>
      <p>This work has been funded by the Vienna Science and Technology Fund (WWTF) [10.47379/VRG18013,
10.47379/NXT22018, 10.47379/ICT2201]; and the Christian Doppler Research Association (CDG)
JRC LIVE.
[4] P. Atzeni, L. Bellomarini, M. Iezzi, E. Sallinger, A. Vlad, Weaving enterprise knowledge
graphs: The case of company ownership graphs, in: EDBT, OpenProceedings.org, 2020,
pp. 555–566.
[5] L. Bellomarini, M. Benedetti, S. Ceri, A. Gentili, R. Laurendi, D. Magnanimi, M. Nissl,
E. Sallinger, Reasoning on company takeovers during the COVID-19 crisis with knowledge
graphs, in: RuleML+RR, 2020.
[6] L. Bellomarini, E. Laurenza, E. Sallinger, Rule-based anti-money laundering in financial
intelligence units: Experience and vision, in: RuleML+RR (Supplement), volume 2644 of
CEUR Workshop Proceedings, CEUR-WS.org, 2020, pp. 133–144.
[7] L. Bellomarini, M. Nissl, E. Sallinger, Rule-based blockchain knowledge graphs: Declarative
ai for solving industrial blockchain challenges, in: RuleML+RR (To Appear), CEUR
Workshop Proceedings, CEUR-WS.org, 2021.
[8] M. Y. Vardi, A theory of regular queries, in: PODS, ACM, 2016, pp. 1–9.
[9] B. Glimm, C. Ogbuji, S. Hawke, I. Herman, B. Parsia, A. Polleres, A. Seaborne, SPARQL 1.1
entailment regimes, 2013. W3C Recommendation 21 March 2013, 2013.
[10] F. A. Fontana, H. Brunelière, H. A. Müller, C. Raibulet, Guest editors’ introduction to the
special issue on model driven engineering and reverse engineering: Research and practice,
J. Syst. Softw. 159 (2020).
[11] L. Bellomarini, A. Gentili, E. Laurenza, E. Sallinger, Model-independent design of
knowledge graphs - lessons learnt from complex financial graphs, in: EDBT,
OpenProceedings.org, 2022, pp. 2:524–2:526.
[12] L. Bellomarini, E. Sallinger, G. Gottlob, The vadalog system: Datalog-based reasoning for
knowledge graphs, PVLDB 11 (2018).
[13] A. Bonifati, P. Furniss, A. Green, R. Harmer, E. Oshurko, H. Voigt, Schema validation and
evolution for graph databases, in: ER, volume 11788 of Lecture Notes in Computer Science,
Springer, 2019, pp. 448–456.
[14] G. Gottlob, A. Pieris, Beyond SPARQL under OWL 2 QL entailment regime: Rules to the
rescue, in: IJCAI, 2015, pp. 2999–3007.
[15] P. Atzeni, L. Bellomarini, F. Bugiotti, G. Gianforme, MISM: A platform for
modelindependent solutions to model management problems., in: J. Data Semantics, 2009,
pp. 133–161.
[16] P. Atzeni, P. Cappellari, P. A. Bernstein, Modelgen: Model independent schema translation,
in: ICDE, IEEE Computer Society, 2005, pp. 1111–1112.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>R.</given-names>
            <surname>Angles</surname>
          </string-name>
          ,
          <article-title>The property graph database model</article-title>
          ,
          <source>in: AMW</source>
          , volume
          <volume>2100</volume>
          <source>of CEUR Workshop Proceedings, CEUR-WS.org</source>
          ,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>L.</given-names>
            <surname>Bellomarini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Fakhoury</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Gottlob</surname>
          </string-name>
          , E. Sallinger,
          <article-title>Knowledge graphs and enterprise AI: the promise of an enabling technology</article-title>
          , in: ICDE, IEEE,
          <year>2019</year>
          , pp.
          <fpage>26</fpage>
          -
          <lpage>37</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>A.</given-names>
            <surname>Hogan</surname>
          </string-name>
          , E. Blomqvist,
          <string-name>
            <given-names>M.</given-names>
            <surname>Cochez</surname>
          </string-name>
          , C. d'Amato, G. de Melo,
          <string-name>
            <given-names>C.</given-names>
            <surname>Gutiérrez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Kirrane</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. E. L.</given-names>
            <surname>Gayo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Navigli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Neumaier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. N.</given-names>
            <surname>Ngomo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Polleres</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. M.</given-names>
            <surname>Rashid</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Rula</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Schmelzeisen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. F.</given-names>
            <surname>Sequeda</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Staab</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Zimmermann</surname>
          </string-name>
          ,
          <article-title>Knowledge graphs</article-title>
          ,
          <source>ACM Comput. Surv</source>
          .
          <volume>54</volume>
          (
          <year>2021</year>
          )
          <volume>71</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>71</lpage>
          :
          <fpage>37</fpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>