<!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>A-L]).
$ yashrajsinh.chudasama@tib.eu (Y. Chudasama); disha.purohit@tib.eu (D. Purohit); philipp.rohde@tib.eu
(P. D. Rohde); maria.vidal@tib.eu (M. Vidal)</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Enhancing Interpretability of Machine Learning Models over Knowledge Graphs</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Yashrajsinh Chudasama</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Disha Purohit</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Philipp D. Rohde</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Maria-Esther Vidal</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>L3S Research Center</institution>
          ,
          <addr-line>Hannover, Germanny</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Leibniz University Hannover</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>TIB Leibniz Information Centre for Science and Technology</institution>
          ,
          <addr-line>Hannover</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2023</year>
      </pub-date>
      <volume>000</volume>
      <issue>01</issue>
      <fpage>0</fpage>
      <lpage>0003</lpage>
      <abstract>
        <p>Artificial Intelligence (AI) plays a critical role in data-driven decision-making frameworks. However, the lack of transparency in some machine learning (ML) models hampers their trustworthiness, especially in domains like healthcare. This demonstration aims to showcase the potential of Semantic Web technologies in enhancing the interpretability of AI. By incorporating an interpretability layer, ML models can become more reliable, providing decision-makers with deeper insights into the model's decision-making process. InterpretME efectively documents the execution of an ML pipeline using factual statements within the InterpretME knowledge graph (KG). Consequently, crucial metadata such as hyperparameters, decision trees, and local ML interpretations are presented in both human- and machine-readable formats, facilitating symbolic reasoning on a model's outcomes. Following the Linked Data principles, InterpretME establishes connections between entities in the InterpretME KG and their counterparts in existing KGs, thus, enhancing contextual information of the InterpretME KG entities. A video demonstrating InterpretME is available online1, and a Jupyter notebook2 for a live demo is published in GitHub3.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        The advent of machine learning (ML) has highlighted the importance of interpretability in
comprehending the decisions made by computational frameworks. While these frameworks often
provide highly accurate outcomes, understanding the reasoning behind their decisions can be
challenging. Although interpretable tools like LIME [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] exist to interpret the predictions of ML
models, they fall short in translating the captured knowledge, such as model insights, into the
application domain. In contrast, knowledge graphs (KGs) represent real-world knowledge through
      </p>
      <p>[[Q]]KG</p>
      <p>KG= (ζ, R, G)
Symbol:KG
generate:
train</p>
      <p>model
SHACL Validation</p>
      <sec id="sec-1-1">
        <title>Train</title>
        <sec id="sec-1-1-1">
          <title>Training ML Models</title>
          <p>Model:
semantic
infer:
predict
Symbol:
trace</p>
          <p>InterpretME KG</p>
        </sec>
      </sec>
      <sec id="sec-1-2">
        <title>Explain</title>
        <sec id="sec-1-2-1">
          <title>InterpretME Interpretation</title>
          <p>● Enhanced contextual</p>
          <p>interpretation of entities
● Federation of KGs
Users ● Traceability of entities
infer:
predict
Symbol:KG
[[Q]]KG + InterpretME
KG</p>
        </sec>
      </sec>
      <sec id="sec-1-3">
        <title>Deduce</title>
        <p>Questions
● Which are the important</p>
        <p>features?
● Does a target entity
satisfy domain
protocols?
● What are the insights of</p>
        <p>a target entity?
Preprocessing</p>
        <p>Feature
Selection</p>
        <p>
          Users
domain ontologies, using entities (e.g., dbr:Louis_XIV) and relations (e.g., dbo:spouse).
KGs have garnered significant attention for representing ML models (e.g., ML schema [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ])
and enhancing our understanding of predictive model characteristics. In this demonstration,
attendees will witness InterpretME’s ability to interpret predictive model decisions based on the
French Royalty KG e.g., feature selection, prediction probabilities, and SHACL validation reports.
Entailment regimes of owl:sameAs will enable to deduce new insights. The French Royalty
KG [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ] is a fully curated KG representing factual statements about the French royal families; it
includes class dbo:Person and its relationships, e.g., dbo:spouse and dbo:child.
        </p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>2. InterpretME</title>
      <p>
        The pipeline implemented by InterpretME, as illustrated in Figure 1, follows a hybrid design
pattern [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] and consists of three layers: Train, Deduce, and Explain. InterpretME accepts input
in the form of KGs or datasets (CSV or JSON format). The user configuration, provided in JSON
format, specifies the independent variables – features selected by the user for analyzing ML
model predictions, e.g., child – dependent variables (features that change as the independent
variables vary, e.g., spouse), the path to a dataset or SPARQL endpoint, and a target class
definition. Application data is retrieved from the input KGs using SPARQL queries. The Train
component utilizes standard supervised ML models (e.g., decision trees) to train on the provided
input data. The input data is preprocessed into the necessary format for training the predictive
model, and AutoML [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] optimizes hyperparameters. The trained model performs a binary
classification task, such as "Predicting whether a French royal person has a spouse".
The Deduce component utilizes the predictions of the trained ML model to enhance
interpretability. Interpretable tools like decision trees and LIME [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] are obtained to understand the predictive
model’s decisions. Here a symbolic reasoning system, i.e., SHACL validation is used to check
whether a predicted entity satisfies domain protocols, e.g., "If two persons are having the same
child then they are married". SHACL validation generates a post-hoc justification for entities
that violate the protocols while simultaneously ensuring the accuracy of the input RDF data.
InterpretME leverages RML mappings [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], as utilized by the SDM-RDFizer [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], to define the
captured metadata from the trained predictive model, which is then incorporated into the
InterpretME KG. These RML mappings provide a declarative specification of the classes and
properties in the InterpretME ontology and ML schema, ensuring that the collected entities
are accurately represented. Consequently, the InterpretME KG contains factual statements
that are both human-readable and machine-readable, efectively documenting the behavior of
the predictive models. The Explain module ofers users more comprehensive interpretations
of the predictive models’ decisions. Users can perform statistical analysis on specific target
entities using SPARQL queries, gaining deeper insights into the decision-making process of
the ML models. Federated Query Processing is employed to query both the input KGs and the
InterpretME KG. This module enables users to interpret the characteristics of a target entity
within the predictive task and understand its context within the input KGs.
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. Demonstration of Use Cases</title>
      <p>
        InterpretME is demonstrated over the French Royalty KG [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Attendees will execute ML
pipelines on KGs and run SPARQL queries to retrieve traced statements. The use cases facilitate
a comprehensive understanding of the characteristics of a target entity within the predictive
model and its context within the input KGs. We will focus on a predictive task involving the
French Royalty KG, where an ML model assigns a classification to a particular target entity,
leaving the decision-making process puzzling. The following use cases will be demonstrated:
Unveiling Important Features. Feature significance is an important part of understanding
the underlying mechanics and context in which ML models work. The predictive models utilize
input features to detect patterns and representations of a target entity. Figure 2 illustrates an
exemplar target entity represented in the InterpretME KG with all the ML model characteristics
and reveals the most important feature with its contribution in the predictive task. Attendees
will be able to study and discover which crucial features contribute the most to the decisions
of the ML models. Thus, the contextual knowledge provided by the InterpretME KG assists
attendees in understanding the features that influence the training of predictive models.
Insights Beyond Numbers. Aside from statistical and numerical data, another critical factor
is the underlying logic of ML models. Quantitative metrics, e.g., accuracy and precision reflect
the overall performance of the ML models, while interpretable tools, such as LIME, provide
interpretations of a target entity without considering the semantic meaning of an entity. For
instance, "Is dbr:Louis_XIV (i.e., target entity) linked to another entity in the input KG?". SPARQL
queries over the InterpretME KG reveal that LIME creates interpretation for target entities,
dbr:Louis_XIV and dbr:Philip_III_of_Spain, despite the fact that both entities
represent the same concept in the input KG. Thus, InterpretME helps attendees in understanding the
importance of considering the semantic properties of an entity within the ML model.
From Opacity to Clarity. Although interpretable tools like LIME ofer interpretations, they are
human-readable only and unclear for which entity the interpretation is generated. InterpretME
overcomes this limitation and provides human- and machine-readable interpretations. Figure 2
illustrates the enhanced interpretation of the target entity, for instance, dbr:Louis_XIV with
all the characteristics from the trained predictive model and the properties from the input
KG. These entities are specified in the InterpretME KG in terms of metadata obtained by the
Train and Deduce layers. InterpretME enhances the contextual description of a target entity
by annotating the behavior of the person (e.g., the models’ characteristics) in the predictive
model, thus, providing more insights into the ML model’s decision. InterpretME follows the
FAIR principles and the vocabulary that describes the captured metadata of ML models’ by
InterpretME is publicly available as an instance of VoCoL1. InterpretME stores independent and
dependent variables as metadata allowing the user to trace back the target entity defined in the
input KGs. InterpretME resorts to the federated query engine DeTrusty [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] for KG traversing.
Attendees will execute SPARQL queries to retrieve data from the input KG, the InterpretME KG,
or both. Based on these findings, attendees will trace back the characteristics of a target entity.
Validity of a Target Entity. SHACL validation is essential for ensuring the quality of the input
data and enhancing the interpretability of ML models. SHACL allows the user to define domain
1http://ontology.tib.eu/InterpretME/
protocols or rules for the characteristics of a target entity. InterpretME utilizes Trav-SHACL [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]
to perform validation of a target entity of an ML model; validation reports are generated and
illustrate whether the entity follows the defined protocols. For instance, in the French Royalty
KG, to ensure the validity of entities, the protocol "If a person has a father and a mother then the
father has a spouse" is defined. InterpretME captures the validation report (i.e., SHACL shapes,
constraints, and validation results) of the entities in the input KG and aligns it with the ML model
characteristics of a target entity in the InterpretME KG. Attendees can explore the validation
results of a particular target entity using SPARQL queries, and check if the classification of
ML models is based on entities that invalidate SHACL constraints. Thus, SHACL validation
enhances the interpretability of a target entity, allowing to assess domain protocol adherence,
interpret ML model predictions in the light of faithfulness, and deduce meaningful insights.
      </p>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusions</title>
      <p>We illustrate how the ML models over KGs can be interpreted using InterpretME. InterpretME
enhances the interpretation of a target entity by adding contextual knowledge collected from
the trained predictive model. In our demonstration, we show how our approach can be applied
to data-driven frameworks, which is a crucial trait in the Semantic Web community. Moreover,
attendees will recognize the significance of capturing the predictive pipeline’s metadata.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>M. T.</given-names>
            <surname>Ribeiro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Singh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Guestrin</surname>
          </string-name>
          ,
          <article-title>"Why Should I Trust You?": Explaining the Predictions of Any Classifier</article-title>
          , in: ACM SIGKDD,
          <year>2016</year>
          . doi:
          <volume>10</volume>
          .1145/2939672.2939778.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>D.</given-names>
            <surname>Esteves</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Ławrynowicz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Panov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Soldatova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Soru</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Vanschoren</surname>
          </string-name>
          , ML Schema Core Specification,
          <source>W3C Submission</source>
          ,
          <year>2016</year>
          . URL: http://www.w3.org/
          <year>2016</year>
          /10/mls/.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>N.</given-names>
            <surname>Halliwell</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Gandon</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Lecue</surname>
          </string-name>
          ,
          <article-title>User Scored Evaluation of Non-Unique Explanations for Relational Graph Convolutional Network Link Prediction on Knowledge Graphs, in: K-CAP</article-title>
          , ACM,
          <year>2021</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>M. van Bekkum</given-names>
            ,
            <surname>M. de Boer</surname>
          </string-name>
          , F. van
          <string-name>
            <surname>Harmelen</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Meyer-Vitali</surname>
            ,
            <given-names>A. ten Teije</given-names>
          </string-name>
          ,
          <article-title>Modular design patterns for hybrid learning and reasoning systems: a taxonomy, patterns and use cases</article-title>
          , Appl. Intell. (
          <year>2021</year>
          ).
          <source>doi:10.1007/s10489-021-02394-3.</source>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>T.</given-names>
            <surname>Akiba</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Sano</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Yanase</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Ohta</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Koyama</surname>
          </string-name>
          ,
          <article-title>Optuna: A next-generation hyperparameter optimization framework</article-title>
          ,
          <source>in: KDD</source>
          ,
          <year>2019</year>
          . URL: https://doi.org/10.1145/3292500.3330701.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>A.</given-names>
            <surname>Dimou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. Vander</given-names>
            <surname>Sande</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Colpaert</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Verborgh</surname>
          </string-name>
          , E. Mannens, R. Van de Walle,
          <article-title>RML: A Generic Language for Integrated RDF Mappings of Heterogeneous Data</article-title>
          ,
          <source>in: 7th Workshop on Linked Data on the Web, CEUR-WS.org</source>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>E.</given-names>
            <surname>Iglesias</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Jozashoori</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Chaves-Fraga</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Collarana</surname>
          </string-name>
          , M.-E. Vidal,
          <article-title>SDM-RDFizer: An RML Interpreter for the Eficient Creation of RDF Knowledge Graphs</article-title>
          , in: CIKM,
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>P. D.</given-names>
            <surname>Rohde</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Bechara</surname>
          </string-name>
          , Avellino,
          <source>DeTrusty v0.12.3</source>
          ,
          <year>2023</year>
          . doi:
          <volume>10</volume>
          .5281/zenodo.8095810.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>M.</given-names>
            <surname>Figuera</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P. D.</given-names>
            <surname>Rohde</surname>
          </string-name>
          , M.-E. Vidal, Trav-SHACL:
          <article-title>Eficiently Validating Networks of SHACL Constraints, in: The Web Conference</article-title>
          , ACM,
          <year>2021</year>
          . doi:
          <volume>10</volume>
          .1145/3442381.3449877.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>