Complete Classification of Complex ALCH O Ontologies using a Hybrid Reasoning Approach
Weihong Song, Bruce Spencer, and Weichang Du
Faculty of Computer Science, University of New Brunswick, Fredericton, Canada {song.weihong, bspencer, wdu}@unb.ca
Abstract. Consequence-based reasoners are typically significantly faster than tableau-based reasoners for ontology classification. However, for more expres- sive DL languages likeALCH O, consequence-based reasoners are not appli- cable, but tableau-based reasoners can sometimes require an unacceptably long time for large and complex ontologies. This paper presents a weakening and strengthening approach for classification ofALCH Oontologies, using a hybrid of consequence- and tableau-based reasoning. We approximate the original ontol- ogyOoby a weakened versionOwand a strengthened versionOs, both are in a less expressive DLALCHand classified by a consequence-based main reasoner. The classification fromOwis sound but possibly incomplete with respect toOo, while that fromOsis complete but possibly unsound. The additional subsumptions de- rived fromOsmay be unsound so are further verified by a tableau-based assistant reasoner. A prototype classifier called WSClassifier is implemented based on this hybrid approach. The experiments results show that for classifying many large and complexALCH Oontologies, WSClassifier’s performance is significantly faster than tableau-based reasoners.
1 Introduction
The target of classification is to calculate all the subsumption relationships between atomic concepts implied by the input ontology. (Hyper)Tableau-based [9,13] and consequence-based reasoners are two of the mainstream reasoners for ontology clas- sification. Current (hyper)tableau-based reasoners such as HermiT [13], FaCT++[20], Pellet [18] and RacerPro [8], are able to classify ontologies in very expressive DLs.
However, despite various optimizations having been applied, classifying certain exist- ing large and complex ontologies is still a challenge for these reasoners, such as various versions of Galen and FMA ontologies. We regard an ontology complex if it is highly cyclic. In contrast to the (hyper)tableau-based reasoners, consequence-based reasoners [10,11,17] are typically very fast but support less expressive DLs. They are variations of so-called completion-based approaches proposed for the OWL EL family [3,5]. So far the most expressive languages that are supported by consequence-based reasoners are Horn-SH IQ[10] andALCH[17].
In this paper we introduce a hybrid reasoning approach for classification of on- tologies in the DL ALCH O, using a consequence-based main reasoner MR and a tableau-basedassistant reasonerAR. MRprovides sound and complete classification over the DLALCHwhich is less expressive thanALCH O, whileARprovides sound
and complete classification overALCH O. SupposeMRreasoning is much faster than AR.We try to classify an ontologyOousingMRto do the major work, andARto do auxiliary work. We produce a weakened versionOwby removing fromOothe nominal axioms that are beyondALCH, and a strengthened versionOsby adding toOwa set of strengthening axiomsO+inALCH that compensate for the removed axioms.Osand Oware inALCH and are classified by MRproducingHwandHs, correspondingly.
Hw,HoandHsare classification results ofOw,OoandOs, respectively. Subsumptions inHw are sound but may not be complete w.r.tOo, whereas subsumptions inHs are complete but may not be sound. Unsound subsumptions inHs\ Hware detected byAR and filtered out. Those that remain are added toHw resulting in the sound and complete classification ofOo. We call this approach weakening and strengthening (WS).
We have implemented a prototype WSClassifier by applying the proposed WS approach and evaluated it. Our previous study on WS approach and application to ALCH OIontologies [19] did not guarantee the completeness of classification. The contribution of this paper is to improve the algorithms and theoretically prove our clas- sification result onALCH Oontologies is sound(trivial) and complete.
The rest of the paper is organized as follows: Section 2 gives an overview of our hybrid classification procedure forALCH O ontologies and prove its completeness.
Section 3 introduces computation of strengthening axioms and Section 4 contains the related work. Section 5 is our partial empirical results and conclusion. Finally, we put all the proofs of lemmas and theorems in Appendix B and complete evaluation in Ap- pendix C.
2 Hybrid Classification of Ontologies
The syntax and semantics ofALCH Ofollows DL conventions. In this paper, we use A,B,E,F for atomic concepts,C,Dfor concepts,R,S for roles,a,bfor individuals, H,Kfor conjunctions of atomic concepts, andM,Nfor disjunctions.
Algorithm 1 describes our hybrid procedure for classifyingOo. It consists of three stages: (1) a normalization stage (line 1) during which the ontology is rewritten to simplify the forms of axioms in it; (2) a main classification stage (lines 2 to 8) in whichOwandOsare generated and classified using theMR;and (3) averification stage (lines 9 to 17) in which the subsumptions arising from just theOsare verified usingAR.
We use notationsCandCoto denote the set of atomic concepts inOobefore and after normalization, respectively, andC>,⊥=C∪ {>,⊥}.
In the normalization stage, theALCH OontologyOo is rewritten to contain only axioms of formsd
Ai vFBj,Av ∃R.B,∃R.A vB,Av ∀R.B,R vS, orNa ≡ {a}. The procedure extends normalization in Frantiˇseket al.[17] by introducing for each {a}anominal placeholder Naand adding anominal axiom Na ≡ {a}. We writeNPfor the set of all nominal placeholders after normalization. The transformation preserves subsumptions inOo. We assume all ontologies are normalized in the rest of the paper.
In the verification stage, there are some cases we hand over the classification work toAR:(1)Na v ⊥ ∈ Hs; (2)E v ⊥ ∈ HsbutOo 6|=E v ⊥, then for everyF ∈C>,⊥, EvF ∈ Hs, while likely only few of them are inHw, thusHs\ Hwmay be huge; (3) the fractionk Hs\ Hw k/kC kis greater than a thresholdd. In the latter two cases,
Algorithm 1:HybridClassify(Oo) Input: AnALCH OontologyOo Output: The classification result ofOo
1 normalizeOo;
2 Ow← Oowith nominal axiomsNa={a}removed; /* Weakening */
3 Hw← MR.classify(Ow); /* Classify the weakened ontology. */
4 O+← getNominalStrAx(Ow,NP,C>,⊥); /* from Algorithm 4 */
5 remove allEvFfromHwwherehE,Fi<C>,⊥×C>,⊥;
6 ifO+=∅then returnHw;
7 Os← Ow∪ O+;
8 Hs←MR.classify(Os); /* Classify the strengthened ontology. */
9 ifNav ⊥ ∈ Hsfor some Na∈NPthen returnAR.classify(Oo);
10 remove allEvFfromHswherehE,Fi<C>,⊥×C>,⊥;
11 if k Hs\ Hwk/kCk>dthen returnAR.classify(Oo);
12 Hws← Hw;
13 foreachEv ⊥ ∈ Hs\ Hwdo
14 ifAR.isSatisfiable(Oo,E)then returnAR.classify(Oo);
15 elseaddEv ⊥intoHws;
16 foreachEvF∈ Hs\ Hwwhere F,⊥do
17 ifnotAR.isSatisfiable(Oo,Eu ¬F)then addEvFintoHws;
18 returnHws
the estimated work for the stage is more than usingARto classifyOo. For (3) we set d=1.5 in our implementation based on the experiments in [7].
In the main classification stage, the major work is to generate theALCHontologies Ow andOs.Owis produced by simply removing all the nominal axioms of the form Na ≡ {a}fromOo. SinceOw ⊆ Oo,Oo |= Ow and soHw ⊆ Ho, i.e. the classification result ofOwis sound w.r.t.Oo.
Example 1. Consider the following normalized ontologyOo,ex which we will use as a running example:
(1) AvC (2) Av ∃R.E (3) EvNa (4)C v ∀R.D (5)DvG (6) Av ∃S.Na (7)Na≡ {a}
:::::: (8) ∃S.DvF
Classification result ofOo,exisHo,ex={AvF,AvC,EvNa,DvG}, whereAvFis implied by axioms (1) – (4),(6) – (8). The weakened versionOw,exofOo,exis obtained by removing nominal axiom (7). And its classification resultHw,ex={AvC,EvNa,DvG}.
We can see thatA vF, which requires (7) to imply, is missing inHw,ex. We will see later how we add strengthening axioms to getAvFinHs,ex.
The most difficult part of the procedure is to findOswhich entails no fewer sub- sumptions thanOo. A sufficient condition is that for anyA,B ∈ C>,⊥ such thatOs 6|= AvB, there exists a modelIofOssatisfyingAu ¬B, and it can be transformed to a modelI0ofOosatisfyingAu ¬B. SinceOsis obtained fromOwby adding strengthen- ing axioms, every modelIofOssatisfies all axioms inOoexcept possibly the nominal
axioms, which require the interpretation of eachNa∈NPto have exactly one instance, whereas for an arbitrary modelIofOs,NaIcould have zero or multiple instances. How- ever, if for eachNa,NaI,∅and all the instances are “identical”, they can be replaced by a single instance. Concretely, these instance have the same label set:
Definition 1 Given an interpretation I = (4I,·I), an atomic concept A is called a labelof an instance x if x∈AI. The set of all the labels of x is named thelabel setof x inI, denoted by LS(x,I).
Such a replacement is called acondensation– it condenses all of the different instances into one instance, and thus it transformsIinto a model that satisfies the nominal axiom for Na. If such a condensation can be done for all nominal placeholders, then we can create a model forOo.
The strengthening axioms are designed to make these condensations possible. They have the form Na v X and NauX v ⊥ computed by Algorithm 4, and thus they force X to be a label of the nominal instanceNa, or not to be one, respectively. By
“manipulating” labels of nominal instances through these strengthening axioms, we can force them all to be identical in certain models, so that the condensations can occur.
The models we construct for transformation are variants of the canonical model constructed forALCHontologies [17]. Our model construction is introduced in Ap- pendix A. Given F ∈ C>,⊥, our approach ensures we can build a model ofOs, which satisfies everyEu ¬F whereOs 6|= E v F. And every such model can be condensed to a model ofOo satisfyingEu ¬F. Stating the contrapositive: ifOo |= E v F then Os |=E vF. Thus classification ofOs is complete. Soundness of our approach is en- sured by the verification stage, and completeness is proved in the following section 2.1.
2.1 Condensing Labels and Completeness
Due to space limitation, we only list the important definitions, lemmas, property and theorems in the paper, all their proofs are in Appendix B. Here we briefly introduce some notations used later. We writeO+for any intermediate (including final) version of strengthening axioms,O+wfor the corresponding intermediate (including final) version of strengthened ontology whereO+w = Ow∪ O+. We writeOsfor the final version of strengthened ontology. GivenE,F ∈ C>,⊥ such thatO+w 6|= E vF, a canonical model I[O+
w,≺F]ofO+wis constructed by first computing asaturationSO+wofO+wand then defining a model based on a total order≺F. The definition of construction of the canonical model is in Appendix A. The computation of saturation is as follows: GivenO+w, the saturation SO+wis initialized as
{init(A)|A∈C} ∪ {init(Na)|Na∈NP}
ThenSO+w is expanded by iteratively applying the inference rules in Table 1 and adding the conclusions intoSO+w until reaching a fixpoint. During this process, existing axioms inSO+ware used as premises and axioms inO+ware used as side conditions.SO+wcontains axioms of the formsinit(H),HvMtAandHvMt ∃R.K. Note Table 1 is modified from Table 3 in [17] by usingR+AandRinit to initialize contexts whenever necessary.
The conjunctionHthat occurs in the premises or conclusions of the inference rules is called the context of the inference.
Table 1.Complete Inference Rules for NormalizedALCHontologies
R+A init(H)
HvA :A∈H R−A HvNtA
HvN :¬A∈H Rinit
HvMt ∃R.K init(K)
Rnu {HvNitAi}ni=1 HvFn
i=1NitM :dn
i=1AivM∈ O+w R+∃ HvNtA
HvNt ∃R.B :Av ∃R.B∈ O+w R−∃ HvMt ∃R.K KvNtA
HvMtBt ∃R.(Ku ¬A) : ∃S.AvB∈ O+w
Rv∗OS R⊥∃ HvMt ∃R.K Kv ⊥ HvM
R∀
HvMt ∃R.K HvNtA
HvMtNt ∃R.(KuB) :Av ∀S.B∈ O+w Rv∗OS
Definition 2 In an interpretationI = (4I,·I), an atomic concept L is called acon- densing labelif (1) LI,∅and (2) for any x,y∈LI, LS(x,I)=LS(y,I).
If a label applied to some instance is a condensing label then every instance to which it applies has the same label set. This means the label sets of all such instances are identical and can be condensed into one instance.
Definition 3 Given a modelIof anALCH OontologyO, a concept L inOand an individual name xL, we define acondensationfunction condense(L,xL,I)that trans- formsIinto an interpretationI0=(4I0,·I0)as follows:
1). Let n be a fresh instance which is not in4I, and r be a replacement function r(x)=
n x∈LI x otherwise 2).4I0={r(x)|x∈ 4I}
3). For each concept A, role R and individual o inO,
AI0={r(x)|x∈AI},RI0 ={(r(x),r(y))|(x,y)∈RI},oI0=r(oI),xIL0=n We say that each x∈LIiscondensedinto n. We also sayIis condensed toI0. Definition 4 H is apotentially supporting contextof A inO+wif HvMtA∈SO+
w. Definition 5 A concept X is called aPotentially Supporting concept (PS)of some A inO+wif either X or¬X is a conjunct of a potentially supporting context H of A inO+w. The set of allPSof A inO+wis denoted byPS[A,O+
w].
Example 2. (PS) Consider theALCHontologyOw,exin Example 1, it can be seen as an ontologyO+w,exwhereO+ex =∅, andNP ={Na}. The potentially supporting contexts ofNaareNa,EandEuD. SoPS[Na,Ow,ex]={Na,D,E}.
Property 6 We sayO+w isdecisiveif for each Na ∈ NP, each X ∈ PS[Na,O+ w], either O+w|=Na vX orO+w|=NauXv ⊥holds.
Lemma 7 GivenO+wand Na ∈NP, if (1)O+wis decisive, and (2)O+w 6|= Na v ⊥. Then for any F∈C>,⊥, Nais a condensing label inI[O+
w,≺F].
Lemma 8 LetIbe a model of anALCH OontologyOsatisfying Eu ¬F,E,F∈C>,⊥, where L is a condensing label inI. ThenI0=condense(L,xL,I)is a model ofO∪{L= {xL}}satisfying Eu ¬F.
Lemma 9 Given someO+wand F ∈C>,⊥, if inI[O+w,≺F]every Na ∈NPis a condensing label, then for each E∈C>,⊥s.t.O+w6|=EvF, there is a model ofOosatisfying Eu ¬F.
Theorem 10 If theO+wwe compute satisfies: (1)O+wis decisive and (2) all Na∈NPare satisfiable inO+w. Then the classification result ofO+wis complete w.r.t.Oo.
Proof. LetE,F ∈C>,⊥be concepts such thatO+w 6|=EvF. Since conditions (1) and (2) of Lemma 7 are satisfied, allNa∈NPare condensing labels in the canonical model I[O+
w,≺F]. By Lemma 9, the model can be condensed to a modelI0ofOofor Eu ¬F, provingOo6|=EvF. So the classification result ofO+wis complete w.r.t.Oo.
In the next section, we demonstrate how we will compute anO+wsatisfying condition (1) in Theorem 10 i.e., is decisive. Such anO+w can also satisfy condition (2) in most cases as in our experiments, therefore completeness is achieved. If in a few cases that such anO+wends up not satisfying condition (2), then we hand over the work toAR.The classification result is still complete.
3 Computing Strengthened Ontology
In this section we show how to create a decisiveO+w. The property suggests that the strengthening axioms should be of the formNa v X or Na uX v ⊥. We first briefly introduce the strengthening axioms selection functionchooseStrAxiom. Based on that, we explain an initial idea to create a decisiveO+w. Then, we introduce how to compute OPS[Na,O+w] which is an overestimation ofPS[Na,O+w] fromO+wwithout doing saturation, and give the naive and improved algorithms to computeO+.
Definition 11 A strengthening axiom selectionchooseStrAxiomis a function that takes an Na∈NP, X∈Co, andOwand returns:
1. ∅only ifOw|=NavX orOw|=NauXv ⊥;
2. a choice between NavX or NauXv ⊥.
Initial idea for computing a decisiveO+w: To create such an ontology, a straightfor- ward idea is to start fromOw, generate saturationSOwofOw, obtainPS[Na,Ow]fromSOw
for allNa ∈ NP. For each pairhNa,Xi,X ∈ PS[Na,Ow], we add a strengthening axiom determined by chooseStrAxiom function into O1+. Then, addO1+ into Ow and ob- tain O1w+. Next, we generate saturation again based onO1w+. Since the impact ofO1+, PS[Na,O1+w] ⊇ PS[Na,Ow]. Then we repeat the above process until a fixpoint at which PS[N
a,Oi+1+w ] = PS[N
a,Oi+w] for all Na ∈ NP, we call the final Oi+1+ as O+, final Oiw+1+ asOswhich is decisive. However to implement such a procedure generating the satu- ration forPS[Na,O+
w]is costly. Thus, instead ofPS[Na,O+
w], we compute the overestimated PS[Na,O+
w]calledOPS[Na,O+ w].
Definition 12 Given an ontologyO+w,OPS[Na,O+w]is a set ofoverestimated potentially supporting conceptswe compute such thatOPS[Na,O+w]⊇PS[Na,O+w]for each Na∈NP.
Algorithm 2:getOPS
Input: NormalizedALCHontologyO+w, a conceptX, a set of nominal placeholdersNP, the set of atomic classesUin the original ontology
Output: A pairhOPS[X,O+w],Pri[X,O+w]i
1 OPS[X,O+w]← ∅;Pri[X,O+w]← ∅;ToProcess← {X};Exists← ∅;
2 whileToProcess,∅do
3 take out a labelWfromToProcess;
4 ifW<Pri[X,O+w]then
5 addWtoPri[X,O+w];
6 if W=>thenstop the procedure and useARto do the classification work;
7 foreachd
AivMF
W∈ O+wdoselect oneAiand add it intoToProcess;
8 foreach∃S.YvW∈ O+wand Rv∗OS and Bv ∃R.Z∈ O+wdo
9 addBintoToProcess;
10 foreachW∈Pri[X,O+w]do
11 ifW∈U or W∈NPthenaddWtoOPS[X,O+w];
12 foreachYv ∀S.W∈ O+wand Rv∗OS and Bv ∃R.Z∈ O+wdoadd∃R.ZtoExists;
13 foreachBv ∃R.W∈ O+wdo add∃R.WtoExists;
14 foreach∃R.W∈Existsand Rv∗OSdo
15 addWtoOPS[X,O+w];
16 foreachYv ∀S.Z∈ O+wdo addZtoOPS[X,O+w];
17 foreach∃S.ZvY∈ O+wdo addZtoOPS[X,O+w];
18 returnhOPS[X,O+w],Pri[X,O+w]i
We use Algorithm 2 to computeOPS[X,O+w]. Based on Definition 4 and 5,PS[X,O+w]
includes all the atoms ofHsuch thatHvMtX∈SO+w. Without a real procedure gen- erating the saturation forPS[X,O+w] as explained above, we actually computeOPS[X,O+w]
based on analyzing the relationships among the premises, side conditions and conclu- sions of the inference rules in Table 1. The procedure of Algorithm 2 can be divided into three parts:
1. (line 2 to 9) We first conduct a search in the converse direction of all possible derivation paths(Definition 16 in Appendix B) of a conclusionHv MtXfor all possibleHs. In the search we maintain a setPri[X,O+w]. Each conceptW ∈Pri[X,O+w]
may be necessary to the derivation ofX, and appears prior toX in the derivation path. More precisely,Wcorresponds to some potential intermediate conclusionHv M0tW which is a necessary conclusion for derivingH v MtX. Since for any contextH,H vAis the only conclusion that can be derived frominit(H), at least one of suchA, which is a conjunct ofH, is inPri[X,O+w]. We writeCXHfor suchA.
Pri[X,O+w]contains at least one conjunctCXHfor any potentially supporting contextH ofX.
2. (lines 10 to 13) Check each conceptW ∈Pri[X,O+
w]to see whether it can be a conjunct CXHof some potential supporting contextHofX. If it can, we find the first conjunct
C1HofHfromCHX.C1H(seeH∗in Lemma 13 in Appendix B), which is either inU orNPin line 11 or the filler of concepts inExistsfrom line 12 to 13, is the initial conceptHstarts from.
3. (line 14 to 17) Find all the other conjuncts ofHbased onC1Hby searching along the derivation paths.
Lemma 13 GivenO+wand a concept A,OPS[A,O+w] returned by Algorithm 2 preserves OPS[A,O+w]⊇PS[A,O+w].
Example 3. (OPS) Consider again the ontologyOw,exin Example 1.
The Execution of Alg. 2:getOPS(Ow,ex,Na,{Na},{A,C,D,E,F,G}) Line 2 to 9 Pri[Na,Ow,ex]={Na,E}
Line 11 OPS[Na,Ow,ex]={Na,E}
Line 13 Exists={∃R.E}
Line 16 OPS[Na,Ow,ex]={Na,E,D}
Line 18 ReturnOPS[Na,Ow,ex]={Na,E,D},Pri[Na,Ow,ex]={Na,E}
OPS[Na,Ow,ex]=PS[Na,Ow,ex]={Na,E,D} soOPS[Na,Ow,ex] ⊇PS[Na,Ow,ex]
For eachX∈OPS[X,Oi+
w], we will use functionchooseStrAxiomto return a strength- ening axiom. Note in Definition 11 forchooseStrAxiom, how can we knowOw|=Nav XorOw |=NauX v ⊥? Actually in Algorithm 1, line 4 (we usedgetNominalStrAx, if usinggetNominalStrAxNaive, it is the same) executesgetOPS(Ow,Na,NP,U) inter- nally before line 3. Then for each Na ∈ NP, each X ∈ OPS[Na,Ow], we add a testing axiomXavNauXintoOwin the first round classification and obtainHw, whereXais a fresh concept forOw. In Algorithm 1 and Definition 11, we ignore this detail and only mention usingOwjust for simplifying explanation. IfXa v ⊥is found inHw, then we simply sayOw|=NauXv ⊥. IfNavXorNauXv ⊥is implied byHw, we do not add any strengthening axiom forXintoOi+1+. We remove the extra testing results fromHw in line 5 of Algorithm 1. When choosing betweenNa vXandNauXv ⊥, we use the heuristics that ifXcorresponds to a union concept before normalization, andNavXis not implied, then we addNauXv ⊥. For other cases, we addNa vX.
Example 4. For the concepts inOPS[Na,Ow,ex], since none of the 4 axioms Na v E, Ea v ⊥,Na vDorDa v ⊥is inHw,ex, and assume EandDdo not associate union concepts before normalization, we addNa v E andNa v Das strengthening axioms O1ex+.
UsingOPS[X,O+
w] instead ofPS[X,O+
w], we design a naive Algorithm 3 based on the aboveInitial Ideato generateO+forO+wso thatO+wis decisive. The execution process is as follows:
1).O0+=∅. 2). ComputeOPS[N
a,Oi+w]for∀Na,Na∈NPfor theOi+. 3).Oi+1+={chooseStrAxiom(Na,X)| ∀Na,X,Na∈NP,X∈OPS[Na,Oi+w]}
In each loop, we add the new Oi+ into Ow and generate Oiw+. When the process converges,Oi+1+ =Oi+. SinceOi+1+is computed fromOPS[N
a,Oi+w], andOPS[N
a,Oi+w] ⊇ PS[N
a,Oi+w]for allNaand for anyi, thus Algorithm 3 guarantees thatO+wis decisive.
Theorem 14 LetO+be strengthening axiom produced from Algorithm 3,O+w=Ow∪O+ is decisive.
Algorithm 3:getNominalStrAxNaive(Naive algorithm for computing strength- ening axioms)
Input: NormalizedALCHontologyOw, a set of nominal placeholdersNP, the set of atomic classesUin the original ontology
Output: Strengthening axiomsO+
1 O+← ∅;
2 repeat
3 newAxioms=∅;
4 foreachNa∈NPdo
5 O+w← Ow∪ O+;
6 hOPS[X,O+w],Pri[X,O+w]i ← getOPS(O+w,Na,NP,U) ; /* from Algorithm 2 */
7 foreachX∈OPS[X,O+w]do
8 newAxioms← newAxioms∪chooseStrAxiom(Na,X);
9 O+← O+∪newAxioms;
10 untilnewAxioms=∅;
11 returnO+
Theorem 15 LetO+be strengthening axioms computed from Algorithm 4,O+w=Ow∪ O+is decisive.(Proof see Appendix B, the following is just an intuitive explanation) Algorithm 4 improves Algorithm 3 by avoiding repetitive search process. In each loop of Algorithm 3, Algorithm 2getOPSbases on the axioms of the inputOiw+1+to compute OPS[N
a,Oi+1+w ]forNa, where only search onOiw+1+\ Oiw+is new, the majority work – search onOwis repeated in each iteration, while Algorithm 4 improves this and only executes getOPSbased onOwfor once in line 3. In Algorithm 2 and 3, a strengthening axiom αcan take effect only in the following situation: Ifα={Nb vX} ∈ Oiw+,X ∈Pri[N
a,Oi+w], thenNb ∈ OPS[Na,Oi+
w]. IfchooseStrAxiom(Na,Nb) returnNa v NbinOiw+1, thenNa ∈ OPS[Nb,Oi+1+
w ]. That means because ofα, in the end,OPS[Na,O+w]=OPS[Nb,O+w].
In Algorithm 4, without really computing each ofOiw+and repeatedly search on them, we achieve similar results based on the merge criteria in line 6 and the merge operation from lines 7 to line 7. AssumeNb∈gi.nominalsandNa∈gj.nominals,X∈gi.ops∩gj.pri,
∅in line 6. Then,X ∈ gi.opsmeans Nb vX will possibly be a strengthening axiom, X∈ gj.primeansXis possibly inNa’sPri, thengiandgjare merged into one group, and finallyOPS[Na,O+w] =OPS[Nb,O+w], too, similar with Algorithm 3.
Example 5. In Algorithm 3,O1ex+=O2ex+. Thus, the loop from line 2 to 9 repeats twice.
In Algorithm 4, sinceNP ={Na}, the merge process from line 6 to 7 does not happen.
For both algorithms, that meansO1ex+does not have impact in later saturation.
Note the naive Algorithm 3 is only used for demonstrating our initial idea. In our implementation, we used the improved Algorithm 4. All three Algorithms 2, 3 and 4 have polynominal complexity. In Algorithm 2, the number of iterations in all levels of loops are bounded by the number of axioms or concepts inOw, and thus have polyno- mial complexity. In Algorithm 3, the number of iterations is bounded by the size ofO+, which is also polynomial. In Algorithm 4, the merge loop can only continue for at most
||NP||times. So all the algorithms are polynomial of the size ofOwand terminate.
Algorithm 4:getNominalStrAx(Calculate strengthening axioms for nominals) Input: NormalizedALCHontologyOw, a set of nominal placeholdersNP, the set of
atomic classesUin the original ontology Output: Strengthening axiomsO+
1 groups← ∅;
2 foreachNa∈NPdo
3 hOPS[Na,Ow],Pri[Na,Ow]i ← getOPS(Ow,Na,NP,U); /* from Algorithm 2 */
4 create a groupgwithg.nominals={Na},g.ops=OPS[Na,Ow],g.pri=Pri[Na,Ow];
5 addgintogroups;
6 whilethere exists gi,gj∈groupssuch that gi.ops∩gj.pri,∅do
7 mergegi,gjinto one groupg, whose properties are unions of corresponding properties ofgiandgj; removegi,gjfromgroupsand addg;
8 foreachg∈groupsdo
9 foreachNa∈g.nominalsdo
10 foreachX∈g.opsdo
11 O+← O+∪chooseStrAxiom(Na,X);
12 returnO+
Example 6. : The Overall Execution Results from Alg. 1:
(1) Weakened OntologyOw:Na≡ {a}removed Line 2 of Alg. 1 (2) Class HierarchyHw:AvC EvNa DvG Line 3 of Alg. 1 (3) Strengthening axiomsO+: two axioms added:NavE NavD (4) For (3): Line 4 of Alg. 1 return from Alg. 4 For (5): Line 8 of Alg. 1 (5) Class HierarchyHs:AvC EvNa DvG AvF NavE Na vD (6) Verify the following 6 pairs (indirect subsumptions included): Line 16 to 17 (7)AvF EvD EvG NavD NavE NavG, 1 pair validated:AvF (8) Class HierarchyHws=Ho:AvC AvF EvNa DvG. Line 18 of Alg. 1
4 Related Work
Optimization techniques for ontology classification have been extensively studied in the literature [4,16,7,12]. For tableau-based reasoners, Enhanced Traversal (ET) [4]
and KP [16,7] are the most widely used techniques. Optimizations for consequence- based classification ofELOontologies were also studied [12], and the most effective technique is overestimation. Firstly, the algorithm saturates the ontology using infer- ence rules forEL and obtains sound subsumptions. Next, potential subsumptions are obtained by continuing saturation with a new overestimation rule added. Finally, the potential subsumptions are checked using a sound and complete but slower procedure forELO. Comparing with this procedure, we support a more expressive DLALCH O.
In the area of hybrid reasoning, Romero et al. [1,2] proposed classification based on modules given to aSROIQreasonerRand an efficientL-reasonerRLsupporting a fragmentLofSROIQ. GivenOo, they find a set of classesΣLwhose superclasses inOocan be computed by classifying a subsetMLofOoin DLL. The superclasses of remaining classes are computed usingR. However, because of the restriction of locality- based modular approach used for computingΣL, nominal axiomsNa ≡ {a}cannot be
moved out fromML[6]. Therefore, in order to guarantee completeness, eitherRLsup- ports nominals or all the work is assigned toR. In current implementation of MORe, RLdoes not support non-safe [12] use of nominals in the Galen ontologies, soRhas to do all the work. In sum, module extraction technique MORe uses for classification is a more general technique that is primarily intended for ontologies in DLs whose expres- sivity is beyond ALCHO. In contrast, our approach currently only supports language ALCH O, combines the two reasoners differently, handles nominals, and improves on its full reasoner more often for complex and highly cyclic ontologies.
Our approach generally belongs to theory approximation [15]. Yuanet. al. [14]
encodedSROIQontologies intoEL++ with additional data structures, and classified by a tractable, sound but incomplete algorithm [14]. A strengthened approximation of SROIQTBoxes with the OWL 2 RL profile [21] is used for query answering.
5 Empirical Results and Conclusion
We have implemented our prototype hybrid classifier WSClassifier in Java. The classi- fier uses ConDOR as the mainALCHreasoner and HermiT as the assistant reasoner for DLALCH O. WSClassifier adopts a well-known preprocessing step to eliminate transitive roles [10], hence supports DLSH O. We set the Java heap space to 12GB and the time limit to 9 days for all reasoners. We compared the classification time of WSClassifier with main-stream tableau-based reasoners and another hybrid reasoner MORe on all large and highly cyclic ontologies available to us, on the ORE dataset and on some proposed variants. For classifying FMA-constitutionalPartForNS(FMA- C) which is the only real-world large and highly cyclic ontologies with nominals we have access to, WSClassifier used 21.2 seconds, while HermiT used 140,882 seconds with configuration of simple core blocking and individual reuse. Other reasoners did not get a result because they ran out either of time or memory. We put the evaluation result Table 2 of comparison of classification performance in Appendix C. The results of Table 2 show, excluding ORE dataset, that WSClassifier is significantly faster than the tableau-based reasoners on 7 out of 10 ontologies. For the other 3 of 10 ontologies, WSClassifier detected that strengthening axioms made some concepts unsatisfiable in Os, and so failed over to HermiT. We see a major speedup for WSClassifier on ORE’s FMA-lite which is highly cyclic and is our targeted ontology. For the remaining 112 ORE ontologies which are not highly cyclic and thus not our target, WSClassifier failed over to HermiT on one of them. Our average reasoning time on these 112 ontologies is longer than that of the other reasoners mainly due to our overheads: computing normal- ized axioms and transmitting the ontology to and from ConDOR.
We have presented a hybrid reasoning technique for soundly and completely clas- sifying anALCH Oontology based on a weakening and strengthening approach. The input ontology is approximated by twoALCHontologies, one weakenedOwand one strengthenedOs, which are classified by a fast consequence-based reasoner. The sub- sumptions ofOwandOsare a subset and a superset of the subsumptions of the original ontology, respectively. Subsumptions implied byOsbut not byOware further checked by a (slower)ALCH O reasoner. This approach is possibly applied to different lan- guage classes, each requiring different strengthening axioms. The implementation can be improved with heuristics for a tighterOPS[Na,O+w]and better strengthening axioms.
References
1. Armas Romero, A., Cuenca Grau, B., Horrocks, I.: Modular combination of reasoners for ontology classification. In: Proc. of DL (2012)
2. Armas Romero, A., Cuenca Grau, B., Horrocks, I.:MORe: Modular combination of OWL reasoners for ontology classification. In: Proc. of ISWC. pp. 1–16 (2012)
3. Baader, F., Brandt, S., Lutz, C.: Pushing theELenvelope. In: Proc. of IJCAI. pp. 364–369 (2005)
4. Baader, F., Hollunder, B., Nebel, B., Profitlich, H.J., Franconi, E.: An empirical analysis of optimization techniques for terminological representation systems. Applied Intelligence 4(2), 109–132 (1994)
5. Baader, F., Lutz, C., Suntisrivaraporn, B.:CEL– a polynomial-time reasoner for life science ontologies. In: Proc. of IJCAR. pp. 287–291 (2006)
6. Cuenca Grau, B., Horrocks, I., Kazakov, Y., Sattler, U.: A logical framework for modularity of ontologies. In: Proc. of IJCAI. pp. 298–303 (2007)
7. Glimm, B., Horrocks, I., Motik, B., Shearer, R., Stoilos, G.: A novel approach to ontology classification. J. Web Semantics 14, 84–101 (2012)
8. Haarslev, V., M¨oller, R.: RACER system description. In: Proc. of IJCAR. pp. 701–705 (2001) 9. Horrocks, I., Sattler, U.: A Tableau decision procedure forSH OIQ. J. Automated Reason-
ing 39(3), 249–276 (2007)
10. Kazakov, Y.: Consequence-driven reasoning for HornSH IQontologies. In: Proc. of IJCAI.
pp. 2040–2045 (2009)
11. Kazakov, Y., Kr¨otzsch, M., Siman˘c´ık, F.: Concurrent classification of ELontologies. In:
Proc. of ISWC. pp. 305–320 (2011)
12. Kazakov, Y., Kr¨otzsch, M., Simanˇc´ık, F.: Practical reasoning with nominals in theELfamily of description logics. In: Proc. of KR. pp. 264–274 (2012)
13. Motik, B., Shearer, R., Horrocks, I.: Hypertableau reasoning for description logics. J. Artifi- cial Intelligence Research 36(1), 165–228 (2009)
14. Ren, Y., Pan, J.Z., Zhao, Y.: Soundness preserving approximation for TBox reasoning. In:
Proc. of AAAI (2010)
15. Selman, B., Kautz, H.: Knowledge compilation and theory approximation. J. ACM 43(2), 193–224 (1996)
16. Shearer, R., Horrocks, I.: Exploiting partial information in taxonomy construction. In: Proc.
of ISWC. pp. 569–584 (2009)
17. Siman˘c´ık, F., Kazakov, Y., Horrocks, I.: Consequence-based reasoning beyond Horn ontolo- gies. In: Proc. of IJCAI. pp. 1093–1098 (2011)
18. Sirin, E., Parsia, B., Cuenca Grau, B., Kalyanpur, A., Katz, Y.: Pellet: A practical OWL-DL reasoner. J. Web Semantics 5(2), 51–53 (2007)
19. Song, W., Spencer, B., Du, W.: WSReasoner: A prototype hybrid reasoner forALCH OI ontology classification using a weakening and strengthening approach. In: Proc. of the 1st Int. OWL Reasoner Evaluation Workshop (2012)
20. Tsarkov, D., Horrocks, I.:FaCT++description logic reasoner: System description. In: Proc.
of IJCAR. pp. 292–297 (2006)
21. Zhou, Y., Cuenca Grau, B., Horrocks, I.: Efficient upper bound computation of query answers in expressive description logics. In: Proc. of DL (2012)
A Canonical Model Construction
GivenF ∈ C>,⊥ andO+w, our target is to construct a modelI[O+
w,≺F] forO+w satisfying Eu ¬F for anyE ∈ C>,⊥ such thatO+w 6|= E v F. We writeIforI[O+
w,≺F] when the
parameters are not important. The construction is done by first computing asaturation SO+
w ofO+w and then defining a model based on it.SO+
w contains axioms of the forms init(H),HvMtAandHvMt ∃R.Kderived using the inference rules.
(1) Computation of saturation
Given anALCHontologyO+w, the saturationSO+
wis initialized as {init(A)|A∈C>} ∪ {init(Na)|Na∈NP}
ThenSO+w is expanded by iteratively applying the inference rules in Table 1 and adding the conclusions intoSO+w until reaching a fixpoint. An inference rule is ap- plied by using existing axioms inSO+was premises and axioms inO+was side condi- tions. We writeO+w `αfor everyα∈SO+w derived fromO+w. The inference process is obviously sound, i.e. ifO+w`αthenO+w|=α.
(2) Model construction
We define a total order≺F over all the concepts inO+w such that F has the least order. IfFis⊥or>, the order can be any arbitrary order. We define the domain4I ofI[O+
w,≺F]as
4I := {xH|init(H)∈SO+wandHv ⊥<SO+w}
wherexHis an instance introduced forH.4Iis nonempty because ifO+wis consis- tent,> v ⊥<SO+w. Sinceinit(>)∈SO+w,x>exists.
To define the interpretation for atomic concepts, we first construct the label set LS(xH,I) for each instancexH. In this section, we writeIHforLS(xH,I). LetAi
be the concept with theith order from the smallest to the largest according to≺F. For convenience we writeM≺F Aiif for each disjunctAinM,A≺F Ai. LetIiHbe a sequence whereI0H:=∅, andIiHis defined as
IiH :=
IiH∪ {Ai}if there existsM ≺F Aisuch that O+w`HvMtAiandM∩ Ii−1H =∅ Ii−1H otherwise
The last element of the sequence is defined asLS(xH,I). With theLS(xH,I) de- fined, the interpretation of an atomic conceptAis defined as
AI := {xH|A∈LS(xH,I)}
The roles are interpreted to satisfy the axiomsHvMt ∃R.K. For each roleRand eachHsuch thatxH∈ 4I, define
IRH:={K| ∃M:O+w`HvMt ∃R.K,M∩ IH=∅}
A conjunctionKis said to be maximal inLSR(xH,I) if there is noK0∈ IRHwith a superset of conjuncts ofK. SinceHv ⊥<SO+w, byR⊥∃ rule we haveKv ⊥<SO+w. And byRinit rule we haveinit(K)∈SO+w. SoxKis well-defined. The interpretation of roles is defined as
RI:= [
R0vO+
wR
{(xH,xK)|Kis maximal inIRH0}
The inference rules in Table 1 is modified from Table 3 in [17] by usingR+AandRinit
to initialize contexts only when necessary. The change affects only the validity ofxKin the construction forRIwhich has been explained above, and the proof thatIsatisfies each type of axiom can be kept unchanged from Simanciket. al.[17]. SoIis a model of theALCHontologyO+w. Moreover, for anyE∈C>,⊥, ifO+w6|=EvF,O+w0EvF.
Since F has the least order in≺F, by the definition of LS(xE,I) we know xE < FI. ThusxE ∈(Eu ¬F)I, andI[O+w,≺F]satisfiesEu ¬F.
B Proofs of Lemmas and Theorems
Lemma 7 GivenO+wand Na ∈NP, if (1)O+wis decisive, and (2)O+w 6|= Na v ⊥. Then for any F∈C>,⊥, Nais a condensing label inI[O+w,≺F].
Proof. For simplicity we writeIforI[O+w,≺F] in this proof. Sinceinit(Na) ∈ SO+w and O+w6|=Na v ⊥, by the construction ofI,xNaexists andxNa∈NaI. Hence it is equivalent to show that for eachxH∈NaI,LS(xH,I)=LS(xNa,I).
We first show that for eachHsuch thatxH∈NaI,xNa ∈HI. SincexH∈NaI,His a potentially supporting context ofNa. LetH=dn
i=1CiH, whereCHi isAor¬A. SinceO+w is decisive, we have the following two cases:
– O+w |=Na vCiHholds for allCiH,1≤i≤n, thenO+w |=Na vH. Since xNa ∈ NaI, xNa ∈HI.
– There exists someisuch thatO+w |= NauCiH v ⊥, thenO+w |= NauH v ⊥. By Lemma 3 of paper [17],xH∈HI, which contradicts with our assumptionxH∈NaI. Next we proveLS(xNa,I) ⊆ LS(xH,I) by contradiction. AssumeLS(xNa,I) * LS(xH,I), letXbe the concept inLS(xNa,I)\LS(xH,I) with the smallest order. Since X∈LS(xNa,I), there existsN≺F Xsuch thatO+w`NavNtXandN∩LS(xNa,I)=∅.
∵O+w`NavNtX ∴O+w|=NavNtX
∵xH∈NaI∧xH<XI ∴xH∈NI ∴LS(xH,I)∩N,∅
In the above proof, ifN =⊥, a contradiction arises withxH ∈NI. Otherwise, letY ∈ LS(xH,I)∩N, there must existN0≺F Ys.t.O+w`HvN0tYandLS(xH,I)∩N0=∅.
∵O+w`HvN0tYandxNa∈HI ∴ xNa∈(N0tY)I
∵N0≺FY andY ∈NandN≺F X∴N0≺F X
SinceXis the smallest inLS(xNa,I)\LS(xH,I),N0 ≺F X andLS(xH,I)∩N0 =∅, we have LS(xNa,I)∩N0 = ∅ (it is trivially true if N0 = ⊥), and xNa < N0I. Given xNa∈(N0tY)I, we haveY ∈LS(xNa,I), this contradicts withN∩LS(xNa,I)=∅. So we conclude thatLS(xNa,I)\LS(xH,I)=∅andLS(xNa,I)⊆LS(xH,I).
Finally we need to proveLS(xH,I)⊆LS(xNa,I). For eachX ∈ LS(xH,I), there existsN≺F Xsuch thatO+w`HvNtXandN∩LS(xH,I)=∅.
∵LS(xNa,I)⊆LS(xH,I) ∴N∩LS(xNa,I)=∅ ∴xNa<NI