<!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 />
    <article-meta>
      <title-group>
        <article-title>Arachne: an OWL RL reasoner applied to Gene Ontology Causal Activity Models (and beyond)</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>James P. Balhoff</string-name>
          <email>balhoff@renci.org</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Benjamin M. Good</string-name>
          <email>bgood@lbl.gov</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Seth Carbon</string-name>
          <email>sjcarbon@lbl.gov</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Christopher J. Mungall</string-name>
          <email>cjmungall@lbl.gov</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Lawrence Berkeley National Lab, Berkeley</institution>
          ,
          <addr-line>CA 94720</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Renaissance Computing Institute, University of North Carolina</institution>
          ,
          <addr-line>Chapel Hill, NC 27517</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>This paper introduces Arachne, an RDF rule engine with support for efficient reasoning with large OWL RL terminologies. Arachne is being used by the Gene Ontology (GO) Consortium to provide real-time reasoning within the Noctua modeling tool while creating GO “Causal Activity Models”.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Of the hundreds of ontologies in use in biology, the Gene Ontology (GO) [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] is perhaps
the best known and most widely used. The GO is used to classify genes found in the
genome of any given species based on the function of the ‘molecular machine’ encoded
by that gene. It captures knowledge about the function of gene products in terms of
their localizations within the cell, the molecular functions they enable, and the
biological processes that they help to carry out. Historically, this ontology has been used to
‘tag’ gene products with labels from the classes in the ontology. Reasoning has
primarily been applied to validate the consistency of the class hierarchy and to infer additional
subsumption relationships [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
      </p>
      <p>
        Now, the GO consortium is shifting to a new knowledge representation paradigm
dubbed ‘causal activity models’ (GO-CAM). As opposed to simply associating gene
products with classes from the ontology, each GO-CAM provides a detailed semantic
model of how one or several gene products contribute to the execution of a biological
process. GO-CAMs are implemented with the OWL 2 Web Ontology Language [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
OWL individuals are used to represent the nodes in the model (corresponding to genes,
functions, etc.). Each individual is typed with a class or classes from the Gene Ontology
and related ontologies such as ChEBI [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], and linked to other individuals via properties
selected from the OBO Relations Ontology [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. These models are constructed by
professional knowledge engineers (‘curators’) in a web stack named Noctua
(https://github.com/geneontology/noctua). Noctua provides a rich multi-user graphical
client on top of a knowledge system backed with an RDF triplestore.
      </p>
      <p>Each GO-CAM is a set of assertions about OWL individuals (an ‘Abox’). For
example, Fig. 1 shows a representation of knowledge about a protein complex, located in
the nucleus, that is involved in enabling DNA polymerase activity. The OWL
definitions for the classes and relationships used to make these assertions comprise the
‘Tbox’.</p>
      <p>Tbox
(sample of
nearly 1 million
OWL classes)
...</p>
      <p>protein
complex</p>
      <p>nucleus
rdfs:subClassOf</p>
      <p>DNA
polymerase</p>
      <p>Complex
rdf:type
(inferred)
Abox
(One simple
GO-CAM model)
rdf:type</p>
      <p>RO:part of
(inferred)
molecular
function</p>
      <p>...</p>
      <p>DNA-directed
DNA polymerase
activity</p>
      <p>rdfs:subClassOf
RO:occurs in</p>
      <p>rdf:type</p>
      <p>RO:enabled by</p>
      <p>All GO-CAMs are modeled using the same Tbox, which contains ~2 million logical
axioms and nearly one million classes. By applying axioms from the Tbox to the
instance graph in the Abox, additional statements can be inferred—for example, for the
Abox in Fig. 1, that the instance of ‘protein complex’ is also an instance of the more
specific ‘DNA polymerase complex’. Upon this semantic backdrop, the Noctua
application needs to:
1. Ensure that the models generated are logically consistent.
2. Provide access to statements that are not explicitly declared in the model but can be
inferred.
3. Provide explanations for inferred statements.
4. Allow for collaborative, simultaneous model editing: reasoning needs to perform
quickly enough to be integrated into the editing experience.</p>
      <p>
        The Gene Ontology project uses the ELK reasoner for the OWL EL profile [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] during
ontology development, and while it has been transformative for tasks such as ontology
classification and consistency checking, it was not a good fit for a real-time multi-user
online system focused on graphs of instance data. It does not support some types of
axioms needed in the context of Abox graph reasoning: inverse properties, property
ranges, and materialization of object property assertions. Also, while ELK supports
incremental classification, it answers a single query at a time. It does not support
preclassification of Tbox inferences and then concurrent extension to process multiple
independent datasets.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Arachne RDF rule engine for OWL RL</title>
      <p>
        To support our need to simultaneously reason over any number of data models, as well
as quickly materialize all inferred instance relationships for each, we developed the
Arachne RDF rule engine for the RL subset of OWL
(https://github.com/balhoff/arachne). OWL RL provides expressive reasoning on
property relationships, and can be implemented using rule-based technologies [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. Arachne
is a forward-chaining rule engine, implemented in Scala and based on the Rete/UL
algorithm as described by Doorenbos [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. This algorithm allows efficient matching of
relevant rules even when the rule set is extremely large. A separate component of
Arachne is an OWL API-based translator which converts OWL Tbox axioms to
corresponding rules from the OWL RL profile (https://github.com/balhoff/owl-to-rules).
Arachne currently supports all OWL RL constructs, with the exception of HasKey and
reasoning with data properties. A subset of SWRL [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] is also supported. Rather than
using a fixed OWL RL ruleset operating on the Tbox as RDF triples, the translator
converts Tbox axioms directly into rules that can be used to efficiently derive only
Abox conclusions (i.e., inferred class assertions and object property assertions), similar
to the approach used by RDFox [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. For example, given the OWL axiom
SubClassOf(‘nucleus’, ‘organelle’), a rule such as the following is generated:
      </p>
      <p>(?x rdf:type ‘nucleus’) → (?x rdf:type ‘organelle’)
Arachne translates the Tbox ontology used in Noctua into more than 1 million rules,
only a limited set of which may apply to any given instance model. This preprocessing,
which takes ~60 seconds on a 2017 Apple MacBook Pro, can be performed at
application startup, producing an immutable rule engine which can be used to concurrently
materialize inferences for any number of models. For a typical model consisting of
hundreds of triples, inference materialization typically takes around 1–2 seconds,
producing 1000–2000 additional triples.</p>
      <p>
        Before implementing Arachne, we explored integration of two other RDF rule
engines into Noctua. The first, RDFox, is an extremely fast reasoner that scales well to
large numbers of rules and input triples [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. However, it is meant to work as a single
triplestore, rather than being used to reason over many independent datasets. RDFox is
implemented in C++ with a Java API wrapper, making cross-platform packaging and
distribution more complicated than desired. Finally, we determined that the academic
license which applies to RDFox was too restrictive for integration and distribution with
our free and open-source stack.
      </p>
      <p>
        The second rule engine we explored was the forward-chaining reasoner included
with the Apache Jena RDF API [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. We found that an initial integration of Jena into
Noctua worked well: with small to intermediate numbers of rules (e.g., 1362 rules
derived from the OBO Relations Ontology) it is as fast or faster than Arachne. However,
as the number of rules increased, performance degraded significantly. For example,
using 1,006,200 rules derived from the full GO-CAM Tbox, after the initial loading of
rules the Jena implementation requires ~250 seconds to derive a total of 2257 triples
from a starting point of 412 triples, while Arachne requires ~1 second.
      </p>
      <p>The addition of the Arachne reasoner to Noctua allows curators to work while the
reasoner constantly runs in the background, dynamically making new inferences and
checking for consistency. Nodes on the canvas are labeled with any inferred ‘direct’
types in addition to their asserted types, and warnings are raised when errors are
introduced. Curators can also explore an Inference Explanations view, which details the
asserted triples and reasoning rules leading to each inferred statement. The fully
materialized set of inferences is used within Noctua to support SPARQL-driven tabular data
exports. As we continue to develop the Noctua interface, we intend to more deeply
integrate reasoning results into the editing experience to serve as a kind of logical spell
checker—always on, offering corrections as statements are created.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Conclusion</title>
      <p>Arachne provides a convenient implementation of OWL RL reasoning which can be
readily integrated into Java-based software or used via its standalone command-line
interface. Its architecture is well suited to applications of large ontologies to
instancebased datasets, supporting new approaches to utilizing the rich semantics represented
within the Gene Ontology and related scientific ontologies. Arachne is open source and
available under a BSD license.</p>
      <p>Acknowledgments. We would like to thank N. Harris for help with editing, and D.
Osumi-Sutherland, K. Van Auken, D. Hill, P. Thomas, and other GO Consortium
members for feedback on reasoning results. Arachne and Noctua development is supported
by NIH-NHGRI 2U41HG002273-17.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <article-title>1. The Gene Ontology Consortium: Expansion of the Gene Ontology knowledgebase and resources</article-title>
          .
          <source>Nucleic Acids Res</source>
          .
          <volume>45</volume>
          ,
          <fpage>D331</fpage>
          -
          <lpage>D338</lpage>
          (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Mungall</surname>
            ,
            <given-names>C.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dietze</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Osumi-Sutherland</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Use of OWL within the Gene Ontology</article-title>
          .
          <source>Proceedings of OWLED 2014, Riva del Garda</source>
          ,
          <source>Italy</source>
          (
          <year>2014</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <article-title>3. OWL 2 web ontology language: Structural specification and functional-style syntax</article-title>
          , https://www.w3.org/TR/owl2-syntax/.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Hastings</surname>
            , J., de Matos,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dekker</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ennis</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Harsha</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kale</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Muthukrishnan</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Owen</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Turner</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Williams</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Steinbeck</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>The ChEBI reference database and ontology for biologically relevant chemistry: enhancements for 2013</article-title>
          .
          <source>Nucleic Acids Res</source>
          .
          <volume>41</volume>
          ,
          <fpage>D456</fpage>
          -
          <lpage>63</lpage>
          (
          <year>2013</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Smith</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ceusters</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Klagges</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Köhler</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kumar</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lomax</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mungall</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Neuhaus</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rector</surname>
            ,
            <given-names>A.L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosse</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Relations in biomedical ontologies</article-title>
          .
          <source>Genome Biol</source>
          .
          <volume>6</volume>
          ,
          <issue>R46</issue>
          (
          <year>2005</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Kazakov</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Krötzsch</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Simančík</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>The Incredible ELK</article-title>
          .
          <source>J. Automat. Reason</source>
          .
          <volume>53</volume>
          ,
          <fpage>1</fpage>
          -
          <lpage>61</lpage>
          (
          <year>2013</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7. OWL 2
          <string-name>
            <given-names>Web</given-names>
            <surname>Ontology Language Profiles (Second Edition</surname>
          </string-name>
          ), https://www.w3.org/TR/owl2- profiles/.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Doorenbos</surname>
          </string-name>
          , R.B.:
          <article-title>Production Matching for Large Learning Systems</article-title>
          , http://reports-archive.adm.cs.cmu.edu/anon/1995/CMU-CS-
          <volume>95</volume>
          -113.pdf, (
          <year>1995</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>SWRL</given-names>
            <surname>: A Semantic Web Rule Language Combining</surname>
          </string-name>
          <string-name>
            <surname>OWL</surname>
          </string-name>
          and RuleML, https://www.w3.org/Submission/SWRL/.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Nenov</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Piro</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Motik</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Horrocks</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wu</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Banerjee</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>RDFox: A Highly-Scalable RDF Store</article-title>
          . In: The Semantic Web - ISWC
          <year>2015</year>
          . pp.
          <fpage>3</fpage>
          -
          <lpage>20</lpage>
          . Springer International Publishing (
          <year>2015</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>11. Apache Jena, https://jena.apache.org.</mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>