Full text
Business Process Variant Analysis based on Mutual Fingerprints of Event Logs Farbod Taymouri1, Marcello La Rosa1, Josep Carmona2 1The University of Melbourne, Melbourne (Australia) 2Universitat Polit` ecnica de Catalunya, Barcelona (Spain) {farbod.taymouri, marcello.larosa}@unimelb.edu.au [email protected] Abstract. Comparing business process variants using event logs is a common use case in process mining. Existing techniques for process variant analysis detect statistically-significant differences between variants at the level of individual entities (such as process activities) and their relationships (e.g. directly-follows relations between activities). This may lead to a proliferation of differences due to the low level of granularity in which such differences are captured. This paper presents a novel approach to detect statistically-significant differences between variants at the level of entire process traces (i.e. sequences of directly-follows relations). The cornerstone of this approach is a technique to learn a directlyfollows graph called mutual fingerprint from the event logs of the two variants. A mutual fingerprint is a lossless encoding of a set of traces and their duration using discrete wavelet transformation. This structure facilitates the understanding of statistical differences along the control-flow and performance dimensions. The approach has been evaluated using real-life event logs against two baselines. The results show that at a trace level, the baselines cannot always reveal the differences discovered by our approach, or can detect spurious differences. 1 Introduction The complexity of modern organizations leads to the co-existence of different variants of the same business process. Process variants may be determined based on different logical drivers, such as brand, product, type of customer, geographic location, as well as performance drivers, e.g. cases that complete on-time vs. cases that are slow. Identifying and explaining differences between process variants can help not only in the context of process standardization initiatives, but also to identify root causes for performance deviations or compliance violations. For example, in the healthcare domain, two patients with similar diseases might experience different care pathways, even if they are supposed to be treated alike [1,2]. Moreover, even if the care pathways are the same in terms of sequences of activities, they could have different performance, e.g. one patient may be discharged in a much shorter timeframe than the other [3]. Fig. 1: Example of mutual fingerprints for an IT service desk process Comparing business process variants using process execution data (a.k.a. event logs) recorded by information systems, is a common use case in process mining [4]. Existing Taymouri, F.; La Rosa, M.; Carmona, J. Business process variant analysis based on mutual fingerprints of event logs. A: International Conference on Advanced Information Systems Engineering. "Advanced Information Systems Engineering, 32nd International Conference, CAiSE 2020: Grenoble, France, June 8–12, 2020: proceedings". Berlín: Springer, 2020, p. 299-318. ISBN 978-3-030-49435-3. The final authenticated version is available online at https://doi.org/10.1007/978-3-030-49435-3_19.
techniques for process variant analysis [5, 6] detect statistically-significant differences between variants at the level of individual entities (such as process activities) and their relationships (e.g. directly-follows relations between activities). However, these techniques often lead to a proliferation of differences due to the low level of granularity in which such differences are captured. This paper presents a statistically sound approach for process variant analysis, that examines both the order in which process activities are executed (a.k.a. control-flow) and their duration (a.k.a. performance), using the event logs of two process variants as input. The cornerstone feature of this approach is the ability to provide statistically significant control-flow differences between process variants, via the use of a novel graph-based representation of a process, namely mutual fingerprint. The fingerprint of a process variant is a directly-follows graph that only shows the behavior of that variant that is statistically significantly different from that of another process variant, hence the term “mutual”. This lossless encoding of differences can be seen as the latent representation of a process variant that provides a considerably simplified representation of the underlying behavior, focusing only on differences. For example, Fig. 1 shows the discovered mutual fingerprints for two example process variants. One can see that the fingerprint of process variant 2 has an extra edge, i.e., (Queued, Completed), that does not appear in the other fingerprint. In a mutual fingerprint graph, different edge types are used to capture differences in the control-flow and activity duration. The approach to construct mutual fingerprints consists of three steps: i) feature generation, ii) feature selection, and iii) filtering. Given the event log of the two variants, the first step exploits Discrete Wavelet Transformation to obtain a lossless encoding of the two variants (along the control-flow and activity duration dimensions) into a set of vectors. The second step adopts a machine learning strategy combined with statistical tests to determine what subset of features, i.e. events, discriminates the two process variants at a given significant level. The third step filters traces of each process variant that do not carry any discriminatory events. The approach has been evaluated using process variants from four real-life event logs, against two baseline techniques. The comparison includes a quantitative assessment of the results and a discussion on execution time. The paper is organized as follows. Related work and preliminaries are presented in Section 2, and 3 respectively. The approach is presented in Section 4, followed by the evaluation in Section 5. Finally, Section 6 concludes the paper and discusses some avenues for future work. 2 Related Work We report only the most recent approaches related to our contribution. The interested reader can find a complete analysis in [7]. The work by van Beest et al. [8] relies on the product automaton of two event structures to distill all the behavioral differences between two process variants from the respective event logs, and render these differences to end users via textual explanations. Cordes et al. [9] discover two process models and their differences are defined as the minimum number of operations that transform on model to the other. This work was extended in [10] to compare process variants using annotated transition systems. Similarly, [11] creates a difference model between two input process models to represent differences. Pini et al. [12] contribute a visualization technique that compares two discovered process models in terms of performance data. The work in [13] proposes an extension of this work, by considering a normative process model alongside with event logs as inputs, and adding more data preparation facilities. Similarly, [14] develops visualisation techniques to provide targeted analysis of resource reallocation and activity rescheduling. Particularly relevant to our approach are the works by Bolt et al. and Nguyen et al., because they are grounded on statistical significance. Bolt et al. [15] use an annotated 2
transition system to highlight the differences between process variants. The highlighted parts only show different dominant behaviors that are statistically significant with respect to edge frequencies. This work was later extended in [5], by inducting decision trees for performance data among process variants. Nguyen et al. [6] encode process variants into Perspective Graphs. The comparison of perspective graphs results in a Differential Graph, which is a graph that contains common nodes and edges, and also nodes and edges that appear in one perspective graph only. As shown in the evaluation carried out in this paper, these two works, while relying on statistical tests, may lead to a proliferation of differences due to the low level in which such differences are captured (individual activities or activity relations). Our approach lifts these limitations by extracting entire control-flow paths or performance differences that constitute statistically significant differences between the two process variants. 3 Preliminaries In this section we introduce preliminary definitions required to describe our approach such as event, trace, event log and process variant. Next, we provide some basic linear algebra definitions that will be specifically used for our featuring encoding. Definition 1 (Event, Trace, Event Log). An event is a tuple (a, c, t, (d1, v1),...,(dm, vm)) where ais the activity name, cis the case id, tis the timestamp and (d1, v1),..., (dm, vm)(where m≥0) are the event or case attributes and their values. A trace is a non-empty sequence σ=e1, . . . , enof events such that ∀i, j ∈[1..n]ei.c =ej.c. An event log Lis a set σ1,...σnof traces. Definition 2 (Process variant). An event log Lcan be partitioned into a finite set of groups called process variants ς1, ς2, . . . , ςn, such that ∃dsuch that ∀ςkand ∀σi, σj∈ ςk,σi.d =σj.d. The above definition of a process variant emphasizes that process executions in the same group must have the same value for a given attribute, and each process execution belongs only to one process variant1. Definition 3 (Vector). A vector, x= (x1, x2, . . . , xn)T, is a column array of elements where the ith element is shown by xi. If each element is in Rand vector contains n elements, then the vector lies in Rn×1, and the dimension of x,dim(x), is n×1. We represent a set of dvectors as x(1),x(2),...,x(d), where x(i)∈Rn×1. Also, they can be represented by a matrix M= (x(1),x(2),...,x(d))where M∈Rn×d. We denote the ith row of a matrix by Mi,:, and likewise the ith column by M:,i. The previous definitions can be extended for a set of columns or rows, for example if R= {3,5,9}and C={1,4,6,12}, then MR,C returns the indicated rows and columns. Definition 4 (Vector space). A vector space consists of a set Vof vectors, a field F (Rfor real numbers), and two operations +,×with the following properties, ∀u,v∈ V, u+v∈V, and ∀c∈F, ∀v∈V, c ×v∈V. Definition 5 (Basis vectors). A set Bof vectors in a vector space Vis called a basis, if every element of Vcan be written as a finite linear combination of elements of B. The coefficients of this linear combination are referred to as coordinates on Bof the vector. A set Bof basis vectors is called orthonormal, if ∀u,v∈B, < uT,v>= 0, and kuk2= 1,kvk2= 1. A basis matrix is a matrix whose columns are basis vectors. 1Definition 2 can be easily generalized to more than one attribute, and arbitrary comparisons. 3
For example, the set of e(1) = (0,0,0,1)T,e(2) = (0,0,1,0)T,e(3) = (0,1,0,0)T, and e(4) = (1,0,0,0)Tconstitutes a vector space in R4. Also, they are orthonormal basis vectors in R4, since every vector in that space can be represented by finite combination of them, for example, (1,2,−3,4)T= 1 ×e(4) + 2 ×e(3) −3×e(2) + 4 ×e(1). The set of e(1),e(2),e(3), and e(4) are linearly independent. The corresponding basis matrix, called canonical basis matrix, is E= (e(1),e(2),e(3),e(4)). 4 Proposed Approach Process variant analysis can help business analysts to find why and how two business process variants, each represented by a set of process executions, differ from each other. In this paper we focus on statistically identifying the differences of two process variants, either in the control flow or in the performance dimension. For instance, we are interested in identifying which sequences of activities occur more frequently in one process variant, or which activity has a statistically significant difference in duration between the two process variants. Fig. 2: Approach for constructing mutual fingerprints Given the event logs of two process variants, our approach revolves around the construction of a representative directly-follows graph from each variant, called mutual fingerprint. A fingerprint highlights the statistically-significant differences between the two variants, along the control-flow and activity duration dimensions. To construct such mutual fingerprints, we perform the following three steps, as shown in Fig. 2: 1. Feature generation: This step encodes every single trace of the input event log of each of the two process variants, into a set of vectors of the same length for every event. Each vector contains the respective wavelet coefficients for a specific event. Essentially, a wavelet coefficient is an encoding of the time series behind each trace. For a trace, these vectors are stacked into a single vector. This way allows the encoding of a process variant as a matrix, called design matrix, which is used in the next step. 2. Feature selection: In this step, the wavelet coefficients are used to build features to train a binary classifier. This procedure can be repeated several times for crossvalidation purposes, and a statistical test is performed on top of the results of crossvalidation, to ensure that the selected features (events classes in the log) provide enough information to discriminate the two classes arising from the two process variants. 3. Filtering: This last step filters the log of each process variant by keeping only those traces that contain discriminatory events discovered from the previous stage. A mutual fingerprint is then built from the traces left for each process variant log. In the rest of this section, we first formally define the notion of discrete wavelet transformation and then use this to illustrate the above three steps in detail. 4
4.1 Discrete Wavelet Transformation and Time-Series Encoding In Sec. 3 we defined a vector space, however, it must be noted that for an arbitrary vector space, there are infinitely number of basis matrices where one can be obtained from the others by a linear transformation [16]. Among several basis matrices, Haar basis matrix is one of the most important set of basis matrix in Rnthat plays an important role in analysing sequential data [17]. Formally, it is defined as follows (for the sake of exposition lets assume that the dimension is power of two): Definition 6 (Haar basis matrix). Given a dimension of power two, i.e., 2n, the Haar basis matrix can be represented by the following recurrent equation [18]: H(n) = H(n−1) ⊗1 1,I(n−1) ⊗1 −1,H(0) = 1 (1) where H(n)is the matrix of Haar vectors of degree 2n,I(n)is an identity matrix of size 2n, and ⊗is the outer-product operator. Haar basis vectors can be derived for dimensions of arbitrary lengths that are not necessarily to be power of two, however, the recurrent formula becomes more complicated [19]. A few examples of Haar basis matrices are as follows: H(1) = 1 1 1−1,H(2) = 1 1 1 0 1 1 −1 0 1−1 0 1 1−1 0 −1 From now on, we show a Haar basis matrix by Hwhenever the corresponding dimension is understood from the context. Definition 7 (Time-series data [20]). A time series {xt}, is a sequence of observations on a variable taken at discrete intervals in time. We index the time periods as 1,2, ..., k. Given a set of time periods, {xt}is shown as a column vector x= (x1, . . . , xk)Tor a sequence x1x2. . . xk. Every time-series data can be decomposed into a set of basis time-series called Haar Wavelet [21]. A Haar wavelet time-series represents the temporal range of variation in the form of a simple step function. For a given time-series, {xi}, of length n, the corresponding Haar wavelet basis time-series are shown by Haar basis vectors in Rn [19], see Def. 6. For example, consider a time-series like x= (3,5,9,1)T, then it can be decomposed into the sets of Haar wavelet time-series shown in Fig. 3. In the above example, one sees that each Haar wavelet time-series has a corresponding Haar basis vector. Thus, the input time-series, x, can be represented as the sum of Haar basis vectors with corresponding coefficients. More compactly, it can be easily represented by the following matrix operation, called Discrete Wavelet Transformation (DWT): x=Hw (2) where wis a column vector that contains wavelet coefficients. For the above example, Eq. 2 is as follow: 3 5 9 1 = 1 1 1 0 1 1 −1 0 1−1 0 1 1−1 0 −1 4.5 −0.5 −1 4 The crucial observation, is that for a given time-series, the set of Wavelet coefficients show available variations in the time-series at different resolutions. The first coefficient 5
Fig. 3: Decomposition of a time-series into a set of Haar Wavelet series is the global average value of time-series, i.e., w1=3+5+9+1 4= 4.5. The second coefficient shows the difference in average between the average of the first half and the average of the second half, i.e., (5+3)/2−(1+9)/2 2=−0.5. This process can be applied recursively until reaching a single element. Hence, one can use Wavelet coefficients as a sound way to encode time-series that inherit variability information. 4.2 Feature Generation The technique in this section generates a sets of multidimensional features, x, for every trace σ. The procedure can be seen as an encoding task that maps a trace into a multidimensional vector space. This encoding is used to identify both control-flow and performance differences between two process variants. For the sake of simplicity we present it for control-flow dimension. The technique in this section provides numerous advantages for analysing sequential data. It is a lossless encoding such that the input time-series can be recovered by the Haar basis matrix for that vector space, see Eq. (2). Second, by DWT-encoding the time-series before analysing it, well-known problems of auto-correlation and crosscorrelation are significantly alleviated, since the generated features are almost uncorrelated [21, 22]. Thus, without losing information one can safely work only with wavelet coefficients rather than over the raw data. Given an input trace, the proposed technique contains three parts, i.e., binarization, vectorization, and stacking. Binarization is a procedure to generate a set of time-series from an input trace. Vectorization encodes every time-series into a vector representation with the help of DWT. Finally, to have a consolidated representation for the generated vectors, they are stacked into a single vector. The starting point for generating a set of features in a vector space is to represent an input trace as several {0,1}time-series that are called binarization. Formally: Definition 8 (Binarization). Given a universal set of activity names E, and trace σ, function f() maps σinto a set of |E| time-series of length |σ|, i.e., ∀ei∈ E, f : (ei, σ)→ {0,1}|σ|. The above definition provides time-series of zeros for an event that does not exist in an input trace. This way one can represent all traces in a unique vector space 2. For example, consider a trace like σ=e1e2e1e1, with E={e1, e2, e3}, then, f(e1, σ) = 1011,f(e2, σ) = 0100, and f(e3, σ) = 0000. Binarization of a given trace provides a time-series for each event of it. Vectorization based on DWT, see Eq. 2, captures simultaneously frequency and location in time information, and embeds auto-correlation and cross-correlation information in the generated features. Formally: 2In practice we keep only non-zero elements in the implementation. 6
Definition 9 (Vectorization). Given a time-series x= (x1, x2, . . . , xn)Twhere xi∈ {0,1}, function g(), computes the corresponding wavelet coefficients, w, for x, i.e., g(x) = w=H−1x. In the above definition, H−1is the inverse of Haar basis matrix for Rn. For example, for time-series x(1) = (1,0,1,1)T,x(2) = (0,1,0,0)T, and x(3) = (0,0,0,0)Tthe corresponding wavelet coefficients w(1),w(2), and w(3) are as follows: 0.75 −0.25 0.5 0 | {z } w(1) = 0.25 0.25 0.25 0.25 0.25 0.25 −0.25 −0.25 0.5−0.5 0 0 000.5−0.5 | {z } H−1 1 0 1 1 |{z} x(1) , 0.25 −0.25 −0.5 0 | {z } w(2) , 0 0 0 0 |{z} w(3) According to the above example, for a trace like σ=e1e2e1e1, to have a consolidate representation we stack together the coefficient vectors into a single vector, formally: Definition 10 (Vector stacking). For an input trace σ, and universal of activities E, with |E| =k, lets assume that w(1),w(2),...,w(k)show the corresponding wavelet coefficients vectors, then the stacked vector is defined as w(σ)= (w(1)T,w(2)T,...,w(k)T). Regarding to the above definition, a design matrix Dfor a process variant is defined to be a matrix whose rows are the stacked vectors of the corresponding traces. As an example for a process variant containing only two traces, i.e., σ1=e1e2e1e1, and σ2= e1e2e3e1, the respective design matrix after binarization, vectorization, and stacking is as follow: D=e1e1e1e1e2e2e2e2e3e3e3e3 w(σ1)0.75 −0.25 0.5 0 0.25 −0.25 −0.5 0 0 0 0 0 w(σ2)0.5−0.25 0 0 0.25 −0.25 −0.5 0 0.25 −0.25 0 0.5 One can see that the first four columns show the wavelet coefficients for event e1, the second four columns show the wavelet coefficients for event e2, and so on. It is easy to see that wavelet coefficients for e2are the same for σ1and σ2; however for e1only three out of four coefficients are equal which shows different frequency and location of this event between σ1and σ2. In practice, to have a unique and common vector space for the encoding of two process variants, we set the dimension of the vector space to the length of the longest trace for both variants. If the alphabet of process variants are different then the union of them is considered as the universal alphabet. Also, an analyst can generate different kind of features; for example one can create a design matrix for adjacent events in traces, where the features are like eiej, with j=i+ 1, instead of only single events. Time complexity. The time complexity of the proposed approach is cubic on the length of the longest trace in the worst-case. However, in practice it is much less than this amount: lets assume that there are two process variants ς1,ς2with n1,n2number of traces respectively, E, is the universal activity names, and d=max|σ|,∀σ∈ς1, ς2, is the length of the longest trace between variants. Thus, computing the Haar basis matrix and its inverse for Rdrequire O(log2d), and O(d3)3operations respectively. It must be mentioned that [23] proposed O(d2)for computing the inverse of a matrix in an 3Note that the cubic complexity is the required time for computing the inverse matrix from scratch. To this end, there are much more efficient approaches like Coppersmith–Winograd algorithm with O(d2.37). 7
incremental way. To create the design matrix D(i),for i= 1,2, the number of required operations is O(ni∗(d∗ E)). However, this matrix is very sparse since for an input trace σ, only the entries related to ei∈σare non-zero. Another possibility to alleviate significantly the overall complexity is by precomputing and storing Haar matrices. 4.3 Feature Selection This section presents a novel feature selection method, grounded on machine learning, that captures the statistically significant features between two design matrices, i.e., D(i),for i= 1,2. Generally speaking, the representation of an entity in an arbitrary vector space contains a set of relevant and irrelevant features. Though, it is unknown as prior knowledge. Thus, a feature selection algorithm is the process of selecting a subset of relevant features that are the most informative ones with respect to the class label. Though feature selection procedures have numerous advantages for machine learning algorithms, in this paper, we leverage the idea of feature selection to highlight the existing differences between two process variants (class 1 and class 2). It must be stressed that every events ei∈ E is represented by a set of features (columns) in the designed matrices, see Def. 10, and each row is called an instance. The feature selection technique in this paper is a wrapper method, where a classifier is trained on a subset of features. If the trained classifier provides acceptable performance according to some criteria for unseen instances, i.e., test instances, then the subset of features is selected and called discriminatory features. Before proceeding, and for the sake of exposition we stack the design matrices D(1),D(2), with the corresponding class labels into a matrix called augmented design matrix as follow: X=D(1) 1 D(2) 2(3) Where 1,2are column vectors showing the class labels. It is clear that Xhas d× E+ 1 features or columns. From X, and for a subset of features, S ⊆ E, we split X into training and test datasets and denote them by X(train) :,S, and X(test) :,S. It must be mentioned that, to create training and test datasets we use stratified sampling method which keeps the proportion of classes similar in either datasets [24]. Stratified sampling helps to create sub-samples that are representative of the initial dataset. Definition 11 (Discriminatory feature). A subset of features, S, with |S| ≤ d× E + 1 is discriminatory if a binary classification function f:R|S| → {1,2}that is trained on X(train) :,S, provides acceptable performance according to some criteria for unseen instances in X(test) :,S. Definition 11 does not pose any restrictions on the shape or the number of parameters for f(), indeed, according to universal approximation theorem there exist such a mapping function between any two finite-dimensional vector spaces given enough data [25]. There are several ways to measure the performance of a classifier on unseen instances. An appropriate metric for imbalanced classes is F1score. It measures the performance of a classifier for one of classes only, e.g., class 1 or positive class, and does not take into account the true negatives, i.e., correct predictions for the other class into account, hence some information are missed [26]. Since in our setting two classes (i.e., process variants) are equally important, and for each subset of features the proportion of class labels varies, and probably imbalanced, we propose weighted F1score as follow: ¯ F1=γ1F(1) 1+γ2F(2) 1(4) 8
Where F(i) 1,for i= 1,2shows the F1obtained by the classifier for classes (i.e., 1, 2) on X(test) :,S. The coefficients γ1,γ2shows the proportion of class labels in the test dataset. It must be noted that the values of γ1and γ2varies for different subset of features. For example, assume that X(test)contains three instances as shown bellow: The test dataset corresponds to the wavelet coefficients for three traces σ1=e1e2e1e1, σ2=e1e2e3e1, and σ3=e3e1e3e3, where the first two traces belong to one process variant (class 1), and the last trace comes from another process variant (class 2). One can see that if we consider Sas the columns related to e1, then the proportion of classes are 2 3and 1 3, however for columns related to e3both numbers are 1 2. The reason is, an arbitrary trace σicontains portion of alphabet E, hence the coefficients γvary from subset to subset, and must be adjusted dynamically. For a subset of features, S, the worst performance of a classifier, f(), happens when it provides a single label for all test instances. It takes place when there is not enough information in Sfor the classifier to discriminate classes (process variants). In more details, if n1, and n2show the number of instances for each class in X(test) :,S, then the worst performance happens when f() labels all test instances as class 1 ( F(1) 1= 2n1 n2+2n1), or as class 2 ( F(2) 1=2n2 n1+2n2), therefore we denote the worst performance of classifier f() by ¯ F1 (0), that is defined as the weighted average of worst cases as follows: ¯ F1(0) =n1 n1+n2 | {z } γ1 ×2n1 n2+ 2n1 | {z } F(1) 1 +n2 n1+n2 | {z } γ2 ×2n2 n1+ 2n2 | {z } F(2) 1 (5) One must note that the value of ¯ F1 (0) like coefficients γ1and γ2varies for different S; thus it is adjusted dynamically. Regarding Eq. 5, for a subset of features, S, we define acceptable performance for a classification function f() if its performance measured by ¯ F1score, is statistically greater than the corresponding ¯ F1 (0) score at some significant level α. Formally, we formulate a statistical test containing the following hypotheses: H0:¯ F1=¯ F1(0) | {z } Null-hypothesis , H1:¯ F1>¯ F1(0) | {z } Alternative-hypothesis (6) The null-hypothesis (H0) in Eq. 6 assumes that for a subset of features S, the classifier f() is unable to discriminate test instances; in other words if Srepresents columns relating to a set of events, then, it claims that the control-flows containing these events are not statistically different between process variants, whereas the alternative-hypothesis (H1) claims they differ. To make the statistical test in Eq. 6 work, we invoke stratified k-fold cross-validation procedure to measure the performance of the classifier ktimes for S. In each round of cross-validation, different training and test datasets, X(train) :,S, and X(test) :,Sare obtained via stratified sampling method, and the corresponding ¯ F1score is calculated. Based on Central Limit Theorem (CLT), the average of ¯ F1scores (ktimes) approximates a normal distribution for k > 30 or a t−distribution for small knumbers [27]. Complexity. In practice, a feature selection algorithm has to do an exhaustive search to obtain subsets of features that are representative of the input dataset. In gen- 9