ELK vs HermiT in DL query answering

95 views
Skip to first unread message

Nacho Traverso Ribón

unread,
Jul 30, 2015, 10:47:44 AM7/30/15
to elk-reasoner-discussion
Hi,

I am performing some experiments in the Gene Ontology with ELK and HermiT. In tese experiments I ask the reasoner to answer to a DL query that allows me to know if a certain relationship between two classes exists. I have seen that ELK is really quicker than HermiT during the classification phase. However it is slower than HermiT when answering DL queries.

private Set<OWLExplanation> checkOWLLink(OWLClass a, OWLObjectProperty p, OWLClass b)
{
     OWLObjectSomeValuesFrom relationAxiom = factory.getOWLObjectSomeValuesFrom(p, b);
     OWLClassExpression negation = factory.getOWLObjectComplementOf(relationAxiom);
     Set<OWLClassExpression> subsumption = new HashSet<OWLClassExpression>();
     subsumption.add(a);
     subsumption.add(negation);
     OWLObjectIntersectionOf subsumptionAxiom = factory.getOWLObjectIntersectionOf(subsumption);
    
     reasoner.isSatisfiable(subsumptionAxiom))
}

The variable reasoner is an instance of ElkReasoner and was created like this:

OWLReasonerFactory reasonerFactory = new ElkReasonerFactory();//Reasoner.ReasonerFactory(); //new JcelReasonerFactory(); // new JFactFactory(); //new PelletReasonerFactory(); //
OWLReasonerConfiguration configuration = new ElkReasonerConfiguration();
reasoner =  reasonerFactory.createReasoner(o, configuration);
reasoner.precomputeInferences(InferenceType.CLASS_ASSERTIONS);
reasoner.precomputeInferences(InferenceType.CLASS_HIERARCHY);
reasoner.precomputeInferences(InferenceType.OBJECT_PROPERTY_HIERARCHY);
reasoner.precomputeInferences(InferenceType.OBJECT_PROPERTY_ASSERTIONS);
reasoner.precomputeInferences(InferenceType.DISJOINT_CLASSES);

Could I do something to improve the performance of ELK and get quicker the answers of the queries? If not, do you know a reasoner suitable for that?

Thank you in advance.
Ignacio Traverso

Yevgeny Kazakov

unread,
Jul 30, 2015, 2:00:49 PM7/30/15
to elk-reasone...@googlegroups.com
Hi Ignacio,

what is the difference we are talking about? Can you give any concrete figures? Can you paste the log of ELK to see what takes most of the time?

In general, I doubt that ELK can perform significantly faster than HermiT for answering (random?) satisfiability queries because in most cases there is not much work to do, so HermiT is already fast enough. ;-) ELK is faster for classification because it is able to derive many subsumption simultaneously, whereas HermiT tests subsumptions one by one. When performing single subsumption tests, ELK would not give much benefit over HermiT (apart from the initial classification time).

Do you really need to perform the tests one by one, or do you know all entailments that you need to test in advance? In the letter case, you can test satisfiability of many class expressions at the same time. Unfortunately, there is no OWL API method for that, but you can do as follows. If you need to test satisfiability of, say, class expressions C1,...,Cn, take new classes (with fresh iris) X1,...,Xn, add axioms SubClassOf(X1 C1),...,SubClass(Xn Cn) to the ontology, and re-classify the ontology. After that you can check satisfiability of classes X1,...,Xn almost instantaneously (this will correspond to satisfiability of C1,..Cn). In this case ELK should compute the result faster than asking satisfiability of each class expression C1,..,Cn one by one.

You can easily adapt these instructions:

There have also been some discussion on this mailing list about using ELK on the (Web) server for answering queries. Perhaps you can find some useful tips there.

Best regards,

Yevgeny

--
You received this message because you are subscribed to the Google Groups "elk-reasoner-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elk-reasoner-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nacho Traverso Ribón

unread,
Jul 30, 2015, 4:08:13 PM7/30/15
to elk-reasone...@googlegroups.com

Parece que tenemos una oportunidad de reducir el tiempo :)

You received this message because you are subscribed to a topic in the Google Groups "elk-reasoner-discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elk-reasoner-discussion/zOgyfy20s9o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elk-reasoner-disc...@googlegroups.com.

Nacho Traverso Ribón

unread,
Aug 3, 2015, 5:51:52 AM8/3/15
to elk-reasoner-discussion, yevgeny...@uni-ulm.de
Hi Yevgney,

Thank you for your Feedback. I tested your proposal and I reduced the time almost 10 times. Before I needed 160 minutes for checking all the axioms, now I need 17 minutes. This is a really good improvement that allow me to continue devolping my similarity measure.

Best regards,
Ignacio
Yevgeny

To unsubscribe from this group and stop receiving emails from it, send an email to elk-reasoner-discussion+unsub...@googlegroups.com.

Yevgeny Kazakov

unread,
Aug 3, 2015, 8:25:14 AM8/3/15
to elk-reasone...@googlegroups.com
Hi Ignacio,

17 minutes seems still quite long for GO. How many axioms do you
check? Thousands? Millions?
Can you share your data? This could be useful for benchmarking / optimising ELK.

Best regards,

Yevgeny

On Mon, Aug 3, 2015 at 11:51 AM, Nacho Traverso Ribón
>>> email to elk-reasoner-disc...@googlegroups.com.

Nacho Traverso Ribón

unread,
Aug 3, 2015, 8:29:54 AM8/3/15
to elk-reasone...@googlegroups.com
Hi Yevgeny,

Additionally to the checking of axioms I am also obtaining the explanations for the valid axioms by means of the owlexplanation library [1]. This is the task that consumes most of the time. I do not know if this answer your question. If not, let me know and I can answer all your questions, share the code and the data.

Cheers
Ignacio

You received this message because you are subscribed to a topic in the Google Groups "elk-reasoner-discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elk-reasoner-discussion/zOgyfy20s9o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elk-reasoner-disc...@googlegroups.com.

Yevgeny Kazakov

unread,
Aug 3, 2015, 8:39:22 AM8/3/15
to elk-reasone...@googlegroups.com
So you say that you have improved the computation of *explanations* 10
times using my previous suggestion? That seems odd.
Do you still compute the explanations for each axiom independently or
you also managed to compute all of them at the same time?

Yevgeny

On Mon, Aug 3, 2015 at 2:29 PM, Nacho Traverso Ribón

Nacho Traverso Ribón

unread,
Aug 3, 2015, 10:56:02 AM8/3/15
to elk-reasoner-discussion, yevgeny...@uni-ulm.de
Hi,

Actually, I improved the computation 3 times (From 148 minutes to 43 minutes). I made a mistake before. With explanations I mean justifications. The similarity measure I am developing takes into account not only the taxonomic information (class hierarchy), but also the neighborhood of the compared classes. At the moment, I consider that A class "A" has a neighbor "B" if the axiom "A SubClassOf some_property B" is entailed in the ontology. I am using your method for finding all these axioms. I introduce a new class in the ontology, called for example temp, and declare it as subclass of the expression "A and ObjectComplementOf(SubClassOf some_property B)". If temp is not satisfiable, then B is neighbor of A through the property some_property. If temp is satisfiable, then B is not neighbor of A.

Once I know the neighbors of A I look for the justifications of the corresponding axioms. Some axioms are stated in the ontology and, therefore, their justifications is an empty set. Other axioms are not stated in the ontology, but can be inferred. I want the justifications of such axioms. I am not happy knowing which are the neighbors of A and through which relatioship is A connected to them. I also want to know why a certain axiom can be inferred. Justifications are also considered in my similarity measure to provide a similarity value.

Your method helped during the phase of computing the neighborhood. The computation of the justifications did not changed.

Best regards,
Ignacio
>> >>> For more options, visit https://groups.google.com/d/optout.
>> >>
>> >>
>> >
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "elk-reasoner-discussion" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/elk-reasoner-discussion/zOgyfy20s9o/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "elk-reasoner-discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an
Reply all
Reply to author
Forward
0 new messages