Any ideas: How to debug a very slow ontology?

396 views
Skip to first unread message

Michael DeBellis

unread,
Jul 27, 2017, 2:25:23 PM7/27/17
to ontolog-forum
I've been helping someone who is fairly new to developing ontologies. I think he was told to re-use a bunch of ontologies.   The problem is that the resulting ontology takes forever every time we run the reasoner. He has confidentiality issues so I can't post the actual ontology but here are the metrics for it:

Axiom 6130
Logical axiom count 3035
Declaration axioms count 653
Class count 381
Object property count 158
Data property count 49
Individual count 411
Annotation Property count 54
DL expressivity SROIQ(D)

This is approximately 4-5 times as large and complex as the main ontology that I've developed for my work. But my ontology takes a few seconds to run the reasoner (and that is with every Reasoner inference preference checked) where as this ontology takes 5-10 minutes. But unfortunately there are no errors when it completes.  Also, we developed a SWRL rule to do data conversion (from centigrade to fahrenheit) and as far as I can tell the rule should be firing. I wrote a SQWRL rule with the exact same left hand side and it seemed to fire exactly when we expected it to but the appropriate object (which was bound according to the SQWRL rule) does not get it's value updated. I'm wondering if whatever weirdness is causing the very slow loading may also be causing this problem. 

I'm wondering does anyone have any suggestions? Are there type issues or other things that can cause very slow inferencing even though there are no actual errors? Are there tools I can use to help find things that look ill formed in the ontology? BTW, I've already advised him to forget about re-using all those ontologies and build just the model he needs to satisfy his use cases first but I'm not sure that's feasible due to what I think are political issues. Which actually reminds me of when I used to do this stuff (consulting) for a living. It never ceased to amaze me that the hardest problems were virtually always the political and personal ones rather than the technical ones. But I digress, any suggestions would be useful. 

Michael


Chris Mungall

unread,
Jul 27, 2017, 2:52:29 PM7/27/17
to ontolog-forum

Very hard to say without seeing the ontology, or at least a breakdown of axiom type, but one strategy we have found useful to isolate the high expressivity components into modules, perform DL reasoning (or even FOL) on these, assert the results, then import these (minus expressive axioms), and keep the core in something like EL that can be speedily reasoned over using Elk or rule-based reasoners. It's not guaranteed complete but a bit of pragmatic intuition goes a long way here.

Of course the other thing to try is just different reasoners. Elk is ubiquitous for large biological ontologies but there have been newer reasoners by the same group and others that reason over larger subsets of DL, or perform advanced modularization for you (MORE, Konklude, ...)

--
All contributions to this forum by its members are made under an open content license, open publication license, open source or free software license. Unless otherwise specified, all Ontolog Forum content shall be subject to the Creative Commons CC-BY-SA 4.0 License or its successors.
---
You received this message because you are subscribed to the Google Groups "ontolog-forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ontolog-foru...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael DeBellis

unread,
Jul 27, 2017, 10:57:42 PM7/27/17
to ontolog-forum
I hadn't thought of trying other reasoners. I use SWRL a lot and at least with Protege Pellet seems to work the best. For example, I think some of the other reasoners don't support all the SWRL builtins. But it can't hurt to try some other ones out. Especially because I think whatever is causing the problem almost certainly has nothing to do with rules anyway. I think it has to do with datatypes that conflict or that over-write some of the standard RDF ones, but that's just a hunch. Thanks for the idea I'll try some different reasoners and see what happens.

Michael

Piotr Nowara

unread,
Jul 28, 2017, 2:49:33 AM7/28/17
to ontolo...@googlegroups.com
In my experience the cardinality axioms "max N" and "exactly N" can kill reasoning performance even of a relatively small ontology. So my first advice would be to check them.

As for the SWRL rule not firing: try to assert the desired triple manually (without the rule) then run the reasoner and see what will happen. 

I'm dealing with slightly bigger OWL ontology on daily basis (which has almost 200 SWRL rules) and reasoning takes about 4-6 seconds with Openllet (an open-source Pellet fork) running on JENA TDB backend.

Good luck!

2017-07-27 22:57 GMT-04:00 Michael DeBellis <mdebe...@gmail.com>:
I hadn't thought of trying other reasoners. I use SWRL a lot and at least with Protege Pellet seems to work the best. For example, I think some of the other reasoners don't support all the SWRL builtins. But it can't hurt to try some other ones out. Especially because I think whatever is causing the problem almost certainly has nothing to do with rules anyway. I think it has to do with datatypes that conflict or that over-write some of the standard RDF ones, but that's just a hunch. Thanks for the idea I'll try some different reasoners and see what happens.

Michael

--
All contributions to this forum by its members are made under an open content license, open publication license, open source or free software license. Unless otherwise specified, all Ontolog Forum content shall be subject to the Creative Commons CC-BY-SA 4.0 License or its successors.
---
You received this message because you are subscribed to the Google Groups "ontolog-forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ontolog-forum+unsubscribe@googlegroups.com.

Michael DeBellis

unread,
Jul 28, 2017, 1:51:15 PM7/28/17
to ontolog-forum
Thanks, that was great feedback, I'll try your suggestions.  

Michael 

Michael DeBellis

unread,
Jul 28, 2017, 8:09:54 PM7/28/17
to ontolog-forum
Thanks to everyone who contributed the excellent ideas. We figured it out. Or rather the guys at Stanford did. I think what was going on was that the rule was making the ontology inconsistent however, it wasn't doing the normal thing of launching a "your dead sucker!" big red popup window. Also, we removed a lot of the imported ontologies and that made a huge difference in the time for the reasoner to run. thanks again for the help!

Michael

sabina_pb

unread,
Jul 29, 2017, 6:51:31 AM7/29/17
to ontolog-forum
Piotr: do you know if Openllet is available as a Protege PlugIn? Thank you and best regards
Sabina
To unsubscribe from this group and stop receiving emails from it, send an email to ontolog-foru...@googlegroups.com.

Michael DeBellis

unread,
Jul 31, 2017, 4:26:53 PM7/31/17
to ontolog-forum




I don't know what Openliet is but I don't think it is one of the currently supported plugins. I've attached an image of the current plugins, hopefully you can read that, let me know if you can't. 


Michael

Piotr Nowara

unread,
Jul 31, 2017, 4:52:24 PM7/31/17
to ontolo...@googlegroups.com
Sabina,

Openllet is an updated version of Pellet which is under active development (and this happens not to be case for the original standalone Pellet reasoner since now it is a part of closed-souce and commercial Stardog triple store/reasoning engine). 

I haven't found an Openllet distribution in form of a Protege-plugin and such plugin is not on the "Openllet roadmap", so it seems the intention is to provide a reasoner for JAVA developers. You can find some more info here: https://github.com/Galigator/openllet

The good news is that Openlet is nicely integrated with the recent version of Jena framework and one can use it easily via Maven which gives you a lot of more power than any Protege plugin. It requires only some basic JAVA skills to get started. 

Best,
Piotr

--
All contributions to this forum by its members are made under an open content license, open publication license, open source or free software license. Unless otherwise specified, all Ontolog Forum content shall be subject to the Creative Commons CC-BY-SA 4.0 License or its successors.
---
You received this message because you are subscribed to the Google Groups "ontolog-forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ontolog-forum+unsubscribe@googlegroups.com.

sabina_pb

unread,
Aug 1, 2017, 4:35:40 AM8/1/17
to ontolog-forum
Thank you Michael and Piotr for your helpful replies. Following Piotr's encouraging words, I will have a look at OpenIllet and the Jena Framework.

Best regards

Sabina
To unsubscribe from this group and stop receiving emails from it, send an email to ontolog-foru...@googlegroups.com.

Michael DeBellis

unread,
Aug 1, 2017, 9:50:04 AM8/1/17
to ontolog-forum
Sabina, You probably know this but I just wanted to point out if all you want to do is build an ontology you don't need to use Jena. I agree that Jena doesn't seem to be that difficult to use.  I've never used it myself but I've looked at it but I always found I could do what I wanted just with Protege and with SWRL and especially with the new SWRLTab in Protege. And while you can't use Openlllet without using Jena you can use the current Pellet reasoner. It definitely is a plugin and very robust. I use it all the time because of all the supported reasoners with Protege Pellet has the best implementation of SWRL. The fact that it's not open source is kind of depressing because I think all software should be open source but for normal building of ontologies and rules you shouldn't have to, in fact you probably shouldn't be looking at the code in the reasoner, it should be a black box module. Of course if your research involves extending a reasoner or something like that, it's a different story but I just wanted to make sure you knew that you don't have to use Java and Jena to build an ontology with SWRL rules and the Pellet reasoner. 

Michael
Reply all
Reply to author
Forward
0 new messages