Mining EL Bases with Adaptable Role Depth
aa r X i v : . [ c s . L O ] F e b Mining EL ⊥ Bases with Adaptable Role Depth
Ricardo Guimarães, Ana Ozaki, Cosimo Persia, Baris Sertkaya
Department of Informatics, University of Bergen, NorwayFrankfurt University of Applied Sciences, [email protected], [email protected], [email protected],[email protected]
Abstract.
In Formal Concept Analysis, a base for a finite structure is aset of implications that characterizes all valid implications of the struc-ture. This notion can be adapted to the context of Description Logic,where the base consists of a set of concept inclusions instead of implica-tions. In this setting, concept expressions can be arbitrarily large. Thus,it is not clear whether a finite base exists and, if so, how large conceptexpressions may need to be. We first revisit results in the literature formining EL ⊥ bases from finite interpretations. Those mainly focus on find-ing a finite base or on fixing the role depth but potentially losing someof the valid concept inclusions with higher role depth. We then present anew strategy for mining EL ⊥ bases which is adaptable in the sense that itcan bound the role depth of concepts depending on the local structure ofthe interpretation. Our strategy guarantees to capture all EL ⊥ conceptinclusions holding in the interpretation, not only the ones up to a fixedrole depth. Among its many applications in artificial intelligence, logic is used to formallyrepresent knowledge. Such knowledge, often in the form of facts and rules, enablesmachines to process complex relational data, deduce new knowledge from it, andextract hidden relationships in a specific domain. A well-studied formalism forknowledge representation is given by a family of logics known as description logics(DLs) [6]. DL is the logical formalism behind the design of many knowledge-basedapplications. However, it is often difficult and time-consuming to manually modelin a formal language rules and constraints that hold in a domain of knowledge.In this work, we consider an automatic method to extract rules (conceptinclusions (CIs)) formulated in DL from data. This data can be, for instance,a collection of facts in a database or a knowledge graph. For instance, in theDBpedia knowledge graph [18], one can represent the relationship between a city‘ a ’ and the region ‘ b ’ it belongs to with the facts city ( a ) , region ( b ) , partof ( a , b ) ,and capital ( b , a ) . From this data, one can mine a CI expressing that a capital isa city that is part of a region.To mine CIs that hold in a dataset, we combine notions of Formal ConceptAnalysis (FCA) [12] and DLs. FCA is a subfield of lattice theory that providesethods for analysing datasets and identifying the dependencies in them. InFCA a dataset, also called a formal context , is a table showing which objectshave which attributes. Given a formal context, FCA methods are used to extractthe dependencies between the attributes, also called implications (Figure 1). A base is a set of implications that entails every valid implication of the dataset andonly those (soundness and completeness). It can be used for detecting erroneousor missing items in the dataset [5]. In the DL setting, a base is a set of CIs (anontology) which can serve as a starting point for ontology engineers to build anontology in a domain of interest.However, for some DLs and datasets, it may happen that no finite base ex-ists. Cyclic relationships are common in knowledge graphs and they are themain challenge for finding a finite DL base. With only one cyclic relationship,we already have that infinitely many concepts hold in the dataset. Strategies forlimiting the size of concepts in the presence of cyclic dependencies have alreadybeen investigated in the literature. Baader and Distel (2008) and Distel (2011)propose a way of mining DL finite bases expressible in the DL EL ⊥ gfp which is theaddition of greatest fix-point semantics to the DL language EL ⊥ [4, 11]. The se-mantics offered by EL ⊥ gfp elegantly solves the difficulty of mining CIs from cyclicrelationships in the data. However, this semantics comes with two drawbacks.Firstly, EL ⊥ gfp concepts may be difficult to understand, and learned CIs may betoo complex to validate by domain experts. Secondly, there is no efficient im-plementation of a reasoner for EL ⊥ gfp , even though the reasoning complexity istractable, like for EL ⊥ . The authors also show how to transform an EL ⊥ gfp baseinto an EL base. However, it is far from being trivial to avoid the step of creatingan EL ⊥ gfp base in their approach.A simplification of the mentioned work has been proposed by Borchmann,Distel, and Kriegel (2016) where they show how to mine EL ⊥ finite bases witha predefined and fixed role depth for concept expressions [8]. As a consequence,the base is sound and complete only w.r.t. CIs containing concepts with boundedrole depth. Their approach avoids the step of creating an EL ⊥ gfp base but alsoavoids the main challenge in creating a finite base for EL ⊥ , which is the fact thatthe role depth of concepts can be arbitrarily large.Our work brings together the best of the approaches by Distel (2011) andBorchmann, Distel, and Kriegel (2016): we directly compute a finite EL ⊥ basethat captures the whole language (not only up to a certain role depth). Insteadof fixing a priori a role depth for mined CIs, we adapt the role depth dependingon the objects considered during the computation of CIs. Related work.
Several authors have worked on combining FCA and DLs or onapplying methods from one field to the other [21]. Baader uses FCA to computethe subsumption hierarchy of the conjunction of predefined con- cepts [1]. usesFCA to compute the subsumption hierarchy of the conjunction of predefinedconcepts. Rudolph uses the DL
FLE for the definition of FCA attributes andFCA techniques for generating a knowledge base [22, 23]. Baader et al. usesFCA for completing missing knowledge in a DL knowledge base [5] . Baaderet al. proposes a method for building DL ontologies through the interaction of ity Region ∃ partof . ⊤ Settlement a × × × b × × × c × × Fig. 1. (a) A dataset with 4 attributes and 3 objects. (b) The implications
City →∃ partof . ⊤ and City → Settlement hold in the dataset but not
City → Region . domain experts [7]. Sertkaya presents a survey on applications of FCA methodsin DLs [24]. Borchmann and Distel provide a practical application of the theorydeveloped by Distel on knowledge graphs [10]. Borchmann shows how a base ofconfident EL ⊥ gfp concept inclusions can be extracted from a DL interpretation [9].Monnin et al. compare, using FCA techniques, data present in DBpedia withthe constraints of a given ontology to check if the data is compliant with it [20].Krigel extends the results by Borchmann to a logic that is more expressive than EL ⊥ [15, 16].In the next section, we present basic definitions and notation. In Section 3,we present the problem of mining EL ⊥ CIs and establish lower bounds for thisproblem. In Section 4, we present our main result for mining EL ⊥ bases withadaptable role depth. Our result uses a notion that relates each vertex in agraph to a set of vertices, called maximum vertices from (MVF). In Section 5,we show that the MVF of a vertex in a graph can be computed in linear time inthe size of the graph. Missing proofs can be found in the long version [13]. We introduce the syntax and semantics of EL ⊥ and basic definitions related todescription graphs used in the paper. The Description Logic EL ⊥ EL ⊥ [3] is a lightweight DL, which only allows for expressing conjunctions andexistential restrictions. Despite this rather low expressive power, slight extensionsof it have turned out to be highly successful in practical applications, especiallyin the medical domain [25].We use two finite and disjoint sets, N C and N R , of concept and role namesto define the syntax and semantics of EL ⊥ . EL ⊥ concept expressions are builtaccording to the grammar rule C, D ::= A | ⊤ | ⊥ | C ⊓ D | ∃ r.C with A ∈ N C and r ∈ N R . We write ∃ r n +1 .C as a shorthand for ∃ r. ( ∃ r n .C ) where ∃ r .C := ∃ r.C .An EL ⊥ TBox is a finite set of concept inclusions (CIs) C ⊑ D , where C, D are EL ⊥ concept expressions. We may omit ‘ EL ⊥ ’ when we speak of conceptexpressions, CIs, and TBoxes, if this is clear from the context. We may write C ≡ D (an equivalence) as a short hand for when we have both C ⊑ D and D ⊑ C . The signature of a concept expression, a CI, or a TBox is the set ofconcept and role names occurring in it.he semantics of EL ⊥ is based on interpretations . An interpretation I is apair ( ∆ I , · I ) where ∆ I is a non-empty set, called the domain of I , and · I is afunction mapping each A ∈ N C to a subset A I of ∆ I and each r ∈ N R to a subset r I of ∆ I × ∆ I . The function · I extends to arbitrary EL ⊥ concept expressions asusual: ( C ⊓ D ) I := C I ∩ D I ( ⊤ ) I := ∆ I ( ⊥ ) I := ∅ ( ∃ r.C ) I := { x ∈ ∆ I | ( x, y ) ∈ r I and y ∈ C I } An interpretation I satisfies a CI C ⊑ D , in symbols I | = C ⊑ D , iff C I ⊆ D I .It satisfies a TBox T if it satisfies all CIs in T . A TBox T entails a CI C ⊑ D ,written T | = C ⊑ D , iff all interpretations satisfying T also satisfy C ⊑ D . Wewrite Σ I for the set of concept or role names X such that X I = ∅ . A finiteinterpretation is an interpretation with a finite domain. Description Graphs, Products, and Unravellings
We also use the notion of description graphs [2]. The description graph G ( I ) =( V I , E I , L I ) of an interpretation I is defined as (e.g. Figure 4):1. V I = ∆ I ;2. E I = { ( x, r, y ) | r ∈ N R and ( x, y ) ∈ r I } ;3. L I ( x ) = { A ∈ N C | x ∈ A I } .The description tree of an EL ⊥ concept expression C over the signature Σ is the finite directed tree G ( C ) = ( V C , E C , L C ) where V C is the set of nodes, E C ⊆ V C × N R × V C is the set of edges, and L C : V → N C is the labellingfunction. G ( C ) is defined inductively:1. for C = ⊤ , V C = { ρ C } and L C ( ρ C ) = ∅ where ρ C is the root node of thetree;2. for C = A ∈ N C , V C = { ρ C } and L C ( ρ C ) = A ;3. for C = D ⊓ D , G ( C ) is obtained by merging the roots ρ D , ρ D in one ρ C with L C ( ρ C ) = L D ( ρ D ) ∪ L D ( ρ D ) ;4. for C = ∃ r.D , G ( C ) is built from G ( D ) by adding a new node (root) ρ C to V D and an edge ( ρ C , r, ρ D ) to E D .The concept expression (unique up to logical equivalence) C ( G v ) of a tree shapedgraph G v = ( V, E, L ) rooted in v is k l i =1 P i ⊓ l l j =1 ∃ r j . C ( G w j ) , where L ( v ) = { P i | ≤ i ≤ k } , ( v, r j , w j ) ∈ E (and there are l such edges) and C ( G w j ) is inductively defined, with G w j being the subgraph of G rooted in w j .A walk in a description graph G = ( V, E, L ) between two nodes u, v ∈ V isa word w = v r v r . . . r n − v n where v = u , v n = v , v i ∈ V , r i ∈ N R and ity ⊓ ∃ government . Party ⊓∃ partof . ( Region ⊓ ∃ capital . ⊤ ) City PartyRegiongovern . partof capital Fig. 2.
A concept expression and its description graph. ( v i , r i , v i +1 ) ∈ E for all i ∈ { , . . . , n − } . The length of w in this case is n , insymbols, | w | = n . Walks with length n = 0 are possible, it means that the walkhas just one vertex (no edges). Vertices and edges may occur multiple times ina walk. Let G = ( V, E, L ) be an EL ⊥ description graph with x ∈ V and d ∈ N .Denote by δ ( w ) the last vertex in the walk w . The unravelling of G up to depth d is the description graph G xd = ( V d , E d , L d ) starting at node x defined as follows:1. V d is the set of all directed walks in G that start at x and have length atmost d ;2. E d = { ( w , r, w rv ) | v ∈ V, r ∈ N R , w , w rv ∈ V d } ;3. L d ( w ) = L ( δ ( w )) .A path is a walk where vertices do not repeat. ( i ) ab CityRegion ii ) a a b City Region iii ) a a ba b a City RegionCityRegion a b a b
21 1
Fig. 3.
Unravelling of the description graph of the interpretation I in ( i ) . For read-ability, partof has been replaced with symbol and capital with symbol . ( ii ) depicts G ( I ) a and ( iii ) depicts G ( I ) a . Let G , . . . , G n be n description graphs such that G i = ( V i , E i , L i ) . Then the product of G , . . . , G n is the description graph ( V, E, L ) defined as:1. V = × ni =1 V i ;2. E = { (( v , . . . , v n ) , r, ( w , . . . , w n )) | r ∈ N R , ( v i , r, w i ) ∈ E i , for all ≤ i ≤ n } ;3. L ( v , . . . , v n ) = T ni =1 L i ( v i ) .If each G i is a tree with root v i then we denote by Q ni =1 G i the tree rooted in ( v , . . . , v n ) contained in the product graph of G , . . . , G n . EL ⊥ Bases
The set of all EL ⊥ CIs that are satisfied by an interpretation I is in generalinfinite because whenever I | = C ⊑ D , I | = ∃ r.C ⊑ ∃ r.D as well. Therefore one x x x City Party , LiberalRegiongovern . partof capital x x x City Party , OrganizationRegiongovern . partofcapital Fig. 4.
Description graph of the interpretation I = {{ x , · · · , x } , · I } where { x , x } = City I , { x , x } = Party I , { ( x , x ) , ( x , x ) } = partof I , etc. is interested in a finite and small set of CIs that entails the whole set of validCIs. For mining such a set of CIs from a given interpretation we employ ideasfrom FCA and recall literature results. Definition 1.
A TBox T is a base for a finite interpretation I and a DL lan-guage L , if for every CI C ⊑ D , formulated within L and Σ I : I | = C ⊑ D iff T | = C ⊑ D .We say that a DL has the finite base property (FBP) if, for all finite inter-pretations I , there is a finite base with CIs formulated within the DL languageand Σ I . Not all DLs have the finite base property. Consider for instance thefragments EL ⊥ rhs (and EL ⊥ lhs ) of EL ⊥ that allows only concept names on the left-hand (right-hand) side but complex EL ⊥ concept expressions on the right-hand(left-hand) side of CIs. Proposition 1. EL ⊥ rhs and EL ⊥ lhs do not have the FBP. Proof. (Sketch) No finite base EL ⊥ rhs exists for the interpretation in Fig-ure 5 ( i ) . For every n ≥ , the EL ⊥ rhs base should entail the CI A ⊑ ∃ r n . ⊤ .Similarly, no finite EL ⊥ lhs base exists for the interpretation in Figure 5 ( ii ) . Forevery n ≥ , the EL ⊥ lhs base should entail the CI ∃ s. ∃ r n .B ⊑ A . ❏ ( i ) A rr ( ii ) A Brs rsr
Fig. 5.
Lack of the FBP for EL ⊥ rhs ( i ) and EL ⊥ lhs ( ii ) . The main difficulty in creating an EL ⊥ base is knowing how to define the roledepth of concept expressions in the base. In a finite interpretation, an arbitrarilylarge role depth means the presence of a cyclic structure in the interpretation.However, EL ⊥ concept expressions cannot express cycles. The difficulty can beovercomed by extending EL ⊥ with greatest fix-point semantics. It is known thathe resulting DL, called EL ⊥ gfp , has the FBP [4, 11]. The authors then show howto transform an EL ⊥ gfp base into an EL ⊥ base, thus, establishing that EL ⊥ alsoenjoys the FBP.In the following, we show that, although finite, the role depth of a base for EL ⊥ and a (finite) interpretation I can be exponential in the size of I . Example 2.
Consider I represented in the shaded area in Figure 6. For p =2 , p = 3 , p = 5 and for all k ∈ N + , we have that x i ∈ ( ∃ r k · p i − .A ) I , where ≤ i ≤ . We know that
30 = min ( T i =1 { k · p i | k ∈ N + } ) = Q ni =1 p i (whichis the least common multiple). We also know that for any n, p ∈ N + , n + 1 is amultiple of p iff n is a multiple of p minus . Therefore, the number d = min ( \ i =1 { k · p i − | k ∈ N + } ) , such that { x , x , x } = B I = ( ∃ r d .A ) I , is Q i =1 p i − . A base for I shouldhave the CI with role depth at least d because it has to entail the CI B ⊑ ∃ r d .A . Theorem 3.
There is a finite interpretation I = ( ∆ I , · I ) such that any EL ⊥ base for I has a concept expression with role depth exponential in the size of I . Proof. (Sketch) We can generalise Example 2 to the case where we have aninterpretation J that for an arbitrary n > , and for every i ∈ { , · · · , n } and k ∈ N + , there is an x ∈ ∆ J that satisfies x ∈ ( ∃ r k · p i − .A ) J where p i is the i -thprime number. In this case, the minimal role depth of concepts in any base for J must be d ≥ Q ni =1 p i − ≥ n . ❏ x ABr r x A B rrr x A B rrrrr x Br x A, Br
Fig. 6.
Description graph of an interpretation I . Let X = { x , x , x } . For all d < we have x ∈ C (cid:0)Q x ∈ X G ( I ) xd (cid:1) I = ( B ⊓ ∃ r d . ⊤ ) I . However, for all k ≥ , x C (cid:0)Q x ∈ X G ( I ) xk (cid:1) I since x ( ∃ r .A ) I . In addition to the role depth of the concept expressions in the base, thesize of the base itself can also be exponential in the size of the data given asinput, which is a well-known result in classical FCA [17]. The DL setting ismore challenging than classical FCA, and so, this lower bound also holds in theproblem we consider. In Section 4, we present our definition of an EL ⊥ base for afinite interpretation I and highlight cases in which the role depth is polynomialin the size of I . Adaptable Role Depth
We present in this section our main result which is our strategy to construct EL ⊥ bases with adaptable role depth. To define an EL ⊥ base, we use the notionof a model-based most specific concept (MMSC) up to a certain role depth.The MMSC plays a key rôle in the computation of a base from a given finiteinterpretation. Definition 2. An EL ⊥ concept expression C is a model-based most specificconcept of X ⊆ ∆ I with role depth d ≥ iff (1) X ⊆ C I , (2) C has role depthat most d , and (3) for all EL ⊥ concept expressions D with role depth at most d ,if X ⊆ D I then ∅ | = C ⊑ D .For a given X ⊆ C I and a role depth d there may be multiple MMSCs(always at least one [8]) but they are logically equivalent. So we write ‘ the ’ MMSCof X with role depth d (in symbols mmsc ( X, I , d ) ), meaning a representativeof such class of concepts. As a consequence of Definition 2, if X = ∅ then mmsc ( X, I , d ) ≡ ⊥ for any interpretation I and d ∈ N . Example 4.
Consider the interpretation I in Figure 4 and let X = { x , x } . Wehave that mmsc ( X, I , ≡ City ⊓ ∃ government . Party ⊓ ∃ partof . Region . With anincreasing k , the concept expression mmsc ( X, I , k ) can become more and morespecific. Indeed, mmsc ( X, I , ≡ mmsc ( X, I , ⊓ ∃ partof . ( Region ⊓ ∃ capital . ⊤ ) which is more specific than mmsc ( X, I , . However, for any k ≥ , we have that mmsc ( X, I , ≡ mmsc ( X, I , k ) .A straightforward (and inefficient) way of computing mmsc ( { X } , I , d ) , for afixed d , would be conjoining every EL ⊥ concept expression C (over N C ∪ N R ) suchthat X ⊆ C I and the depth of C is bounded by d . A more elegant method forcomputing MMSCs is based on the product of description graphs and unravellingcyclic concept expressions up to a sufficient role depth.The MMSC can be written as the concept expression obtained from the prod-uct of description graphs of an interpretation. Formally, if I = ( ∆ I , · I ) is a finiteinterpretation, X = { x , . . . , x n } ⊆ ∆ I and a d ≥ , then mmsc ( { X } , I , d ) ≡ C ( Q ni =1 G ( I ) x i d ) [8].The interesting challenge is how to identify the smallest d that satisfies theproperty: if x ∈ mmsc ( X, I , d ) I , then x ∈ mmsc ( X, I , k ) I for every k > d . Inthe following, we develop a method for computing MMSCs with a role depth thatis suitable for building an EL ⊥ base of the given interpretation. This method isbased on the already mentioned MVF notion, defined as follows. Definition 3.
Given a description graph G = ( V, E ) with u ∈ V , we define the maximum vertices from (or MVF) u in G , denoted mvf ( G , u ) , as: max { v num ( w ) | w is a walk in G starting at u } where v num ( w ) is the number of distinct vertices occurring in w . Additionally,we define the function mmvf as follows: mmvf ( G ) := max u ∈ V mvf ( G , u ) . n other words, MVF measures the maximum number of distinct verticesthat a walk with a fixed starting point can visit in the graph. Example 5.
Consider the interpretation I in Figure 4. Any walk in the descrip-tion graph of I starting at x will visit at most three distinct vertices (in-cluding x ). Although there are four vertices reachable from x , we have that mvf ( G ( I ) , x ) = 3 . For the vertex x , there are walks of any finite length, but wevisit at most three distinct vertices, namely, x , x , x , and mvf ( G ( I ) , x ) = 3 .For computing the MMSC up to a sufficient role depth based on MVF weuse the following notion of simulation. Definition 4.
Let G = ( V , E , L ) , G = ( V , E , L ) be EL ⊥ descriptiongraphs and ( v , v ) ∈ V × V . A relation Z ⊆ V × V is a simulation from ( G , v ) to ( G , v ) , if (1) ( v , v ) ∈ Z , (2) ( w , w ) ∈ Z implies L ( w ) ⊆ L ( w ) ,and (3) ( w , w ) ∈ Z and ( w , r, w ′ ) ∈ E imply there is w ′ ∈ V such that ( w , r, w ′ ) ∈ E and ( w ′ , w ′ ) ∈ Z .Simulations can be used to decide whether an individual from an interpreta-tion domain belongs to the extension of a given concept expression. Lemma 6 ([8]).
Let I be an interpretation, let C be an EL ⊥ concept expression,and let G ( C ) = ( V C , E C , L C ) be the EL ⊥ description graph of C with root ρ C .For every x ∈ ∆ I , there is a simulation from ( G ( C ) , ρ C ) to ( G ( I ) , x ) iff x ∈ C I . Lemma 6 together with other previous results is used below to prove Lemma 7,which is crucial for defining the adaptable role depth. It shows the upper boundon the required role depth of the MMSC.
Lemma 7.
Let I = ( ∆ I , · I ) be a finite interpretation and take an arbitrary X = { x , . . . , x n } ⊆ ∆ I , x ′ ∈ ∆ I , and k ∈ N . Let d = mvf n Y i =1 G ( I ) , ( x , . . . , x n ) ! · mvf ( G ( I ) , x ′ ) . If x ′ ∈ C ( Q ni =1 G ( I ) x i d ) I then x ′ ∈ C ( Q ni =1 G ( I ) x i k ) I . Proof. (Sketch) We show in the long version [13] the following claim.
Claim.
For all description graphs G = ( V, E, L ) and G ′ = ( V ′ , E ′ , L ′ ) , all vertices v ∈ V and v ′ ∈ V ′ , and d = mvf ( G , v ) · mvf ( G ′ , v ′ ) if there is a simulation Z d : ( G vd , v ) ( G ′ , v ′ ) , then there is a simulation Z k :( G vk , v ) ( G ′ v ′ ) for all k ∈ N .f k ≤ d , one can restrict Z d to the vertices of G vk , which would be a subgraphof G vd . Otherwise, the intuition behind this claim is that the pairs in Z d definea walk in G ′ for each walk in G that has length at most d − . And if a walk in G has length at least d − , then there is a vertex w that this walk visits twicewhile the image of this walk in G ′ also repeats a vertex at the same time. Thispaired repetition can be used to find a matching vertex in V ′ for each vertex of G vk by recursively shortening the walk that this vertex corresponds to if it haslength d or larger.Lemma 6 and x ′ ∈ C ( Q ni =1 G ( I ) x i d ) I imply that there is a simulation Z d from ( Q ni =1 G ( I ) x i d , ( x , . . . , x n )) to ( G ( I ) , x ′ ) . Then, by Claim 4 there is a sim-ulation Z k : ( Q ni =1 G ( I ) x i k , ( x , . . . , x n )) ( G ( I ) , x ′ ) (we just need to take G = Q ni =1 G ( I ) , G ′ = G ( I ) , v = ( x , . . . , x n ) and v ′ = x ′ ). Therefore, Lemma 6implies that x ′ ∈ C ( Q ni =1 G ( I ) x i k ) I . ❏ Lemma 7 shows that even for vertices that are parts of cycles, there is acertain depth of unravellings, which we call a fixpoint, that is guaranteed to bean upper bound.Proposition 8 gives an intuition about how large the MVF of a vertex in aproduct graph can be when compared to the MVF of the corresponding verticesin the product’s factors.
Proposition 8.
Let {G i | ≤ i ≤ n } be n description graphs such that G i =( V i , E i , L i ) . Also let v i ∈ V i . Then: mvf n Y i =1 G i , ( v , . . . , v n ) ! ≤ n Y i =1 mvf ( G i , v i ) . Proof.
Let w be an arbitrary walk in Q ni =1 G i , ( v i ) ≤ i ≤ n that starts in ( v , . . . , v n ) and let ( w , . . . , w n ) be a vertex in this walk. It follows from the def-inition of product that each w i belongs to a walk in G i that begins in v i . There-fore, there are only mvf ( G i , v i ) options for each w i . Hence, there are at most Q ni =1 mvf ( G i , v i ) possible options for ( w , . . . , w n ) . In other words, v num ( w ) ≤ Q ni =1 mvf ( G i , v i ) . Since w is arbitrary, we can conclude that mvf n Y i =1 G i , ( v , . . . , v n ) ! ≤ n Y i =1 mvf ( G i , v i ) . ❏ Although the MVF of a product can be exponential in | ∆ I | , there are manycases in which it is linear in | ∆ I | . Example 9 illustrates one such case. Example 9.
Consider the interpretation of Figure 4. The elements x , x , x , x and x never reach cycles, therefore, each of them can only have walks up toa finite length. Take X = { x , x } . Since every walk in G ( I ) starting from x as length at most , the longest walk possible in Q i ∈{ , } G ( I ) starting at node ( x , x ) is: ( x , x ) , partof , ( x , x ) , capital , ( x , x ) . Thus mvf Y i ∈{ , } G ( I ) , ( x , x ) = 2 . Take X = { x , x } . Since x and x do not share labels in their outgoing edges mvf Y i ∈{ , } G ( I ) , ( x , x ) = 1 . The observations about the MVF in Example 9 are generalised in Lemma 10which shows a sufficient condition for polynomial (linear) role depth.
Lemma 10.
Let I = ( ∆ I , · I ) be a finite interpretation and X = { x , . . . , x n } ⊆ ∆ I . If for some ≤ i ≤ n it holds that every walk in G ( I ) starting at x i has length at most m for some m ∈ N , then mvf ( Q ni =1 G ( I ) , ( x , . . . , x n )) ≤ mvf ( G ( I ) , x i ) . Proof. (Sketch) As it happens in Example 9, it can be proven that wheneverthere is a vertex x i for which every walk starting at it has length at most m , then m also bounds the lengths of the walks starting at ( x , . . . x n ) in Q ni =1 G ( I ) . ❏ Combining the bounds for the fixpoint and MVF given by Lemmas 7 and 10,we can define a function that returns an upper approximation of the fixpoint,for any subset of the domain of an interpretation, as follows.
Definition 5.
Let I = ( ∆ I , · I ) be a finite interpretation and X = { x , . . . , x n } ⊆ ∆ I . Also let X lim = { x ∈ X | ∃ m ∈ N : every walkstarting at x in G ( I ) has length ≤ m } . The function d I : P ( ∆ I ) N is defined as follows: d I ( X ) = ( d − if X lim = ∅ d · mmvf ( G ( I )) otherwise , where d = mvf ( Q ni =1 G ( I ) , ( x , . . . , x n )) .Next, we prove that function d I is indeed an upper bound for the fixpoint ofan MMSC. The idea sustaining Lemma 11 is that if x ∈ X ⊆ ∆ I and every walkin G ( I ) starting at x has length at most m , then m can be used as a fixpointdepth for the MMSC of X in I . Lemma 7 covers the cases where vertices arethe starting point of walks of any length. emma 11. Let I = ( ∆ I , · I ) be a finite interpretation and X ⊆ ∆ I . Then, forany k ∈ N , it holds that: mmsc ( X, I , d I ( X )) I ⊆ mmsc ( X, I , k ) I . Proof. (Sketch) Let X = { x , . . . , x n } ⊆ ∆ I . If k ≤ d I ( X ) , the lemma holdstrivially. For k > d I ( X ) we divide the proof in two cases. First, if there is a x i ∈ X such that every walk in G ( I ) starting at x i has length at most m forsome m ∈ N , then as stated in Lemma 10, every walk in Q ni =1 G ( I ) starting at ( x , . . . , x n ) has length at most mvf ( Q ni =1 G ( I ) , ( x , . . . , x n )) − .In other words, even when k > d I ( X ) , we have: n Y i =1 G ( I ) xk = n Y i =1 G ( I ) xd I ( X ) , and therefore, we can apply Lemma 6 to conclude that: mmsc ( X, I , d I ( X )) I ⊆ mmsc ( X, I , k ) I . Otherwise, if X lim = ∅ , the lemma is a direct consequence ofDefinition 5 and Lemma 7. ❏ In the remaining of this paper, we write mmsc ( X, I ) as a shorthand for mmsc ( X, I , d I ( X )) . An important consequence of Lemma 11 and the definitionof MMSC is that, for any EL ⊥ concept expression C and finite interpretation I ,it holds that C I = mmsc (cid:0) C I , I (cid:1) I . Lemma 12.
Let I = ( ∆ I , · I ) be a finite interpretation. Then, for all EL ⊥ con-cept expression C it holds that: mmsc (cid:0) C I , I (cid:1) I = C I . Proof.
Direct consequence of Lemma 4.4 (vi) of [8] and Lemma 11. ❏ We use this result below to define a finite set of concept expressions M I forbuilding a base of the CIs valid in I . Definition 6.
Let I = ( ∆ I , · I ) be a finite interpretation. The set M I is theunion of {⊥} ∪ N C and {∃ r. mmsc ( X, I ) | r ∈ N R and X ⊆ ∆ I , X = ∅} We also define Λ I = { d U | U ⊆ M I } .Building the base mostly relies on the fact that, given a finite interpretation I ,for any EL ⊥ concept expression C , there is a concept expression D ∈ Λ I suchthat C I = D I . Theorem 13.
Let I be a finite interpretation and let Λ I be defined as above.Then, B ( I ) = { C ≡ mmsc (cid:0) C I , I (cid:1) | C ∈ Λ I } ∪{ C ⊑ D | C, D ∈ Λ I and I | = C ⊑ D } is a finite EL ⊥ base for I . roof. (Sketch) As Λ I is finite, so is B ( I ) . The CIs are clearly sound and thesoundness of the equivalences is due to Lemma 12. For completeness, assumethat I | = C ⊑ D . Using an adaptation of Lemma 5.8 from [11] and Lemma 12above, we can prove, by induction on the structure of the concept expressions C and D , that there are concept expressions E, F ∈ Λ I such that B ( I ) | = E ≡ mmsc (cid:0) C I , I (cid:1) , B ( I ) | = F ≡ mmsc (cid:0) D I , I (cid:1) , B ( I ) | = C ≡ mmsc (cid:0) C I , I (cid:1) , and B ( I ) | = D ≡ mmsc (cid:0) D I , I (cid:1) . By construction, as E ⊑ F ∈ B ( I ) , we can provethat whenever I | = C ⊑ D , so does B ( I ) . ❏ Recall the interpretation I in Figure 6. In order to compute a base for I ,we should compute an MMSC with role depth at least . An important benefitof our approach is that the role depth of the other MMSCs, which are partof the mined CIs in the base may be smaller. For instance, the role depth of mmsc ( { x } , I ) is . In the next section, we show that one can compute theMVF of a vertex in a graph in linear time in the size of the graph. As discussed in Section 4, the MVF is the key to provide an upper bound for thefixpoint for each MMSC. An easy way to estimate the MVF would consist in com-puting the number of vertices reachable from v in the description graph G . Let reach ( G , v ) be such a function. By definition it holds that mvf ( G , v ) ≤ reach ( G , v ) .Although reach ( G , v ) can be computed in polynomial time, the difference betweenthese two metrics can be quite large. For instance, consider that v is the root ofa description graph G that is a binary tree with n nodes. Then mvf ( G , v ) = n ,while reach ( G , v ) = 2 n .In this section, we present an algorithm to compute mvf ( G , v ) that takeslinear time in the size of G , but first we need to recall some fundamental conceptsfrom Graph Theory, one of them is the notion of strongly connected components(Definition 7). Definition 7.
Let G = ( V, E, L ) be a description graph. The strongly connectedcomponents (SCCs) of G , in symbols SCC ( G ) , are the partitions V , . . . , V n of V such that for all ≤ i ≤ n : if u, v ∈ V i then there is a path from u to v and apath from v to u in G . Additionally, we define a function scc ( G , v ) , which returnsthe SCC of G that contains v .A compact way of representing a description graph G consists in regardingeach SCC in G as a single vertex. This compact graph is a directed acyclic graph(DAG), also called condensation of G [14], and it is formalised in Definition 8. Definition 8.
Let G = ( V, E, L ) be a description graph. The condensation of G is the directed acyclic graph G ∗ = ( V ∗ , E ∗ ) where V ∗ = { scc ( G , u ) | u ∈ V } and E ∗ = { ( scc ( G , u ) , scc ( G , v )) | ( u, r, v ) ∈ E and scc ( G , u ) = scc ( G , v ) } . Also, if w ∗ is path in G ∗ , the weight of w ∗ , in symbols weight ( G ∗ ) , is the sum of the sizes ofthe SCCs that appear as vertices of w ∗ . x } { x }{ x } { x } { x , x } { x } Fig. 7.
Condensation of the description graph in Figure 4. Every vertex is an SCCof the original graph and the edges indicate accessibility between the SCCs. Also, thecondensation has no labels.
We use these notions to link the MVF (Definition 3) to the paths in thecondensation graph in Lemma 14.
Lemma 14.
Let G = ( V, E, L ) be a description graph, let G ∗ = ( V ∗ , E ∗ ) be thecondensation of G , and v ∈ V . Then: mvf ( G , v ) = max { weight ( w ∗ ) | w ∗ is a path in G ∗ starting at scc ( G , v ) } . Proof. (Sketch) First we prove that every path w ∗ = V , . . . , V m in G ∗ start-ing at scc ( G , v ) induces a walk w in G starting at v with v num ( w ) = weight ( w ∗ ) .Then, we show that if w ∗ has maximal weight, then no walk in G starting at v can visit more than weight ( w ∗ ) vertices. ❏ By Lemma 14, we only need to compute the maximum weight of a path in G ∗ that starts at scc ( G ∗ , v ) to obtain the MVF of a vertex v in a description graph G . Algorithm 1 relies on this result and proceeds as follows: first, it computes theSCCs of the description graph and the condensation graph. Then, the algorithmtransverses the condensation graph, using an adaptation of depth-first search todetermine the maximum path weight for the initial SCC.Algorithm 1 assumes that the SCCs and condensation are computed cor-rectly. Besides keeping the computed values, the array wgt prevents recursivecalls on SCCs that have already been processed. According to Lemma 14, toprove that Algorithm 1 is correct we just need to prove that the function maxWeight in fact returns the maximum weight of a path in the condensationgiven a starting vertex (which corresponds to an SCC in the original graph). Lemma 15.
Given G = ( V, E, L ) and v ∈ V as input, Algorithm 1 returns themaximum weight of a path in the condensation of G starting at scc ( G , v ) . Proof. (Sketch) Let G ∗ = ( V ∗ , E ∗ ) be the condensation of G . If scc ( G , v ) has no successor in G ∗ , then the output of maxWeight is correct. If scc ( G , v ) has successors, then the maximum weight of a path staring at scc ( G , v ) in G ∗ is given by | scc ( G , v ) | plus the maximum value computed among its successors.This equation holds because G ∗ is a DAG. ❏ lgorithm 1: Computing MVF via Lemma 14
Input:
A description graph G = ( V, E, L ) and a vertex v ∈ V Output:
The MVF of v in G , i.e., mvf ( G, v ) V ∗ ← SCC ( G ) E ∗ ← condense ( G , V ∗ ) G ∗ ← ( V ∗ , E ∗ ) for V ′ ∈ V ∗ do wgt [ V ′ ] ← null return maxWeight ( G ∗ , scc ( G , v ) , wgt ) // Auxiliary function Function maxWeight ( G ∗ , V ′ , wgt ) : current ← for W ′ ∈ { U ′ ∈ V ∗ | ( V ′ , U ′ ) ∈ E ∗ } do if wgt [ W ′ ] = null then current ← max( current, maxWeight ( G ∗ , W ′ , wgt )) else current ← wgt [ W ′ ] wgt [ V ′ ] ← current + | V ′ | return wgt [ V ′ ] Lemmas 14 and 15 imply that Algorithm 1 computes the MVF of v in G correctly. Moreover, the computation of SCCs can be done in time O ( | V | + | E | ) [26], the condensation in time O ( | E | ) [19] and the depth-first transversal via maxWeight in time O ( | V | + | E | ) . Hence, it is possible to compute the MVF ofa vertex in a graph in linear time in the size of the description graph even ifit consists solely of cycles. Yet, given an interpretation I = ( ∆ I , · I ) the graphgiven as input to Algorithm 1 might be a product graph with an exponentialnumber of vertices in | ∆ I | . Also, Algorithm 1 can be modified to compute theMVF for all vertices by starting the function maxWeight from an unvisited SCCuntil all vertices are visited in polynomial time in the size of the graph. In this work, we introduce a way of computing EL ⊥ bases from finite interpre-tations that adapts the role depth of concepts according to the the structure ofinterpretations. Our definition relies on a notion that relates vertices in a graphto sets of vertices, called MVF. We have also shown that the MVF computa-tion can be performed in polynomial time in the size of the underlying graphstructure. Our EL ⊥ base, however, is not minimal. As future work, we plan tobuild on previous results combining FCA and DLs to define a base with minimalcardinality. We will also investigate the problem of mining CIs in the presence ofnoise in the dataset. We plan to use the support and confidence measures fromassociation rule mining to deal with noisy data and implement our approachusing knowledge graphs as datasets. cknowledgements Parts of this work have been done in the context of CEDAS (Center for DataScience, University of Bergen, Norway). This work was supported by the FreeUniversity of Bozen-Bolzano, Italy, under the project PACO. ibliography [1] Franz Baader. Computing a minimal representation of the subsumptionlattice of all conjunctions of concepts defined in a terminology. In
Proc.Intl. KRUSE Symposium , pages 168–178, 1995.[2] Franz Baader. Terminological cycles in a description logic with existentialrestrictions. In
IJCAI , pages 325–330. Morgan Kaufmann, 2003.[3] Franz Baader, Sebastian Brandt, and Carsten Lutz. Pushing the EL en-velope. In Leslie Pack Kaelbling and Alessandro Saffiotti, editors, IJCAI ,pages 364–369. Professional Book Center, 2005.[4] Franz Baader and Felix Distel. A finite basis for the set of EL -implicationsholding in a finite model. In Raoul Medina and Sergei Obiedkov, editors, ICFCA 2008 , pages 46–61. Springer-Verlag, 2008.[5] Franz Baader, Bernhard Ganter, Barış Sertkaya, and Ulrike Sattler. Com-pleting description logic knowledge bases using formal concept analysis. InManuela M. Veloso, editor,
IJCAI , pages 230–235. AAAI Press, 2007.[6] Franz Baader, Ian Horrocks, Carsten Lutz, and Ulrike Sattler.
An Intro-duction to Description Logic . Cambridge University Press, 2017.[7] Franz Baader and Ralf Molitor. Building and structuring description logicknowledge bases using least common subsumers and concept analysis. In
ICCS , pages 292–305. Springer, 2000.[8] D. Borchmann, F. Distel, and F. Kriegel. Axiomatisation of general con-cept inclusions from finite interpretations.
Journal of Applied Non-ClassicalLogics , 26(1):1–46, jan 2016.[9] Daniel Borchmann.
Learning Terminological Knowledge with High Confi-dence from Erroneous Data . PhD thesis, Dresden University of Technology,2014.[10] Daniel Borchmann and Felix Distel. Mining of el-gcis. In Myra Spiliopoulou,Haixun Wang, Diane J. Cook, Jian Pei, Wei Wang, Osmar R. Zaïane, andXindong Wu, editors,
Data Mining Workshops (ICDMW), 2011 IEEE 11thInternational Conference on , pages 1083–1090. IEEE Computer Society,2011.[11] Felix Distel.
Learning description logic knowledge bases from data usingmethods from formal concept analysis . PhD thesis, Dresden University ofTechnology, 2011.[12] Bernhard Ganter and Rudolf Wille.
Formal Concept Analysis: MathematicalFoundations . Springer, Berlin/Heidelberg, 1999.[13] Ricardo Guimarães, Ana Ozaki, Cosimo Persia, and Baris Sertkaya. Min-ing EL ⊥ bases with adaptable role depth. Technical report, 2020. .[14] Frank Harary, Robert Z. Norman, and Dorwin Cartwright. Structural mod-els: an introduction to the theory of directed graphs . John Wiley & Sons,New York, 1965.15] Francesco Kriegel.
Constructing and Extending Description Logic Ontolo-gies using Methods of Formal Concept Analysis . PhD thesis, TechnischeUniversität Dresden, Dresden, Germany, 2019.[16] Francesco Kriegel. Learning Description Logic Axioms from Discrete Proba-bility Distributions over Description Graphs. In Francesco Calimeri, NicolaLeone, and Marco Manna, editors,
JELIA 2019 , pages 399–417. Springer,2019.[17] Sergei O. Kuznetsov. On the intractability of computing the duquenne-guigues base.
J. UCS , 10(8):927–933, 2004.[18] Jens Lehmann, Robert Isele, Max Jakob, Anja Jentzsch, Dimitris Kon-tokostas, Pablo N. Mendes, Sebastian Hellmann, Mohamed Morsey, Patrickvan Kleef, Sören Auer, and Christian Bizer. Dbpedia - A large-scale, multi-lingual knowledge base extracted from wikipedia.
Semantic Web , 6(2):167–195, 2015.[19] Silvano Martello and Paolo Toth. Finding a minimum equivalent graph ofa digraph.
Networks , 12(2):89–100, 1982.[20] Pierre Monnin, Mario Lezoche, Amedeo Napoli, and Adrien Coulet. Usingformal concept analysis for checking the structure of an ontology in LOD:the example of dbpedia. In
ISMIS , pages 674–683. Springer, 2017.[21] Ana Ozaki. Learning description logic ontologies: Five approaches. wheredo they stand?
KI - Künstliche Intelligenz , 04 2020.[22] Sebastian Rudolph. Exploring relational structures via
FLE . In Karl ErichWolff, Heather D. Pfeiffer, and Harry S. Delugach, editors,
ICCS , pages196–212. Springer-Verlag, 2004.[23] Sebastian Rudolph.
Relational exploration: Combining Description Log-ics and Formal Concept Analysis for knowledge specification . PhD the-sis, Fakultät Mathematik und Naturwissenschaften, TU Dresden, Germany,2006.[24] Barış Sertkaya. A survey on how description logic ontologies benefit fromformal concept analysis. In Marzena Kryszkiewicz and Sergei Obiedkov,editors,
CLA , volume 672 of
CEUR Workshop Proceedings , pages 2–21, 2010.[25] K.A. Spackman, K.E. Campbell, and R.A. Cote. SNOMED RT: A referenceterminology for health care.
J. American Medical Informatics Association ,pages 640–644, 1997. Fall Symposium Supplement.[26] Robert Tarjan. Depth-first search and linear graph algorithms.
SIAM Jour-nal on Computing , 1(2):146–160, jun 1972.
Proofs for Section 3
We prove that EL rhs and EL lhs do not have the finite base property (Proposi-tions 16 and 17). Proposition 16. EL ⊥ rhs does not have the finite base property. Proof.
Consider the interpretation I = ( { x , x } , · I ) where { ( x , x ) , ( x , x ) } = r I , { x } = A I and every other concept and role name is mapped by · I to ∅ (Fig-ure 5 ( i )). In I , A I = { x } and for all n ∈ N + , x ∈ ( ∃ r n . ⊤ ) I . Assume that B is a base for I and EL rhs . As B is a (finite) TBox formulated in EL rhs withsymbols from Σ I , it can only have CIs of the form A ⊑ C . Since I | = A ⊑ ∃ r n . ⊤ ,for all n ∈ N + , it follows that B is infinite, which is a contradiction. ❏ Proposition 17. EL ⊥ lhs does not have the finite base property. Proof.
In this proof, assume that CIs are formulated in EL lhs . Consider theinterpretation I = ( { x , x , x , x } , · I ) with r I = { ( x , x ) , ( x , x ) , ( x , x ) } s I = { ( x , x ) , ( x , x ) } A I = { x } B I = { x } and every other concept and role name is mapped by · I to ∅ (see Figure 5 ( ii )).By definition of I , for all n ∈ N + , we have that I | = ∃ s. ∃ r n .B ⊑ A . So if B is a base for EL lhs and I then B | = ∃ s. ∃ r n .B ⊑ A for all n ∈ N + . Now, observethat there is no D such that1. ∅ | = ∃ s. ∃ r n .B ⊑ D ,2. ∅ D ⊑ ∃ s. ∃ r n .B (where means ‘does not entail’),3. and I | = D ⊑ A .The reason for the above is because x ∈ D I for all D satisfying (1) and (2)but x A I . Moreover, there is no k ∈ N + such that I | = ∃ r k .B ⊑ B or I | = ∃ r k .B ⊑ A (because x B I and x , x A I but x , x ∈ ( ∃ r k .B ) I ). So, B can only entail ∃ s. ∃ r n .B ⊑ A if there is a CI in B with a concept equivalentto ∃ s. ∃ r n .B . This concept needs to have role depth n . Since B | = ∃ s. ∃ r n .B ⊑ A for all n ∈ N + , there are CIs with role depth n for all n ∈ N + . This means that B cannot be finite. ❏ ext, we prove the result which shows that the depth of roles in a base hasan exponential lower bound. Theorem 3.
There is a finite interpretation I = ( ∆ I , · I ) such that any EL ⊥ base for I has a concept expression with role depth exponential in the size of I . Proof.
For any n ≥ , we consider the interpretation I where for every i ∈ { , · · · , n } and k ≥ , there is x i ∈ ∆ I that satisfies x i ∈ ( ∃ r k · p i − .A ) I , x i ∈ B I , and x i ( ∃ r l .A ) I for l
6∈ { k · p i − | k ≥ } where p i is the i -th primenumber.We know that min( T ni =1 { k · p i | k ≥ } ) = Q ni =1 p i (which is the least commonmultiple). We also know that for any n, p ∈ N + , n + 1 is a multiple of p iff n isa multiple of p minus . Therefore, d = min ( T ni =1 { k · p i − | k ≥ } ) , is theminimal number such that B I = ( ∃ r d .A ) I . Since d = Q ni =1 p i − ≥ n , thestatement holds because a base for I should entail the CI B ⊑ ∃ r d .A . For thisto happen, it should have a CI with role depth at least d . ❏ B Proofs for Section 4
Now we will prove Claim 4, which is part of Lemma 7 that underlies our ap-proach. Before that, we need an additional result regarding simulations, whichallows us to view them as functions.
Lemma 18.
Let G = ( V , E , L ) and G = ( V , E , L ) be two EL ⊥ descrip-tion graphs. Let Z : ( G , v ) ( G , v ) be a simulation. Then, there exists asimulation Z ′ : ( G , v ) ( G , v ) such that for every v ∈ V , there is at mostone w ∈ V such that ( v, w ) ∈ Z ′ . Proof.
Assume that Z is a simulation from ( G , v ) to ( G , v ) . If it satisfiesthe property that for every v ∈ V , there is at most one w ∈ V such that ( v, w ) ∈ Z , we can take Z = Z ′ .Let Z ′ be such that { ( v , v ) } ⊆ Z ′ ⊆ Z . Also, suppose that it satisfies thefollowing properties. – If ( v, w ) ∈ Z , then exists w ′ ∈ V such that ( v, w ′ ) ∈ Z ′ . – If ( v, w ) ∈ Z ′ and ( v, w ′ ) ∈ Z ′ then w = w ′ .A subset Z ′ ⊆ Z satisfying these two properties always exists: we just leavein Z ′ one pair ( v, w ) for each v ∈ V such that ( v, w ′ ) ∈ Z for some w ′ ∈ V .We will show that if ( v , v ) ∈ Z ′ , then Z ′ is a simulation from ( G , v ) to ( G , v ) .1. ( v , v ) ∈ Z ′ is assumed.2. If ( v, w ) ∈ Z ′ , then ( v, w ) ∈ Z , therefore L ( v ) ⊆ L ( w ) since Z is a simula-tion.. If ( v, w ) ∈ Z ′ and ( v, r, v ′ ) ∈ E , then we know that ( w, r, w ′ ) ∈ E andthat ( v ′ , w ′ ) ∈ Z for some w ′ ∈ V . If ( v ′ , w ′ ) ∈ Z ′ then (3) holds for Z ′ .Otherwise, by construction of Z ′ , there is a w ′ ∈ V such that ( w ′ , r, w ′ ) ∈ E and ( v ′ , w ′ ) ∈ Z ′ , which proves (3) for Z ′ in this case.Therefore, Z ′ : ( G , v ) ( G , v ) is a simulation such that for every v ∈ V ,there is at most one w ∈ V such that ( v, w ) ∈ Z ′ . ❏ Now we proceed to the claim’s actual proof.
Claim.
For all description graphs G = ( V, E, L ) and G ′ = ( V ′ , E ′ , L ′ ) , all vertices v ∈ V and v ′ ∈ V ′ , and d = mvf ( G , v ) · mvf ( G ′ , v ′ ) if there is a simulation Z d : ( G vd , v ) ( G ′ , v ′ ) , then there is a simulation Z k :( G vk , v ) ( G ′ v ′ ) for all k ∈ N . Proof.
Let G , G ′ , v and v ′ as stated earlier and consider the unravellings G vd = ( V d , E d , L d ) and G vk = ( V k , E k , L k ) of G . Now, assume that there is a simulation Z d : ( G vd , v ) ( G ′ , v ′ ) . By Lemma 18,we can assume w.l.o.g. that for each w ∈ V d there exists at most one u ∈ V ′ such that ( w , u ) ∈ Z d . Therefore, we can define a function z such that z ( w ) isthe only vertex in V ′ such that ( w , z ( w )) ∈ Z d .If k ≤ d then, as G vk is a subtree of G vd (and thus, V k ⊆ V d ), one can just take Z k = { ( w , z ( w )) | w ∈ V k } as simulation. We now argue about the case where k > d . Recall that the function δ returns the vertex of a graph that occurs atend of a path. We show that in any path of length d in G vd , there are two vertices w and w such that δ ( w ) = δ ( w ) and z ( w ) = z ( w ) .In what follows, we use the fact that unravellings are trees, and thus, for eachvertex in an unravelling, there is exactly one path starting from the root to it.So we can refer to this path without ambiguity. Moreover, if w is a vertex in anunravelling with root v , then the path distance of w is the length of the pathfrom v to w .Now, let w = w r . . . r n − w n be a vertex in V d and let w i = w r . . . r i − w i for ≤ i ≤ n be the vertices in the path from v to w ( w = v and w n = w ).The path from v to w in G vd determines a walk w ∗ in G starting at v as follows: w ∗ = δ ( w ) r . . . r n − δ ( w n ) . Due to the definition of mvf there can be at most mvf ( G , v ) distinct values of δ for all vertices in the path from v to w , that is, |{ δ ( w i ) | ≤ i ≤ n }| ≤ mvf ( G , v ) .As Z d is a simulation, the path from v to w also determines a walk in G ′ starting at v ′ : w ′ = z ( w ) r . . . r n − z ( w n ) . Again, due to the definition of mvf there can be at most mvf ( G ′ , v ′ ) distinctvalues of z for all vertices in the path from v to w , that is, |{ z ( w i ) | ≤ i ≤ }| ≤ mvf ( G , v ) . Therefore, there are at most mvf ( G , v ) · mvf ( G ′ , v ′ ) = d distinctpairs ( δ ( w ′ ) , z ( w ′ )) , where w ′ is a vertex in the path from v to w , i.e., |{ ( δ ( w i ) , z ( w i )) | ≤ i ≤ n }| ≤ d. If a vertex w has path distance d from v in G vd , then there are d + 1 verticesin the path from v to w . As there are at most d distinct pairs ( δ ( w ′ ) , z ( w ′ )) ,where w ′ is a vertex in this path, and d + 1 vertices in the path from v to w ,the pigeonhole principle implies that there will be two vertices w , w ∈ V d inthe path from v to w such that both z ( w ) = z ( w ) and δ ( w ) = δ ( w ) .Let V ⊆ V d be the set of all vertices such that there are no two distinctvertices w and w on the path from v to w with δ ( w ) = δ ( w ) and z ( w ) = z ( w ) . Because of the previous argument, V contains only vertices whose pathdistance from v is strictly less than d .Since G vd is a description tree with root v , there is exactly one directed pathfrom v to any given vertex w ∈ V d . Hence, if w ∈ V then every vertex w ′ on thepath from v to w in G vd is also in V . In other words, V spans a subtree of G vd .Now, let us consider the set V + composed by the direct successors of theleaves of the subtree determined by V , that is, V + = { w r . . . r n − w n ∈ V d \ V | w r . . . r n − w n − ∈ V } . Since each vertex in V has path distance at most d − from v , each vertex V + has path distance at most d from v . Together with thefact that V spans a subtree of G vd , for each vertex w ∈ V d with path distance d from v , there is exactly one vertex w ′ ∈ V + in the path from v to w (includingthe extremities).As we assume k > d , we know that G vd is a subtree of G vk , hence V also spansa subtree of G vk . Therefore V ∪ V + ∈ V k and for every vertex w ∈ V k there isexactly one vertex w ′ in V + in the path from v to w in G vk . For each vertex w ∈ V k , such w ′ can be used to build a simulation from Z d that includes w , aswe will show next.For each vertex w ∈ V ∪ V + , there is exactly one vertex w ′ in V in the pathfrom v to w such that δ ( w ) = δ ( w ′ ) and z ( w ) = z ( w ′ ) . Therefore, we can definea function s : V ∪ V + V which retrieves such vertex for every w ∈ V ∪ V + .Now, we can use this function s to find an alternative path in V d for eachvertex in V k when extending Z d to the vertices in V k \ V d . This notion is formalisedby the function f : V k V defined next, where w = w r . . . w | w |− r | w |− w | w | . f ( w ) = ( s ( w ) if w ∈ V ∪ V + f ( f ( w r . . . w | w |− ) r | w |− w | w | ) otherwise.To clarify the rôle of f in this proof, consider a vertex w = w r . . . r n − w n ∈ V k with n > d . As before, let w i = w r . . . r i − w i for ≤ i ≤ n be the vertices inthe path from v to w . Since the path distance from v to w is more than d , weknow that there is one ≤ m ≤ n such that w m ∈ V + . We also know that theres one ≤ j < m such that s ( w j ) = w m . When applying f to w , we obtain thefollowing: f ( w ) = f ( . . . f . . . f ( f ( w m ) r m w m +1 ) . . . ) r n − w n ) . Since w m ∈ V + , we have that f ( w m ) = w j , which is closer to v than w m . As aconsequence of s ( w j ) = w m and the definitions of unravelling and simulation, weknow that ( δ ( w j ) , r m , δ ( w m +1 )) ∈ E and ( z ( w j ) , r m , z ( w m +1 )) ∈ E ′ . Becausethe relation between vertices in V + and their image via the function s holds ineach step of the recursion, we can add ( w , z ( f ( w )) to Z d for every vertex in V k creating a new simulation.We use this observation to define the relation Z k as: Z k = { ( w , z ( f ( w )) | w ∈ V k } . Now we show that Z k is a simulation from ( G vk , v ) to ( G ′ , v ′ ) .1. Since v ∈ V and Z d is a simulation satisfying the property of Lemma 18, ( v, z ( f ( v ))) = ( v, z ( v )) = ( v, v ′ ) .2. Since Z d is a simulation and f ( w ) ∈ V d : L k ( w ) = L ( δ ( w )) = L ( δ ( f ( w )))= L d ( f ( w )) ⊆ L ′ ( z ( f ( w ))) .
3. Let w ∈ V k and assume that ( w , r, w ry ) ∈ E k .If w ry ∈ V ∪ V + , then w ∈ V . Therefore, ( w , r, w ry ) ∈ E d . We also have: ( z ( f ( w )) , r, z ( f ( w ry ))) = ( z ( s ( w )) , r, z ( s ( w ry )))= ( z ( w ) , r, z ( w ry )) . Moreover, ( z ( w ) , r, z ( w ry )) ∈ E ′ because Z d is a simulation. Finally, byconstruction, ( w ry, z ( w ry )) ∈ Z k .Otherwise, if w ry V ∪ V + , we have that f ( w ry ) = f ( f ( w ) ry ) . Since f ( w ) ∈ V , f ( w ) ry ∈ V ∪ V + and consequently f ( f ( w ) ry ) = s ( f ( w ) ry ) .By the definition of s : z ( s ( f ( w ) ry )) = z ( f ( w ) ry ) = z ( f ( w ry )) . Since Z d is a simulation and f ( w ) ∈ V d , it holds that ( z ( f ( w )) , r, z ( f ( w ) ry )) =( z ( f ( w )) , r, z ( f ( w ry ))) ∈ E ′ . Thus, ( w ry, z ( f ( w ) ry )) = ( w ry, z ( f ( w ry )) ∈ Z k which concludes the proof of (S3) for Z k .Therefore, Z k is a simulation from ( G vk , v ) to ( G ′ , v ′ ) , which proves the claim. ❏ emma 10 refers to walks in a product graph. To simplify its proof we high-light a relationship between walks in the product graph and walks in their factorsvia Proposition 19. Proposition 19.
Let G , . . . , G n be n description graphs, with G i = ( V i , E i , L i ) for ≤ i ≤ n . It holds that, for each walk w in Q ni =1 G i starting at ( v , . . . , v n ) ,there is a walk in G i starting at v i with the same length, for all ≤ i ≤ n . Proof.
Let w be a walk in Q ni =1 G i starting in ( v , . . . , v n ) with length m asfollows: w = ( w , , . . . , w n, ) r . . . r m − ( w ,m − , . . . , w n,m )) . The walk w i = w i, r . . . r m − w i,m is a walk in G i because w i,j ∈ V i for ≤ j Lemma 10. Let I = ( ∆ I , · I ) be a finite interpretation and X = { x , . . . , x n } ⊆ ∆ I . If for some ≤ i ≤ n it holds that every walk in G ( I ) starting at x i has length at most m for some m ∈ N , then mvf ( Q ni =1 G ( I ) , ( x , . . . , x n )) ≤ mvf ( G ( I ) , x i ) . Proof. Let X = { x , . . . , x n } ⊆ ∆ I and let X lim = { x ∈ X | ∃ m ∈ N : every walkstarting from x in G ( I ) has length ≤ m } . Assume X lim = ∅ and let x ′ ∈ X lim be such that mvf ( G ( I ) , x ′ ) = min x ∈ X lim mvf ( G ( I ) , x ) . Since x ′ ∈ X lim , every walk in G ( I ) starting at x ′ has length bounded by mvf ( G ( I ) , x ′ ) − . Due to the definition of product of description graphs (re-call how the edges are built), this limitation extends to every walk in Q ni =1 G ( I ) starting at ( x , . . . , x n ) : they have length at most min x ∈ X lim mvf ( G ( I ) , x ) − .If there was a longer walk, there would be also a walk in in G ( I ) starting at x ′ with the same length due to Proposition 19. ❏ In the following, we prove that our adaptable role depth yields an upperbound of the actual fixpoint for an MMSC. Lemma 11. Let I = ( ∆ I , · I ) be a finite interpretation and X ⊆ ∆ I . Then, forany k ∈ N , it holds that: mmsc ( X, I , d I ( X )) I ⊆ mmsc ( X, I , k ) I . roof. Let X = { x , . . . , x n } ⊆ ∆ I and X lim = { x ∈ X | ∃ m ∈ N : every walkstarting from x in G ( I ) has length ≤ m } . If k ≤ d I ( X ) the lemma holds trivially. For k > d I ( X ) we divide the proof intwo cases. First, if X lim = ∅ then as stated in Lemma 10, every walk in Q ni =1 G ( I ) starting at ( x , . . . , x n ) has length at most mvf ( Q ni =1 G ( I ) , ( x , . . . , x n )) − d I ( X ) .In other words, even when k > d I ( X ) , we have: Q ni =1 G ( I ) xk = Q ni =1 G ( I ) xd I ( X ) ,and therefore, we can apply Lemma 6 to conclude that: mmsc ( X, I , d I ( X )) I ⊆ mmsc ( X, I , k ) I . Otherwise, if X lim = ∅ , we can use the fact that mmvf ( G ) ≥ mvf ( G , x ′ ) ∀ x ′ ∈ ∆ I to obtain: d I ( X ) ≥ mvf n Y i =1 G ( I ) , ( x , . . . , x n ) ! · mvf ( G ( I ) , x ′ ) . Hence, if X lim = ∅ , the lemma is a direct consequence of Definition 5 andLemma 7. ❏ To prove that B ( I ) defined in Theorem 13 is a base, we first recall a resultrelated to the notion of MMSC. Lemma 20. [8] Let I = ( ∆ I , · I ) be a finite EL ⊥ interpretation. For all X ⊆ ∆ I and k ∈ N , it holds that ∅ | = mmsc (cid:16) mmsc ( X, I , k ) I , I , k (cid:17) ≡ mmsc ( X, I , k ) . We will also need a property regarding the construction of concept expres-sions with MMSCs. Lemma 21 (Adaptation of Proposition A.1 from [8]). For all EL ⊥ conceptexpressions C, D over N C ∪ N R and all r ∈ N R it holds that: ( mmsc (cid:0) C I , I (cid:1) ⊓ D ) I = ( C ⊓ D ) I , ( ∃ r. ( mmsc (cid:0) C I , I (cid:1) )) I = ( ∃ r.C ) I . Then, we define for each concept expression C and interpretation I a specificconcept in Λ I which is called the lower approximation of C in I . We recall that,for X ⊆ ∆ I , we write mmsc ( X, I ) as a shorthand for mmsc ( X, I , d I ( X )) . Definition 9 (Lower Approximation (adapted from Definition 5.4 in[11])). Let C be an EL ⊥ concept expression and I = ( ∆ I , · I ) a model. Alsolet N C ∪ N R be a finite signature and EL ⊥ ( N C , N R ) the set of all EL ⊥ conceptxpressions over N C ∪ N R . Then, there are concept names U ⊆ N C and pairs Π ⊆ N R × EL ⊥ ( N C , N R ) such that: C = l U ⊓ l ( r,E ) ∈ Π ∃ r.E We define the lower approximation of C in I as: approx ( C, I ) = ( d U ⊓ d ( r,E ) ∈ Π ∃ r. mmsc (cid:0) E I , I (cid:1) if C = ⊥ , ⊥ otherwise.Concept expressions built according to Definition 9 are always elements of Λ I because they are a conjunction of elements in M I (Definition 6). Next, with astraightforward, but nevertheless important, adaptation of the Lemma 5.8 from[11] we prove that the lower approximation of a concept and the concept itselfhave the same extension. Lemma 22. Let C be an EL ⊥ concept expression and I = ( ∆ I , · I ) a model. Itholds that mmsc (cid:0) C I , I (cid:1) I = approx ( C, I ) I = C I . Proof. If C = ⊥ then mmsc (cid:0) C I , I (cid:1) I = approx ( C, I ) I = ∅ . Otherwise, thereare concept names U ⊆ N C and pairs Π ∈ N R × EL ⊥ ( N C , N R ) such that C = l U ⊓ l ( r,E ) ∈ Π ∃ r.E Using Lemma 21 we obtain: C I = ( l U ⊓ l ( r,E ) ∈ Π ∃ r.E ) I = ( l U ⊓ l ( r,E ) ∈ Π ∃ r. mmsc (cid:0) E I , I (cid:1) ) I = ( approx ( C, I )) I Finally, we can apply Lemma 12 obtaining mmsc (cid:0) C I , I (cid:1) I = approx ( C, I ) I . ❏ Using these results, we can conclude that for each MMSC there is a conceptexpression in Λ I with the same extension in I . With this observation we can wecan proceed to Theorem 13’s proof. Theorem 13. Let I be a finite interpretation and let Λ I be defined as above.Then, B ( I ) = { C ≡ mmsc (cid:0) C I , I (cid:1) | C ∈ Λ I } ∪{ C ⊑ D | C, D ∈ Λ I and I | = C ⊑ D } s a finite EL ⊥ base for I . Proof. As Λ I is finite, so it is B ( I ) . The concept inclusions are clearly soundand the soundness of the equivalences is due to Lemma 12.Let J = ( ∆ J , · J ) be an arbitrary interpretation such that J | = B ( I ) . Forcompleteness, we prove that for any EL ⊥ concept expression C , J | = C ≡ mmsc (cid:0) C I , I (cid:1) . We prove this claim by induction of the structure of C . Base case: If C = ⊥ or C = A where A ∈ N C , then C ∈ Λ I , by definition of Λ I .Then, by definition of B ( I ) , we have that C ≡ mmsc (cid:0) C I , I (cid:1) ∈ B ( I ) . Step case ( ⊓ ): Suppose C = E ⊓ F and the claim holds for E and F . By the in-ductive hypothesis, B ( I ) | = E ≡ mmsc (cid:0) E I , I (cid:1) and B ( I ) | = F ≡ mmsc (cid:0) F I , I (cid:1) .Hence, for all interpretations J such that J | = B ( I ) , we have that E J = mmsc (cid:0) E I , I (cid:1) J and F J = mmsc (cid:0) F I , I (cid:1) J . By Lemma 22, there are E, F ∈ Λ I such that mmsc (cid:0) E I , I (cid:1) I = E I and mmsc (cid:0) F I , I (cid:1) I = F I . Moreover, byLemma 12, mmsc (cid:0) E I , I (cid:1) I = E I and mmsc (cid:0) F I , I (cid:1) I = F I . Therefore ( E ⊓ F ) I = E I ∩ F I = E I ∩ F I = ( E ⊓ F ) I .As E ⊓ F ∈ Λ I (up to logical equivalence), E ⊓ F ≡ mmsc (cid:0) ( E ⊓ F ) I , I (cid:1) ∈B ( I ) (again up to logical equivalence). Since J is a model of B ( I ) , by Lemma 21: (cid:0) E ⊓ F (cid:1) J = mmsc (cid:0) ( E ⊓ F ) I , I (cid:1) J = mmsc (cid:0) ( E ⊓ F ) I , I (cid:1) J = mmsc (cid:0) C I , I (cid:1) J . To prove that C J = mmsc (cid:0) C I , I (cid:1) J , in the following, we write C as ashorthand for E ⊓ F and show that C J = C J . Since E ∈ Λ I , we have that B ( I ) | = E ≡ mmsc (cid:16) E I , I (cid:17) . Moreover, as mmsc (cid:0) E I , I (cid:1) I = E I , we have that B ( I ) | = E ≡ mmsc (cid:16) mmsc (cid:0) E I , I (cid:1) I , I (cid:17) . By Lemma 20, it follows that ∅ | = mmsc (cid:16) mmsc (cid:0) E I , I (cid:1) I , I (cid:17) ≡ mmsc (cid:0) E I , I (cid:1) . Therefore, B ( I ) | = E ≡ mmsc (cid:0) E I , I (cid:1) and as B ( I ) | = E ≡ mmsc (cid:0) E I , I (cid:1) , then B ( I ) | = E ≡ E . Similarly we obtain B ( I ) | = F ≡ F and that B ( I ) | = C ≡ C .As J was an arbitrarily chosen model of B ( I ) , we conclude that B ( I ) | = C ≡ mmsc (cid:0) C I , I (cid:1) and B ( I ) | = C ≡ C . tep case ( ∃ ): In this case, C = ∃ r.E for some r ∈ N R and EL ⊥ concept expres-sion E . Let J be an interpretation such that J | = B ( I ) . We know that: x ∈ C J ⇐⇒ x ∈ ( ∃ r.E ) J ⇐⇒ ∃ y ∈ E J : ( x, y ) ∈ r J . By our induction hypothesis, B ( I ) | = E ≡ mmsc (cid:0) E I , I (cid:1) , hence: x ∈ C J ⇐⇒ ∃ y ∈ mmsc (cid:0) E I , I (cid:1) J : ( x, y ) ∈ r J ⇐⇒ x ∈ ( ∃ r. mmsc (cid:0) E I , I (cid:1) ) J . In short, we proved that C J = ( ∃ r. mmsc (cid:0) E I , I (cid:1) ) J . Next, as ∃ r. mmsc (cid:0) E I , I (cid:1) ∈ M I , we know that ∃ r. mmsc (cid:0) E I , I (cid:1) ≡ mmsc (cid:16) ∃ r. mmsc (cid:0) E I , I (cid:1) I , I (cid:17) ∈ B ( I ) With Lemma 21 we obtain: ( ∃ r. mmsc (cid:0) E I , I (cid:1) ) J = ( mmsc (cid:16) ∃ r. mmsc (cid:0) E I , I (cid:1) I , I (cid:17) ) J = ( mmsc (cid:0) ( ∃ r.E ) I , I (cid:1) ) J = ( mmsc (cid:0) C I , I (cid:1) ) J . Thus, C J = ( mmsc (cid:0) C I , I (cid:1) ) J . Since J was chosen arbitrarily, we can con-clude that B ( I ) | = C ≡ mmsc (cid:0) C I , I (cid:1) .Now, we prove that if I | = C ⊑ D , then B ( I ) | = mmsc (cid:0) C I , I (cid:1) ⊑ mmsc (cid:0) D I , I (cid:1) .Let J be a model of B ( I ) . We know from Lemmas 12 and 22 that there are U, V ⊆ M I such that C I = ( d U ) I and D I = ( d V ) I . From the definition of B ( I ) , we obtain mmsc (cid:0) ( d U ) I , I (cid:1) ⊑ mmsc (cid:0) ( d V ) I , I (cid:1) ∈ B ( I ) . Therefore: J | = mmsc (cid:16) ( l U ) I , I (cid:17) ⊑ mmsc (cid:16) ( l V ) I , I (cid:17) Replacing ( d U ) I with C I and ( d V ) I with D I yields: J | = mmsc (cid:0) C I , I (cid:1) ⊑ mmsc (cid:0) D I , I (cid:1) . Therefore, using the fact that J | = C ≡ mmsc (cid:0) C I , I (cid:1) for every EL ⊥ conceptexpression C (proved earlier) we can conclude that J | = C ⊑ D .Since all the required concept inclusions hold in an arbitrary model of B ( I ) ,whenever they hold in I we have that B ( I ) is also complete for the EL ⊥ CIs. ❏ Proofs for Section 5 In the following we present the proofs related to the computation of the MVFfunction. In particular, we provide proofs for the relationship between the con-densation graph and the MVF function (Lemma 14), and the correctness ofAlgorithm 1 (Lemma 15). Lemma 14. Let G = ( V, E, L ) be a description graph, let G ∗ = ( V ∗ , E ∗ ) be thecondensation of G , and v ∈ V . Then: mvf ( G , v ) = max { weight ( w ∗ ) | w ∗ is a path in G ∗ starting at scc ( G , v ) } . Proof. First we prove that every path w ∗ = V , . . . , V m in G ∗ starting at scc ( G , v ) induces a walk in G starting at v with v num ( w ) = weight ( w ∗ ) . Let v = v . For each ≤ i < m , the induced walk must: visit v i , then pass throughall vertices in V i (repeating vertices whenever needed), then visit a vertex u i ∈ V i such that there is an edge ( u i , r, v i +1 ) ∈ E with v i +1 ∈ V i +1 (this is possible dueto the definitions of SCCs and condensation). When the walk reaches a vertex u m − , it must visit v m and pass through every vertex in V m before stopping.Such walk visits every vertex in S mi =1 V i , thus v num ( w ) = weight ( w ∗ ) .Now let w be a walk in G starting at v which is induced (as explained earlier)by a path w ∗ in G ∗ starting at scc ( G , v ) with maximum weight. Assume thatthere is a walk w in G starting at v such that v num ( w ) > v num ( w ) . Due to thedefinitions of SCC and condensation we know that there is a path w ∗ in G ∗ starting at scc ( G , v ) such that v num w ≤ weight ( w ∗ ) . However, this would implythat: weight ( w ∗ ) = v num ( w ) < v num w ≤ weight ( w ∗ ) , which is a contradictionsince we assume that w ∗ has maximal weight. Therefore, no walk in G startingat v can visit more vertices than weight ( w ∗ ) .Since we have shown that for every path w ∗ in G ∗ starting at scc ( G , v ) , thereis a walk w in G starting at v , with v num ( w ) = weight ( w ∗ ) , we can conclude thatthe statement of this lemma holds. ❏ Lemma 15. Given G = ( V, E, L ) and v ∈ V as input, Algorithm 1 returns themaximum weight of a path in the condensation of G starting at scc ( G , v ) . Proof. Let G ∗ = ( V ∗ , E ∗ ) be the condensation of G . If W ′ ∈ V ∗ is un-reachable from scc ( G , v ) then wgt [ V ′ ] will remain null as it will never be visited.Otherwise, W ′ will be visited in some call of maxWeight . If it has no successors,the loop in Line 9 will not do anything, and thus wgt [ W ′ ] = | W ′ | as expected.Instead, if scc ( G , v ) has successors, then the maximum weight of a path start-ing at scc ( G , v ) in G ∗ is given by | scc ( G , v ) | plus the maximum value computedamong its successors. This equation holds because G ∗ is a DAG. Since, the loopin Line 9 forces the maximum weights of the successors of W ′ to be calculatedfirst, the value returned in Line 15 is correct.to be calculatedfirst, the value returned in Line 15 is correct.