Alignment Approximation for Process Trees
Daniel Schuster, Sebastiaan van Zelst, Wil M. P. van der Aalst
AAlignment Approximation for Process Trees
Daniel Schuster , Sebastiaan van Zelst , , and Wil M. P. van der Aalst , Fraunhofer Institute for Applied Information Technology FIT, Germany { daniel.schuster,sebastiaan.van.zelst } @fit.fraunhofer.de RWTH Aachen University, Germany [email protected]
Abstract.
Comparing observed behavior (event data generated duringprocess executions) with modeled behavior (process models), is an essen-tial step in process mining analyses. Alignments are the de-facto standardtechnique for calculating conformance checking statistics. However, thecalculation of alignments is computationally complex since a shortestpath problem must be solved on a state space which grows non-linearlywith the size of the model and the observed behavior, leading to thewell-known state space explosion problem . In this paper, we present anovel framework to approximate alignments on process trees by exploit-ing their hierarchical structure. Process trees are an important processmodel formalism used by state-of-the-art process mining techniques suchas the inductive mining approaches. Our approach exploits structuralproperties of a given process tree and splits the alignment computationproblem into smaller sub-problems. Finally, sub-results are composed toobtain an alignment. Our experiments show that our approach providesa good balance between accuracy and computation time.
Keywords:
Process mining · Conformance checking · Approximation.
Conformance checking is a key research area within process mining [1]. Thecomparison of observed process behavior with reference process models is of cru-cial importance in process mining use cases. Nowadays, alignments [2] are thede-facto standard technique to compute conformance checking statistics. How-ever, the computation of alignments is complex since a shortest path problemmust be solved on a non-linear state space composed of the reference model andthe observed process behavior. This is known as the state space explosion prob-lem [3]. Hence, various approximation techniques have been introduced. Mosttechniques focus on decomposing Petri nets or reducing the number of align-ments to be calculated when several need to be calculated for the same processmodel [4–8].In this paper, we focus on a specific class of process models, namely pro-cess trees (also called block-structured process models), which are an importantprocess model formalism that represent a subclass of sound
Workflow nets [9].For instance, various state-of-the-art process discovery algorithms return process a r X i v : . [ c s . D B ] O c t D. Schuster et al. trees [9–11]. In this paper, we introduce an alignment approximation approachfor process trees that consists of two main phases. First, our approach splitsthe problem of alignments into smaller sub-problems along the tree hierarchy.Thereby, we exploit the hierarchical structure of process trees and their seman-tics. Moreover, the definition of sub-problems is based on a gray-box view on thecorresponding subtrees since we use a simplified/abstract view on the subtrees torecursively define the sub-problems along the tree hierarchy. Such sub-problemscan then be solved individually and in parallel. Secondly, we recursively composean alignment from the sub-results for the given process tree and observed pro-cess behavior. Our experiments show that our approach provides a good balancebetween accuracy and computation effort.The remainder is structured as follows. In Section 2, we present related work.In Section 3, we present preliminaries. In Section 4, we present the formal frame-work of our approach. In Section 5, we introduce our alignment approximationapproach. In Section 6, we present an evaluation. Section 7 concludes the paper.
In this section, we present related work regarding alignment computation andapproximation. For a general overview of conformance checking, we refer to [3].Alignments have been introduced in [2]. In [12] it was shown that the com-putation is reducible to a shortest path problem and the solution of the problemusing the A* algorithm is presented. In [13], the authors present an improvedheuristic that is used in the shortest path search. In [14], an alignment approxi-mation approach based on approximating the shortest path is presented.A generic approach to decompose Petri nets into multiple sub-nets is in-troduced in [15]. Further, the application of such decomposition to alignmentcomputation is presented. In contrast to our approach, the technique does notreturn an alignment. Instead, only partial alignments are calculated, which areused, for example, to approximate an overall fitness value. In [4], an approachto calculate alignments based on Petri net decomposition [15] is presented thatadditionally guarantees optimal fitness values and optionally returns an align-ment. Comparing both decomposition techniques with our approach, we do notcalculate sub-nets because we simply use the given hierarchical structure of aprocess tree. Moreover, our approach always returns a valid alignment.In [5], an approach is presented that approximates alignments for an event logby reducing the number of alignments being calculated based on event log sam-pling. Another technique based on event log sampling is presented in [8] wherethe authors explicitly approximate conformance results, e.g., fitness, rather thanalignments. In contrast to our proposed approach, alignments are not returned.In [6] the authors present an approximation approach that explicitly focuses onapproximating multiple optimal alignments. Finally, in [7], the authors presenta technique to reduce a given process model and an event log s.t. the originalbehavior of both is preserved as much as possible. In contrast, the proposedapproach in this paper does not modify the given process model and event log. lignment Approximation for Process Trees 3
Table 1: Example of an event log from an order process
Event-id Case-id Activity name Timestamp · · ·· · · · · · · · · · · · · · ·
200 13 create order (c) 2020-01-02 15:29 · · ·
201 27 receive payment (r) 2020-01-02 15:44 · · ·
202 43 dispatch order (d) 2020-01-02 16:29 · · ·
203 13 pack order (p) 2020-01-02 19:12 · · ·· · · · · · · · · · · · · · ·
We denote the power set of a given set X by P ( X ). A multi-set over a set X allows multiple appearances of the same element. We denote the universe ofmulti-sets for a set X by B ( X ) and the set of all sequences over X as X ∗ , e.g., (cid:104) a, b, b (cid:105)∈{ a, b, c } ∗ . For a given sequence σ , we denote its length by | σ | . We denotethe empty sequence by (cid:104)(cid:105) . We denote the set of all possible permutations for given σ ∈ X ∗ by P ( σ ) ⊆ X ∗ . Given two sequences σ and σ (cid:48) , we denote the concatenationof these two sequences by σ · σ (cid:48) . We extend the · operator to sets of sequences,i.e., let S , S ⊆ X ∗ then S · S = { σ · σ | σ ∈ S ∧ σ ∈ S } . For traces σ, σ (cid:48) , the setof all interleaved sequences is denoted by σ (cid:5) σ (cid:48) , e.g., (cid:104) a, b (cid:105)(cid:5)(cid:104) c (cid:105) = {(cid:104) a, b, c (cid:105) , (cid:104) a, c, b (cid:105) , (cid:104) c, a, b (cid:105)} . We extend the (cid:5) operator to sets of sequences. Let S , S ⊆ X ∗ , S (cid:5) S denotes the set of interleaved sequences, i.e., S (cid:5) S = (cid:83) σ ∈ S ,σ ∈ S σ (cid:5) σ .For σ ∈ X ∗ and X (cid:48) ⊆ X , we recursively define the projection function σ ↓ X (cid:48) : X ∗ → ( X (cid:48) ) ∗ with: (cid:104)(cid:105) ↓ X (cid:48) = (cid:104)(cid:105) , (cid:0) (cid:104) x (cid:105)· σ (cid:1) ↓ X (cid:48) = (cid:104) x (cid:105)· σ ↓ X (cid:48) if x ∈ X (cid:48) and ( (cid:104) x (cid:105)· σ ) ↓ X (cid:48) = σ ↓ X (cid:48) else.Let t =( x , . . . , x n ) ∈ X × . . . × X n be an n -tuple over n sets. We define projec-tion functions that extract a specific element of t , i.e., π ( t )= x , . . . , π n ( t )= x n ,e.g., π (( a, b, c )) = b . Analogously, given a sequence of length m with n -tuples σ = (cid:104) ( x , . . . , x n ) , . . . , ( x m , . . . , x mn ) (cid:105) , we define π ∗ ( σ )= (cid:104) x , . . . , x m (cid:105) , . . . , π ∗ n ( σ )= (cid:104) x n , . . . , x mn (cid:105) . For instance, π ∗ (cid:0) (cid:104) ( a, b ) , ( a, c ) , ( b, a ) (cid:105) (cid:1) = (cid:104) b, c, a (cid:105) . Process executions leave event data in information systems. An event describesthe execution of an activity for a particular case /process instance. ConsiderTable 1 for an example of an event log where each event contains the executedactivity, a timestamp, a case-id and potentially further attributes. Since, in thispaper, we are only interested in the sequence of activities executed, we define anevent log as a multi-set of sequences. Such sequence is also referred to as a trace . Definition 1 (Event log).
Let A be the universe of activities. L ∈B ( A ∗ ) is anevent log. Next, we define the syntax and semantics of process trees.
D. Schuster et al. → n (cid:9) n . × n . → n . a n . b n . ∧ n . c n . d n . τ n . ∧ n . e n . a n . T = (cid:52) T ( n . ) T = (cid:52) T ( n . ) Fig. 1: Process tree T = (cid:0) { n o , . . . , n . } , (cid:8) ( n , n . ) , . . . , ( n . , n . ) (cid:9) , λ, n (cid:1) with λ ( n )= → , . . . , λ ( n . )= d Definition 2 (Process Tree Syntax).
Let A be the universe of activitiesand τ / ∈A . Let (cid:76) = {→ , × , ∧ , (cid:9) } be the set of process tree operators. We definea process tree T =( V, E, λ, r ) consisting of a totally ordered set of nodes V , a setof edges E , a labeling function λ : V →A∪{ τ }∪ (cid:76) and a root node r ∈ V . – (cid:0) { n } , {} , λ, n (cid:1) with λ ( n ) ∈A∪{ τ } is a process tree – given k> process trees T =( V , E , λ , r ) , . . . , T k =( V k , E k , λ k , r k ) , T =( V,E, λ, r ) is a process tree s.t.: • V = V ∪ . . . ∪ V k ∪{ r } (assume r / ∈ V ∪ . . . ∪ V k ) • E = E ∪ . . . ∪ E k ∪ (cid:8) ( r, r ) , . . . , ( r, r k ) (cid:9) • λ ( x )= λ j ( x ) ∀ j ∈{ , . . . , k }∀ x ∈ V j , λ ( r ) ∈{→ , ∧ , ×} – given two process trees T =( V , E , λ , r ) and T =( V , E , λ , r ) , T =( V, E,λ, r ) is a process tree s.t.: • V = V ∪ V ∪{ r } (assume r / ∈ V ∪ V ) • E = E ∪ E ∪ (cid:8) ( r, r ) , ( r, r ) (cid:9) • λ ( x )= λ ( x ) if x ∈ V , λ ( x )= λ ( x ) if x ∈ V , λ ( r )= (cid:9) In Figure 1, we depict an example process tree T that can alternatively berepresented textually due to the totally ordered node set, i.e., T (cid:98) = → ( (cid:9) ( × ( → ( a, b ) , ∧ ( c, d )) , τ ) , ∧ ( e, a )). We denote the universe of process trees by T . The degree d indicates the number of edges connected to a node. We distinguish betweenincoming d + and outgoing edges d − , e.g., d + ( n . )=1 and d − ( n . )=2. For a tree T =( V, E, λ, r ), we denote its leaf nodes by T L = { v ∈ V | d − ( v )=0 } . The child func-tion c T : V → V ∗ returns a sequence of child nodes according to the order of V ,i.e., c T ( v )= (cid:104) v , . . . , v j (cid:105) s.t. ( v, v ) , . . . , ( v, v j ) ∈ E . For instance, c T ( n . )= (cid:104) n . ,n . (cid:105) . For T =( V, E, λ, r ) and a node v ∈ V , (cid:52) T ( v ) returns the corresponding tree T (cid:48) s.t. v is the root node, i.e., T (cid:48) =( V (cid:48) , E (cid:48) , λ (cid:48) , v ). Consider T , (cid:52) T ( n . )= T ashighlighted in Figure 1. For process tree T ∈T , we denote its height by h ( T ) ∈ N . Definition 3 (Process Tree Semantics).
For given T =( V, E, λ, r ) ∈T , wedefine its language L ( T ) ⊆A ∗ . – if λ ( r )= a ∈A , L ( T )= {(cid:104) a (cid:105)} – if λ ( r )= τ , L ( T )= {(cid:104)(cid:105)} – if λ ( r ) ∈{→ , × , ∧} with c T ( r )= (cid:104) v , . . . , v k (cid:105)• with λ ( r )= → , L ( T )= L ( (cid:52) T ( v )) · . . . ·L ( (cid:52) T ( v k )) • with λ ( r )= ∧ , L ( T )= L ( (cid:52) T ( v )) (cid:5) . . . (cid:5)L ( (cid:52) T ( v k )) lignment Approximation for Process Trees 5 trace part a b (cid:29) (cid:29) c f (cid:29) (cid:29) model part n . λ ( n . )= a n . λ ( n . )= b n . λ ( n . )= τ n . λ ( n . )= d n . λ ( n . )= c (cid:29) n . λ ( n . )= a n . λ ( n . )= e Fig. 2: Optimal alignment γ = (cid:10) ( a, n . ) , . . . , ( (cid:29) , n . ) (cid:11) for (cid:104) a, b, c, f (cid:105) and T • with λ ( r )= × , L ( T )= L ( (cid:52) T ( v )) ∪ . . . ∪L ( (cid:52) T ( v k )) – if λ ( r )= (cid:9) with c T ( r )= (cid:104) v , v (cid:105) , L ( T )= { σ · σ (cid:48) · σ · σ (cid:48) · . . . · σ m | m ≥ ∧ ∀ ≤ i ≤ m (cid:0) σ i ∈L ( (cid:52) T ( v )) (cid:1) ∧ ∀ ≤ i ≤ m − (cid:0) σ (cid:48) i ∈L ( (cid:52) T ( v )) (cid:1) } In this paper, we assume binary process trees as input for our approach, i.e,every node has two or none child nodes, e.g., T . Note that every process treecan be easily converted into a language equivalent binary process tree [9]. Alignments [12] map observed behavior onto modeled behavior specified by pro-cess models. Figure 2 visualizes an alignment for the trace (cid:104) a, b, c, f (cid:105) and T (Figure 1). The first row corresponds to the given trace ignoring the skip sym-bol (cid:29) . The second row (ignoring (cid:29) ) corresponds to a sequence of leaf nodess.t. the corresponding sequence of labels (ignoring τ ) is in the language of theprocess tree, i.e., (cid:104) a, b, d, c, a, e (cid:105)∈L ( T ). Each column represents an alignmentmove. The first two are synchronous moves since the activity and the leaf nodelabel are equal. The third and fourth are model moves because (cid:29) is in the logpart. Moreover, the third is an invisible model move since the leaf node label is τ and the fourth is a visible model move since the label represents an activity.Visible model moves indicate that an activity should have taken place w.r.t. themodel. The sixth is a log move since the trace part contains (cid:29) . Log moves in-dicate observed behavior that should not occur w.r.t. the model. Note that wealternatively write γ (cid:98) = (cid:10) ( a, a ) , . . . , ( (cid:29) , e ) (cid:11) using their labels instead of leaf nodes. Definition 4 (Alignment).
Let A be the universe of activities, σ ∈A ∗ be a traceand T =( V, E, λ, r ) ∈T be a process tree with leaf nodes T L . Note that (cid:29) , τ / ∈A .A sequence γ ∈ (cid:0) ( A∪{(cid:29)} ) × ( T L ∪{(cid:29)} ) (cid:1) ∗ with length n = | γ | is an alignment iff:1. σ = π ∗ ( γ ) ↓ A (cid:68) λ (cid:16) π (cid:0) γ (1) (cid:1)(cid:17) , . . . , λ (cid:16) π (cid:0) γ ( n ) (cid:1)(cid:17)(cid:69) ↓ A ∈L ( T ) ( (cid:29) , (cid:29) ) / ∈ γ and ( a, v ) / ∈ γ ∀ a ∈A ∀ v ∈ T L (cid:0) a (cid:54) = λ ( v ) (cid:1) For a given process tree and a trace, many alignments exist. Thus, costs areassigned to alignment moves. In this paper, we assume the standard cost function .Synchronous and invisible model moves are assigned cost 0, other moves areassigned cost 1. An alignment with minimal costs is called optimal . For a processtree T and a trace σ , we denote the set of all possible alignments by Γ ( σ, T ).In this paper, we assume a function α that returns for given T ∈T and σ ∈A ∗ an optimal alignment, i.e., α ( σ, T ) ∈ Γ ( σ, T ). Since process trees can be easilyconverted into Petri nets [1] and the computation of alignments for a Petri netwas shown to be reducible to a shortest path problem [12], such function exists. D. Schuster et al.
In this section, we present a general framework that serves as the basis forthe proposed approach. The core idea is to recursively divide the problem ofalignment calculation into multiple sub-problems along the tree hierarchy. Sub-sequently, we recursively compose partial sub-results to an alignment.Given a trace and tree, we recursively split the trace into sub-traces andassign these to subtrees along the tree hierarchy. During splitting/assigning, weregard the semantics of the current root node’s operator. We recursively splituntil we can no longer split, e.g., we hit a leaf node. Once we stop splitting, wecalculate optimal alignments for the defined sub-traces on the assigned subtrees,i.e., we obtain sub-alignments. Next, we recursively compose the sub-alignmentsto a single alignment for the parent subtree. Thereby, we consider the semanticsof the current root process tree operator. Finally, we obtain a valid , but notnecessarily optimal, alignment for the initial given tree and trace since we regardthe semantics of the process tree during splitting/assigning and composing.Formally, we can express the splitting/assigning as a function. Given a trace σ ∈A ∗ and T =( V, E, λ, r ) ∈T with subtrees T and T , ψ splits the trace σ into k sub-traces σ , . . . , σ k and assigns each sub-trace to either T or T . ψ ( σ, T ) ∈ (cid:110)(cid:10) ( σ , T i ) , . . . , ( σ k , T i k ) (cid:11) | i , . . . , i k ∈{ , } ∧ σ · . . . · σ k ∈ P ( σ ) (cid:111) (1)We call a splitting/assignment valid if the following additional conditions aresatisfied depending on the process tree operator: – if λ ( r )= × : k =1 – if λ ( r )= → : k =2 ∧ σ · σ = σ – if λ ( r )= ∧ : k =2 – if λ ( r )= (cid:9) : k ∈{ , , , . . . } ∧ σ · . . . · σ k = σ ∧ i =1 ∧ ∀ j ∈{ , . . . , k − } (cid:0) ( i j =1 ⇒ i j +1 =2) ∧ ( i j =2 ⇒ i j +1 =1) (cid:1) Secondly, the calculated sub-alignments are recursively composed to an align-ment for the respective parent tree. Assume a tree T ∈T with sub-trees T and T , a trace σ ∈A ∗ , a valid splitting/assignment ψ ( σ, T ) , and a sequence of k sub-alignments (cid:104) γ , . . . , γ k (cid:105) s.t. γ j ∈ Γ ( σ j , T i j ) with ( σ j , T i j )= ψ ( σ, T )( j ) ∀ j ∈{ , . . . , k } .The function ω composes an alignment for T and σ from the given sub-alignments. ω ( σ, T, (cid:104) γ , . . . , γ k (cid:105) ) ∈{ γ | γ ∈ Γ ( σ, T ) ∧ γ · . . . · γ k ∈ P ( γ ) } (2)By utilizing the definition of process tree semantics, it is easy to show that, givena valid splitting/assignment, such alignment γ returned by ω always exists.The overall, recursive approach is sketched in Algorithm 1. For a given tree T and trace σ , we create a valid splitting/assignment (line 4). Next, we recursivelycall the algorithm on the determined sub-traces and subtrees (line 6). If giventhresholds for trace length ( T L ) or tree height (
T H ) are reached, we stop split-ting and return an optimal alignment (line 2). Hence, for the sub-traces created,we eventually obtain optimal sub-alignments, which we recursively compose toan alignment for the parent tree (line 7). Finally, we obtain a valid, but notnecessarily optimal, alignment for T and σ . lignment Approximation for Process Trees 7 Algorithm 1:
Approximate alignment input: T =( V, E, λ, r ) ∈T , σ ∈A ∗ , T L ≥ , T H ≥ begin if | σ |≤ T L ∨ h ( T ) ≤ T H then return α ( σ, T ); // optimal alignment else ψ ( σ, T )= (cid:104) ( σ , T i ) , . . . , ( σ k , T ik ) (cid:11) ; // valid splitting for ( σ j , T ij ) ∈ (cid:10) ( σ , T i ) , . . . , ( σ k , T ik ) (cid:11) do γ j ← approx. alignment for σ j and T ij ; // recursion γ ← ω ( σ, T, (cid:104) γ , . . . , γ k (cid:105) ); // composing return γ ; → T T σ = (cid:104) d, c,a,b, c,d | a, e (cid:105) A ( T )= { a, b, c, d } (cid:104)(cid:105) / ∈L ( T ) SA ( T )= { a, c,d } EA ( T )= { b, c, d } A ( T )= { e,a } (cid:104)(cid:105) / ∈L ( T ) SA ( T )= { e, a } EA ( T )= { e,a } σ = (cid:104) d, c, a, b, c, d (cid:105) σ = (cid:104) a,e (cid:105) (a) Trace splitting and assignment → T T γ (cid:98) = d c a b c dd c b b c d γ (cid:98) = a ea eγ (cid:98) = d c a b c dd c b b c d · a ea e (b) Alignment composition Fig. 3: Overview of the two main actions of the approximation approach
Here, we describe our proposed approach, which is based on the formal frame-work introduced. First, we present an overview. Subsequently, we present specificstrategies for splitting/assigning and composing for each process tree operator.
For splitting a trace and assigning sub-traces to subtrees many options exist.Moreover, it is inefficient to try out all possible options. Hence, we use a heuristic that guides the splitting/assigning. For each subtree, we calculate four character-istics: the activity labels A , if the empty trace is in the subtree’s language, possi-ble start-activities SA and end-activities EA of traces in the subtree’s language.Thus, each subtree is a gray-box since only limited information is available.Consider the trace to be aligned σ = (cid:104) d, c, a, b, c, d, a, e (cid:105) and the two sub-trees of T with corresponding characteristics depicted in Figure 3a. Since T ’sroot node is a sequence operator, we need to split σ once to obtain two sub-traces according to the semantics. Thus, we have 9 potential splittings positions: (cid:104)| d | c | a | b | c | d | a | e | (cid:105) . If we split at position 1, we assign σ = (cid:104)(cid:105) to the first subtree T and the remaining trace σ = σ to T . Certainly, this isnot a good decision since we know that (cid:104)(cid:105) / ∈L ( T ), the first activity of σ is nota start activity of T and the activities b, c, d occurring in σ are not in T . D. Schuster et al.
Assume we split at position 7 (Figure 3a). Then we assign σ = (cid:104) d, c, a, b, c, d (cid:105) to T . All activities in σ are contained in T , σ starts with d ∈ SA ( T ) and endswith d ∈ EA ( T ). Further, we obtain σ = (cid:104) a, e (cid:105) whose activities can be replayedin T , and start- and end-activities match, too. Hence, according to the gray-box-view, splitting at position 7 is a good choice. Next, assume we receive twoalignments γ for T , σ and γ for T , σ (Figure 3b). Since T is executed before T , we concatenate the sub-alignments γ = γ · γ and obtain an alignment for T . In this section, we formally define the computation of the four tree character-istics for a given process tree T =( V, E, λ, r ). We define the activity set A as afunction, i.e., A : T →P ( A ), with A ( T )= { λ ( n ) | n ∈ T L , λ ( n ) (cid:54) = τ } . We recursivelydefine the possible start- and end-activities as a function, i.e., SA : T →P ( A ) and EA : T →P ( A ). If T is not a leaf node, we refer to its two subtrees as T and T . SA ( T )= { λ ( r ) } if λ ( r ) ∈A∅ if λ ( r )= τSA ( T ) if λ ( r )= →∧(cid:104)(cid:105) / ∈L ( T ) SA ( T ) ∪ SA ( T ) if λ ( r )= →∧(cid:104)(cid:105)∈L ( T ) SA ( T ) ∪ SA ( T ) if λ ( r ) ∈{∧ , ×} SA ( T ) if λ ( r )= (cid:9) ∧(cid:104)(cid:105) / ∈L ( T ) SA ( T ) ∪ SA ( T ) if λ ( r )= (cid:9) ∧(cid:104)(cid:105)∈L ( T ) EA ( T )= { λ ( n ) } if λ ( r ) ∈A∅ if λ ( r )= τEA ( T ) if λ ( r )= →∧(cid:104)(cid:105) / ∈L ( T ) EA ( T ) ∪ EA ( T ) if λ ( r )= →∧(cid:104)(cid:105)∈L ( T ) EA ( T ) ∪ EA ( T ) if λ ( r ) ∈{∧ , ×} EA ( T ) if λ ( r )= (cid:9) ∧(cid:104)(cid:105) / ∈L ( T ) EA ( T ) ∪ EA ( T ) if λ ( r )= (cid:9) ∧(cid:104)(cid:105)∈L ( T ) The calculation whether the empty trace is accepted can also be done recursively. – λ ( r )= τ ⇒ (cid:104)(cid:105)∈L ( T ) and λ ( r ) ∈A ⇒ (cid:104)(cid:105) / ∈L ( T ) – λ ( r ) ∈{→ , ∧} ⇒ (cid:104)(cid:105)∈L ( T ) ∧ (cid:104)(cid:105)∈L ( T ) ⇔ (cid:104)(cid:105)∈L ( T ) – λ ( r ) ∈× ⇒ (cid:104)(cid:105)∈L ( T ) ∨ (cid:104)(cid:105)∈L ( T ) ⇔ (cid:104)(cid:105)∈L ( T ) – λ ( r )= (cid:9) ⇒ (cid:104)(cid:105)∈L ( T ) ⇔ (cid:104)(cid:105)∈L ( T ) The decision where to split a trace and the assignment of sub-traces to subtrees isbased on the four characteristics per subtree and the process tree operator. Thus,each subtree is a gray-box for the approximation approach since only limitedinformation is available. Subsequently, we explain how we interpret the subtree’scharacteristics and how we utilize them in the splitting/assigning decision.Consider Figure 4 showing how the approximation approach assumes a givensubtree T behaves based on its four characteristics, i.e., A ( T ) , SA ( T ) , EA ( T ) , (cid:104)(cid:105)∈L ( T ). The most liberal interpretation I ( T ) of a subtree T can be consideredas a heuristic that guides the splitting/assigning. The interpretation I ( T ) de-pends on two conditions, i.e., if (cid:104)(cid:105)∈L ( T ) and whether there is an activity that isboth, a start- and end-activity, i.e., SA ( T ) ∩ EA ( T ) (cid:54) = ∅ . Note that L ( T ) ⊆L ( I ( T ))holds. Thus, the interpretation is an approximated view on the actual subtree.In the next sections, we present for each tree operator a splitting/assigningand composing strategy based on the presented subtree interpretation. All strate-gies return a splitting per recursive call that minimizes the overall edit distancebetween the sub-traces and the closest trace in the language of the interpretation lignment Approximation for Process Trees 9 → (cid:78) × (cid:0) SA ( T ) (cid:1) (cid:9) τ (cid:78) × (cid:0) A ( T ) (cid:1) (cid:78) × (cid:0) EA ( T ) (cid:1) (a) (cid:104)(cid:105) / ∈L ( T ) and SA ( T ) ∩ EA ( T )= ∅ ×→ (cid:78) × (cid:0) SA ( T ) (cid:1) (cid:9) τ (cid:78) × (cid:0) A ( T ) (cid:1) (cid:78) × (cid:0) EA ( T ) (cid:1) (cid:78) × (cid:0) SA ( T ) ∩ EA ( T ) (cid:1) (b) (cid:104)(cid:105) / ∈L ( T ) and SA ( T ) ∩ EA ( T ) (cid:54) = ∅ ×→ (cid:78) × (cid:0) SA ( T ) (cid:1) (cid:9) τ (cid:78) × (cid:0) A ( T ) (cid:1) (cid:78) × (cid:0) EA ( T ) (cid:1) τ (c) (cid:104)(cid:105)∈L ( T ) and SA ( T ) ∩ EA ( T )= ∅ ×→ (cid:78) × (cid:0) SA ( T ) (cid:1) (cid:9) τ (cid:78) × (cid:0) A ( T ) (cid:1) (cid:78) × (cid:0) EA ( T ) (cid:1) (cid:78) × (cid:0) SA ( T ) (cid:1) ∩ EA ( T ) (cid:1) τ (d) (cid:104)(cid:105)∈L ( T ) and SA ( T ) ∩ EA ( T ) (cid:54) = ∅ Fig. 4: Most liberal interpretation I ( T ) of the four characteristics of a processtree T ∈T . For a set X = { x , . . . , x n } , (cid:78) × ( X ) represents the tree × ( x , . . . , x n )of the assigned subtrees. For σ , σ ∈A ∗ , let (cid:108) ( σ , σ ) ∈ N ∪{ } be the Levenshteindistance [16]. For given σ ∈A ∗ and T ∈T , we calculate a valid splitting ψ ( σ, T )= (cid:10) ( σ , T i ) , . . . , ( σ j , T i k ) (cid:11) w.r.t. Eq. (1) s.t. the sum depicted below is minimal. (cid:88) j ∈{ ,...,k } (cid:0) min σ (cid:48) ∈I ( T ij ) (cid:108) ( σ j , σ (cid:48) ) (cid:1) (3)In the upcoming sections, we assume a given trace σ = (cid:104) a , . . . , a n (cid:105) and aprocess tree T =( V, E, λ, r ) with subtrees referred to as T and T . The choice operator is the most simple one since we just need to assign σ to oneof the subtrees according to the semantics, i.e., assigning σ either to T or T .We compute the edit distance of σ to the closest trace in I ( T ) and in I ( T ) andassign σ to the subtree with smallest edit distance according to Eq. (3).Composing an alignment for the choice operator is trivial. Assume we even-tually get an alignment γ for the chosen subtree, we just return γ for T . When splitting on a sequence operator, we must assign a sub-trace to eachsubtree according to the semantics. Hence, we calculate two sub-traces: (cid:104) ( σ , T ) , ( σ , T ) (cid:105) s.t. σ · σ = σ according to Eq. (3). The optimal splitting/assigning canbe defined as an optimization problem, i.e., Integer Linear Programming (ILP).In general, for a trace with length n , n +1 possible splitting-positions exist: (cid:104)| a | a | . . . | n a n | n +1 (cid:105) . Assume we split at position 1, this results in (cid:10) ( (cid:104)(cid:105) , T ) , ( σ, T ) (cid:11) , i.e., we assign (cid:104)(cid:105) to T and the original trace σ to T . Composing the alignment from sub-alignments is straightforward. In general,we eventually obtain two alignments, i.e, (cid:104) γ , γ (cid:105) , for T and T . We composethe alignment γ for T by concatenating the sub-alignments, i.e., γ = γ · γ . According to the semantics, we must define a sub-trace for each subtree, i.e., (cid:104) ( T , σ ) , ( T , σ ) (cid:105) . In contrast to the sequence operator, σ · σ = σ does not gen-erally hold. The splitting/assignment w.r.t. Eq. (3) can be defined as an ILP. Ingeneral, each activity can be assigned to one of the subtrees independently.For example, assume σ = (cid:104) c, a, d, c, b (cid:105) and T (cid:98) = ∧ (cid:0) → ( a, b ) , (cid:9) ( c, d ) (cid:1) with subtree T (cid:98) = → ( a, b ) and T (cid:98) = (cid:9) ( c, d ). Below we assign the activities to subtrees. (cid:104) c , a , d , c , b (cid:105) T T T T T Based on the assignment, we create two sub-traces: σ = (cid:104) a, b (cid:105) and σ = (cid:104) c, d, c (cid:105) .Assume that γ (cid:98) = (cid:104) ( a, a ) , ( b, b ) (cid:105) and γ (cid:98) = (cid:104) ( c, c ) , ( d, d ) , ( c, c ) (cid:105) are the two align-ments eventually obtained. To compose an alignment for T , we have to considerthe assignment. Since the first activity c is assigned to T , we extract the corre-sponding alignment steps from γ until we have explained c . The next activityin σ is an a assigned to T . We extract the alignment moves from γ until we ex-plained the a . We iteratively continue until all activities in σ are covered. Finally,we obtain an alignment for T and σ , i.e., γ (cid:98) = (cid:10) ( c, c ) , ( a, a ) , ( d, d ) , ( c, c ) , ( b, b ) (cid:11) . We calculate m ∈{ , , , . . . } sub-traces that are assigned alternately to the twosubtrees: (cid:104) ( σ , T ) , ( σ , T ) , ( σ , T ) , . . . , ( σ m − , T ) , ( σ m , T ) (cid:105) s.t. σ = σ · . . . · σ m .Thereby, σ and σ m are always assigned to T . Next, we visualize all possiblesplitting positions for the given trace: (cid:104)| a | | a | . . . | n − a n | n (cid:105) . If we splitat each position, we obtain (cid:10)(cid:0) (cid:104)(cid:105) , T (cid:1) , (cid:0) (cid:104) a (cid:105) , T (cid:1) , (cid:0) (cid:104)(cid:105) , T (cid:1) , . . . , (cid:0) (cid:104) a n (cid:105) , T (cid:1) , (cid:0) (cid:104)(cid:105) , T (cid:1)(cid:11) .The optimal splitting/assignment w.r.t Eq. (3) can be defined as an ILP.Composing an alignment is similar to the sequence operator. In general, weobtain m sub-alignments (cid:104) γ , . . . , γ m (cid:105) , which we concatenate, i.e., γ = γ · . . . · γ m . This section presents an experimental evaluation of the proposed approach.We implemented the proposed approach in PM4Py , an open-source processmining library. We conducted experiments on real event logs [17,18]. For each log,we discovered a process tree with the Inductive Miner infrequent algorithm [10].In Figures 5 and 6, we present the results. We observe that our approach ison average always faster than the optimal alignment algorithm for all tested pa-rameter settings. Moreover, we observe that our approach never underestimates https://pm4py.fit.fraunhofer.de/lignment Approximation for Process Trees 11 t r ee h e i g h t ( T H ) avg. computation time (s) optimal alignments: 301.77 (a) Avg. computation time (s) t r ee h e i g h t ( T H ) avg. alignment cost optimal alignments: 23.41 (b) Avg. alignment costs Fig. 5: Results for [17], sample: 100 variants, tree height 24, avg. trace length 28 t r ee h e i g h t ( T H ) avg. computation time (s) optimal alignments: 181.39 (a) Avg. computation time (s) t r ee h e i g h t ( T H ) avg. alignment cost optimal alignments: 61.11 (b) Avg. alignment costs Fig. 6: Results for [18], sample: 100 variants, tree height 10, avg. trace length 65the optimal alignment costs, as our approach returns a valid alignment. W.r.t.optimization problems for optimal splittings/assignments, consider parametersetting TH:5 and TL:5 in Figure 5. This parameter setting results in the high-est splitting along the tree hierarchy and the computation time is the lowestcompared to the other settings. Thus, we conclude that solving optimizationproblems for finding splittings/assignments is appropriate. In general, we ob-serve a good balance between accuracy and computation time. We additionallyconducted experiments with a decomposition approach [15] (available in ProM )and compared the calculation time with the standard alignment implementation(LP-based) [12] in ProM. Consider Table 2. We observe that the decompositionapproach does not yield a speed-up for [17] but for [18] we observe that thedecomposition approach is about 5 times faster. In comparison to Figure 6a,however, our approach yields a much higher speed-up. We introduced a novel approach to approximate alignments for process trees.First, we recursively split a trace into sub-traces along the tree hierarchy based Table 2: Results for decomposition based alignments
Approach [17] (sample: 100 variants) [18] (sample: 100 variants)decomposition [4] 25.22 s 20.96 sstandard [12] 1.51 s 103.22 s on a gray-box view on the respective subtrees. After splitting, we compute op-timal sub-alignments. Finally, we recursively compose a valid alignment fromsub-alignments. Our experiments show that the approach provides a good bal-ance between accuracy and calculation time. Apart from the specific approachproposed, the contribution of this paper is the formal framework describing howalignments can be approximated for process trees. Thus, many other strategiesbesides the one presented are conceivable.
References
1. W. M. P. van der Aalst,
Process Mining - Data Science in Action . Springer, 2016.2. W. M. P. van der Aalst, A. Adriansyah, and B. F. van Dongen, “Replaying historyon process models for conformance checking and performance analysis,”
WileyInterdiscip. Rev. Data Min. Knowl. Discov. , vol. 2, no. 2, 2012.3. J. Carmona, B. F. van Dongen, A. Solti, and M. Weidlich,
Conformance Checking- Relating Processes and Models . Springer, 2018.4. W. L. J. Lee, H. M. W. Verbeek, J. Munoz-Gama, W. M. P. van der Aalst,and M. Sep´ulveda, “Recomposing conformance: Closing the circle on decomposedalignment-based conformance checking in process mining,”
Inf. Sci. , vol. 466, 2018.5. M. F. Sani, S. J. van Zelst, and W. M. P. van der Aalst, “Conformance check-ing approximation using subset selection and edit distance,” in
CAiSE 2020 , ser.LNCS, vol. 12127. Springer, 2020.6. F. Taymouri and J. Carmona, “An evolutionary technique to approximate multipleoptimal alignments,” in
BPM 2018 , ser. LNCS, vol. 11080. Springer, 2018.7. ——, “Model and event log reductions to boost the computation of alignments,”in
SIMPDA 2016 , vol. 1757. CEUR-WS.org, 2016.8. M. Bauer, H. van der Aa, and M. Weidlich, “Estimating process conformance bytrace sampling and result approximation,” in
BPM 2019 , ser. LNCS, vol. 11675.Springer, 2019.9. S. J. J. Leemans, “Robust process mining with guarantees,” Ph.D. dissertation,Department of Mathematics and Computer Science, 2017.10. S. J. J. Leemans, D. Fahland, and W. M. P. van der Aalst, “Discovering Block-Structured Process Models from Event Logs Containing Infrequent Behaviour,” in
BPM Workshops 2013 , ser. LNBIP, vol. 171. Springer, 2013.11. D. Schuster, S. J. van Zelst, and W. M. P. van der Aalst, “Incremental discoveryof hierarchical process models,” in
RCIS 2020 , ser. LNBIP, vol. 385. Springer,2020.12. A. Adriansyah, “Aligning Observed and Modeled Behavior,” Ph.D. dissertation,Eindhoven University of Technology, 2014.13. B. F. van Dongen, “Efficiently computing alignments - using the extended markingequation,” in
BPM 2018 , ser. LNCS, vol. 11080. Springer, 2018.14. B. F. van Dongen, J. Carmona, T. Chatain, and F. Taymouri, “Aligning mod-eled and observed behavior: A compromise between computation complexity andquality,” in
CAiSE 2017 , ser. LNCS, vol. 10253. Springer, 2017.15. W. M. P. van der Aalst, “Decomposing Petri Nets for Process Mining: A GenericApproach,”
Distributed and Parallel Databases , no. 4, 2013.16. V. I. Levenshtein, “Binary codes capable of correcting deletions, insertions, andreversals,” in