scieee AI-readable full text Open interactive document viewer

Conformance checking and diagnosis in process mining

Munoz-Gama, Jorge

Abstract

In the last decades, the capability of information systems to generate and record overwhelming amounts of event data has experimented an exponential growth in several domains, and in particular in industrial scenarios. Devices connected to the internet (internet of things), social interaction, mobile computing, and cloud computing provide new sources of event data and this trend will continue in the next decades. The omnipresence of large amounts of event data stored in logs is an important enabler for process mining, a novel discipline for addressing challenges related to business process management, process modeling, and business intelligence. Process mining techniques can be used to discover, analyze and improve real processes, by extracting models from observed behavior. The capability of these models to represent the reality determines the quality of the results obtained from them, conditioning its usefulness. Conformance checking is the aim of this thesis, where modeled and observed behavior are analyzed to determine if a model defines a faithful representation of the behavior observed a the log. Most of the efforts in conformance checking have focused on measuring and ensuring that models capture all the behavior in the log, i.e., fitness. Other properties, such as ensuring a precise model (not including unnecessary behavior) have been disregarded. The first part of the thesis focuses on analyzing and measuring the precision dimension of conformance, where models describing precisely the reality are preferred to overly general models. The thesis includes a novel technique based on detecting escaping arcs, i.e., points where the modeled behavior deviates from the one reflected in log. The detected escaping arcs are used to determine, in terms of a metric, the precision between log and model, and to locate possible actuation points in order to achieve a more precise model. The thesis also presents a confidence interval on the provided precision metric, and a multi-factor measure to assess the severity of the detected imprecisions. Checking conformance can be time consuming for real-life scenarios, and understanding the reasons behind the conformance mismatches can be an effort-demanding task. The second part of the thesis changes the focus from the precision dimension to the fitness dimension, and proposes the use of decomposed techniques in order to aid in checking and diagnosing fitness. The proposed approach is based on decomposing the model into single entry single exit components. The resulting fragments represent subprocesses within the main process with a simple interface with the rest of the model. Fitness checking per component provides well-localized conformance information, aiding on the diagnosis of the causes behind the problems. Moreover, the relations between components can be exploded to improve the diagnosis capabilities of the analysis, identifying areas with a high degree of mismatches, or providing a hierarchy for a zoom-in zoom-out analysis. Finally, the thesis proposed two main applications of the decomposed approach. First, the theory proposed is extended to incorporate data information for fitness checking in a decomposed manner. Second, a real-time event-based framework is presented for monitoring fitness.

Full text

ADVERTIMENT . La consulta d’aquesta tesi queda condicionada a l’acceptació de les següents condicions d'ús: La difusió d’aquesta tesi per mitjà del servei TDX (www.tesisenxarxa.net) ha estat autoritzada pels titulars dels drets de propietat intel·lectual únicament per a usos privats emmarcats en activitats d’investigació i docència. No s’autoritza la seva reproducció amb finalitats de lucre ni la seva difusió i posada a disposició des d’un lloc aliè al servei TDX. No s’autoritza la presentació del seu contingut en una finestra o marc aliè a TDX (framing). Aquesta reserva de drets afecta tant al resum de presentació de la tesi com als seus continguts. En la utilització o cita de parts de la tesi és obligat indicar el nom de la persona autora. ADVERTENCIA. La consulta de esta tesis queda condicionada a la aceptación de las siguientes condiciones de uso: La difusión de esta tesis por medio del servicio TDR (www.tesisenred.net) ha sido autorizada por los titulares de los derechos de propiedad intelectual únicamente para usos privados enmarcados en actividades de investigación y docencia. No se autoriza su reproducción con finalidades de lucro ni su difusión y puesta a disposición desde un sitio ajeno al servicio TDR. No se autoriza la presentación de su contenido en una ventana o marco ajeno a TDR (framing). Esta reserva de derechos afecta tanto al resumen de presentación de la tesis como a sus contenidos. En la utilización o cita de partes de la tesis es obligado indicar el nombre de la persona autora. WARNING. On having consulted this thesis you’re accepting the following use conditions: Spreading this thesis by the TDX (www.tesisenxarxa.net) service has been authorized by the titular of the intellectual property rights only for private uses placed in investigation and teaching activities. Reproduction with lucrative aims is not authorized neither its spreading and availability from a site foreign to the TDX service. Introducing its content in a window or frame foreign to the TDX service is not authorized (framing). This rights affect to the presentation summary of the thesis as well as to its contents. In the using or citation of parts of the thesis it’s obliged to indicate the name of the author PhD Thesis –2014 – CONFORMANCE CHECKING AND DIAGNOSIS IN PROCESS MINING Jorge Munoz-Gama Advisor Josep Carmona Vargas A thesis presented by Jorge Munoz-Gama in partial fulfillment of the requirements for the degree of Doctor per la Universitat Polit`ecnica de Catalunya – BarcelonaTech Author: Jorge Munoz-Gama Address: Department of Software Edifici Omega, Despatx S108 C/ Jordi Girona, 1–3 08034 Barcelona, Spain Email: jm[email protected]c.edu jm[email protected] Telephone: (+34) 93 413 78 61 To Loly, Emilio, Alex, and the rest of my family Summary Conformance Checking and Diagnosis in Process Mining In the last decades, the capability of information systems to generate and record overwhelming amounts of event data has experimented an exponential growth in several domains, and in particular in industrial scenarios. Devices connected to the internet (internet of things), social interaction, mobile computing, and cloud computing provide new sources of event data and this trend will continue in the next decades. The omnipresence of large amounts of event data stored in logs is an important enabler for process mining, a novel discipline for addressing challenges related to business process management, process modeling, and business intelligence. Process mining techniques can be used to discover, analyze and improve real processes, by extracting models from observed behavior. The capability of these models to represent the reality determines the quality of the results obtained from them, conditioning its usefulness. Conformance checking is the aim of this thesis, where modeled and observed behavior are analyzed to determine if a model defines a faithful representation of the behavior observed a the log. Most of the efforts in conformance checking have focused on measuring and ensuring that models capture all the behavior in the log, i.e., fitness. Other properties, such as ensuring a precise model (not including unnecessary behavior) have been disregarded. The first part of the thesis focuses on analyzing and measuring the precision dimension of conformance, where models describing precisely the reality are preferred to overly general models. The thesis includes a novel technique based on detecting escaping arcs, i.e., points where the modeled behavior deviates from the one reflected in log. The detected escaping arcs are used to determine, in terms of a metric, the precision between log and model, and to locate possible actuation points in order to achieve a more precise model. The thesis also presents a confidence interval on the provided precision metric, and a multi-factor measure to assess the severity of the detected imprecisions. Checking conformance can be time consuming for real-life scenarios, and understanding the reasons behind the conformance mismatches can be an effort-demanding task. The second part of the thesis changes the focus from the precision dimension to the fitness dimension, and proposes the use of decomposed techniques in order to aid in checking and diagnosing 7 8 fitness. The proposed approach is based on decomposing the model in single entry single exit components. The resulting fragments represent subprocesses within the main process with a simple interface with the rest of the model. Fitness checking per component provides well-localized conformance information, aiding on the diagnosis of the causes behind the problems. Moreover, the relations between components can be exploded to improve the diagnosis capabilities of the analysis, identifying areas with a high degree of mismatches, or providing a hierarchy for a zoom-in zoom-out analysis. Finally, the thesis proposed to main applications of the decomposed approach. First, the theory proposed is extended to incorporate data information for fitness checking in a decomposed manner. Second, a realtime event-based framework is presented for monitoring fitness. Chapter 1 Introduction There is a wide range of ways to define the concept of process. A simple but intuitive alternative is to define a process as a sequence of activities performed in a specific order to achieve a specific goal. And when this definition is considered one realizes that processes are everywhere in our daily lives. Processes are crucial parts of our industries and organizations. An assembly line in a car plant, or the management of packages in a delivery company are examples of processes in industrial scenarios. However, the concept of process is wider than that, being present in any daily activity: buying groceries in the city marked is, by itself, a process. When you go to a market you visit the different stands in a given order. The stands where you buy may depend on your needs that day (e.g., groceries for yourself or to prepare a big meal for some guests), or even on the date itself (e.g., the butcher closes on Monday). The order of the stalls is determined by a set of factors (e.g., buy in stalls close to each others to avoid crossing the market each time, or buy heavy purchases at the end to not carry them around). Even concurrent activities may appear (e.g., send your son to buy bread while you buy the fish). Hence, buying groceries is a complete process with all its elements. Other examples of processes are the application for a credit card, boarding and security procedures before a flight, or the preoperative steps before a surgical procedure. The times of paper and ink are progressively passing, and nowadays more and more organizations are supported by some kind of IT system. The support of the IT system in small organizations is usually passive, like the use of simple spreadsheets to keep the accounts of a small business. In other cases, like in banking, this support plays a more active role where each action is strictly controlled and monitored by the IT system. But most the IT systems used in practice have something in common: the possibility to keep some kind of record of the actions occurred during the executions of the process they support. This records are called event logs. Consider, for example, a doctoral scholarship process of some university. Doctoral students that want to apply for a scholarship submit their academic record, the CV of their 15 16 Chapter 1. Introduction advisor, and a description of their proposed project. Then the university evaluates the documentation and decides whether they grant the scholarship. The process starts collecting all the documents and starting the procedure (Start Processing). Then, the three documents are evaluated in any order (Evaluate Academic Record,Evaluate Advisor CV and Evaluate Project). Once all documents have been evaluated, a final evaluation is done by the chief of the department (Final Evaluation) and the application is accepted (Accepted) or rejected (Rejected). Finally, the decision taken is notified to the student (Notify Results). Table 1.1 show an example of an event log recorded by the IT system supporting this scholarship process. Each row represents an event of the log, and the events are grouped, not chronologically, but by student – i.e., case identifier – to help on understanding the process. Case Event Timestamp Activity Employee Student . . . 1 1 01-01-2014 10:00 Start Processing Merce Alex . . . 1 2 01-01-2014 11:30 Evaluate Academic Record Fernando Alex . . . 1 4 01-01-2014 13:30 Evaluate Project Fernando Alex . . . 1 8 01-01-2014 17:00 Evaluate Advisor CV Fernando Alex . . . 1 9 02-01-2014 10:00 Final Evaluation Ana Alex . . . 1 11 02-01-2014 11:00 Accept Ana Alex . . . 1 12 02-01-2014 12:00 Notify Results Merce Alex . . . 2 3 01-01-2014 12:00 Start Processing Merce Dolores . . . 2 5 01-01-2014 14:00 Evaluate Academic Record Maria Dolores . . . 2 6 01-01-2014 15:00 Evaluate Advisor CV Maria Dolores . . . 2 7 01-01-2014 16:00 Evaluate Project Fernando Dolores . . . 2 10 02-01-2014 10:30 Final Evaluation Ana Dolores . . . 2 13 02-01-2014 13:00 Reject Ana Dolores . . . 2 15 02-01-2014 16:00 Notify Results Merce Dolores . . . 3 14 02-01-2014 15:00 Start Processing Merce Emilio . . . 3 16 02-01-2014 17:30 Evaluate Academic Record Maria Emilio . . . 3 17 02-01-2014 18:00 Evaluate Project Maria Emilio . . . 3 18 03-01-2014 10:00 Final Evaluation Ana Emilio . . . 3 19 03-01-2014 11:00 Reject Ana Emilio . . . 3 21 03-01-2014 13:00 Notify Results Merce Emilio . . . 4 20 03-01-2014 12:00 Start Processing Merce George . . . . . . . . . . . . . . . . . . . . . . . . Table 1.1: Example of a partial event log for the scholarship process, grouped by case. The information contained on the event logs represents an unbiased reflect of the real process as it is, being the perfect starting point for process mining techniques. 1.1. Process Mining 17 1.1 Process Mining Process mining is a relative young research discipline that sits between machine learning and data mining on the one hand, and process modeling and analysis on the other hand. The idea of process mining is to discover, monitor and improve real processes by extracting knowledge from event logs readily available in today’s IT systems [4]. Event logs are unbiased footprints representing the process as it is. This contrasts with the process assumed by the process owners, a perception possibly biased by their understanding of how the process is executed. Event logs are the starting point of all process mining techniques, that use them to discover, verify or extend models for the process. In some cases these models are used to gain insight, document, or analyze the process, for example to simulate future scenarios. In other cases, the model is used directly to support the process, for example as part of some workflow management system. But in any case, a model close to the reality is required to obtain good results. Figure 1.1 shows an overview of how process mining is structured. conformance discovery enhancement controls / supports models / analyzes record events REALITY PROCESS MODEL EVENT LOG IT SYSTEMS Figure 1.1: Overview of process mining and its three types of techniques: discovery, conformance and enhancement [4]. Figure 1.2 shows a possible workflow model discovered from the scholarship process event log of Table 1.1. For simplicity purposes, the model is defined using an informal but intuitive notation, instead of wide-spread process formalisms such as BPMN [69], Petri nets [68], or 18 Chapter 1. Introduction YAWL [9]. In this informal notation AND diamonds model concurrent activities and XOR diamonds represent mutually exclusive activities, similar to the gateways of BPMN. Start Processing AND Evaluate Project Evaluate Academic Record Evaluate Advisor CV AND Final Evaluation XOR Accept Reject XOR Notify Results Figure 1.2: Informal process model of the scholarship process. Process mining techniques can be grouped into three classes depending on their purpose: discovery,conformance, and enhancement. Discovery: A discovery technique takes an event log as input and produces a model only considering the knowledge extracted from the log. For example, the model in Figure 1.2 could be an example of model obtained from logs of the scholarship process. Discovery is the oldest sub-discipline in process mining, and it is the one with more approaches proposed. The list of approaches is long, as long is the list of different techniques used to discover models. For instance, α-algorithm [13] is based on detecting relations among activities of the log, Genetic Miner [58] uses evolutionary algorithms, or Genet [37] and ILP Miner [101] are based on the theory of regions. The model discovered is not restricted to the workflow perspective of the process. If the log contains additional information one can also discover resource-related models, for example capturing the interactions between the actors of the process [11]. Conformance: Unlike discovery, conformance considers both an event log and a model as inputs. The goal of conformance techniques is to check if the behavior modeled represents accurately the behavior observed in the log. Some examples of conformance techniques are [79, 15, 62, 67, 97]. Conformance can be used to verify if a process documentation is still updated, or to check if the model obtained using a discovery approach is a faithful representation of the process. Conformance checking is the main goal of this thesis and it is presented in more detail in Section 1.2. Enhancement: Like conformance, enhancement also considers both an event log and a model as inputs. However, enhancement techniques aim to improve the a-priori model with information contained in the log. This enhancement could be done by means of repairing the model to better conform the observed behavior [44]. Another option is to extend the model with additional information, adding a new perspective to the process 1.2. Conformance Checking and its Challenges 19 model. For example, detecting and including the data dependencies that affect the routing of a process execution [83]. 1.2 Conformance Checking and its Challenges Most of the research in process mining has mainly focused on discovery techniques, neglecting the importance of conformance. However, conformance techniques have become an essential part in the process life cycle. Regulations, certifications or simply communication purposes are making most organization document their processes. Process models are also required in process-aware information systems such as workflow management systems, or for analyzing and simulating future scenarios. However, models not representing adequately the reality could lead to wrong conclusions. Therefore, conformance techniques are necessary to detect inadequate models, or models that have become obsolete due the continuously changing nature of the processes. Conformance is also necessary to compare several models for the same process and determine the best option, for example among models obtained with different discovery algorithms. 1.2.1 Dimensions of Conformance Checking By measuring the conformance between an event log and a process model one is concerned about quantifying if a given model is valid description of the reality. A first naive approach could be to consider that a model and a log conform each other simply if the model captures all the behavior observed in the log. In other words, a perfect conformance would require that all the traces in the log fit in the model. However, a more accurate study shows that, although important, this condition alone is not sufficient. For example, let us consider the model in Figure 1.3 for the scholarship example. The informal semantics behind this model (similar to Petri nets), know as a flower model, is that it captures a possible sequence of the activities, in any order and for any length. Therefore, any possible log involving the same activities fit this model. However, as one can see, this model provides absolutely no insight into the process or how the activities are executed. In [80, 79] the multidimensional nature of the conformance is studied, and the authors propose four dimensions – fitness,precision,generalization and simplicity – to fully capture the notion of how good a given model is with respect to the reality. Fitness As it has been already mentioned, this dimension indicates how much of the observed behavior is captured – fits – the process model. For example, the trace hStart Processing, Evaluate Academic Record, Evaluate Project, Evaluate Advisor CV, Final Evaluation, Accept, Notify Resultsiwith case id 1 in Table 1.1 perfectly fits the model in Figure 1.2. However, the trace Start Processing, Evaluate Academic Record, Evaluate Project, Final Evaluation, Reject, Notify Results with case id 3 does not fit the model because the advisor CV is never checked, denoting that the application of 20 Chapter 1. Introduction Evaluate Academic Record Evaluate Advisor CV Reject Notify Results Final Evaluation Accept Start Processing Evaluate Project Start End Figure 1.3: Informal flower process model of the scholarship process, modeling any possible sequence of the activities. the student is rejected without proper evaluation. On the other hand, both traces fit the flower model of Figure 1.3. Part III of this thesis is devoted to analyze the fitness dimension in a decomposed way, and consequently a more formal presentation of the fitness dimension is included in these sections. Precision This dimension addresses overly general models: precision penalizes a process model for allowing behavior that is unlikely given the observed behavior in the event log. For example, in the log of Table 1.1 we observe that, although the three documents could be evaluated concurrently, the university employees always evaluate first the academic record. That way, if the student is clearly not suitable for the grant (e.g., the grade does not reaches the minimum necessary), the advisor and project evaluation is done superficially. Consequently, the model shown in Figure 1.4 is a more precise representation of the reality than Figure 1.2. The flower model in Figure 1.3 is the perfect example of completely imprecise model. Part II of this thesis is devoted to the precision dimension, and consequently a more formal presentation of the precision is included in these sections. Generalization This dimension addresses overfitting models: a good model must be able to generalize and reproduce possible future behavior, instead of capturing simply each trace of the observed log. For example, Figure 1.5 shows a model that only captures one possible order for the evaluation of the documents and that results necessarily in the acceptance of the application. This model perfectly captures the first trace in the Table 1.1, but it is unable to generalize for any other possible process execution. Simplicity This dimension penalizes models that are unnecessarily complex: following 1.2. Conformance Checking and its Challenges 21 Evaluate Academic Record AND Evaluate Project Evaluate Advisor CV AND Final Evaluation XOR Accept Reject XOR Notify Results Start Processing Figure 1.4: More precise model for the scholarship process. Start Processing Evaluate Academic Record Evaluate Project Evaluate Advisor CV Final Evaluation Accept Notify Results Figure 1.5: Model that overfitting the first trace of the scholarship log, and does not generalize for possible future behavior. the Occam’s Razor principle, models that explain the behavior observed in the log in a simple way are preferred to those that use redundant components. Figure 1.6 is an example where the unjustified use of duplicate activities – i.e., an activity of the process is represented in different parts of the model – complicates unnecessary a model for the scholarship process. 1.2.2 Replay-based and Align-based Conformance Checking In early works on conformance, most of the proposed approaches were based on replaying the log on the model to detect discrepancies. Some replay-based approaches simply stop at the point where the model is not able to reproduce the trace anymore. Other approaches perform the replay in a non-blocking way, regardless whether the path of the model is followed or not, like [80]. More sophisticate approaches, like [98], include also a look ahead function to determine the most promising path. Recently, another family of approaches has appeared, where the conformance checking is done in a global manner, by means of aligning both the modeled behavior and the behavior observed in the log. Examples of conformance approaches based on alignments are [15, 54]. These approaches handle conformance in a global way, but they are computationally more expensive compared with replay-based approaches. In the first part of this thesis, both replay-based and align-based approaches are explored to check precision. In the second part, a decomposed technique is proposed to alleviate the conformance diagnosis computation time, specially for those analysis based on alignments due their expensive cost. 22 Chapter 1. Introduction Start Processing XOR Evaluate Project Evaluate Academic Record Evaluate Advisor CV XOR Final Evaluation XOR Accept Reject XOR Notify Results Evaluate Project Evaluate Academic Record Evaluate Advisor CV Evaluate Academic Record Evaluate Advisor CV Evaluate Project Evaluate Advisor CV Evaluate Academic Record Evaluate Project Evaluate Advisor CV Evaluate Academic Record Evaluate Advisor CV Evaluate Project Evaluate Project Evaluate Academic Record Figure 1.6: Unnecessary complex model for the scholarship process. 1.2.3 Challenges of Conformance Checking Conformance checking must confront a set of challenges in order to be applied successfully. In particular, we identify five challenges: four-dimensional conformance,big data and real time, noise, incompleteness, unfitness, and indeterminism,conformance diagnosis and modeling notations. This thesis addresses all these the challenges. In recent years other authors have also proposed approaches in that direction. Challenge 1 – Four-Dimensional Conformance. Since the multidimensional nature of the conformance – fitness, precision, generalization and simplicity – was first stated in [82] and later refined in [84, 80, 79], the relation between the four dimensions and the adequacy of the results has become more and more clear. Works like [33] illustrate the need of metrics for all the dimensions in order to discover good models. However, most of the approaches proposed in conformance, specially on the early days, are focused exclusively on fitness. Conformance checking must provide also metrics for other dimensions such as precision, generalization, and simplicity. Challenge 2 – Big Data and Real Time. The amount of information recorded by the information systems periodically grows exponentially. Event logs become more detailed, complete and large, and with them also the process models. Conformance techniques must evolve accordingly in order to handle this exponential growth, specially those based on the global aligning of behaviors. Moreover, the fast implantation of online and monitoring paradigms in nowadays systems is requiring faster and more fine-grained conformance approaches. Challenge 3 – Noise, Incompleteness, Unfitness, Indeterminism. Most of the problems found in process mining have to deal with this four concepts: noise, incompleteness, unfitness, and indeterminism. Noise in event logs can appear by traces incorrectly 1.3. Contributions of the Thesis 23 recorded (for instance, due to temporary system failure), or traces reflecting exceptional situations not representative for the typical behavior of the process. Noise is a wellknown problem in discovery approaches [4], and therefore, conformance approaches proposed should also be noise-aware too. On the other hand, assuming a complete log is an unrealistic assumption in most of the cases. The number of traces necessary for a complete log grows exponentially when the number of concurrent actions in the model is increased. Moreover, some concurrent actions may look sequentially in the log because performing one action is always much faster than the other. Conformance techniques must include mechanisms to aid the process analyst on deciding whether the problems are real conformance anomalies or result of the incompleteness of the log. Unfitness – i.e., situations where the behavior observed in the log cannot be reproduced by the model – is a conformance dimension itself, but it may influence other dimensions: if the model cannot reproduce the observed behavior, it cannot determine in what state was the system in that moment. Conformance approaches should try to abstract from how the alignment between observed and modeled behavior is done. This include also the indeterministic situations produced when a trace in the log can be mapped to several sequences in the model. Challenge 4 – Conformance Diagnosis. The importance of indicating the location of the problems for a proper conformance diagnosis was already emphasized in the seminal work [79]. However, the diagnosis mechanisms cannot be limited to simply locate the possible conformance errors, but they must go a step further: they must provide aiding mechanisms to the analyst to fully understand the root causes of the problems. For example, making it possible to dynamically inspect the conformance results at different levels of abstraction, or to group mismatches with a similar root cause. Diagnosis tools are specially useful for large models or models with a high degree of complexity, where the causes of the problems are difficult to grasp. Challenge 5 – Modeling Notations. Most of the approaches presented in conformance so far focus exclusively on the control-flow perspective of the process – i.e., the order of the activities – and to one specific workflow modeling notation, Petri nets [68]. Conformance techniques must include other modeling notations, and other perspectives. In addition, there must appear new approaches to check the conformance of multi-perspective models – models capturing more than one perspective – like for example [54], where integer linear programming techniques are used to validate both the control-flow and the data perspectives of a model. 1.3 Contributions of the Thesis Process mining, and more specifically conformance checking and conformance diagnosis, are the main goals of the contributions proposed in this thesis. These contributions can 24 Chapter 1. Introduction be grouped in two categories: those that aim on analyzing precision, and those that use decomposition to diagnose conformance problems in a decomposed way. Table 1.2 summarizes the contributions of this thesis. The table includes a description of the contribution, the category it belongs to, the chapter where they are presented, the conformance challenge they mainly address (cf. Section 1.2), and the publications where they were proposed. The remainder of the section enumerates the contributions of this thesis. Contribution Chapter Challenge Publication Prec Approach to quantify and analyze the precision between a log and a model based on escaping arcs. 3 1,2 [62] Robustness and confidence interval for precision based on escaping arcs. 4 1,2,3 [64][63] Severity assessment of the imprecision point detected. 4 1,4 [64][63] Precision checking based on aligning observed and modeled behavior. 5 1,3 [18] Abstraction and directionality in precision based on alignments. 5 1,3 [19] Decomp Decomposed conformance checking based on SESE components. 6 2,4 [65] [67] Hierarchical and topological decomposition based on SESE components for conformance diagnosis. 7 4 [66] [67] Decomposed conformance checking for multi-perspective models. 8 5 [55] Decomposed Conformance Checking for Real-Time scenarios. 9 2 [29] Table 1.2: Chart summarizing the contributions of this thesis. 1.3.1 Precision Checking •A novel approach to measure precision in conformance checking, based on detecting and assessing escaping arcs. The escaping arcs identify where the modeled behavior allows 2.3. Process Models 31 The purpose of XES is not only the storage of event logs, but to provide a standard format for the interchange of event log data between tools and application domains. 2.3 Process Models Process models are the second element necessary in any conformance checking approach. A process model captures the behavior to compare with respect to the behavior observed in the log. Different models are used to capture different perspective of the process. In this thesis we mainly focus on the control-flow perspective of the processes, and therefore the models are used to capture the ordering between the actions. For the sake of generality, whenever it is possible, we abstract from any specific process modeling notation defining a generic process model. In Section 2.4 we present several concrete process modeling languages. A generic process model semantics can be abstracted using a basic transition systems as a placeholder for more advanced modeling languages, such as Petri nets, UML, BPMN, EPCs, etc. Definition 2.9 (Process Model).Aprocess model semantic is abstracted as a transition system TS ={S, T, %, SI, SF}over a set of model tasks Twith states S, initial states SI⊆S, final states SF⊆S, and transitions %⊂ S×T×S. When no set of final states is specified, all states are assumed to be final states. A task t∈Tis enabled to be executed in the state sof the model M, denoted as (M, s)[ti, if there is a transition with task tin the state s, i.e., (s, t, s0)∈%. (M, s)[ti(M, s0) denotes that tis enabled in sand executing tresults in the state s0. Let σ=ht1, t2, . . . , tni ∈ T∗be a sequence of model tasks. (M, s)[σi(M, s0) denotes that there is a set of states s0, s1, . . . , sn such that s0=s,sn=s0and (M, si)[ti+1i(M, si+1) for 0 ≤i<n. Definition 2.10 (Complete Task Sequences).The set of complete tasks sequences φtof process model Mis the set of all possible sequences of tasks executed from an initial state reaching a final state, i.e., φt(M)=[σ|(M, sI)[σi(M, sF)}for all sI∈SIand sF∈SF. Figure 2.2 shows a process model Mcapturing the order of the tasks T=t1. . . t8using the informal semantics of Chapter 1, i.e., AND models concurrent tasks and XOR mutually exclusive tasks. The set of complete tasks sequences of this model is: 32 Chapter 2. Preliminaries φt(M) = ht1, t2, t3, t4, t5, t6, t8i ht1, t2, t3, t4, t5, t7, t8i ht1, t2, t4, t3, t5, t6, t8i ht1, t2, t4, t3, t5, t7, t8i ht1, t3, t2, t4, t5, t6, t8i ht1, t3, t2, t4, t5, t7, t8i ht1, t3, t4, t2, t5, t6, t8i ht1, t3, t4, t2, t5, t7, t8i ht1, t4, t2, t3, t5, t6, t8i ht1, t4, t2, t3, t5, t7, t8i ht1, t4, t3, t2, t5, t6, t8i ht1, t4, t3, t2, t5, t7, t8i AND AND XOR XOR t1 t2 t3 t4 t5 t6 t7 t8 Figure 2.2: Informal process model for tasks t1. . . t8. In a labeled process model (or observable process model) the tasks represent activities in a real process that are potentially observable, i.e., they may cause events in a log. This potential observability is captured by the labeling function, which relates observable tasks in the model to activities of the process. Definition 2.11 (Labeled Process Model).Alabeled process model (or simply a process model) is a tuple M= (TS, l), where the transition system TS ={S, T, %, SI, SF}represents the semantics of the model, and l∈T9UAis a labeling function where UAis some universe of activity labels. The process models in this thesis are considered always labeled, unless stated otherwise. If a model task t6∈ dom(l), then it is called invisible (or also known as silent or unobservable). An occurrence of a visible task t∈dom(l) corresponds to observable activity l(t). Two or more tasks associated with the same activity are called duplicate. For instance, Figure 2.3 show a labeled process model for the scholarship variant process. The task t5is invisible, i.e., this action is not observed nor recorded in the log. Tasks t1and t8are duplicate tasks corresponding with the same activity (a)Set Checkpoint. 2.3. Process Models 33 (a) Set Checkpoint AND (b) Evaluate Project (c) Evaluate Academic Record (d) Evaluate Advisor CV AND XOR (e) Accept (f) Reject XOR (a) Set Checkpoint t1 t2 t3 t4 t5 t6 t7 t8 Figure 2.3: Informal labeled process model for scholarship variant process. Definition 2.12 (Process Model notations).Let M= (TS, l) be a process model with TS ={S, T, %, SI, SF}. •Tv(M) = dom(l) is the set of visible tasks in M. •Av(M) = rng(l) is the set of corresponding observable activities in M. •Tu v(M) = {t∈Tv(M)| ∀t0∈Tv(M)l(t) = l(t0)⇒t=t0}is the set of unique visible tasks in M, i.e., there are no other tasks with the same associated to the same activity. •Au v(M) = {l(t)|t∈Tu v(M)}is the set of corresponding unique observable activities in model M. In the example model Mof Figure 2.3 the set of visible tasks is Tv(M) = {t1, t2, t3, t4, t6, t7, t8} (all except t5), and the set of unique visible tasks is Tu v(M) = {t2, t3, t4, t6, t7}. The set of observable activities is Av(M) = {a, b, c, d, e, f}, while the set of unique observable activities is only Au v(M) = {b, c, d, e, f}. Similar to the set of complete task sequences, a labeled process model contains its corresponding set of complete activity sequences, i.e., sequences of tasks starting from an initial to a final state projected onto the set of observable activities. Definition 2.13 (Complete Activity Sequences).Let Mbe a process model with Ttasks and labeling function l. A sequence σv=ha1, a2, . . . , ani ∈ UA∗is a complete activity sequence of the model M, denoted as (M, sI)[σv.(M, sF) if and only if there is a complete tasks sequence σ∈T∗in Msuch that (M, sI)[σi(M, sF) and l(σ) = σv. The set of complete activity sequences of the model Mis denoted φ(M). The set of complete activity sequences of the model in Figure 2.3 is: 34 Chapter 2. Preliminaries φ(M) = ha, b, c, d, e, ai ha, b, c, d, f, ai ha, b, d, c, e, ai ha, b, d, c, f, ai ha, c, b, d, e, ai ha, c, b, d, f, ai ha, c, d, b, e, ai ha, c, d, b, f, ai ha, d, b, c, e, ai ha, d, b, c, f, ai ha, d, c, b, e, ai ha, d, c, b, f, ai 2.4 Process Modeling Formalisms There are a wide variety of process modeling formalism that match the generic process model definition of previous section. In this section we present some of these formalisms. In particular we focus on Petri nets and its extensions, the formal notation used to illustrate the process models examples of this thesis. 2.4.1 Petri Nets Petri nets [68] are one of most frequently used process modeling notations in process mining. Its formal semantics, its mathematical foundation, and its inherent capacity to model concurrency in a succinct way, make Petri nets perfect to model the control-flow perspective of processes. In addition, Petri nets are supported by an intuitive graphical notation, and there exists a wide range of tools and libraries to operate with them. Definition 2.14 (Petri Net).APetri net is a tuple PN = (P, T, F) with Pthe set of places, Tthe set of transitions, where P∩T=∅, and F⊆(P×T)∪(T×P) the flow relation. For a node n(place or transition) of a Petri net, •n(n•) is the predecessor (successor) set of n in A, i.e., •n={n0|(n0, n)∈F}and n•={n0|(n, n0)∈F}. The set of transitions Trepresent the set of tasks of generic process modeling definition. An example of Petri net is shown in Figure 2.4. The transitions are represented as square nodes, while the places are represented as circles. The states of a Petri net are called markings. The formal semantics of Petri nets are defined by the firing rule, that states the effects of firing an enabled transition. Definition 2.15 (Petri Net Semantics).Let PN = (P, T, F) be a Petri net. A marking Mis a multiset of places, i.e., M∈ B(P). A transition t∈Tis enabled in a marking M, denoted 2.4. Process Modeling Formalisms 35 a = Set Checkpoint b = Evaluate Project c = Evaluate Academic Record d = Evaluate Advisor CV e = Accept f = Reject t6 e t7 f p7 t8 a end t5 p7 p2 t3 c p5 p1 t2 b p4 p3 t4 d p6 start t1 a Figure 2.4: Petri net for scholarship variant process of Figure 2.3. as (PN , M)[ti, iff •t≤M.Firing transition tin M, denoted as (PN , M)[ti(PN , M0), results in a new marking M0=M− •t+t•, i.e., tokens are removed from •tand added to t•. A marking is graphically represented as black dots (called tokens) in places. For example, the marking represented in Figure 2.4 is M= [start]. In that marking, only t1is enabled, and firing t1, (PN , M)[t1i(PN , M0), will result in the marking M0= [p1, p2, p3]. In M0, t2, t3, t4are enabled simultaneously, and can be fired in any order. Similar to tasks sequences, a transition sequence from a Petri net can also be defined. Notice that, for the sake of clarity, the same notation is preserved between generic process models and Petri nets, referring to tasks or transitions in each particular case. Definition 2.16 (Transition Sequence).Atransition sequence σ=ht1, t2, . . . , tni ∈ T∗of Petri net PN , represented as (PN , M)[σi(PN , M0), denotes that there is a set of markings M0, M1, . . . , Mnsuch that M0=M,Mn=M0and (N, Mi)[ti+1i(N, Mi+1) for 0 ≤i<n. A marking M0is reachable from Mif there exists a σsuch that (PN , M)[σi(PN , M0). Similar to generic labeled process models, a Petri net can also be labeled, associating observable activities to the transitions of the model. Definition 2.17 (Labeled Petri Net).Alabeled Petri net PN = (P, T, F, l) is a Petri net (P, T, F ) with labeling function l∈T9UA, where UAis some universe of activity labels. Figure 2.4 shows a labeled Petri net for scholarship variant process of Figure 2.3. Similar to the generic labeled process model, we can define the visible transitions Tv(PN ), observable activities Av(PN ), unique visible transitions Tu v(PN ), and unique observable activities Au v(PN ) of a Petri net PN . Typically, invisible transitions are represented as filled squares, e.g., t5. Definition 2.18 (Activity Sequence).A sequence σv=ha1, a2, . . . , ani ∈ UA∗is a activity sequence of the Petri net PN , denoted as (PN , M)[σv.(PN , M0) if and only if there is a transition sequence σ∈T∗in PN such that (PN , M)[σi(PN , M0) and l(σ) = σv. In the context of process mining and business processes, processes are usually considered to start in an initial state and to end in a well-defined end state. Petri nets considering a initial and a final marking are called system nets. 36 Chapter 2. Preliminaries Definition 2.19 (System Net).A system net is a triplet SN = (PN , MI, MF) where PN = (P, T, F, l) is a labeled Petri net, MI∈ B(P) is the initial marking, and MF∈ B(P) is the final marking. A system net SN = (PN ,[start],[end]) is a possible system net for the Petri net PN in Figure 2.4. We define the set of complete transition sequences and the set of complete activity sequences as the sequence of transitions and activities from the initial marking to the final marking. Definition 2.20 (Complete Transition Sequence, Complete Activity Sequence).Let SN = (PN , MI, MF) be a system net with PN = (P, T, F, l). The set of complete transition sequences φtof SN is the set of all possible sequences of transitions executed from the initial marking and reaching the final marking, i.e., φt(SN )=[σ|(PN , MI)[σi(PN , MF)}. The set of complete activity sequences of system net SN is the set of all possible sequences of observable activities from the initial marking and reaching the final marking, i.e., φ(SN ) = [σ|(PN , MI)[σ . (PN , MF)}. 2.4.2 Workflow Nets Workflow nets [5, 7], commonly used for business and workflow processes, are a subclass of Petri nets with a well defined starting and ending place. Definition 2.21 (Workflow Net).Aworkflow net WN = (P, T, F, l, start,end) is a particular type of Petri net where: •start is a special source place with no incoming arcs, i.e., •start =∅ •end is a special sink place, with no outgoing arcs, i.e., end•=∅ •every node of the net must be on some path from start to end The Petri net in Figure 2.4 shown in the previous section is actually a workflow net. Workflow nets present a direct way to define system nets, with a single token in start as initial marking, and a single token in end as a final marking. Definition 2.22 (System Net from Workflow net).A system net SN = (WN ,[start],[end]) from the workflow net WN is the net where the initial marking is [start], and the final marking is [end]. 2.4.3 Other Formalisms There is a wide range of other model formalisms to describe processes. Each formalism has its own advantages and disadvantages, and its own tools to support it. Some examples of such formalisms are BPMN [69], YAWL [9], EPC [3], or UML [70], to enumerate some examples. 2.4. Process Modeling Formalisms 37 Business Process Model and Notation (BPMN) [69] is a standard for business process modeling that provides a graphical notation for specifying business processes based on a flowcharting technique very similar to activity diagrams from Unified Modeling Language (UML) [70]. The objective of BPMN is to support business process management, for both technical users and business users, by providing a notation that is intuitive to business users, yet able to represent complex process semantics. BPMN is one of the most used notations in the industry. BPMN is composed of events (denoted as circles), activities (denoted as rounded squares) and gateways (denoted as diamonds), among other elements, and the connections between them. Figure 2.5 illustrates a model for the scholarship variant process using BPMN notation1. (a) Set Checkpoint (c) Evaluate Academic Record (b) Evaluate Project (d) Evaluate Advisor CV (e) Accept (f) Reject (a) Set Checkpoint Figure 2.5: BPMN for scholarship variant process of Figure 2.3. Another notation is YAWL [9]. The original drivers behind YAWL were to define a workflow language that would support all (or most) of the typical workflow patterns [10] and that would have a formal semantics. The language is supported by a software system that includes an execution engine, a graphical editor and a worklist handler. The system is available as Open source software under the LGPL license. Figure 2.6 illustrates a model for the scholarship variant process using YAWL notation, where the atomic tasks (denoted as squares) can be possibly complemented with control flow elements such as AND-split, AND-join, XOR-split, XOR-join, OR-split or OR-join. (a) Set Checkpoint (b) Evaluate Project (c) Evaluate Academic Record (d) Evaluate Advisor CV (e) Accept (f) Reject (a) Set Checkpoint Figure 2.6: YAWL for scholarship variant process of Figure 2.3. 1For the sake of clarity, BPMN notation is abused representing an activity without label. Part II Precision in Conformance Checking 39 3.4. Precision based on Escaping Arcs 47 <a,b,d,g,i> <a,c,d,e,f,h,i> <a,c,e,d,f,h,i> <a,c,e,f,d,h,i> start t1 ap1 t2 b t3 c p2 p3 t4 d t6 f t5 e p5 p6 t7 g t8 h p4 p7 t9 iend <a,c,f> <a,c,d,f> <a,c,d,e,e> <a,c,e,d,e> <a,c,e,e> 4 <> 1 <a,b,d,g,i> 1 <a,c,d,e,f,h> 1 <a,c,d,e,f> 1 <a,c,d,e> 1 <a,c,d> 3 <a,c> 1 <a,b,d,g> 1 <a,b,d> 1 <a,b> 1 <a,c,e,d,f,h> 1 <a,c,e,f,d,h> 1 <a,c,e,d,f> 1 <a,c,e,d> 1 <a,c,e,f,d> 1 <a,c,e,f> 2 <a,c,e> 4 <a> 1 <a,c,d,e,f,h,i> 1 <a,c,e,d,f,h,i> 1 <a,c,e,f,d,h,i> a b d c e dg e d f f d h h hi i i f i 4 <> 1 <a,b,d,g,i> 1 <a,c,d,e,f,h> 1 <a,c,d,e,f> 1 <a,c,d,e> 1 <a,c,d> 3 <a,c> 1 <a,b,d,g> 1 <a,b,d> 1 <a,b> 1 <a,c,e,d,f,h> 1 <a,c,e,f,d,h> 1 <a,c,e,d,f> 1 <a,c,e,d> 1 <a,c,e,f,d> 1 <a,c,e,f> 2 <a,c,e> 4 <a> 1 <a,c,d,e,f,h,i> 1 <a,c,e,d,f,h,i> 1 <a,c,e,f,d,h,i> a b d c e dg e d f f d h h hi i i f i 0 <a,c,d,f> 0 <a,c,d,e,e> f e f0 <a,c,f> 0 <a,c,e,d,e> e 0 <a,c,e,e> e 0.81 event log process model ETC Precision metric Minimal Imprecise Traces modeling log behavior enhance with model behavior and detect imprecisions Figure 3.4: Route map of the precision based on escaping arcs. in the log. The number of escaping arcs and their location are used to estimate the precision of the whole system in terms of a metric. This step is explained in detail in Section 3.7. 4. Collecting minimal imprecise traces: Finally, all the precision problems detected are collected in terms of an event log, describing the minimal traces leading to a precision problem. This step is explained in Section 3.8. 48 Chapter 3. Precision based on the Log 3.5 Constructing the Observed Behavior In this section we present the first necessary step for the precision checking proposed in this section: determining the states conforming the observed behavior by means of an automaton. The state definition proposed in this section is based on the prefixes of the traces, i.e. given a log trace σreflecting an instance of the process, the prefixes of σdetermine the states reached by the system during that execution. Definition 3.1 (Prefixes of a Log).Let L∈ B(A∗) be an event log, where σ=ha1, a2, . . . , ani ∈ Lis a trace of the log. •(σ) is the set of prefixes of the trace σ, i.e., •(σ) = {ha1, a2, . . . , ami| m≤n}.•(L)∈ B(A∗) is the multiset of prefixes of the log L, i.e., •(L) = Uσ∈L•(σ). Notice that, the empty sequence hi and the complete sequence are prefixes of any trace. Let us consider for example the trace σ=ha, b, d, g, iiof log L1in Figure 3.5. The prefixes •(σ) = {hi,hai,ha, bi,ha, b, di,ha, b, d, gi,ha, b, d, g, ii} represent the states reached by the system during the execution recorded in σ. The set of prefixes resulting of applying this definition to all the traces in L1represents the set of observed states of the whole log. <a,b,d,g,i> <a,c,d,e,f,h,i> <a,c,e,d,f,h,i> <a,c,e,f,d,h,i> L1 a = Start Checkpoint b = Register Low-value Claim c = Register High-value Claim d = Check Policy e = Consult Expert f = Check Liability g = Complete Low-value Claim h = Complete High-value Claim i = Close Checkpoint Figure 3.5: Event log L1for a liability insurance claim process. The state information extracted from a log is used to construct a compact representation in terms of an automaton. The prefix automaton contains the states, the transitions between the states, and the weight of a state within the process. Definition 3.2 (Prefix Automaton of the Log).Let L∈ B(A∗) be an event log, where A is the set of activities. We define the prefix automaton of the log as an extension of the transition system definition AL= (S, A, %, ω, hi) such that: •the set of states correspond to the set of prefixes of the log, i.e., S={σ|σ∈ •(L)}. •the set of labels correspond to the set of activities of the log, i.e., A. •the arcs %⊆ (S×A×S) define the concatenation between prefixes and activities, i.e., %={(σ, a, σ · hai)|σ∈S∧σ· hai ∈ S}. 3.5. Constructing the Observed Behavior 49 •the function that determines the weight of a state is determined by the number of occurrences of the state in the multiset of prefixes of the log, i.e., ω(σ) = •(L)(σ). •the initial state corresponds with the empty prefix hi. 4 <> 1 <a,b,d,g,i> 1 <a,c,d,e,f,h> 1 <a,c,d,e,f> 1 <a,c,d,e> 1 <a,c,d> 3 <a,c> 1 <a,b,d,g> 1 <a,b,d> 1 <a,b> 1 <a,c,e,d,f,h> 1 <a,c,e,f,d,h> 1 <a,c,e,d,f> 1 <a,c,e,d> 1 <a,c,e,f,d> 1 <a,c,e,f> 2 <a,c,e> 4 <a> 1 <a,c,d,e,f,h,i> 1 <a,c,e,d,f,h,i> 1 <a,c,e,f,d,h,i> a b d c e dg e d f f d h h hi i i f i Figure 3.6: Prefix automaton AL1for the event log L1. Figure 3.6 illustrates the construction of the prefix automaton for the log L1. Each prefix of L1identifies a state. The number in the states represent the weight function. For instance, the state haihas a weight of ω(hai) = 4 because it appears four times in •(L). On the other hand, ha, biappears only once, i.e., ω(ha, bi) = 1. The initial state corresponds with the prefix hi. In [12], the authors proposed a configurable approach to construct a transition system from an event log. The definition of state and the events considered to build a state can be parametrized depending on the abstraction level desired. In particular, the parameters past, sequence, and no horizon will result in a transition system with the same characteristics as the prefix automaton proposed in this section. In Chapter 5 we consider the use of other values for the parameters and their effects on the precision checking. 50 Chapter 3. Precision based on the Log 3.6 Incorporating Modeled Behavior In this section we use the prefix automaton representing the observed behavior to restrict the exploration of the modeled behavior. Let us consider, for example, the model SN 1 in Figure 3.7, presented in terms of a system net, with [start] and [end] as initial and final markings respectively.1The system net is a possible model for the insurance process observed in the log L1. Given a state of the prefix automaton, we analyze the set of activities possible when the model reaches that state. For example, let us consider the state haiof the prefix automaton AL1. Analyzing the set of complete activity sequences of SN 1we realize that, once the model reaches the state hai, only two activities can follow: band c. For the sake of clarity, in this section we assume that the log perfectly fits the model. That is to say that all traces of the log Lare included in the set of complete activity sequences of the model M, i.e. ∀σ∈L:σ∈φ(M). Consequently, any prefix of the trace σrepresents a state reachable by the model. In Section 3.10 we study the relaxation of this assumption, and how the theory proposed is extended accordingly. a = Start Checkpoint b = Register Low-value Claim c = Register High-value Claim d = Check Policy e = Consult Expert f = Check Liability g = Complete Low-value Claim h = Complete High-value Claim i = Close Checkpoint start t1 ap1 t2 b t3 c p2 p3 t4 d t6 f t5 e p5 p6 t7 g t8 h p4 p7 t9 iend SN1 Figure 3.7: System net SN 1modeling the liability insurance claim process. Given a prefix automaton from the log, we analyze the activities allowed by the model in each log state, and we incorporate new states denoting those activities modeled but never observed in the log. Let us consider for example the automaton AL1SN 1in Figure 3.8, result of enhancing AL1with modeled behavior of SN 1. The states in white represent states both in the log and model behavior. The colored states represent the new states introduced, that belong only to modeled behavior but never observed in the log. The weight of these new states is 0, denoting that they are not observed in the log. For example, the state ha, ci represents a state both in the log L1and the model SN 1, but ha, c, fiis a state only of the model (i.e., ha, c, fiis not a prefix of L1). Formally, the enhancement of the observed prefix automaton with modeled behavior is defined as follows: 1Notice that we use system nets in this section for illustrative purposes only, while the theory refers to any process model. 3.6. Incorporating Modeled Behavior 51 4 <> 1 <a,b,d,g,i> 1 <a,c,d,e,f,h> 1 <a,c,d,e,f> 1 <a,c,d,e> 1 <a,c,d> 3 <a,c> 1 <a,b,d,g> 1 <a,b,d> 1 <a,b> 1 <a,c,e,d,f,h> 1 <a,c,e,f,d,h> 1 <a,c,e,d,f> 1 <a,c,e,d> 1 <a,c,e,f,d> 1 <a,c,e,f> 2 <a,c,e> 4 <a> 1 <a,c,d,e,f,h,i> 1 <a,c,e,d,f,h,i> 1 <a,c,e,f,d,h,i> a b d c e dg e d f f d h h hi i i f i 0 <a,c,d,f> 0 <a,c,d,e,e> f e f0 <a,c,f> 0 <a,c,e,d,e> e 0 <a,c,e,e> e Figure 3.8: Prefix automaton AL1SN 1of the event log L1enhanced with the modeled behavior of the system net SN 1. Definition 3.3 (Prefix Automaton of the Observed Behavior Enhanced with the Modeled Behavior).Let L∈ B(A∗) be an event log, where Ais a set of activities. Let M be a process model, where φ(M) is the set of complete activity sequences of M. Similar to •(L), •(φ(M)) represents the prefixes of the complete activity sequences of M, i.e., •(φ(M)) = Uσ∈φ(M)•(σ). We define the prefix automaton of the observed behavior enhanced with modeled behavior ALM = (S, A, %, ω, hi) such that: •Let SLM ={σ|σ∈ •(L)∩ •(φ(M))}be the states that are in both observed and modeled behavior. Let SM={σ|σ6∈ •(L)∧σ∈ •(φ(M))}be states that are in the modeled behavior but not in the observed behavior2. The set of states Sof the enhanced automaton is the union S=SLM ∪SE, where SE⊆SMare the states only in the modeled behavior that come preceded by a state in both behaviors, i.e., SE={σ· hai|σ∈SLM ∧σ· hai ∈ SM}. •The set of labels correspond to the set of activities of the process, i.e., A. •The arcs %⊆ (S×A×S) define the concatenation between states and activities, i.e., %={(σ, a, σ · hai)|σ∈S∧σ· hai ∈ S}. 2SL={σ|σ∈ •(L)∧σ6∈ •(φ(M))}is not possible because we assume perfect fitness (cf. Section 3.10.) 52 Chapter 3. Precision based on the Log •The function that determines the weight of a state is determined by the number of occurrences of the state in the multiset of prefixes of the log Pwith P=•(L), or 0 if the state does not appear on the log: ω(σ) = P(σ) if σ∈SLM 0 if σ∈SE •The initial state corresponds with the empty prefix hi. Notice that, although the definition of the enhanced prefix automaton considers the set of complete activity sequences φ(M) of a model M, in practice the approach proposed does not require computing all the sequences in advanced. In the previous example, for the system net SN 1the set of complete activity sequences is infinite due the transition t5. Instead, in executable process models such as Petri nets or BPMN, the sequences can be constructed progressively on demand. For example, given SN 1and the state hai, we analyze the marking reached after firing t1(i.e., [p1]) and the activities allowed (i.e., band c), being ha, biand ha, ci both sequences possible in the model. Notice that, the presence of invisible and duplicate transitions may arise some potential indeterminism about the marking reached after a given prefix, i.e., the same sequence of activities may match several tasks sequences, reaching different markings, and therefore, allowing different set of activities. For the sake of clarity in this section we assume determinism. In Section 3.10 we explore the relaxation of this assumption and the consequences that this may produce. Moreover, the proposed approach does not require the complete exploration of model behavior. Unlike other approaches in the literature that require an exhaustive exploration of the model state space (e.g., [80]), the proposed approach restricts the exploration to the boundaries of the log state space. Only the border between the behavior observed in the log and the model behavior is explored. For example, given L1and SN 1, the trace ha, c, d, e, e, e, e, e, f, h, iiincluded in the model behavior is never explored. 3.7 Detecting Escaping Arcs and Evaluating Precision Given an event log Land process model M, the prefix automaton ALM contains the juxtaposition of both observed and modeled behaviors, and the border defined between them. Each state of the automaton represents a state reached by the system during the execution recorded in the log. The precision checking approach proposed in this chapter bases its estimation on comparing, for each one of these states, the activities allowed by the model and the activities that where recorded in the log. Definition 3.4 (Observed and Modeled Arcs).Let ALM = (S, A, %, ω, hi) be the prefix automaton of the log Lenhanced with the behavior of the model M. Let SLM be the states that are in both observed and modeled behavior, and let SMbe the states only in the modeled behavior. Let σ∈SLM be a state of the automaton. obs(σ) = {(σ, a, σ0)∈% |σ∈SLM ∧σ0∈ 3.7. Detecting Escaping Arcs and Evaluating Precision 53 SLM }represent those arcs whose activities were executed and consequently recorded on the log Lwhen the system was on the state σ.mod(σ) = {(σ, a, σ0)∈% |σ∈SLM ∧σ0∈ SLM ∪SM}represent those arcs whose activities are modeled and consequently allowed by the model Mwhen the system was on the state σ. Similarly, we refer as observed/modeled states of σthose states reached through an observed/modeled arc from σ, and observed/modeled activities of σthose activities used in the observed/modeled arcs from σ. For example, let us consider the state ha, ciof the automaton AL1SN 1. The activities modeled by the model SN 1in that state are d,eand f. On the other hand, the activities observed in the same state are only dand e. Notice that in this section we are under the assumption that the log perfectly fits the model. Therefore, observed(σ)⊆modeled(σ) for all states σ∈SLM . An escaping arc denotes a point where the behavior of the process model allows more than what has been actually observed in the log, i.e., an arc that escapes from the log behavior. Definition 3.5 (Escaping Arcs).Let ALM = (S, A, %, ω, hi) be the prefix automaton of the log Lenhanced with the behavior of the model M, where σ∈SLM . The set of escaping arcs of the state σis determined by the difference between the arcs modeled and the arcs allowed on the state, i.e., esc(σ) = mod(σ)\obs(σ). Similarly, we refer to the activities used to escape and the states reached, as escaping activities and escaping states, respectively. The set of all escaping arcs of the automaton is denoted as esc(ALM ). Following with the example state ha, ciof the automaton in AL1SN 1, there is only one escaping activity in that state: f. In other words, when the system was in the state ha, ci, all activities allowed by the model in that point have been observed, except f. Notice that, by construction of the automaton, the escaping activities are considered globally, i.e., all the traces in the log are considered as a whole to compute the set of reflected activities, instead of analyzing trace by trace independently. For example, given the state ha, ciin AL1SN 1, the activity dis reflected in the second trace of L1, and the activity eis reflected in the third and forth traces of the log. In our view, a precise model is one that does not contain escaping arcs, i.e., for each state it only models the behavior observed on the log. A model where almost all the behavior allowed represents an escaping opportunity must be considered highly imprecise. In that sense, we define a metric –ETC Precision– designed to measure the precision between a model and a log, based on the escaping arcs. On the one hand, the metric quantifies the degree of escaping arcs of the automaton. This value is weighted according to the weight of the state where each escaping arc is located, i.e., escaping arcs in more frequent states have more impact in the metric that those who appear in infrequent and barely used parts of the process. On the other hand, the metric measures the modeled behavior on the automaton, weighted also according to the weights of the states. The metric defines the precision between a log and a model as the relation between the escaping behavior versus the modeled behavior. Definition 3.6 (ETC Precision).Let ALM = (S, A, %, ω, hi) be the prefix automaton of the log Lenhanced with the behavior of the model M. The metric ETC Precision estimates 54 Chapter 3. Precision based on the Log the precision of the system comparing, for each state in SLM , the number of escaping arcs with the number of modeled arcs. The numbers are weighted according to the importance of the state. Formally: etcp(ALM )=1−Pσ∈SLM ω(σ)· |esc(σ)| Pσ∈SLM ω(σ)· |mod(σ)| Let us consider, for example, the automaton AL1SN 1. The automaton contains 21 states in SLM , denoted in white. For each one of those states we compute the number of escaping arcs and the number of modeled arcs, and we weight them according to the weight of each state. etcp(AL1SN 1)=1− 4·0+4·0+1·0+1·0+1·0+1·0 + 3·1+1·1+1·1+· · · 4·1+4·2+1·1+1·1+1·1+1·0+3·3+1·2+1·2 + · · · · · · 1·0+1·0+1·0 + 2·1+1·1+ 1 ·0+1·0+1·0+1·0 + · · · · · · 1·1+1·1+1·0+2·3+1·2+1·1+1·1+1·0+1·1 + · · · · · · 1·0+1·0+1·0 · · · 1·1+1·1+1·0= 1 −8 43 = 1 −0.19 = 0.81 The etcpvalue for the automaton AL1SN 1between L1and SN 1is 0.81, denoting a moderate precision degree of 81%. Taking a look at the literature one can see that the intuitive notion of precision is difficult to capture in a metric. Comparing a process model and an even log always allows for different interpretations and a wide range of metrics can defined. Facing so much uncertainty it is wise to impose some requirements to ensure the usefulness of any measure proposed. In [81] the authors present a list, based on [56], with five properties any conformance metric proposed should satisfy: validity, stability, analyzability, reproducibility and localizability. In the following part we analyze those properties and we provide a brief justification on how ETC Precision metric fulfills them: •Validity Validity means that the measure and the property to measure must be sufficiently correlated with each other. As it has been motivated, there is a direct relation between the precision of a system and the escaping arcs detected, justifying its validity. An increase in the precision degree is reflected in the number and importance of the escaping arcs, and thus, producing an increment on the metric value. •Stability Stability means that the measure should be stable against manipulations of minor significance, i.e., be as little as possible affected by properties that are not measured. 3.7. Detecting Escaping Arcs and Evaluating Precision 55 The approach proposed is defined at a activity level, i.e., the observed behavior is compared with the modeled behavior independently from the structural properties of the models. Two models with different structure but modeling the same behavior will result in the same metric value. This makes even possible to compare models defined using different notations, e.g., Petri nets and BPMN. The metric is defined such that the context of the precision problem is taken into account, but not the position, i.e., two states with the same weight will have the same importance in the metric no matter where they are located. Notice that, although the metric is defined to measure the precision dimension independently, possible problems and corrections in the fitness dimension may affect the stability of the precision results (cf. Section 3.10). •Analyzability Analyzability, in general, relates to the properties of the measured values (e.g., whether they can be statistically evaluated). In the remainder, the emphasis is on the requirement that the measured values should be distributed between 0 and 1, with 1 being the best and 0 being the worst value. Notice that by definition esc(σ)⊆mod(σ), resulting in a metric that range from 0 to 1. Therefore, on the one hand an optimal value for precision is defined, i.e, 1 denotes that the observed behavior is precisely modeled. This is especially important as a stop condition in the context of an iterative approach looking for appropriate process models, such as genetic mining [60, 32], but also for a human analyst as it indicates that there is no better solution available. Notice that, to achieve a value of 1 is not necessary to have all the modeled behavior observed in a single trace, i.e., the precision is considered globally, taking all the observed traces as a whole. Finally, the fact that the metric is normalized by the degree of allowed behavior in each state makes it possible to use it for comparing different pairs of model-log, even if they refer to different processes. •Reproducibility Reproducibility means that the measure should be independent of subjective influence, i.e., it requires a precise definition of its formation. The definition of the metric proposed is solid and formal, and there is no room for subjectivity. The same experiment can be reproduced several times and it will always output the same result. However, notice that the relation between activity sequences and tasks sequences of a process model may arise possible non-deterministic situations, requiring further assumptions in order to preserve the reproducibility of the approach (cf. Section 3.10). •Localizability Localizability means that the system of measurement forming the metric should be able to locate those parts in the analyzed object that lack certain desirable (i.e., the measured) properties. It is very important that a precision problem is not only reflected by the measured value but can also be located. In that sense, the escaping arcs captured in the automaton 56 Chapter 3. Precision based on the Log describe perfectly where the precision problems are, making possible for the business analyst to identify potential points of improvement. Additionally, in Section 3.8 we provide an additional mechanism to collect all those precision problems for a deeper analysis. 3.8 Minimal Imprecise Traces The ETC Precision metric presented in the previous section provides a numeric measurement on the precision of the system. This value may be useful to measure the precision of several alternative models describing the same observed behavior, or to establish when a model becomes obsolete to represent an evolving process. However, in order to fully understand the causes of the precision problems, an analyst needs to be able to access the exact points of mismatch between the observed and modeled behaviors. The prefix automaton and its detected escaping arcs provide this information, and may be used to guide a deeper analysis into model and the log to understand their discrepancy. Some of the escaping arcs may represent meaningful abstractions that arise in the model and therefore no further action is required. Others, however, may suggest situations for which future actions over the process need to be carried out. Additionally to the escaping arcs detected on the automaton, in this section we propose to collect all the precision anomalies in terms of logs and traces to be used later on for its analysis. Each escaping arc is represented by one minimal imprecise trace (mit), a sequence containing the minimal behavior observed until the escaping arc was available. All the minimal imprecise traces compose the minimal imprecise log. Definition 3.7 (Minimal Imprecise Traces and Log).Let ALM = (S, A, %, ω, hi) be the prefix automaton of the log Lenhanced with the behavior of the model M. Let esc(ALM ) define all the escaping arcs of the automaton. Given the escaping arc (σ, a, σ0)∈esc(ALM ), its minimal imprecise trace is defined as mit((σ, a, σ0)) = σ0. The set of all minimal imprecise traces define the minimal imprecise log, i.e., mil(ALM ) = Si∈escape(ALM )mit(i). In AL1SN 1, there are five escaping arcs in the automaton, and thus, five are the minimal imprecise traces conforming the minimal imprecise log, shown in Figure 3.9. Notice that, by definition, all minimal imprecise traces fulfill a minimality criterion, i.e., their represent the minimal behavior before the deviation. In other words, all elements in the trace except the last one represent a behavior observed in the log, and the last one is the activity allowed by the model but not observed. The representation of the imprecisions in terms of a minimal imprecise log opens the possibility to different analysis and uses. For example, all techniques and tools based in analyzing event logs can be used to gain insights into the precision problems. That includes most of the approaches in the field of process mining, e.g., discovery algorithms can be used to derive a model that represents the imprecise behavior. Some of the minimal imprecise traces can be used for process reparation, correcting the model to represent more precisely 3.11. Conclusions 63 start t1 a end p1 t2 b t3 b t4 c t5 d p2 p3 p4 t6 e Figure 3.12: Model to illustrate the problems of indeterministic scenarios. heuristics, e.g., a random selection, or more elaborate look-ahead heuristics to determine the most plausible option. The heuristic solution contrasts with the possibility to use alignment algorithms to determine the global optimal sequence of tasks for a given activity sequence. This possibility is explored in detail in the Chapter 5. 3.11 Conclusions Given an event log and a process model, the notion of escaping arcs offers an efficient alternative to analyze the precision dimension. This chapter described the definition of the observed behavior in terms of an automaton, and how that automaton is enhanced to incorporate information about the modeled behavior. It showed how the enhanced automaton is used to detect the escaping arcs. The escaping arcs, and their position within the process, are the bases for the proposed precision metric. Furthermore, the chapter proposed the collection and analysis of the escaping arcs to get insight into the imprecision causes. Finally, the chapter includes a discussion on generalizing the approach for unfitting and indeterministic scenarios. Chapter 4 Qualitative Analysis of Precision Checking 4.1 Introduction In the previous chapter we introduced the precision checking based on escaping arcs. Given a log and a model, we use the behavior observed in the log to traverse the modeled behavior, detecting the escaping arcs and estimating the precision of a system. In other words, it allows to know how precise is our model describing the behavior observed in the log. In this chapter, we go a step further, and we extend the escaping arcs analysis to address the following points: •Robustness on the escaping arcs. Experience has proved that most real-life logs contain noise, e.g, incorrectly logged events (for instance, due to temporary system misconfiguration), or sequence of events representing abnormal behavior [60]. Even though noise tends to represent a minor part of the observed behavior, its effect on the escaping arcs detection may become significant, i.e., causing exceptional escaping arcs to appear, or covering legitimate ones. In this chapter we revisit the escaping arcs approach in order to make it more robust to such situations. •Confidence of the precision metric. A checking based on escaping arcs reports the degree of precision of the system at a certain moment. However, the metric by itself provides no insight on the precision stability, i.e., how likely is the metric to drastically change when we consider more observed behavior. In this chapter we introduce a –The materials reported in this chapter are partially published in [64] and [63] – 65 66 Chapter 4. Qualitative Analysis of Precision Checking confidence interval over the precision metric in order to indicate the possible variability of the metric in the future. •Severity of the imprecisions. The precision based on escaping arcs aims to estimate the effort needed to achieve a perfectly precise system, i.e., resolving all the escaping arcs result in a model that precisely describes the observed behavior. However, analyzing the cause of an escaping arc and eventually fixing it requires time and it is a resourceconsuming task. One only wants to invest time and effort in resolving those deviations that represent a clear and sever precision problem. On the other hand, it may be considered a waste of resources to fix escaping arcs likely to disappear in a near future. In this chapter we propose a multi-factor severity assessment of the escaping arcs, making it possible to compare them and prioritize those imprecisions that need to be resolved first. The remainder of this chapter is organized as follows. Section 4.2 revisits the theory of precision checking based on escaping arcs presented in Chapter 3 to introduce the notion of robustness on it. In Section 4.3 we present an upper bound and a lower bound of the precision metric to estimate its degree of confidence. Section 4.4 proposes a multi-factor analysis of the escaping arcs detected in order to estimate its severity. In Section 4.5 we provide some experimental results. Finally, Section 4.6 concludes the chapter. 4.2 Robustness on the Precision The precision checking presented in Chapter 3 is based on detecting escaping arcs, i.e., the log is traversed to detect those points where the modeled behavior is broader than the one observed on the log. Each trace considered produces new escaping arcs, or covers some existing one. However, although the weight of the states is taken into account to estimate the precision metric (cf. Definition 3.6), it is not used to determine what represents or not an escaping arc. In other words, infrequent or noise behavior in the log may impact on the escaping arcs and the precision metric, covering possible escaping arcs and creating new ones. Let us consider the insurance process in Chapter 3 and use it as a running example to illustrate the concepts introduced in this chapter. The system net of Figure 4.1 represents a model Mfor the insurance process, and the log Lin Table 4.1 is a reflect of the process execution. Each row of the log represents a trace and the number of occurrences of the trace in the log. Therefore, Lcaptures 3200 executions of the process, following 5 different paths. Figure 4.2 shows the prefix automaton of Land Mas it is presented in Chapter 3. Looking at the prefix automaton one can see the effect of the infrequent trace σ5=ha, c, d, e, e, f, h, ii. The detected escaping arc ha, c, d, e, e, eiis a direct result of the trace σ5, i.e., an escaping arc that would not exist if we consider the log L0= [σ1435 1, σ946 2, σ764 3, σ54 4]. On the other hand, σ5contains the prefix ha, c, d, e, eithat otherwise, considering L0, would be a escaping arc on 4.2. Robustness on the Precision 67 a = Start Checkpoint b = Register Low-value Claim c = Register High-value Claim d = Check Policy e = Consult Expert f = Check Liability g = Complete Low-value Claim h = Complete High-value Claim i = Close Checkpoint start t1 ap1 t2 b t3 c p2 p3 t4 d t6 f t5 e p5 p6 t7 g t8 h p4 p7 t9 iend Figure 4.1: Model Mfor the insurance process, used as running example to illustrate the concepts of this chapter. Frequency Trace 1435 σ1=ha, b, d, g, ii 946 σ2=ha, c, d, e, f, h, ii 764 σ3=ha, c, e, d, f, h, ii 54 σ4=ha, c, e, f, d, h, ii 1σ5=ha, c, d, e, e, f, h, ii Table 4.1: Event log Lfor the insurance process, used as running example to illustrate the concepts of this chapter. a highly weighted state ha, c, d, ei(with its consequent effect on the metric value). A robust precision checking approach should be affected as less as possible for this kind of situations. In the literature, several approaches have been proposed to detect noisy and anomalous traces within event logs, e.g., [22, 23]. This is not the goal of the approach presented in this section, but to extend the escaping arc detection theory in order to incorporate the weight component, and to do that in an arc-level way. Therefore, the filtering of anomalous traces from the event log can be considered a pre-processing step previous to the precision checking. In order to increase the robustness of the approach presented in Chapter 3, in this section we propose the use of a cut threshold to remove states of the prefix automaton based on their weight, as a preliminary step to the precision computation. In other words, states in the log having a weight under that threshold are considered out of the observed behavior for the precision checking purposes. For example, if we consider the state ha, c, d, eiin Figure 4.2, we see that 99.9% of its behavior follows the factivity, being ea promising candidate to be cut. The cut threshold proposed in this section is defined to be parametric at arc-level: •Parametric: The cut threshold is based on a cut factor r∈[0,1]. The cut factor is established according to the level of robustness desired. For instance, a high cut factor 68 Chapter 4. Qualitative Analysis of Precision Checking 3200 <> 1435 <a,b,d,g,i> 946 <a,c,d,e,f,h> 946 <a,c,d,e,f> 947 <a,c,d,e> 947 <a,c,d> 1765 <a,c> 1435 <a,b,d,g> 1435 <a,b,d> 1435 <a,b> 764 <a,c,e,d,f,h> 54 <a,c,e,f,d,h> 764 <a,c,e,d,f> 764 <a,c,e,d> 54 <a,c,e,f,d> 54 <a,c,e,f> 818 <a,c,e> 3200 <a> 946 <a,c,d,e,f,h,i> 764 <a,c,e,d,f,h,i> 54 <a,c,e,f,d,h,i> a b d c e dg e d f f d h h hi i i f i 0 <a,c,d,f> 1 <a,c,d,e,e> f e f0 <a,c,f> 0 <a,c,e,d,e> e 0 <a,c,e,e> e 1 <a,c,d,e,e,f,h> 1 <a,c,d,e,e,f> 1 <a,c,d,e,e,f,h,i> e hi 0 <a,c,d,e,e,e> f Figure 4.2: Prefix automaton for the event log Land model Mas it is presented in Chapter 3. is used to compute the precision using only the main behavior of the system, reaching a higher level of abstraction. On the other hand, a low cut factor cuts only the most extreme cases. When the cut factor ris 0 there is no cut states, and all the behavior is considered for the precision checking. •Arc-Level: The cut threshold is applied at arc-level, and not at trace level. In other words, to decide if at the state σtwith the incoming arc q= (σs, a, σt) must be cut we consider only the context of that arc, i.e., the weight of target state σtand the weight of its predecessor σs. The cut threshold is defined as the weight of the source state multiplied by the cut factor, i.e., ω(σs)·r. A state is cut if its weight is less or equal than the cut threshold, i.e., ω(σt)≤ω(σs)·r. Notice that, the cut threshold is defined locally to the arc, and not globally. Therefore, the cut does not depends on the weight of the overall automaton but only on the weights of the part of the process the arc refers to. When a state σ∈SLM is defined as cut state, all the states in SLM descendants of σare also considered cut. Figure 4.3 shows the prefix automaton of Land Mwhen we apply a cut factor of r= 0.03. The automaton shows some differences with the original automaton in Figure 4.2, where the cut states are represented in a different color than the escaping states. For example, the state ha, c, d, e, eiis a cut state because its weight do not overpass the threshold ω(ha, c, d, e, ei)≤ ω(ha, c, d, ei)·r, i.e., 1 ≤947 ·0.03 = 28.41. Consequently, all the states after ha, c, d, e, ei 4.2. Robustness on the Precision 69 3200 <> 1435 <a,b,d,g,i> 946 <a,c,d,e,f,h> 946 <a,c,d,e,f> 947 <a,c,d,e> 947 <a,c,d> 1765 <a,c> 1435 <a,b,d,g> 1435 <a,b,d> 1435 <a,b> 764 <a,c,e,d,f,h> 54 <a,c,e,f,d,h> 764 <a,c,e,d,f> 764 <a,c,e,d> 54 <a,c,e,f,d> 54 <a,c,e,f> 818 <a,c,e> 3200 <a> 946 <a,c,d,e,f,h,i> 764 <a,c,e,d,f,h,i> 54 <a,c,e,f,d,h,i> a b d c e dg e d f f d h h hi i i f i 0 <a,c,d,f> 1 <a,c,d,e,e> f e f0 <a,c,f> 0 <a,c,e,d,e> e 0 <a,c,e,e> e 1 <a,c,d,e,e,f,h> 1 <a,c,d,e,e,f> 1 <a,c,d,e,e,f,h,i> e hi 0 <a,c,d,e,e,e> f Figure 4.3: Prefix automaton for the event log Mand model Mconsidering a cut factor r= 0.03. are also cut states, i.e., ha, c, d, e, e, fi,ha, c, d, e, e, f, hiand ha, c, d, e, e, f, h, ii. Formally, cut states are defined as follows: Definition 4.1 (Cut States).Let ALM = (S, A, %, ω, hi) be the prefix automaton of the log Lenhanced with the behavior of the model M. Let (σs, a, σt)∈% be an arc where σt∈SLM is a state of both log and model. Given a cut factor r, the prefix σtis a cut state if : •its weight is less or equal than the cut threshold for that state, i.e., ω(σt)≤ω(σs)·r. •any of the prefixes of σtis already a cut state, i.e., ∃σa·σb=σt:σais a cut state. The set of cut states is represented as Sr. The prefix automaton of the log Lenhanced with the behavior of the model Mand cut with a threshold ris denoted as Ar LM . Notice that, by definition the empty sequence hi is never a cut state because it has no incoming arc. Notice also that, when the threshold factor ris 0, no state in the log is cut and the approach behaves as the one presented in Chapter 3. As it has been mentioned before, the cut states are considered to be out of the log behavior. Therefore, although they appear on the log, they are counted as escaping states for the precision computation. The definitions of modeled,observed and escaping in Definition 3.4 and Definition 3.5 are adapted to reflect this new scenario. 70 Chapter 4. Qualitative Analysis of Precision Checking Definition 4.2 (Escaping Arcs with Cut States).Let Ar LM = (S, A, %, ω, hi) be the prefix automaton of the log Lenhanced with the behavior of the model Mand cut with a factor r. Let the prefix σs∈(SLM \Sr) represent a state of both log and model and not cut by r. The set of arcs observed in σsrepresent those activities executed and consequently recorded on the log Lbut not cut by r, i.e., obs(σs) = {(σs, a, σt)∈% |σt∈(SLM \Sr)}. The set of activities modeled by the model Min the state σsis defined as mod(σs) = {(σs, a, σt)∈% |σt∈SM}. The set of escaping arcs of the state σsis determined by the difference between the arcs modeled and the arcs observed on the state, i.e., esc(σs) = mod(σs)\obs(σs). For example, the modeled activities of the state ha, c, d, eiare fand e, but only fis considered observed, being eescaping. The precision metric in Definition 3.6 is redefined to consider the new definitions of modeled and escaping arcs. The metric only explores states both in the modeled and observed behavior which are not cut. Definition 4.3 (ETC Precision with Cut States).Let Ar LM = (S, A, %, ω, hi) be the prefix automaton of the log Lenhanced with the behavior of the model Mand cut with a factor r. The metric ETC Precision when the automaton contains cut states is defined as follows: etcp(Ar LM ) = 1 −Pσ∈(SLM \Sr)ω(σ)· |esc(σ)| Pσ∈(SLM \Sr)ω(σ)· |mod(σ)| 3200 <> 1435 <a,b,d,g,i> 946 <a,c,d,e,f,h> 946 <a,c,d,e,f> 947 <a,c,d,e> 947 <a,c,d> 1765 <a,c> 1435 <a,b,d,g> 1435 <a,b,d> 1435 <a,b> 764 <a,c,e,d,f,h> 54 <a,c,e,f,d,h> 764 <a,c,e,d,f> 764 <a,c,e,d> 54 <a,c,e,f,d> 54 <a,c,e,f> 818 <a,c,e> 3200 <a> 946 <a,c,d,e,f,h,i> 764 <a,c,e,d,f,h,i> 54 <a,c,e,f,d,h,i> a b d c e dg e d f f d h h hi i i f i 0 <a,c,d,f> 1 <a,c,d,e,e> f e f0 <a,c,f> 0 <a,c,e,d,e> e 0 <a,c,e,e> e Figure 4.4: Escaping arcs of the prefix automaton for the event log Land model M, cut with a factor r= 0.03. 4.3. Confidence on Precision 71 Figure 4.4 illustrates the states and escaping arcs considered in the metric for the running example Land M. The five escaping states considered are represented in color: the four states in the same color indicate states in the model but not in the log, and the state in different color represents a cut state. The blurry states indicate the states not explored by the precision metric due to being cut states. The metric calculation for automaton A0.03 LM between Land Mwith a cut factor of 0.03 is: etcp(A0.03 LM )=1− 3200 ·0 + 3200 ·0 + 1435 ·0 + 1435 ·0 + 1435 ·0 + 1435 ·0 + 1765 ·1+. . . 3200 ·1 + 3200 ·2 + 1435 ·1 + 1435 ·1 + 1435 ·1 + 1435 ·0 + 1765 ·3 + . . . · · · +947 ·1+947 ·1+ 946 ·0 + 946 ·0 + 946 ·0 + 818 ·1+764 ·1+. . . · · · + 947 ·2 + 947 ·2 + 946 ·1 + 946 ·1 + 946 ·1 + 818 ·3 + 764 ·2 + . . . · · · + 764 ·0 + 764 ·0 + 764 ·0 + 54 ·0 + 54 ·0 + 54 ·0 + 54 ·0 · · · + 764 ·1 + 764 ·1 + 764 ·0 + 54 ·1 + 54 ·1 + 54 ·1 + 54 ·0 = 1 −5241 31498 = 1 −0.17 = 0.83 The metric result for the automaton A0.03 LM is 0.83, and as it was expected differs from the results of the automaton ALM with no cut where etcp(ALM ) is 0.86. The difference is explained because A0.03 LM contains a escaping state (ha, c, d, e, ei) is a state with high weight (ha, c, d, eiwith weight 947), a situation that does not occur in ALM , causing the metric to decrease. 4.3 Confidence on Precision Given an event log and a model, the metric ETC Precision (etcp) estimates the degree of precision of the system. However, together with a metric, sometimes it is convenient to provide also a confidence value, indicating the possible variability of the metric in the future. In this section we provide this confidence value in terms of a confidence interval, i.e., an upper confidence value (etc> p)and a lower confidence value (etc⊥ p)estimating variability over the computed metric. A narrow interval indicates that the metric should not vary significantly. On the other hand, a wide interval reflects the opposite: a low confidence in the metric provided, whose value could change drastically in the future. Both confidence values presented in this section are defined in terms of k, a parameter representing the future behavior to consider. A low kis used to compute the confidence in a near future, whereas with a large k, a larger incoming behavior is considered, and thus a longer term future is contemplated. We will implement kas number of traces to consider. Notice that, both confidence values presented in this section are approximated, i.e., they do not provide real bounds over the metric, but instead aim at estimating them with simple and intuitive heuristics which can be computed in a systematic manner. 72 Chapter 4. Qualitative Analysis of Precision Checking 4.3.1 Upper Confidence Value Given an automaton Ar LM and the parameter krepresenting the future behavior to consider, the upper value of the confidence interval is computed considering a best possible scenario. That is, all the future behavior aims only to cover existing escaping arcs. In other words, each jwhere 1 ≤j≤krepresents a new occurrence in an escaping arc, increasing the weight of the both states of the arc. In that sense, each jcan be seen as a future trace reaching an escaping arc q= (σs, a, σt). Both if the target state σtis not in the log or it has been cut, a trace jrepresents a new occurrence of it in the log. If the number of occurrences is enough to overpass the cut threshold (cf. Section 4.2), the arc is no longer considered escaping. The cost in number of occurrences needed to change a escaping arc q= (σs, a, σt) from escaping to non escaping depends on the cut factor rconsidered, i.e., ω(σt)≤ω(σs)·r. Notice that, states in the model but not in the log (i.e., with weight 0), are under that threshold, no matter what ris considered. The technique presented in this section estimates the gain (i.e., the precision increase) of covering each escaping arc, and maximizes the total gain considering kas the maximum number of occurrences used to cover escaping arcs. For that, we first define the cost and the gain of covering an escaping arc. Definition 4.4 (Cost and Gain of Covering and imprecision).Let q= (σs, a, σt) be an escaping arc of the automaton Ar LM . The cost of covering q, denoted as cost(q) = cwith c∈N, is the minimum cthat satisfies ω(σt) + c > (ω(σs) + c)·r, i.e., it overpasses the cut threshold. The gain of covering the escaping arc qis defined as gain(q) = ω(σs), i.e., the gain of reducing in one the number of escaping arcs of the source state σs. By inspecting the formula of the ETC Precision metric (cf. Definition 4.3), one can see why the gain of covering the escaping qis defined as ω(σs): if the state σshas one less escaping arc, the number of escaping arcs become |esc(σs)| − 1. Since this number is multiplied by ω(σs) in the numerator part of the equation, the numerator will be reduced exactly in ω(σs). 1765 <a,c> 0 <a,c,f> f 947 <a,c,d> 0 <a,c,d,f> f 947 <a,c,d,e> 1 <a,c,d,e,e> e 818 <a,c,e> 0 <a,c,e,e> e 764 <a,c,e,d> 0 <a,c,e,d,e> e q1 q2 q3 q4 q5 Figure 4.5: Close up of the escaping arcs of the automaton A0.03 LM for the running example Mand L. Let us consider the escaping arcs of the running example A0.03 LM , enumerated in Figure 4.5. The cost of the escaping arc q2is 30, i.e., 30 traces need to reach that arc to overpass the 4.4. Severity of an Escaping Arc 79 In our running example, we consider that Check Liability (f) is a relative cheap operation where the database is queried automatically, whereas Consult Expert (e) is a much costly operation that involve a human consultation. Consequently, considering crit(e) = 0.9 and crit(f)=0.2, the escaping arcs q3,q4,q5are considerably more critical than q1,q2. 4.4.5 Visualizing the Severity The severity of an escaping arc is the result of combining the different factors through the function f, that assign weights to each factor (cf. Definition 4.7). For example, the standard severity proposed in this chapter for an escaping arc qis defined as sev(q) = mean(factq w,factq a,factq sτ ,factq c). This value can be used to visualize the severity escaping arcs of a system in more advanced ways than simply displaying the value next to the arc. For example, the set of escaping arcs can be partitioned according to their severity ([0.0,0.3) = low, [0.3,0.4) = mid, and [0.4,1.0) = critical), and using an intuitive traffic light color scheme (i.e., green, yellow, red), an analyst can easily identify visually the different severity degrees. Figure 4.7: Two escaping arcs with different factor value distribution. However, there are situations where a factor-grained analysis of the severity may be more adequate, i.e., analyzing the factors independently, instead of aggregating them on a unique value. For those cases, displaying the factor results in a radar chart provides a better understanding of the different factor distribution composing the severity of an escaping arc. For example, Figure 4.7 two possible escaping arcs with different factor distribution. The left chart corresponds to a really frequent escaping arc. However, the situation of that escaping arc is really unstable and the possibilities of choosing badly in that situation are really few. The second escaping arc, shown in the chart on the right, is much more sever in general terms than the first one. It corresponds to a more stable and dangerous situation, but it is less frequent than the first one. 80 Chapter 4. Qualitative Analysis of Precision Checking 4.5 Experimental Results This section illustrate experimentally some of the concepts presented on this chapter. Table 4.2 contains the results of applying the proposed approach to a set of large datasets. For comparative reasons, the datasets are some of the ones used in Chapter 3, obtained from the same public repository. As it is mentioned in Chapter 3, these datasets cannot be handled by precision approaches such as a0b[80]. The experimental setting is based on variations of the a32f0n00 5 and t32f0n00 5 datasets, and the experiments focus on illustrating how the growth of a log influences the metric and its confidence, given a particular selection of the stability and confidence parameters presented in this chapter. The column with pX reports the percentage of the log considered in each case, i.e. p100 represents the original a32f0n00 5 log, while logs pX with X < 100 correspond to slices of the original log, e.g., p20 contains the first 20% of the original log traces. Logs pX with X > 100 are obtained by choosing with uniform distribution among the existing traces in the log the extra traces needed to achieve the desired size. Bench |Log|rketcpConfidence time(s) a32 p20 180 .05 20 .543 .246 - .553 (.307) 1 / 3 / 5 p40 360 .564 .345 - .570 (.225) 1 / 5 / 6 p60 540 .576 .403 - .582 (.179) 1 / 7 / 11 p80 720 .583 .441 - .587 (.146) 1 / 12 / 17 p100 900 .592 .470 - .595 (.125) 1 / 15 / 24 p150 1350 .591 .504 - .595 (.091) 2 / 16 / 23 p200 1800 .591 .523 - .595 (.072) 2 / 17 / 23 p250 2250 .590 .534 - .594 (.060) 2 / 16 / 24 p300 2700 .591 .544 - .594 (.050) 2 / 16 / 24 t32 p20 360 .05 20 .385 .250 - .387 (.137) 2 / 67 / 121 p40 720 .391 .305 - .392 (.087) 4 / 180 / 229 p60 1080 .392 .330 - .393 (.063) 5 / 295 / 339 p80 1440 .393 .345 - .394 (.049) 6 / 336 / 496 p100 1800 .393 .353 - .394 (.041) 6 / 390 / 550 p150 2700 .393 .365 - .393 (.028) 6 / 411 / 562 p200 3600 .393 .371 - .393 (.022) 7 / 429 / 572 p250 4500 .393 .376 - .393 (.017) 9 / 440 / 579 p300 5400 .393 .379 - .393 (.014) 9 / 443 / 581 Table 4.2: Precision metric value, confidence and computation time for incremental benchmarks. As in the previous experiment in Chapter 3, the models used are the ones obtained from discovering a Petri net through the ILPMiner [101]. The wide spectrum of the set of 4.5. Experimental Results 81 benchmarks presented makes it possible to illustrate the evolution of the approach presented in this chapter and can be considered as a real situation in an information system where trace sets are evaluated on a regular basis, e.g., monthly. A first conclusion on the table is the stability of the approach with respect to the size of the log. Notice that the etcpvalue tends to increase as new behavior is considered, e.g., between p20 and p100 there is a difference of 0.05. However, this difference is extremely small considering that between p20 and p100 there is a 500% increment in the observed behavior. In addition, the more traces are included in the previously observed behavior, the closer the metric value is to stabilizing. The second conclusion to extract from this table is the dependency between the traces considered and the confidence in the metric, i.e., increasing the size of the trace set considered results in a narrower confidence interval. Sheet1 Page 1 1 500 10002000 1 500 10002000 1 500 1000 2000 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 k etcp ext_c1_01 ext_c1_02 ext_c1_03 (a) Page 1 0 0.01 0.02 0.03 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 0.22 0.24 0.26 0.28 0.3 0.33 0.36 0.4 0 10 20 30 40 50 60 70 80 90 100 plg01 plg02 r %behaviornotconsidered (b) Figure 4.8: Charts showing the effects of different parameters for the confidence value. 82 Chapter 4. Qualitative Analysis of Precision Checking The next set of experiments are designed to illustrate the influence of confidence parameter kand the cutting parameter rin the proposed approach. In chart 4.8a, three process models are considered: ext c1 01,ext c1 02 and ext c1 03. These benchmarks have been created using the PLG tool [36]. This tool allows to create configurable and generic benchmarks, containing all the common patters appearing in any workflow model, e.g., choice, parallelism, sequence, etc. For the experiment, each one of the logs considered contains 15000 traces. Benchmarks 01 and 03 denote standard processes, with great difference between model and log behavior (and thus exhibiting low precision). On the other hand, process model ext c1 02 is a simpler model which describes accurately the behavior reflected in the log, i.e., the precision value is high. The chart illustrates the influence in the approach when considering diverse future windows, i.e., four different kvalues: 1, 500, 1000 or 2000 new traces to consider. As it is reflected in the experiments, the future considered has no influence on the metric value, but it is relevant on the confidence value over the metric. The possibility of variation for the metric considering a really near future (i.e. k= 1) is practically zero. However, when considering farther futures, this possibility increases, e.g., considering a kvalue of 2000 (approx. 15% of the log) the confidence in the metric is substantially low. Notice that, as expected, the confidence interval is not symmetric. Chart 4.8b illustrates the relation between the cut factor rand the percentage of the process behavior considered to compute the precision. Two generic and representative process, plg 01 and plg 02, have been created using PLG tool, and different values of rhave been tested. The conclusion we obtain is that for these processes, lower values of r(i.e., less than 0.04) can be used to polish the effects produced by noisy traces, while greater values of r (not considering more than 10% of the process behavior for computing the precision) should be used if the emphasis is in computing precision on the most frequent parts of the process. Values greater than 0.4 does not make any sense, due to the 100% of process is discarded. In addition, charts 4.9a and 4.9b are used to illustrate the part of the approach concerning the severity. Four generic models (sev01, sev02, sev03 and sev04) have been created using the PLG tool, which contain the most common structures in workflow models. For each model, a severity analysis has been performed, where each factor has received the same weight. The same values of rand τhave also been assigned for all the models (0.01 and 0.06, respectively). The criticality value assigned to each of the tasks is different depending on the task and the model. In chart 4.9a, we selected the most sever escaping arc of each process, and show the distribution of each one of the four factors. This chart illustrates the distribution of the weight of each factor in the final severity value, in this particular setting. In addition, it also illustrates that, given the normalization introduced in the definition of each one of the factors, it is possible to compare the severity between imprecision of different processes, e.g., given a system containing the four process models, and given the current setting, the escaping arc shown in the second bar (which corresponds to model sev02) should be tackled first. In chart 4.9b, the same four processes are considered. In this case, escaping arcs of each process are classified in three categories: low (less than 0.3), mid (between 0.3 4.5. Experimental Results 83 sev01 sev02 sev03 sev04 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 weight alt stab crit (a) Sheet1 Page 1 sev01 sev02 sev03 sev04 0 2000 4000 6000 8000 10000 12000 crit mid low (b) Figure 4.9: Severity analysis of four escaping arcs, and partitioning of the detected escaping arcs in three severity categories: low, mid, and critical. and 0.4) and critical (greater than 0.4). Notice that, in this particular scenario, the number of critical escaping arcs (the ones that should be tackled urgently) is small (approx. 10 imprecisions for each process) compared to the total number of escaping arcs. Finally, the approach presented in this chapter has been tested in a real world scenario. The scenario is taken from a Dutch Academic Hospital, and the log contains about 150.000 events in 1100 cases, where each case corresponds with a patient of the Gynecology department.1The goal of the experiment is to measure the quality of the models obtained using different discovery algorithms. The process miners used in the experiment are RBMiner[90], Genet[37], ILPMiner [101] and α-miner[13]. The results illustrate that the precision of the models obtained using such miners focusing on the whole process is very low. The models generated allow almost all the tasks most of the time, decreasing drastically the precision and consequently the quality of the models. For instance, the etcpvalue of the models generated by α-miner and RBMiner are 0.03 and 0.01 respectively. However, that precision increases when we apply partition and clustering techniques over the log, to focus the mining on specific parts of the process. For instance, mining a model projecting the process over the set of the 10 most frequent events will result in a precision of 0.397, 0.386, and 0.386 for Genet,ILPMiner and α-miner respectively. In the case of RBMiner, the precision is slightly greater, i.e., 0.423. 1Log file DOI is doi:10.4121/uuid:d9769f3d-0ab0-4fb8-803b-0d1120ffcf54 and can be found in the 3TU Datacenter (http://data.3tu.nl). 84 Chapter 4. Qualitative Analysis of Precision Checking 4.6 Conclusions Given an event log and a process model, the approach to measure precision based on escaping arcs presented in Chapter 3 is sensitive to the presence of infrequent behavior. This chapter presented an extension of the escaping arc theory to increase its robustness, by discarding exceptional behavior from the precision computation. Furthermore, the chapter presented a confidence interval over the precision metric, indicating how likely is the metric to drastically change when more observed behavior is considered. Finally, the chapter proposed a multifactor measure to quantify the severity of the detected escaping arcs, making it possible to compare them and to prioritize those imprecisions that need to be resolved first. Chapter 5 Precision based on Alignments 5.1 Introduction As it has been illustrated in previous chapters, replaying observed behavior over the modeled behavior is an effective and efficient way to detect escaping arcs, and with them, detect potential imprecise points to be fixed. However, there are situations where the observed behavior cannot be replayed on the modeled behavior, i.e., the model cannot mimic the ”moves” observed in the log. These problems are produced by the presence of unfitting traces, or undeterministic situations on the model. For example, let us consider the model M1at the top of Figure 5.1, and the state σ1=ha, b, ciobserved in the log. Given the choice between band cin M1, the state σ1cannot be reached by the model. A similar situation occurs for the models M2and M3, in the middle and bottom of Figure 5.1, respectively. However, in this case the problems are not produced due the unreachability of the observed state, but because there is a non-bijective relation between activity sequences and tasks sequences on the model – due invisible and duplicate activities. Let us consider the model M2and the observed state σ2=ha, bi. What are the set of modeled activities for the state σ2?c, if we consider the upper b? Or d, if we consider the lower b?. The use of duplicate activities may introduce – not always – undeterminitic situations such as the one illustrated. A similar situation happens with the presence of invisible activities. For example, let us consider the model M3and the observed state σ3=hai. Because invisible activities are not reflected in the log, there is no way to determine if the set of modeled activities in σ3are b, c, or the empty set. The effect of problems derived from unfitting logs can be alleviated making some assumptions over the observed behavior. For example, in Section 3.10.1 the unfitting part of the –The materials reported in this chapter are partially published in [18] and [19] – 85 86 Chapter 5. Precision based on Alignments start t1 a end p1 t2 b t3 c t4 d t5 e p2 p3 p4 t6 f start t1 a end p1 t2 b t3 b t4 c t5 d p2 p3 p4 t6 e start t1 a end p1 t2 b t3 b t4 b t5 c p2 p3 p4 t6 d M1 M2 M3 Figure 5.1: Models to illustrate the problems with the replay produced by unfitting traces (top), the indeterminism of duplicate activities (middle), and the indeterminism of invisible activities (bottom). trace is considered noisy or infrequent and it is discarded for the precision metric. This drastic approach is useful when the percentage of log discarded is small, and we are not interested on providing all possible points of imprecision. However, the effect in a worst case scenario is not negligible. For example, in a log where only the first event in all traces is wrongly recorded, the whole log is discarded. Similar, heuristic assumptions could be considered to solve indeterministic situations with no formal guarantees, but still practical applicability. Undeterminism is produced because the escaping arcs are detected at a log level. At a model level, each task is unique, e.g., although t2and t3have the same label b, they are distinguishable in the model M2. Therefore, a precision checking at a task level will solve indeterministic situations, transferring the responsibility to mapping correctly log traces and tasks sequences of the model. Thus, each trace in the log is translated to a complete tasks sequence in the model. For example, log traces ha, b, c, eiand ha, b, d, eimay be associated with ht1, t2, t4, t6iand ht1, t3, t5, t6iof model M2, respectively. The mapping between log traces and model traces is far from trivial. An approach may consider the use of heuristics, such as look-ahead [98, 30]. Informally, when the approach reaches a decision point, the algorithm looks ahead to choose the most suitable option. For example, in the trace ha, b, c, eifor the M2,t2is selected because there is a cnext. Similar happens when the indeterminism is introduced by invisibles, e.g., trace ha, b, diis associated with complete tasks sequence ht1, t2, t4, t6iin M3. Look-ahead heuristics can be also used to associate unfitting observed stated to reachable states of the model. For example, given the observed trace ha, b, c, d, fiand the model M1, the algorithm could consider can event wrongly recorded in the log. 5.2. Cost-Optimal Alignment 87 Look-ahead and other heuristics are heuristics after all, and therefore, they lack of formal guarantees. The decision taken heuristically may not be the optimal. Even, when the number of events considered in the look-ahead is increased, the decision may still not be optimal, e.g., the optimal path may require reconsidered previous decision [15]. In this chapter we introduce a precision checking approach based on aligning observed and modeled behavior. The alignment is done at a model level, for each one of the traces in the log. The alignment techniques provide global optimal results and therefore, there are guarantees on the escaping arcs detected. Notice that, the computation cost of aligning observed and modeled behavior in a global optimal may be considerable in some cases. Therefore, there are situations where other alternatives need to be considered, for example, a decomposed aligning for conformance diagnosis (cf. Chapter 6), or a heuristic replay-based approach in real-time scenarios where the time is a crucial element (cf. Chapter 9). The remainder of this chapter is organized as follows. Section 5.2 formalizes the alignment of observed and modeled behavior. Section 5.3 proposes an approach to measure precision from the alignments. In Section 5.4, we propose two extensions for abstracting the precision checking from the order of the tasks (Section 5.4.1) and the direction of the automaton construction (Section 5.4.2). Finally, Section 5.5 provides experimental results, and Section 5.6 concludes the chapter. 5.2 Cost-Optimal Alignment An alignment between an event log and a process model relates occurrences of activities in the log to tasks of the model. As the execution of a case is often performed independently of the execution of another case, the alignment is performed per traces. This is a common assumption take in process mining techniques, and reduces the complexity of the analysis. For each trace in an event log that fits a process model, each move in the trace (i.e., an activity observed in the log) can be mimicked by a move in the model (i.e., a task executed in the model). However, this is not the case if the trace does not fit the model perfectly. We use the symbol to denote ”no move” in either log or model. Definition 5.1 (Moves [15]).Let L∈ B(A∗) be an event log over the activities A, and let M be a model where Tis the set of tasks of the model, Av(M) is the set of observable activities of M, and lis the labeling function between tasks and observable activities in M. For the sake of clarity, we abuse the notation writing l(t) = τif t6∈ dom(l), i.e., if tis an invisible task. •(aL,(aM, t)) is a move, where aL∈A∪ , (aM, t)∈(Av(M)∪τ×T)∪ , and l(t) = aM. •(a, (a, t)) is a synchronous move (also called move in both), where a∈A,t∈T, and l(t) = a. 88 Chapter 5. Precision based on Alignments a = Examination b = Radiology c = Update Record d = Therapy e = Home Care f = Allergy Test g = Chemotherapy h = Post-Chemo i = Operation start t1 aend t3 i t4 b t5 c t2 f t6 g t9 h t8 e t7 d p4 p3 p5 p6 p1 p2 Figure 5.2: Model for a medical process, used as running example on this chapter. •(a, ) is a move on log, where a∈A. •(,(a, t)) is a move on model, where (a, t)∈(Av(M)∪τ×T), and l(t) = a. •Alegal move is a move on log, a move on model, or a synchronous move. Otherwise, it is an illegal move.ALM denotes the set of possible legal moves between the model Mand log L. Given a sequence of moves γ,row L(γ) denotes the sequence of log activities in γ, i.e., the first element. Similar, row M(γ) and row T(γ) denote the sequence of model activities and tasks, respectively. rowL,rowMand rowTdenote the projection of sequences of activities in the log, model and tasks, filtering . Definition 5.2 (Alignment [15]).Let σL∈Lbe a log trace and σM∈φt(M) a complete task sequence of model M. An alignment of σLand σMis a sequence of moves γ∈ALM ∗ such that the sequence of log activities (ignoring ) yields σL, and the sequence of model tasks (ignoring ) yields σM, i.e., rowL(γ) = σLand rowT(γ) = σM. Let us consider a medical process for an oncological treatment in a hospital – this process will be used as running example during this chapter. Model Min Figure 5.2 represents a possible model for this medical process. Assuming that the end state of the model is reached when place end in the model contains exactly one token, the model represents an infinite set of complete activity sequences, e.g., ha, b, c, di,ha, c, b, di,ha, b, c, ei,ha, c, b, ei,ha, f, g, hi, ha, b, i, c, b, ei. Given an unfitting trace σL=ha, b, d, ei, Figure 5.3 shows some possible alignments between σLand M. The moves are represented vertically, e.g., the second move of γ1is (,(c, t3)), indicating that the model performs t3while the log does not make any move. Note that after removing , the projections of all moves in the model are by definition complete task sequences allowed by the model. This property is not always ensured by other conformance checking approaches. For example, given a trace and a process model, when using the approach in [80], the so-called missing tokens are added to allow activities that occur in the trace but are not 5.3. Precision based on Alignments 95 0 <t1,t3,t2,t4> 5 <> 5 <t1> 1 <t1,t3> 1 <t1,t3,t2> 1 <t1,t3,t2,t5> 0 <t1,t3,t2,t9> 2 <t1,t6> 2 <t1,t6,t7> 2 <t1,t6,t7,t8> 0 <t1,t2,t3,t5> 2 <t1,t2> 1 <t1,t2,t3> 1 <t1,t2,t3,t4> 0 <t1,t2,t3,t9> 0 <t1,t2,t9,t5> 1 <t1,t2,t9> 1 <t1,t2,t9,t2> 0 <t1,t2,t9,t6> 0 <t1,t2,t9,t2,t3,t5> 1 <t1,t2,t9,t2,t3> 1 <t1,t2,t9,t2,t3,t4> 0 <t1,t2,t9,t2,t3,t9> 0 <t1,t2,t9,t2,t9> Figure 5.5: Automaton from 1-alignments between model Mand log L. the escaping states are in color. For example, the escaping tasks of the state ht1, t2, t3i are {t4, t5, t9}\{t4}={t5, t9}. The computation and analysis of these escaping arcs are the cornerstone of the precision checking technique presented in this thesis. All identified escaping arcs can be analyzed and further used to correct the model and make it more precise. Furthermore, in order to globally estimate precision, these escaping arcs in turn are weighted and normalized defining a metric to measure precision called 1-align precision metric. Definition 5.7 (1-Align Precision metric).Let AΛ1M= (S, T, %, ω, s0) be the prefix automaton of the alignments in Λ1enhanced with the behavior of the model M. The metric 1-Align Precision estimates the precision of the system comparing, for each state in S, the number of escaping arcs with the number of allowed arcs. The numbers are weighted according to the importance of the state. Formally: a1 p(AΛ1M)=1−Ps∈Sω(s)· |esc(s)| Ps∈Sω(s)· |mod(s)| For example, the precision for the automaton derived from Λ1shown in Figure 5.5 is 96 Chapter 5. Precision based on Alignments 0.79. 5.3.2 Precision from All-Alignment As experiments show, the use of one alignment is an effective and efficient alternative for precision checking. However, the approach relies on selecting one of optimal alignments, and therefore, it may detect more escaping arcs. Let us consider the model in Figure 5.6, and a log with only one trace ha, di. end t4 d p2 start t1 a p1 t2 b t3 c Figure 5.6: Model with two optimal alignments for the trace ha, di, one with move on the model (b, t2), and the other with one move on model (c, t3). There are two possible optimal alignments: one includes a move on the model (b, t2), and the other one move on model (c, t3), while (a, t1) and (d, t4) are synchronous moves. If we select the first alignment for computing the precision, ht1, t3iis then considered an escaping tasks. On the other hand, if we select the second alignment, ht1, t2ibecomes an escaping tasks. In other words, decisions in the fitness dimension are affecting the precision dimension. As [80, 79] states, the analysis of one conformance dimension should be independent from the others. Therefore, given that both alignments have the same cost, both alignments must be considered for precision dimension, while the mismatches produced by the moves on model must be evaluated in the fitness phase. Following with the running example of Table 5.1, we consider the following 9 complete transition sequences to represent the observed behavior: rowT(γ1a) = ht1, t6, t7, t8i,rowT(γ1b) = ht1, t2, t3, t4i,rowT(γ1c) = ht1, t3, t2, t4i, rowT(γ1d) = ht1, t3, t2, t5i,rowT(γ1e) = ht1, t2, t3, t5i,rowT(γ2) = ht1, t2, t3, t4i,rowT(γ3) = ht1, t3, t2, t5i,rowT(γ4) = ht1, t6, t7, t8i, and rowT(γ5) = ht1, t2, t9, t2, t3, t4i, Notice that, constructing an automaton from all the alignments using the approach on the previous section introduces a bias on the weighting functions: log traces associated with more optimal alignments would have more weight. For example, log trace σ1would have five times more influence in the measure – rowT(γ1a), rowT(γ1b), rowT(γ1c), rowT(γ1d) and rowT(γ1e) – than σ2–rowT(γ2). In other words, in order to have an unbiased precision measure, the weight of each optimal alignment associated with a log trace must be normalized, such that each trace of the log has the same importance within the observed behavior. For that, we define the weight of an alignment, and we redefine the weight of the states in the prefix automaton. Definition 5.8 (Weight of Alignment).Let Mbe a model, let Lbe an event log, let σLbe a trace in L, let L(σL) be the frequency of σL, and let γ∈Λ∗ M(σL) be one of the optimal 5.3. Precision based on Alignments 97 alignments between σLand M. The weight of γis defined as ω(γ) = L(σL)·1/|Λ∗ M(σL)|, i.e., the weight is split equally among all the alignments of the log trace, taking into account the frequency of the trace withing the log. Given the prefix automaton AΛ∗M= (S, T, %, ω, s0), the weight of a state s∈Sis defined as: ω(s) = X ∀γ∈Λ∗ ω(γ) if sis a prefix of rowT(γ) (or 0 otherwise) For example, the weight of the alignment γ1aof trace σ1is 1 ·1/5=0.2, while the weight of γ2is 1 ·1/1 = 1. Figure 5.7 shows the resulting automata for the running exemple Land Musing the function Λ∗. For example, the weight of the state ht1, t6iis 1 from γ4plus 0.2 from γ1a, i.e., 1.2. <t1,t3,t2,t4> 5 <> 5 <t1> 1.4 <t1,t3> 1.4 <t1,t3,t2> 1.2 <t1,t3,t2,t5> 0 <t1,t3,t2,t9> 1.2 <t1,t6> 1.2 <t1,t6,t7> 1.2 <t1,t6,t7,t8> <t1,t2,t3,t5> 2.4 <t1,t2> 1.4 <t1,t2,t3> 1.2 <t1,t2,t3,t4> 0 <t1,t2,t3,t9> 0 <t1,t2,t9,t5> 1 <t1,t2,t9> 1 <t1,t2,t9,t2> 0 <t1,t2,t9,t6> 0 <t1,t2,t9,t2,t3,t5> 1 <t1,t2,t9,t2,t3> 1 <t1,t2,t9,t2,t3,t4> 0 <t1,t2,t9,t2,t3,t9> 0 <t1,t2,t9,t2,t9> 0.2 0.2 Figure 5.7: Automaton from all-alignments between model Mand log L. As it is done with 1-align precision metric, the all-align metric is formalized as: Definition 5.9 (All-Align Precision metric).Let AΛ∗M= (S, T, %, ω, s0) be the prefix automaton of the alignments in Λ∗enhanced with the behavior of the model M. The metric All-Align Precision estimates the precision of the system comparing, for each state in S, 98 Chapter 5. Precision based on Alignments the number of escaping arcs with the number of allowed arcs. The numbers are weighted according to the importance of the state. Formally: a∗ p(AΛ∗M)=1−Ps∈Sω(s)· |esc(s)| Ps∈Sω(s)· |mod(s)| 5.3.3 Precision from Representative-Alignment Given a log trace and a process model, Λ∗provides all optimal alignments. However, as shown in [18], it is an expensive option in terms of computation time. The use of only one alignment per trace (i.e., Λ1) solves this issue in cases where time is a priority, but it may sacrifice accuracy. As a trade-off between time and accuracy, in this section we propose precision measurement based on representatives of all optimal alignments ΛR(cf. Section 5.2). In this section, we revisit the precision measurement to include this notion. Freq Trace ΛRrep 1σ1=haiγ1a1 γ1c2 γ1d2 1σ2=ha, b, c, diγ21 1σ3=ha, c, b, eiγ31 1σ4=ha, f, g, hiγ41 1σ5=ha, b, i, b, c, diγ51 Table 5.2: Optimal representative alignments of log L= [σ1, σ2, σ3, σ4, σ5] and the medical model Mof Figure 5.2 Table 5.2 show the optimal representative alignments assigned to each trace of the running example, and the number of optimal alignments they represent. The construction of the prefix automaton and the definition of escaping arcs for the representative alignments are the same as the or for all the alignments shown in the previous section, except for the weighting function. The weight of an alignment γneeds to be proportional to the number of alignments represented by γ, i.e., rep(γ). Definition 5.10 (Weight of Alignment).Let Mbe a model, let Lbe an event log, let σL be a trace in L, let L(σL) be the frequency of σL, and let γ∈ΛR M(σL) be one of the optimal representative alignments between σLand M, where rep(γ) are the alignments represented by γ. The weight of γis defined as: ω(γ) = L(σL)·rep(γ)/X γ0∈ΛR(σL) rep(γ0) 5.3. Precision based on Alignments 99 For instance, let us consider the optimal representative alignment γ1cfor the log trace σ1. The number of alignments represented by γ1cis rep(γ1c) = 2. The total number of optimal alignments represented by the representative alignments associated with σ1is Pγ0∈ΛR(σ1)rep(γ0) = 5. Hence, the weight ω(γ1c) = 1 ·2/5=0.4. On the other hand, let us consider γ5, the only optimal alignment associated with σ5. The representative alignment γ5represents 1 optimal alignment. Since the number of all optimal alignments represented is Pγ0∈ΛR(σ5)rep(γ0) = 1, the weight of γ5is ω(γ5) = 1 ·1/1 = 1. Figure 5.8 shows the resulting automata for the running exemple Land Musing the function ΛR. For example, the weight of the state ht1, t3iis 1 from γ3, plus 0.4 from γ1c (represents 2 alignments of 5), plus 0.4 from γ1d(represents 2 alignments of 5), i.e., 1.8. <t1,t3,t2,t4> 5 <> 5 <t1> 1.8 <t1,t3> 1.8 <t1,t3,t2> 1.4 <t1,t3,t2,t5> 0 <t1,t3,t2,t9> 1.2 <t1,t6> 1.2 <t1,t6,t7> 1.2 <t1,t6,t7,t8> <t1,t2,t3,t5> 2 <t1,t2> 1 <t1,t2,t3> 1 <t1,t2,t3,t4> 0 <t1,t2,t3,t9> 0 <t1,t2,t9,t5> 1 <t1,t2,t9> 1 <t1,t2,t9,t2> 0 <t1,t2,t9,t6> 0 <t1,t2,t9,t2,t3,t5> 1 <t1,t2,t9,t2,t3> 1 <t1,t2,t9,t2,t3,t4> 0 <t1,t2,t9,t2,t3,t9> 0 <t1,t2,t9,t2,t9> 0.4 0 Figure 5.8: Automaton from representative-alignments between model Mand log L. As it is done with 1-align and all-align precision metric, the rep-align metric is formalized as: Definition 5.11 (Rep-Align Precision metric).Let AΛRM= (S, T, %, ω, s0) be the prefix automaton of the alignments in ΛRenhanced with the behavior of the model M. The metric All-Align Precision estimates the precision of the system comparing, for each state in S, 100 Chapter 5. Precision based on Alignments the number of escaping arcs with the number of allowed arcs. The numbers are weighted according to the importance of the state. Formally: aR p(AΛRM) = 1 −Ps∈Sω(s)· |esc(s)| Ps∈Sω(s)· |mod(s)| Note that there can be more than one ways to compute representative alignments from a given model and a trace. Given an event log and a model, the selection of representative alignments between each trace in the log and the model obviously influences the automata that can be constructed between the log and the model. 5.4 Abstractions for the Precision based on Alignments The approach presented in Section 5.3 uses the prefixes of complete tasks sequences to represent states of the automaton. This implies that given a complete tasks sequence σ, other sequences with slightly different permutation of tasks are placed in different branches of constructed automaton than σ. Given a process model that allows many possible interleaving of tasks, the approach can only provide a perfect precision value if all permutations of the interleaving activities are been observed. This requirement may be too restrictive in some cases. start t1 a end b c d e f g h i t2 t3 t4 t5 t6 t7 t8 t9 Figure 5.9: Process model that allows the interleaving of two blocks of tasks: t2, t3, t4and t6, t7, t8. For example, let us consider the process model in Figure 5.9 and the log in Table 5.3. The model allows for the interleaved execution of t2,t3and t4. This behavior is also observed in the log, containing all possible permutations of t2,t3and t4. The model also allows the interleaving of t6,t7and t8, and all possible permutations of t6,t7and t8are also observed in the log. One may expect a perfect precision of 1 for such model and log. However, given the presented approach, the precision is 0.8. The automaton of Figure 5.10 shows the escaping arcs detected. Notice that prefix ht1, t2, t3iof ht1, t2, t3, t4, t5, t6, t7, t8, t9iand prefix ht1, t3, t2iof ht1, t3, t2, t4, t5, t7, t6, t8, t9irepresent two different states even when the 5.4. Abstractions for the Precision based on Alignments 101 Freq Trace rowT(γ) 1ha, b, c, d, e, f, g, h, ii ht1, t2, t3, t4, t5, t6, t7, t8, t9i 1ha, b, d, c, e, f, h, g, ii ht1, t2, t4, t3, t5, t6, t8, t7, t9i 1ha, c, b, d, e, g, f, h, ii ht1, t3, t2, t4, t5, t7, t6, t8, t9i 1ha, c, d, b, e, g, h, f, ii ht1, t3, t4, t2, t5, t7, t8, t6, t9i 1ha, d, b, c, e, h, f, g, ii ht1, t4, t2, t3, t5, t8, t6, t7, t9i 1ha, d, c, b, e, h, g, f, ii ht1, t4, t3, t2, t5, t8, t7, t6, t9i Table 5.3: Event log for the model in Figure 5.9 executed tasks and their frequency in both prefixes are the same. For the given example, the minimum number of traces necessary to reach a precision of 1 is 36. This number increases exponentially with the increasing degree of concurrency of the considered model. In such cases, some level of abstraction in the way states are represented is desirable. In Section 5.4.1 we propose an approach to abstract from the order of the tasks to compute the precision, dealing with the possible incompleteness of the log. Moreover, notice that the automaton is constructed considering the prefixes of the complete tasks sequences. However, this may introduce a bias on the direction, i.e., the tasks executed in the past are the ones that determine the current state. A reasonable alternative is to consider the future tasks to determine the current state. In Section 5.4.2 we propose to use the future to construct the automaton, in order to deal with the possible bias produced by the direction used to compute precision. 5.4.1 Abstraction on the Order In [12], the authors describe an approach to extract a transition system from the log. The proposed approach consider a set of possible abstractions and filters on the trace in order to determine the states of the transition system. In particular, they propose the use of sets, multisets, and sequences of activities as state representations. In a similar way, in this section we propose two possible state representations for precision checking that can be chosen depending on the desired level of abstractions: •Ordered: A state is a sequence of tasks. This is the same representation as the one used in Section 5.3. For example, the states for prefix ht1, t2, t3iand ht1, t3, t2iare different. •Unordered: A state is a multiset of tasks, i.e., the order among tasks does not matter, but the number of executions of each task does. For example, the states for ht1, t2, t3i and ht1, t3, t2iare the same, i.e., [t1, t2, t3]. However, the states for ht1, t2, t9iand 102 Chapter 5. Precision based on Alignments ht1, t2, t9, t2iare not the same, i.e., [t1, t2, t9] and [t1, t22, t9] respectively, because the number of occurrences of each task matters. Figure 5.11 show the 1-alignment automaton for the medical process, considering the multiset state representation. This automaton contains differences with respect to its ordered homologous (cf. Figure 5.5). For example, instead of having two states ht1, t2, t3i and ht1, t3, t2ifor prefixes ht1, t2, t3iand ht1, t3, t2i, both prefixes are now represented as a single state [t1, t2, t3]. This representation reduces the number of escaping arcs and hence increases precision values. Using multiset state representation and precision calculation as explained in Section 5.3, the model in Figure 5.9 and log in Table 5.3 used to motivate this section has a precision value of 1 (perfect). It is worth mentioning that in [12], the authors also propose the use of set as state representation. However, this is not applicable to our case: unlike sequence or multiset, a set does not preserve the number of occurrences of each task executed, and therefore, it may represent a (possible infinite) number of different model states. For example, given the model in Figure 5.2, the set {t1, t2, t9}represents ht1, t2, t9i,ht1, t2, t9, t2i,ht1, t2, t9, t2, t9i, . . . . 5.4.2 Abstraction on the Direction In the approach presented in Section 5.3, the prefixes of the complete tasks sequences are used to build the automaton. For example, given a complete task sequence ht1, t2, t3, t4i, the states constructed from the sequence are the empty sequence hi (corresponding with h•t1, t2, t3, t4i, where •indicates a point of interest in the sequence), ht1i(for ht1•, t2, t3, t4i), ht1, t2i(for ht1, t2, t3, t4•t3, t4i), ht1, t2, t3i(for ht1, t2, t3•t4i) and finally ht1, t2, t3, t4i(for ht1, t2, t3, t4•i). In other words, only the activities in the past are used and we move forward on the complete task sequences. This approach is used by all existing precision checking techniques [62, 64, 63]. In [12], the authors show that any point in the sequence (represented as •) may represent two complementary visions: the past tasks seen until that point (as it has been shown above), but also the future tasks to come until the ending of the case. For instance, given ht1, t2•t3, t4i,ht1, t2iare the tasks occurred, while ht3, t4iare the tasks to happen. Both ht1, t2iand ht3, t4iare used in [12] as two different states that can be derived from the same point in the sequence. In this section, we use the same idea to present a backward precision measurement, that complements the forward approach presented before. The combination of metric results for both approaches will lead to a measurement unbiased by the direction of the precision checking. For the sake of clarity we will use ordered state representation to illustrate the remainder of the section, although the analogous procedure is applicable for unordered representation. Let Λ be the option chosen to compute precision, i.e., Λ1, Λ∗or ΛR. In order to build the automaton for the backward precision measurement, we consider the prefixes of the reversed complete tasks sequences in rowT(Λ). In other words, given rowT(γ) = ht1, t2, t3, t4iof the alignment γ∈Λ, we use row0 T(γ) = ht4, t3, t2, t1ito determine the states, resulting in the 5.4. Abstractions for the Precision based on Alignments 103 following 5 states: hi (corresponding with h•t4, t3, t2, t1i), ht4i(for ht4•t3, t2, t1i), ht4, t3i (for ht4, t3•t2, t1i), ht4, t3, t2i(for ht4, t3, t2•t1i) and finally ht4, t3, t2, t1i(for ht4, t3, t2, t1•i). Analogously, the set of complete tasks sequences of Mis also reversed.1The rest of the precision checking is performed as it is described in Section 5.3. Figure 5.12 shows an example of two automata for the trace ha, b, c, di, constructed by moving in forward direction (left) and by moving backward (right). Notice the difference of identified escaping arcs shown by the two automata. Finally, precision values obtained using forward and backward-constructed automaton can be combined (e.g., the average), resulting in a balanced precision metric unbiased by the direction of the automaton constructed. Note that more sophisticated and flexible combinations of both metrics are also possible. In Section 5.5, we investigate the differences in precision values produced by the various approaches using a variety of even logs and models. 1Notice that, for the case of Petri nets with one unique initial and final markings, the set of all reversed complete transition sequences can be generated by the behavior of a net obtained from the original net by reversing its arcs and swapping their initial with final marking. 104 Chapter 5. Precision based on Alignments 0 <t1,t2,t4,t3,t5,t6,t7> 1 <t1,t2,t4,t3,t5,t6,t8,t7,t9> 1 <t1,t2,t3,t4,t5,t6,t7,t8,t9> 1 <t1,t3,t2,t4,t5,t7,t6,t8,t9> 1 <t1,t3,t4,t2,t5,t7,t8,t6,t9> 1 <t1,t4,t2,t3,t5,t8,t6,t7,t9> 1 <t1,t4,t3,t2,t5,t8,t7,t6,t9> 1 <t1,t2,t4,t3,t5,t6,t8,t7> 1 <t1,t2,t3,t4,t5,t6,t7,t8> 1 <t1,t3,t2,t4,t5,t7,t6,t8> 1 <t1,t3,t4,t2,t5,t7,t8,t6> 1 <t1,t4,t2,t3,t5,t8,t6,t7> 1 <t1,t4,t3,t2,t5,t8,t7,t6> 1 <t1,t2,t4,t3,t5,t6,t8> 1 <t1,t2,t3,t4,t5,t6,t7> 1 <t1,t3,t2,t4,t5,t7,t6> 1 <t1,t3,t4,t2,t5,t7,t8> 1 <t1,t4,t2,t3,t5,t8,t6> 1 <t1,t4,t3,t2,t5,t8,t7> 1 <t1,t2,t4,t3,t5,t6> 1 <t1,t2,t3,t4,t5,t6> 1 <t1,t3,t2,t4,t5,t7> 1 <t1,t3,t4,t2,t5,t7> 1 <t1,t4,t2,t3,t5,t8> 1 <t1,t4,t3,t2,t5,t8> 1 <t1,t2,t4,t3,t5> 1 <t1,t2,t3,t4,t5> 1 <t1,t3,t2,t4,t5> 1 <t1,t3,t4,t2,t5> 1 <t1,t4,t2,t3,t5> 1 <t1,t4,t3,t2,t5> 1 <t1,t2,t4,t3> 1 <t1,t2,t3,t4> 1 <t1,t3,t2,t4> 1 <t1,t3,t4,t2> 1 <t1,t4,t2,t3> 1 <t1,t4,t3,t2> 1 <t1,t2,t4> 1 <t1,t2,t3> 1 <t1,t3,t2> 1 <t1,t3,t4> 1 <t1,t4,t2> 1 <t1,t4,t3> 2 <t1,t2> 2 <t1,t3> 2 <t1,t4> 6 <t1> 6 < > 0 <t1,t2,t4,t3,t5,t7> 0 <t1,t2,t4,t3,t5,t8> 0 <t1,t2,t3,t4,t5,t7> 0 <t1,t2,t3,t4,t5,t8> 0 <t1,t2,t3,t4,t5,t6,t8> 0 <t1,t3,t2,t4,t5,t6> 0 <t1,t3,t2,t4,t5,t8> 0 <t1,t3,t2,t4,t5,t7,t8> 0 <t1,t3,t4,t2,t5,t6> 0 <t1,t3,t4,t2,t5,t8> 0 <t1,t3,t4,t2,t5,t7,t6> 0 <t1,t4,t2,t3,t5,t6> 0 <t1,t4,t2,t3,t5,t7> 0 <t1,t4,t2,t3,t5,t8,t7> 0 <t1,t4,t3,t2,t5,t6> 0 <t1,t4,t3,t2,t5,t7> 0 <t1,t4,t3,t2,t5,t8,t6> Figure 5.10: Precision automaton and escaping arcs between the model in Figure 5.9 and the log in Table 5.3. 5.6. Conclusions 111 Figure 5.18: Computation time comparison of alignment-based precision measurement using combined values (from backward and forward automata construction). Y-axis values are shown in a logarithmic scale. and models using alignment-based approach with combined precision values between forward and backward-constructed automata. The y-axis of the charts are shown in logarithmic scale. As shown in the figure, the computation time of precision measurement with all-alignments takes much longer than the ones required by one or representative alignments. All measurements using 1-alignment/representative alignments were computed in less than 10 seconds. Notice the similarity between the left and right graph on the figure (except the IsalaLog that has out-of-memory problem in the approach with representative alignments). In fact, we obtained identical results for all other combination of state representations (ordered/unordered) and directions where automata is constructed (forward/backward). This shows that the different directions of the automata construction and state representations are not significantly influencing computation time. Instead, most computation time of precision measurement is spent in the alignment of logs and process models. Another interesting observation is that the time spent to compute representative alignments are similar to the time spent to compute 1-alignment. Thus, we recorded the number of generated representatives for the experiments and other statistics to investigate this. 5.6 Conclusions The direct use of event logs to determine the observed behavior is susceptible to get misaligned when it is compared with the modeled behavior, i.e., situations where the model is unable to determine the system state given the observed behavior. This chapter proposes the use of aligning approaches as a previous step before the precision computation. In particular, the chapter extends the escaping arcs theory to use the 1-alignment, all-alignment and representative-alignment to determine the observed behavior, instead of using directly 112 Chapter 5. Precision based on Alignments the log. Furthermore, the chapter proposes an abstraction of the escaping arcs approaches, where different state representations and different automaton construction are considered. Part III Decomposition in Conformance Checking 113 Chapter 6 Decomposed Conformance Checking 6.1 Introduction While in the previous chapters we analyzed the precision dimension, in these second part we focus on the fitness dimension of conformance checking. In real-life situations, event logs often do not fit its corresponding models, i.e., some log traces cannot be fully reproduced in the model. These non-fitting situations should be communicated to the stakeholders, in order to take decisions on the process object of study. However, in reality process models can be non-deterministic, which complicates the analysis. Non-determinism may arise when the model contains silent or duplicate activities, which is often the case in practice. Moreover, the presence of noise in the log – e.g., incorrectly logged events or abnormal behavior – complicates even more the algorithmic detection of non-fitting situations. Due to this, the initial fitness approaches based on replaying log traces in a model in order to assess whether a trace can fit a model [80] have been recently reconsidered, giving rise to approaches based on alignment [16]. Alignment techniques relate complete firing sequences of the model and traces in the event log. The techniques can cope with deviations and models with duplicate/invisible activities. However, alignment techniques are extremely challenging from a computational point of view. Traces in the event log need to be mapped on paths in the model. A model may have infinitely many paths and the traces may have an arbitrary amount of deviating events. Hence, although the algorithms have demonstrated to be of great value for undertaking small or medium-sized problem instances [4, 49], they are often unable to handle problems –The materials reported in this chapter are partially published in [67] and [65] – 115 116 Chapter 6. Decomposed Conformance Checking of industrial size. Decomposition techniques are an important means to tackle much large and more complex process mining problems. Therefore, this chapter addresses this problem through decomposition and distribution, using Petri nets as the modeling class (although the conclusions can be extrapolated to other process model notations). There is a trivial way to decompose the fitness checking problem. One can simply split the event log into sublogs such that every trace appears in precisely one of these sublogs. Note that the conformance is still checked on the whole model. Linear speed-ups are possible using such a simple decomposition. However, the real complexity is in the size of the model and the number of different activities in the event log [15]. Therefore, we propose a different approach. Instead of trying to assess the fitness of the whole event log and the complete Petri net, fitness checking is only performed for selected subprocesses (subnets of the initial Petri net and corresponding sublogs). Subprocesses are identified as subnets of the Petri net that have a single-entry and a single-exit node (SESE), thus representing an isolated part of the model with a well-defined interface to the rest of the net. SESEs can be efficiently computed and hierarchically represented in a tree-like manner into the Refined Process Structured Tree (RPST) [73]. The remainder of this chapter is organized as follows. Related work and other approaches for decomposing conformance checking are presented in Section 6.2. Section 6.3 presents the definitions of Single-Entry Single-Exit and Refined Process Structured Tree. The decomposition of a Petri net in terms of SESEs is presented in Section 6.4, and Section 6.5 defines avalid decomposition where the conformance properties are preserved. In Section 6.6 we provide some experimental results. Finally, Section 6.7 concludes the chapter. 6.2 Related Work Decomposing large graphs into smaller fragments is a topic widely studied in the literature. There exist plenty of techniques with different goals for that task, for example, minimizing the connectivity among fragments [52]. In particular, this chapter aims to obtain fragments with asingle entry node and a single exit node [72]. SESEs, presented in Section 6.3, capture the idea of subprocess with a clear entry and exit point within the main process. In [93, 94] the authors proposed a Refined Process Structure Tree, a tree structure of SESEs. The proposed RPST has some desirable properties: it is unique, it is modular, and can be computer in linear time. The linear time computation is based on the idea of triconnected components in [91]. The original RPST algorithm [93] contained a post-processing step fairly complex. In [72, 73] the computation of this post-processing step is considerably simplified by introducing a pre-processing step that splits every node with more than one incoming andmore than one outgoing edge into two nodes. Both the theory and the implementation used in this chapter is based on [72, 73] Decomposition techniques have been applied recently in process mining. In [2], the author proposes a new decomposition concept: passages. A passage is a pair of two non-empty sets of activities (X, Y ) such that the set of direct successors of Xis Yand the set of direct 6.3. Single-Entry Single-Exit and Refined Process Structure Tree 117 predecessors of Yis X[2]. Process discovery and conformance checking can be done at a passage level and the results can be aggregated. This has advantages in terms of efficiency and diagnostics. Moreover, passages can be used to distribute process mining problems over a network of computers. In [1] the author formalizes the concept of valid decomposition to decompose in a generic way process discovery and conformance problems. A decomposition is valid, presented in detail in Section 6.5, if the resulting subnets ”agree” on the original labeling function, each place resides in just one subnet, and also each invisible transition resides in just one subnet. Moreover, if there are multiple transitions with the same label, they should reside in the same subnet. Only unique visible transitions can be shared among different subnets. Finally, conformance checking and decomposition are also considered in the work on proclets [45]. Proclets can be used to define the so-called artifact centric processes, i.e., processes that are not monolithic but that are composed of smaller interacting processes (called proclets). In [45] it is shown that conformance checking can be done per proclet by projecting the event log onto a single proclet while considering interface transitions in the surrounding proclets. 6.3 Single-Entry Single-Exit and Refined Process Structure Tree The intuitive idea behind the decomposition technique in this chapter is to find subgraphs that have a simple interface with respect to the rest of the net. The following set of definitions formalize the idea of Single-Entry Single-Exit subnet and the corresponding decomposition. The underlying theory dates back to the seminal work of Hopcroft and Tarjan in the seventies [48], but recent studies have made considerable progress into making the algorithms practical when applied to process models [73, 72]. We start defining the graph structure used for decomposing a process model: the workflow graph. Given a workflow net1, the workflow graph represents the arcs between the nodes of the net. Definition 6.1 (Workflow Graph).Let WN = (P, T, F, start,end) be a workflow net, where Pare the places, Tare the transitions, and Fare the arcs. We define the workflow graph of WN simply as the directed graph G(WN )=(N, F ) where no distinctions are made between places and transitions, i.e., N=P∪Trepresent the nodes of the graph, and Fthe arcs. We can omit the parameter WN whenever the context is clear. An example of workflow graph Figure 6.1b (only the graph but not the squares) is shown for the workflow net in Figure 6.1a. 1Although the approach presented in this chapter can be generalized to general Petri nets with several sources and sinks, for the sake of clarity in this paper we restrict to the workflow case with only one source and only one sink [73]. 118 Chapter 6. Decomposed Conformance Checking (a) t1 t2 t3 t4 t5 t6 t7 start p2 p3 p4 p5 p6 p7 end ab c d e f g h i jk l m n op S6 S7 S3 S4 S5 SS2 S S1 S1 S S2 SS3 S jop a S4 SS5 SS6 SS7 S bdfhcegikmln (b) (c) Figure 6.1: An example of (a) workflow net, (b) its workflow graph, and the (c) RPST with its SESE decomposition. In the remainder, the following context is assumed: Let Gbe the workflow graph of a given WN , and let GS= (VS, S) be a connected subgraph of Gformed by a set of edges S and the vertices VS= Π(S) induced by S.2 Definition 6.2 (Subnet nodes [73]).A node x∈VSis interior with respect to GSiff it is connected only to nodes in VS; otherwise xis a boundary node of GS. A boundary node y of GSis an entry of GSiff no incoming edge of ybelongs to Sor if all outgoing edges of y belong to S. A boundary node yof GSis an exit of GSiff no outgoing edge of ybelongs to Sor if all incoming edges of ybelong to S. For example, let us consider the arcs S4={b, d, f, h}of Figure 6.1, and the set of vertices induced by them VS4={t1, p2, t2, p4, t4}.t1and t4are boundary nodes, while p2, t2, p4are interior. Moreover, t1is an entry, while t4is an exit. As next definition formalizes, a SESE is a special type of subgraph with a very restricted interface with respect to the rest of the graph: Definition 6.3 (Single-Exit-Single-Entry [73]).A set of edges S⊆Fis a SESE (Single- Exit-Single-Entry) of graph G= (N, F ) iff GShas exactly two boundary nodes: one entry and one exit. A SESE is trivial if it is composed of a single edge. Sis a canonical SESE of Gif it does not partially overlap with any other SESE of G, i.e., given any other SESE S0of G, they are nested (S⊆S0or S0⊆S) or they are disjoint (S∩S0=∅). By definition, the source start of a workflow net is an entry to every fragment it belongs to and the sink end of the net is an exit from every fragment it belongs to. 2Π(R) = S(a,b)∈R{a, b}is the set of elements referred to by relation X⊆A×B. 6.4. Decomposing Conformance Checking using SESEs 119 The decomposition based on canonical SESEs is a well studied problem in the literature, and can be computed in linear time. In [94], the authors proposed the algorithm for constructing the RPST, i.e., a hierarchical structure containing all the canonical SESEs of a model. In [73], the computation of the RPST is considerably simplified and generalized by introducing a pre-processing step that reduces the implementation effort considerably. Definition 6.4 (Refined Process Structured Tree [73]).Let Gbe the workflow graph of a given workflow net. The Refined Process Structured Tree (RPST) of Gis the tree composed by the set of all its canonical SESEs, such that, the parent of a canonical SESE Sis the smallest canonical SESE that contains S. The root of the tree is the entire graph, and the leaves are the trivial SESEs. The set of all the nodes of the tree is denoted as S. Figure 6.1 show the RPST and the canonical SESEs in the example of the same figure. In the remainder of the chapter, we will refer to canonical SESEs resulting from the RPST decomposition simply as SESEs. Also note that the SESEs are defined as a set of edges (i.e., S) over the workflow graph (not as subgraphs, i.e., GS). However, for simplicity and when the context is clear, we will use the term SESE to refer also to the subgraph induced by those edges. We will denote as PN S= (PS, TS, FS) the Petri net determined by the SESE S, i.e., PN S= (P∩Π(S), T ∩Π(S), F ∩S). The nodes (either transitions or places) determined by Sare denoted as NS, i.e., (P∪T)∩Π(S). 6.4 Decomposing Conformance Checking using SESEs It is well known that checking conformance of large logs and models is a challenging problem. The size of log and model and the complexity of the underlying process strongly influence the time needed to compute fitness and to create optimal alignments. Divide-and-conquer strategies are a way to address this problem [66, 65, 67, 1]. As indicated before, we do not just want to partition the traces in the event log (providing a trivial way to distribute conformance checking). The potential gains are much higher if also the model is decomposed and traces are split into smaller ones. To decompose conformance checking problems, the overall system net SN is broken down into a collection of subnets {SN 1,SN 2,...,SN n}such that the union of these subnets yields the original system net. Definition 6.5 (Decomposition).Let SN = (SN MI, MF) be a system net where WN = (P, T, F, start,end). D={SN 1,SN 2, . . . SN n}is a decomposition of SN if and only if: •P=S1≤i≤nPi, •T=S1≤i≤nTi, •F=S1≤i≤nFiwhere Fi∩Fj=∅for 1 ≤i<j≤n. 120 Chapter 6. Decomposed Conformance Checking Note that each place or transition can be shared among different subnets, while each arc resides in just one subnet. Any decomposition that satisfies Definition 6.5 may be considered for decomposing a conformance problem, e.g., subnets containing only one arc, or subnets randomly grouping distant nodes on the net. However, given that the ultimate goal of a decomposition is to be able to diagnose, comprehend and understand conformance problems, the use of meaningful decompositions is preferred, i.e., SESEs. Given the structure of a SESE where a unique single entry and a unique single exit exist, a SESE becomes an appropriate unit of decomposition. Intuitively, each SESE may represent a subprocess within the main process (i.e., the interior nodes are not connected with the rest of the net), and the analysis of every SESE can be performed independently. The RPST of a net can then be used to select a possible set of SESEs forming a decomposition. As it shown in Proposition. 6.6, any transverse cut over the RPST defines a decomposition. Proposition 6.6 (SESE decomposition).Let SN = (SN MI, MF)be the system net of the workflow net WN = (P, T, F, start,end). Consider the RPST decomposition of WN , where S represents all the SESEs in the RPST. We define a transverse-cut over the RPST as a set of SESEs D⊆Ssuch that any path from the root to a leaf of RPST contains one and only one SESE in D. Given a transverse-cut D={S1, S2,...Sn}, let the decomposition DDbe defined as DD={SN S1,SN S2, . . . SN Sn}, where SN Si= (PN Si, MIPSi, MFPSi), i.e., the Petri net determined by the SESE Si, and the projection of the initial and final markings on the places of the subnet. The decomposition DDderived from the SESEs satisfies the definition of decomposition given in Definition 6.5 Proof. By definition of RPST, the arcs of each SESE in the RPST are contained in one, and only one, of its children (unless it is a trivial SESE). Therefore, any transverse-cut set of SESEs contains all the arcs, where each arc only appears in only one SESE. Proposition 6.7 (A SESE decomposition from RPST exists).Given any RPST, a decomposition always exists. Proof. Given any RPST, the root (i.e., the whole net) defines a decomposition. In addition, the set of all the leaves (i.e., the trivial SESEs with only one arc) also defines a decomposition. As it is claimed in Proposition 6.7, the overall net is, by definition, a decomposition by itself. But it is obvious to see that this trivial way of decomposition does not alleviate the initial conformance problem. On the other hand, a decomposition formed only by trivial SESEs will produce meaningless components, and at the same time, the posterior analysis will have to deal with the analysis overhead produced by the creation of the numerous components. A decomposition which lays in between the aforementioned extremes seems more interesting from the practical point of view, i.e., to generate components large enough to become meaningful subprocesses, but whose size can be handled in practice. Hence, 6.5. Bridging a Valid Decomposition 127 i j l i j k l which reveals that the mandatory check of the medical history is missing in the log. Analogously, the alignment for B4is: m n n m n o n that identifies the explicit need for notifying again the client, an action missing in the log but required by the model. Finally, the alignment for B6: q q s q s reveals another fitness problem for trace σ: the system has stored in the log an early registration of the notification which was not meant at that point in time, since later notifications were sent and according to the model, the registration is only expected to be done at the end of the case. Using Prop. 6.11, we can infer that the fact that some components in the decomposition identify fitness problems implies that the whole model does not fit the log. 6.5.1 Decomposition with invisible/duplicates So far, the approach presented in this chapter was assuming that all the Petri net transitions were associated with a unique single activity, i.e., a transition could be unambiguously identified by its label. In this section we lift this assumption in order to consider invisible and duplicate transitions. An invisible transition is a transition without activity associated, e.g., transitions included for routing purposes. Duplicate transitions are transitions with the same activity associated. For example, consider the net of Figure 6.7, which is a slight variation of the example in Figure 6.5. This model contains an invisible transition (represented in black) used to skip the execution of contract hospital, i.e., now contract hospital is optional. Moreover, the new model does not distinguish between high insurance check and low high insurance check, but the same action insurance check is modeled in two different parts of the model, i.e., is a duplicate activity. The Petri net definition is extended considering now a labeling function l∈T6→ UAwhere UAis some universe of activity labels. Additionally, if a transition t6∈ dom(l), it is called invisible. Tv(PN ) = dom(l) is the set of visible transitions in PN .Tu v(PN ) = {t∈Tv(PN )| ∀t0∈Tv(PN )l(t) = l(t0)⇒t=t0}is the set of unique visible transitions in PN (i.e., there are no other transitions having the same visible label) As it has been illustrated previously in this chapter, when a net is decomposed, the labels of the transitions are used to synchronize and preserve the fitness properties. However, sharing invisible and duplicate transitions among subnets generates ambiguity invalidating this synchronization. Thus, the definition of valid decomposition presented in Definition 6.8 128 Chapter 6. Decomposed Conformance Checking h l m a s n p i e k l b d e f g h q rs o p q m n o b r a S'1 d i B1 B6S'4 B2 B3 S'2 S'3 B4 B5 b d e f g h i e k l m n o p q s r a register claim decide high-low start high check start low check insurance check high medical history check contract hospital insurance check low medical history check end high check end low check start notification prepare notification notify re-notification need register notification archive claim re-process claim Figure 6.7: Variant of the running example of Figure 6.5 including invisible and duplicates (top), and its corresponding decomposition (bottom). is refined to consider invisible and duplicates, i.e., only unique visible transitions can be shared among subnets. Definition 6.12 (Valid Decomposition with Invisible and Duplicates[1]).Let SN = (WN , MI, MF) be a system net where WN = (P, T, F, l, start,end). D={SN 1,SN 2, . . . SN n}is a valid decomposition of SN if and only if: •SN i= (PN i, Mi I, Mi F) is a system net with PN i= (Pi, Ti, Fi, li) for all 1 ≤i≤n, •li=lTifor all 1 ≤i≤n, •Pi∩Pj=∅for 1 ≤i<j≤n, •Ti∩Tj⊆Tu v(SN ) for 1 ≤i<j≤n, and •SN =S1≤i≤nSN i. Let SN = (WN , MI, MF) with WN = (P, T, F, l, start,end) be a system net with valid decomposition D={SN 1,SN 2,...,SN n}. We can observe the following properties: 6.5. Bridging a Valid Decomposition 129 - each place appears in precisely one of the subnets, i.e., for any p∈P:|{1≤i≤n| p∈Pi}| = 1, - each invisible transition appears in precisely one of the subnets, i.e., for any t∈T\ Tv(SN ): |{1≤i≤n|t∈Ti}| = 1, - visible transitions that do not have a unique label (i.e., there are multiple transitions with the same label) appear in precisely one of the subnets, i.e., for any t∈Tv(SN )\ Tu v(SN ): |{1≤i≤n|t∈Ti}| = 1, - visible transitions having a unique label may appear in multiple subnets, i.e., for any t∈Tu v(SN ): |{1≤i≤n|t∈Ti}| ≥ 1, and - each edge appears in precisely one of the subnets, i.e., for any (x, y)∈F:|{1≤i≤n| (x, y)∈Fi}| = 1. In order to instantiate a decomposition complying with this new definition of valid decomposition, Algorithm 6.1 needs to be refined (cf. Algorithm 6.2). Algorithm 6.2 Refined k-decomposition algorithm function k-dec(RPST,k) V={root(RP ST)} D=∅ while V6=∅do v←pop(V) if |v.arcs()| ≤ kor not Decomposable(v)then D=D∪ {v} else V=V∪ {children(v)} return D function Decomposable(s) {s1,...sn} ← children(s) T←shared transitions in {s1,...sn} P←shared places in {s1,...sn} TP←transitions connected with P if T∩Tu v6=Tthen return false else if TP∩Tu v6=Tthen return false else if same label in different {s1,...sn}then return false else return true 130 Chapter 6. Decomposed Conformance Checking Algorithm 6.2 checks if considering the children of a SESE swill violate the definition of valid decomposition in Definition 6.12. The three conditions need to be satisfied: - transitions shared (T) between any subset of SESEs {s1,...sn}must be unique visible transitions (Tu v). - places shared (P) between any subset of SESEs {s1,...sn}will be bridged according to Def. 6.9. Therefore, transitions connected with the places shared (P) between any subset of {s1,...sn}must be unique visible transitions (Tu v), in order to avoid be duplicated boundary transitions after the bridging. - Transitions with the same label must belong to the same vi. The main difference between the original k-decomposition algorithm presented previously and Algorithm 6.2 is that the latter checks if considering the children of SESE vfor the decomposition Dwill violate the valid decomposition definition (Definition 6.12). Notice that by definition, if the children {s1,...sn}of vviolate the definition, considering further descendants of vwill also violate the definition. Therefore, when the algorithm checks that the SESE must not be decomposed, it includes it into the decomposition D. As a result, Algorithm 6.2 does not guarantee the kproperty, i.e., some components may have more than karcs. For instance, consider the subnets resulting of a 15-decomposition and bridging shown in Figure 6.7. Unlike Figure 6.6, here when the algorithm tries to decompose the SESE S2, it detects than this will result in splitting the duplicate e, and thus it must consider S2, even if the number of arcs of S2is greater 153. Notice that some worst case scenarios exist for Algorithm 6.2: consider the example of Figure 6.8. In this case, the presence of invisible transitions in the model boundaries makes it impossible for the algorithm decompose more that the root S1, and therefore, the resulting decomposition will be the overall net. The effect of those cases can be alleviated by pre-processing the model and the log before applying the decomposed conformance. (a) workflow net t1 t7 ab S2 S S1S1 S S2 Sb a (b) RPST ... ... Figure 6.8: Example of worst case scenario for the k-decomposition with invisible/duplicates. 3Notice that, the bridging may produce that a SESE loses its SESE structure, e.g., the entry and exit places of S2are removed when it becomes S0 2due to the bridges B2and B3. In spite of this, the decomposition obtained still satisfies Definition 6.12. 6.6. Experimental Results 131 6.6 Experimental Results In this section we provide experimental results demonstrating that decomposition approach proposed provides significant performance gains and improved diagnostics. 0 200 400 600 800 1000 1200 prAm6 prBm6 prCm6 prDm6 prEm6 prFm6 prGm6 time (s) new DC (25) new DC (50) old DC (50) non decomposed n/a n/a 1667 1386 2743 n/a 3566 Figure 6.9: Comparison of computation time among different approaches: the new decomposed conformance checking technique (two variants: one which limits the maximum size of each component to k= 25 and the other to k= 50), the old decomposed conformance checking technique [65], and the approach without decomposition. Implementation The techniques presented in this chapter have been implemented within the ProM 6 tool4, and have been included in the package Decomposed Conformance. The new implementation (unlike the one presented in [66, 65]) is fully compliant with the Divide&Conquer package – a new initiative for a common framework among all decomposed process mining techniques within ProM, such as [2, 53, 66, 65]. This modular framework is based on common objects and encourages and facilitates the reusability of plugins, both for discovery and conformance. Compared to the implementation in [66, 65] the architecture changed dramatically. For example, arrays of components are used, instead of the sequential creation and processing of the components. These changes in the implementation had a significant impact on the performance of the techniques. The Decomposed Conformance package in ProM supports all of the decomposition and filtering approaches and the advanced diagnostics described in this paper. Performance Improvements Figure 6.9 illustrates the performance improvement achieved by SESE-based decomposition and the new implementation in ProM. For this first analysis we use the bpm2013 benchmark5. The benchmark contains large models with different levels of fitness (ranging from perfectly 4http://www.promtools.org/prom6/nightly 5http://dx.doi.org/10.4121/uuid:44c32783-15d0-4dbd-af8a-78b97be3de49 132 Chapter 6. Decomposed Conformance Checking fitting as prBm6, to models with fitness of 0.57 – like prCm6), according to the fitness metric in [16]. Figure 6.9 compares four approaches using seven model-log combinations. The chart includes the results of the new Decomposed Conformance (DC), using a kto decompose of 25 and 50 respectively (cf. Algorithm 6.1). In this experiment (and in the rest of section) we used a conformance based on alignments for checking the conformance of each component [16]. The comparison also includes the results of the previous implementation (with kof 50) [66, 65], and the non-decomposed results of [16] (using the same algorithm and parameters as the decomposed approach). The chart illustrates perfectly the vast difference, in computation time, between the approach presented and the non-decomposed alternative. The non-decomposed approach remains competitive for the less complex and highly fitting models (e.g., prAm6 and prBm6). Because of the component creation overhead the non-decomposed approach may even be faster for simple and well-fitting models as noted in [65]. For example, for prAm6 and prBm6 the non-decomposed approach is faster than the previous implementation presented in [65]. This is no longer the case for the new decomposed implementation which is outperforming the earlier approaches. In those cases where the complexity and fitness is an issue, the difference could reach two orders of magnitude (e.g., from 15 to 3566 seconds in prEm6). More importantly, the approach proposed is able to tackle and provide conformance information for those cases (prDm6, prFm6 and prGm6) where [16] is not able to provide a result within a period of 12 hours. Notice though, that the goal of both approaches is slightly different: while [16] aims for a global conformance, the decomposed approach aims for an optimal conformance of each component. However, a decomposed approach makes it possible to locate in a smaller vicinity where the conformance problems are, get a better understanding of the cause, and eventually be able to provide and bound conformance properties in a global manner [1]. The comparison also shows the significant speedup yield by the new implementation with respect to the one in [65], due to the new architecture based on arrays of components. Conformance Diagnosis One of the main contributions presented is a decomposed strategy to aid on the diagnosis of conformance problems in large systems, pinpointing which subprocesses are producing them. In order to illustrate this contribution we provide the fitness results per component for the running example and the benchmark bpm2013 (cf. Figure 6.10 and 6.11). We use a circumference to graphically depict the fitness evaluation of a decomposition by means of a colored gradient for each component. All components of the decomposition are placed in different positions of the circumference. Let us use the running example of this chapter to illustrate the graphical visualization used. For each component, a line from the center of the circumference indicates its fitness. If the line reaches the perimeter, the fitness is 1.0 (components S0 1,B1,B2,S0 2,B3,S0 4,B5,S0 6), while the line for components with fitness anomalies does not reach the perimeter. To show 6.6. Experimental Results 133 S'1 B1 B2 S'2 S'3 B3B4 S'4 B5 B6 S'6 Figure 6.10: Fitness visualization for the running example. Figure 6.11: Fitness results per components for benchmark bpm2013. intuitively the fitness, a color gradient is included in the circumference: the fitness ranges from red/dark (fitness problems close to 0.0) down to green/light (perfect fitness of 1.0). The fitness diagnosis of each one of the models of benchmark bpm2013 can be understood more easily: for model prAm6, 7 components have fitness anomalies, with diverse severity (7 dents on the circumference) .6On the other hand, all components in prBm6 are perfectly fitting. This contrasts with prCm6, where fitness problems are clearly spread over multiple components. The other of benchmark model-log combinations have fitness anomalies in just a few components. This supports the approach taken in this thesis. The diagnostics help to focus on the problematic parts while at the same time provide performance gains. Performance vs Comprehension The previous experiment included two different sizes for the decomposition: 25 and 50. This second set of experiments is designed to determine the optimal decomposition size for both perspectives: performance impact and comprehension of the conformance anomalies 6When no fitness anomalies exist, we do not explicitly label components in the visualization. 134 Chapter 6. Decomposed Conformance Checking detected. The benchmark used, isbpm20137, includes several models, and a set of logs with different properties for each model. In this experiment we have checked conformance for different values of k. Note that, when the kis the total number of arcs of the model, the decomposed approach behaves as non-decomposed (i.e., there is only one component). Figure 6.12 reflects the computation time for two of the cases in the benchmark (pr1908-m34-l3- noise and pr1151-m37-l3-noise), which summarizes the global tendency for all the models in the benchmark. The mark representing the minimum time is slightly differentiated. 0 10 20 30 40 50 0 20 40 60 80 time(s) k pr-1908-m34-l3-noise i ( ) 0 100 200 300 400 0 30 60 90 120 time(s) k pr-1151-m37-l3-noise Figure 6.12: Comparison of computation time among different kvalues. The main conclusion one can reach from the experiments is that, from a computational time point of view, the smaller the better. This is perfectly reflected in Figure 6.12. For 7http://dx.doi.org/10.4121/uuid:b8c59ccb-6e14-4fab-976d-dd76707bcb8a 6.6. Experimental Results 135 small values of k(e.g., 1 . . . 20), the results show a slight overhead because many components need to be created. However the effect of this overhead is negligible in most of the cases. On the other hand, when the k-decomposition starts to allow larger components, the computation time abruptly increases. This disruption on the computation time is produced by the hierarchical nature of the RPST, e.g., a decomposition kinstead of k+ 1 could lead the selection of nsubprocesses of low complexity instead of the one subprocess that includes all n. The results and insights based on these new experiments differ from [65], where –due to inefficiencies of the previous implementation– the overhead caused by the processing of components was significantly higher, making kof 200 faster than 50 in some cases. If components are excessively small (e.g., 1 . . . 10), the semantic information they provide is rather trivial or insufficient. From a diagnostic point of view, the subprocesses to be analyzed should be large enough to be able to make meaningful conclusions. Our empirical experiments show that, decomposition with kbetween 20 and 40 could represent a good trade-off between computation time and diagnostic quality. Trace length and grouping A third set of experiments was conduced to study the effect of the trace lengths on the proposed approach. We aim to compare decomposed and non-decomposed conformance checking for different traces lengths. All logs and models of this experiments are included in the isbpm2013 benchmark. For each model used in this experiment, four logs were generated, each one with a different average length of the traces on it (e.g., pr1908-m18-l1 has an average trace length of 18, while pr1908-m41-l4 has average length of 41). Each one of these four logs has been generated from simulating the same model and using the same parameters (except the length of the traces), and all them are completely fitting. Additionally, we have created another four logs for each model, with the same characteristics, but containing noise (and hence being non-fitting). Figure 6.13 shows the results for two models: pr-1908 and pr-1151, being the results similar for the rest of models-logs in the benchmark. For each model, the chart contains the computation times of each alternative: decomposed (using k of 25) with noisy logs and fitting logs, and the results for the same noisy and fitting logs using the original non-decomposed approach. The first conclusion that arises from the experiments refers to the processes with noise – the most plausible assumption in a real world scenario. Figure 6.13 shows that, when the log has short traces, both decomposed and non-decomposed alignment checking perform good. However, once the length of the traces grows (or simply traces of large models or with lot of concurrency), it has a severe effect on the non-decomposed performance. This was to be expected, i.e., the more activities in a trace, the more difficult it is to compute the alignment. On the other hand, the decomposed approach performs both fast and with a near-to constant growth (and eventually constant at some point). This is justified by the effect of the decomposition on the computation time (as has been shown in Figure 6.9), but also due to the grouping (as explained below). 136 Chapter 6. Decomposed Conformance Checking 0 20 40 60 80 100 16 21 26 31 36 41 time(s) averagetracelength dec(25) fit dec(25)noise non_decfit non_decnoise pr-1908 0 200 400 600 800 1000 11 21 31 41 51 time(s) averagetracelength dec(25)fit dec(25) noise non_decfit non_decnoise pr-1151 Figure 6.13: Comparison of computation time among different trace length. The current implementation of the align-based conformance checking includes the grouping optimization: when the algorithm analyzes a trace, it first checks if it has already computed an alignment for an identical trace. In this is the case, it re-uses the previously computed alignment, thus reducing the time significantly. The effect of this optimization for the non-decomposed scenario depends on the case at hand, and it is strongly related with the size and the behavior of the model. However, in the decomposed scenario, the chances to encounter this situation increase: the smaller is the component (e.g., k= 25), the fewer activities it contains, and therefore, the more likely it is to find a trace already seen before (once the original trace has been projected onto the component). The effects of the grouping are perfectly reflected by the fitting cases of Figure 6.13: the decomposed approach performs faster than the non-decomposed alternative even in a fitting scenario. This is remarkable because alignments can be created easily in this case. 7.2. Topological Conformance Diagnosis 143 t5 t9 p6 p9 p7 t7 t8 t1 t4 p4 p2 t2 S52B+ 2 S' ' Figure 7.3: Examples of non-fitting weakly connected components. Algorithm 7.1 Non-Fitting Weakly Connected Components Algorithm function nfwcc(TD,V). V is non-fitting vertices Cc=∅ remove from TD:.Graph induced by V -all arcs c={x, y}such that x, y 6∈ V -all vertices z6∈ V while TDhas vertices do v1←select random vertex on TD {v1,...vn} ← get vertices weakly connected with v1using Depth-first search remove {v1,...vn}from TD Cc=Cc∪Sn 1vi return Cc of the algorithm is to have all the vertices in Vconnected, i.e. Gbe connected. If this is not the case, the algorithm detects the two largest connected components (c1and c2) of G, and then computes the shortest path ({v1. . . vn}) between any vertex in c1and any vertex in c2. Finally, {v1. . . vn}are included to V, and it is checked again if the induced graph Gis connected. Given the example of Figure 7.2c, the net resulting (shown in Figure 7.4) contains the union of the subnets SN S0 2,SN S0 4,SN B1,SN S0 5and SN B2. S4 S2 t1 t4 p4 p2 t2 t5 t9 p6 p9 p7 t7 t8t8 S52B+B1+ + + ''' Figure 7.4: Example of a non-fitting subnet. 144 Chapter 7. Topological and Multi-level Conformance Diagnosis Algorithm 7.2 Non-Fitting Subnet Algorithm function nfn(TD,Vnf ). Vnf is non-fitting vertices V←Vnf G←graph induced by Von TD while Gis not connected do c1←get the 1st largest conn. comp. of G c2←get the 2nd largest conn. comp. of G {v1. . . vn} ← shortest path vertex(TD, c1, c2) V=V∪ {v1. . . vn}. G←graph induced by Von TD return Petri net induced by V 7.3 Multi-level Conformance Diagnosis and its Applications So far the analysis of the conformance was always performed using a complete decomposition of the model. However, for detailed process diagnosis it is important to also be able to do a more focused analysis. This section presents three approaches to achieve this: (1) stand-alone checking, (2) multi-level analysis, and (3) filtering. 7.3.1 Stand-alone Checking First we consider the problem of analyzing a selected subprocess in isolation. Clearly, assumptions on the subprocess and its context must be defined in order to perform such an isolated conformance check. The conformance results obtained are strongly correlated with the assumptions considered, and hence the analysis of the model properties and domain knowledge becomes an essential part, e.g., whether a place has a bound on the number of tokens, or the number of activations of the subprocess within a trace. Let us show an application of the stand-alone checking for the typical case of wellstructured process models, that can easily be modeled using the subclass of safe workflow nets[66]. Given a SESE Sobtained from a decomposition, one can apply the following steps to conduct a local diagnosis of S: 1. Workflowing the SESE: In order to have a clear starting and ending point for the subprocess represented, re-define the net derived from S. In other words, given a SESE S, define the net derived from Sin terms of a workflow net, with an starting place (start) and a final place (end). By construction, a SESE has both an entry (i) and an exit (o) node. The start corresponds with iif iis a place. However, when iis a transition, we define start to be an artificial place and we connect it with i. Similarly for end and o. 7.3. Multi-level Conformance Diagnosis and its Applications 145 2. Initial and Final Marking: Given the workflow-net from the previous step, determining a plausible initial marking becomes straightforward, i.e., due to the safeness assumption of safe workflow nets, we consider a single token in the start in order to enable the execution of the subprocess. Similarly for the final marking. 3. SESE activations: the number of potential activations of a SESE within a case must be determined. In case it is always one, the SESE is left as is. However, in case it can be executed more than once (e.g., the SESE is inside some loop in the model), the net in the previous step is short-circuited, using a silent transition between end and start. Finally, it can also happen that a SESE may be not executed in a trace. In this last case, a silent transition between start and end avoiding the SESE content will be used. Determining if a suprocess can be executed several times is a complex matter. In [66], it is proposed the use of Petri net structural theory (minimal T-invariants [88]) as a best effort strategy for estimating repetitive behavior. 7.3.2 Multi-Level Analysis In this section we propose to combine the stand-alone checking presented above with the RPST to achieve a conformance analysis on a hierarchical manner. RPST nodes enriched with conformance information enable the analysis at different degrees of granularity and independence, similar to zooming in and out using online maps. Note that, by construction, the root of the RPST is the overall net. Therefore, any hierarchical analysis that involves the conformance checking of all the RPST nodes will require checking conformance on the original net (plus the checks of the rest of nodes), i.e., the computation time for a exhaustive hierarchical analysis will always be, by definition, greater than checking conformance on the overall net. For complex and time-consuming cases, this problem can be alleviated by limiting the size of the nodes to check or by using less expensive replay-based conformance techniques like [80, 30]. The latter techniques use heuristics in order to deal with unfitting situations. 7.3.3 Filtering The study presented in [66] suggest that there are three main differences between manual hierarchical decomposition and the one provided by the RPST-based decomposition: (1) analysts prefer to discard small components, (2) analysts prefer to not consider similar components, and (3) analysts prefer to have a hierarchy with a limited number of levels. Additionally, in this paper we point out a fourth difference: (4) analysts prefer to base hierarchies on other (non-control-flow) perspectives. In the remainder of this section we propose filtering techniques to allow for RPST-based decompositions closer to hierarchical decompositions preferred by analysts. -Small components: Small components of the RPST can be removed by filtered using a minimal size threshold. 146 Chapter 7. Topological and Multi-level Conformance Diagnosis (a) similar size among SESEs S2 S S1 S3S4 S (b) high simplicity among SESEs Figure 7.5: Example of cases with high similarity between nested SESEs. -Similarity: In order to reduce the redundancy of components and the unnecessary growth of the hierarchy, a similarity metric between parent-child components is defined, together with a threshold that determines the similarity frontier that will determine when two components are considered essentially the same. The proposed metric for estimating the similarity between a node Sand its single child S0is based on two factors: size and simplicity. The size factor is related with the number of arcs of Snot included on S0. The more arcs shared by both components, the more similar they are. For instance, considering the component S1of Figure 7.5a, all its arcs are included in S2 except two, i.e., S2is in essence S1. Therefore, a detailed conformance diagnosis over S1may be sufficient for understanding both subprocesses. The simplicity factor refers to the simplicity of part of the parent Snot included on the child S0. When such part defines a simple behavior (e.g., the strictly sequential behavior of S3not included in S4, in Figure 7.5b), the analysis and understanding of the parent may again be enough. On the other hand, when the behavior not included in S0contains complex controlflow constructs (e.g., mixtures of concurrency and choice) it may be more advisable to analyze both subprocesses. An example similarity metric is formalized as follows. Definition 7.3 (Similarity Metric).Let SP= (VP, FP) be an RPST node, and let SC= (VC, FC) be its only child. Let size define the difference on size between them, i.e., size =|FC|/|FP|. Let FO=FP\FCbe the set of non-intersecting arcs. Let F∗ Obe the arcs in FOthat have a source vertex with only one outgoing edge, and a target vertex with only one incoming edge, i.e., F∗ O={(x, y)∈FO|(x, v)∈FO|= 1∧ |(w, y)∈FO|= 1}. Let simplicity define the simplicity of the non-intersecting arcs, i.e., simplicity =|F∗ O|/|FO|. The similarity between SPand SCis the harmonic 7.4. Experimental Results 147 mean between size and simplicity: similarity = 2 ·size ·simplicity size +simplicity Although the similarity evaluation is restricted to nodes with only one child, our experimental results show that the reduction achieved on the RPST may be significant (specially after applying a small nodes filtering). -Multi-perspective filtering: The filtering presented until now is based on only structural net properties, not taking into account other perspectives (e.g., data, costs, roles, departments). However, they may be situations where we would like to focus the analysis only on those subprocesses satisfying certain domain conditions, e.g., an analyst may want to focus on the subprocesses involving tasks executed in a particular department. Therefore, we need to support filtering based on user-requirements and focus the analysis on the subprocesses involving activities relevant from the selected viewpoint. Such filtering is not limited to activities and may involve other perspectives (e.g., resources, actors, or costs), determining the activities they are connected with, and using them for filtering. 7.4 Experimental Results The set of experiments of this section is designed to illustrate the effects of some of the techniques proposed for process diagnosis. In particular, the Non-fitting Subnet Algorithm (cf. Algorithm 7.2), and the techniques of filtering the RPST based on small components and similarity (cf. Section 7.3.3). Table 7.1 shows the application of the NFN algorithm over the benchmark bpm20132, with components of size at most 50. For each model (containing Pplaces and Ttransitions) the table provided the size of the minimal net containing all the non-fitting components, i.e., the number of places and transitions (|P|and |T|), and the number of vertices |V|used to create the net. The table illustrates the benefits of the proposed algorithm to detect and isolate the fitness mismatches. In case the fitness problems are spread all over the whole model, the resulting net is almost the original net (e.g., prCm6). However, when the fitness problems are local, the net that encloses all problem spots may be orders of magnitude smaller than the original net, thus easing the diagnosis. The second experiment performed illustrates the effects of the simplification techniques over the RPST. Figure 7.6 reflect the results for one of the models (prCm6). The charts show the number of nodes of the original RPST, after filtering small components (<10) and then merging by similarity (>0.8). The number of nodes are distributed by levels of depth in the RPST tree, i.e., the distance with the root represented as the level 1. The chart clearly reflects the difference between the number of components on the original RPST and 2http://dx.doi.org/10.4121/uuid:44c32783-15d0-4dbd-af8a-78b97be3de49 148 Chapter 7. Topological and Multi-level Conformance Diagnosis Dataset NFN P T |V| |P| |T| prAm6 363 347 14 15 14 prCm6 317 317 113 315 317 prDm6 529 429 31 55 52 prEm6 277 275 31 29 40 prFm6 362 299 7 27 25 prGm6 357 335 5 34 29 Table 7.1: Results of NFN algorithm. the one after removing the small components, i.e., most of the RPST nodes are small. After removing small nodes the depth of the RPST only decreases two levels (from 14 to 12). On the other hand, when merging on similarity is applied over the filtered RPST, the number of nodes is not reduced so drastically, but the number of levels of the tree is (from 13 to 6), providing a hierarchical decomposition with less redundancy and more aligned with the human perception [66]. 0 100 200 1 3 5 7 9 11 13 nodes levels RSPT 020 40 1 3 5 7 9 11 13 nodes levels small 020 40 1 3 5 7 9 11 13 nodes levels similarity Figure 7.6: Results of filtering by small (<10) and merging by similarity (>0.8) over the model prCm6. 7.5 Conclusions Decomposition techniques in conformance checking provide an efficient mechanism to identify and locate conformance anomalies. This chapter went a step further, using decomposition techniques to provide other mechanisms for the diagnosis of conformance problems. The chapter proposed a topological relation between components, used to identify closely connected components with conformance problems. Furthermore, the chapter defined a hierarchy of components, opening the door to a zoom-in zoom-out analysis of the conformance. Chapter 8 Data-aware Decomposed Conformance Checking 8.1 Introduction Most of the work done in conformance checking in the literature, and the one presented in this thesis so far, focuses on the control-flow of the underlying process, i.e. the ordering of activities [80, 16]. In a data-aware process model, each case, i.e. a process instance, is characterized by its case variables. Paths taken during the execution may be governed by guards and conditions defined over such variables. A process model specifies the set of variables and their possible values, guards, and write/read actions. Since existing conformance checking techniques typically completely abstract from data, resources, and time, many deviations remain undetected. Therefore, the event log may record executions of process instances that appear fully conforming, even when it is not the case. Rigorous analysis of the data perspective is needed to reveal such deviations. Let us consider the process that is modeled as BPMN diagram in Figure 8.1. It models the handling of loans requests from customers. It is deliberately oversimplified to be able to explain the concepts more easily. The process starts with a credit request where the requestor provides some documents to demonstrate the capability of paying the loan back. These documents are verified and the interest amount is also computed. If the verification step is negative, a negative decision is made, the requestor is informed and, finally, the negative outcome of the request is stored in the system. If verification is positive, an assessment is made to take a final decision. Independently of the assessment’s decision, the requestor is –The materials reported in this chapter are partially published in [55] – 149 150 Chapter 8. Data-aware Decomposed Conformance Checking Credit Request (a) Verify (b) Assessment (c) Positive Vefication Register Negative Verification (d) Negative Verification Inform Requester (e) Renegotiate Request(f) Register Negative Request (g) Negative Decision Open Credit (h) Positive Decision Amount (A) Interest (I) Decision (D) Verification (V) 0.1 Amount < Interest < 0.2 Amount The renegotiated amount is smaller than the original amount Decision = Negative Figure 8.1: Example of a (simplified) process to request loans. The dotted arcs going from a transition to a variable denote write operations; the arcs towards a transition denote read operations, i.e. the transition requires accessing the current variables’ value. Each transition is abbreviated into a lower-case letter (e.g. a) and each variable is represented as a upper-case letter (e.g. A). The abbreviations are shown in brackets after the name of the transitions or variable names. informed. Moreover, even if the verification is negative, the requestor can renegotiate the loan (e.g. to have lower interests) by providing further documents or by asking for a smaller amount. In this case, the verification-assessment part is repeated. If both the decision and verification are positive and the requestor is not willing to renegotiate, the credit is opened. Let us consider the following trace:1 σex =h(a,∅,{(A, 4000)}),(b,{(A, 4000)},{(I, 450),(V, false)}),(c,{(V, false)}, {(D, true)}),(e,∅,∅),(f,{(A, 4000)},{(A, 5000)}),(b,{(A, 5000)},{(I, 450), (V, false)}),(d,{(V, false)},{(D, false)}),(e,∅,∅),(h,{(D, true)},∅)i Seen from a control-flow perspective only (i.e. only considering the activities’ ordering), the trace seems to be fully conforming. Nonetheless, a number of deviations can be noticed if the data perspective is considered. First of all, if activity cis executed, previously activity bcould not have resulted in a negative verification, i.e. Vis set to false. Second, activity f 1Notation (act, r, w) is used to denote the occurrence of activity act that writes and reads variables according to functions wand r, e.g., (b,{(A, 4000)},{(I, 450),(V, false)}) is an event corresponding to the occurrence of activity bwhile reading value 4000 for variable Aand writing values 450 and false to variables I and Vrespectively. (e,∅,∅) corresponds to the occurrence of activity ewithout reading/writing any variables. 8.1. Introduction 151 cannot write value 5000 to variable A, as this new value is larger than the previous value, i.e. 4000. Furthermore, if the decision and verification are both negative, i.e. both Vare D are set to false, then hcannot be executed at the end. The identification of non-conforming traces clearly has value in itself. Nonetheless, organizations are often interested in explanations that can steer measures to improve the quality of the process. Alignments (cf. Chapter 5) aim to support more refined conformance checking. An alignment aligns a case in the event log with an execution path of the process model as good as possible. If the case deviates from the model, then it is not possible to perfectly align with the model and a best matching scenario is selected. Note that for the same deviation, multiple explanations can be given. For instance, the problem that hwas executed when it was not supposed to happen can be explained in two ways: (1) hshould not have occurred because Vand Dare both set to false (“control-flow is wrong”) and (2) Vand D should both have been set to true because hoccurs (“data-flow is wrong”). In order to decide for the most reasonable explanation, costs are assigned to deviations and we aim to find the explanation with the lowest cost. For instance, if assigning a wrong value to Vand Dis less severe than executing hwrongly, the second explanation is preferred. The seminal work in [16] only considers alignments in the control-flow part, thus ignoring the data-perspective aspect of conformance. As we detail in Section 8.2.3, finding an alignment of an event log and a data-aware process model is undecidable in the general case. However, to make the problem decidable, works [54, 57] put forward the limitation that guards need to be linear (in)equations. These works also show that, even with that limitation, the problem of finding an alignment of an event log can become intractable since the problem’s complexity is exponential on the size of the model, i.e. the number of activities and data variables. In this chapter, while keeping the limitations mentioned above, we aim to speed up the computation of alignments by using a divide-and-conquer approach. The data-aware process model is split into smaller partly overlapping model fragments. For each model fragment a sublog is created by projecting the initial event log onto the activities used in the fragment. Given the exponential nature of conformance checking, this may significantly reduce the computation time. If the decomposition is done properly, then any trace that fits into the overall model also fits all of the smaller model fragments and vice versa. The remainder of this chapter is organized as follows. Section 8.2 revisits the background definitions of conformance checking and process mining presented so far in this thesis to incorporate data information. In Section 8.3 we extend the definition of valid decomposition for data-aware models. Section 8.4 proposes a valid decomposition strategy based on SESEs. Experimental results, both artificial and real, are presented in Section 8.5. Finally, Section 8.6 concludes the chapter. 152 Chapter 8. Data-aware Decomposed Conformance Checking 8.2 Data-aware Processes In the previous chapters, all the definitions and theory presented focus on the control-flow perspective of the processes. In this section we extend those concepts to incorporate the data perspective. In particular, this section presents Petri nets with data as data-aware process model notation, event logs with data, and the relation between models and logs. 8.2.1 Petri nets with Data n1 n2 n3 n5 n6 Credit Request Register Negative Verification Inform Requester Renegotiate Open Credit Loan Assessment Interests Amount Verification Decision Register Negative Request Register Negative Request n4 n4 Verify Verify Figure 8.2: Pictorial representation of a Petri net with Data that models the process earlier described in terms of BPMN diagram (cf. Figure 8.1). Places, transitions and variables are represented as circles, rectangles and triangles, respectively. The dotted arcs going from a transition to a variable denote the writing operations; the reverse arcs denote the read operations, i.e. the transition requires accessing the current variables’ value. Petri nets presented in previous chapters are extended to incorporate data. A Petri net with Data is a Petri net with any number of variables (see Definitions 8.1 and 8.2 below). Petri nets with data can be seen as an abstracted version of high-level/colored Petri nets [50]. Colored Petri nets are extremely rich in expressiveness; however, many aspects are unimportant in our setting. Petri nets with data provide precisely the information needed for conformance checking of data-aware models and logs. In particular, the definitions presented is based on the work of de Leoni et al. [54]. Definition 8.1 (Variables and Values).UVN is the universe of variable names. UVV is the universe of values. UVM =UVN 6→ UVV is the universe of variable mappings.