Full text
UNIVERSIDADE DE SANTIAGO DE COMPOSTELA Centro Singular de Investigaci´ on en Tecnolox´ ıas da Informaci´ on (CiTIUS) Tesis doctoral MINING COMPLETE, PRECISE AND SIMPLE PROCESS MODELS Presentada por: Borja V´ azquez Barreiros Dirigida por: Manuel Lama Pen´ ın Manuel Mucientes Molina Santiago de Compostela, septiembre de 2016
Manuel Lama Pen´ ın, Profesor Titular del ´ Area de Ciencias de la Computaci´ on e Inteligencia Artificial de la Universidade de Santiago de Compostela Manuel Mucientes Molina, Profesor Contratado Doctor del ´ Area de Ciencias de la Computaci´ on e Inteligencia Artificial de la Universidade de Santiago de Compostela HACEN CONSTAR: Que la memoria titulada MINING COMPLETE, PRECISE AND SIMPLE PROCESS MODELS ha sido realizada por Borja V´ azquez Barreiros bajo nuestra direcci´ on en el Centro Singular de Investigaci´ on en Tecnolox´ ıas da Informaci´ on de la Universidade de Santiago de Compostela, y constituye la Tesis que presenta para obtar al t´ ıtulo de Doctor. Santiago de Compostela, septiembre de 2016 Manuel Lama Pen´ ın Director de la tesis Manuel Mucientes Molina Director de la tesis Borja V´ azquez Barreiros Autor de la tesis
Manuel Lama Pen´ ın, Profesor Titular del ´ Area de Ciencias de la Computaci´ on e Inteligencia Artificial de la Universidade de Santiago de Compostela Manuel Mucientes Molina, Profesor Contratado Doctor del ´ Area de Ciencias de la Computaci´ on e Inteligencia Artificial de la Universidade de Santiago de Compostela como Director/res de la tesis titulada: MINING COMPLETE, PRECISE AND SIMPLE PROCESS MODELS Por la presente INFORMAN: Que la tesis presentada por Don Borja V´ azquez Barreiros es id´ onea para ser presentada, de acuerdo con el art´ ıculo 41 del Regulamento de Estudos de Doutoramento, por la modalidad de compendio de ART´ ICULOS, en los que el doctorando ha tenido participaci´ on en el peso de la investigaci´ on y su contribuci´ on fue decisiva para llevar a cabo este trabajo. Y que est´ a en conocimiento de los coautores, tanto doctores como no doctores, participantes en los art´ ıculos, que ninguno de los trabajos reunidos en esta tesis ser´ an presentados por ninguno de ellos en otras tesis de Doctorado, lo que firmamos bajo nuestra responsabilidad. Santiago de Compostela, septiembre de 2016 Manuel Lama Pen´ ın Director de la tesis Manuel Mucientes Molina Director de la tesis Borja V´ azquez Barreiros Autor de la tesis
I love deadlines. I like the whooshing sound they make as they fly by. Douglas Adams
You know it is. You pick up a book, flip to the dedication, and find that, once again, the author has dedicated a book to someone else and not to you. Not this time. - Neil Gaiman Agradecimientos En primer lugar, mi m´ as sincero agradecimiento a mis directores de tesis, Manuel Mucientes y Manuel Lama, por depositar su confianza en mi para llevar a cabo esta tesis. Gracias por vuestros consejos y ayuda brindada a lo largo de todos estos a˜ nos. Dar las gracias al Departamento de Electr´ onica y Computaci´ on, as´ ı como al Centro singular de Investigaci´ on en Tecnolox´ ıas da Informaci´ on (CiTIUS), de la Universidad de Santiago de Compostela por los medios y recursos proporcionados para la realizaci´ on de la tesis. Aprovecho para mostrar mi agradecimiento al Dr. Wil van der Aalst por acogerme en su grupo durante mi estancia predoctoral, y permitirme disfrutar de una experiencia inolvidable tanto personal, como profesionalmente. Gracias a toda la gente que conoc´ ı all´ ı durante ese tiempo y que me hizo sentir coma na casa. Tambi´ en me gustar´ ıa expresar mi gratitud a las entidades que han financiado el desarrollo de esta investigaci´ on. Concretamente, agradecer el soporte econ´ omico recibido por parte del Ministerio de Ciencia e Innovaci´ on a trav´ es del proyecto “SoftLearn: Soft computing para miner´ ıa de procesos en e-learning” (TIN2011-22935) y del Ministerio de Econom´ ıa y Competitividad, cofinanciado por el Fondo Europeo de Desarrollo Regional - FEDER, a trav´ es del proyecto “BAI4SOW: Soft Computing for supporting Business Intelligence in Social Workflows” (TIN2014-56633-C3-1-R). Imposible olvidarse de los irremplazables compa˜ neros de laboratorio. Gracias por estar ah´ ı durante todos estos a˜ nos.
vi tres algoritmos de descubrimiento de procesos. Adem´ as, los resultados se han comparado con ocho algoritmos diferentes del estado del arte, demostrando, estad´ ısticamente, que a˜ nadiendo tareas duplicadas tras descubrir un modelo de proceso presenta mejores resultados, en t´ erminos de precisi´ on y simplicidad, que las t´ ecnicas del estado del arte actual. Siguiendo con la idea de mejorar la visualizaci´ on de un modelo de proceso, la ´ ultima secci´ on de la presente Tesis Doctoral busca mejorar este aspecto con la inclusi´ on de conocimiento de dominio utilizando t´ ecnicas de jerarquizaci´ on. En otras palabras, la jerarquizaci´ on de procesos tiene como objetivo utilizar el conocimiento del dominio para traducir un modelo de proceso ya descubierto a una representaci´ on m´ as espec´ ıfica dentro de un dominio particular y, por lo tanto, obtener un modelo de proceso m´ as interpretable. Esta idea de jerarquizaci´ on de procesos utilizando conocimiento del dominio es, dentro de nuestro conocimiento, una aproximaci´ on novedosa, sin trabajo previo directamente relacionado en el campo de la miner´ ıa proceso. No obstante, sigue las mismas ideas que los m´ etodos que tienen como objetivo descomponer modelos de proceso. Sin embargo, las t´ ecnicas de descomposici´ on se centran en la partici´ on de modelos de proceso y de registros de eventos en partes m´ as peque˜ nas que se pueden analizar de forma independiente. Por lo tanto, no devuelven una representaci´ on jer´ arquica del modelo de proceso, sino una representaci´ on todav´ ıa aplanada del modelo de proceso original. De este modo, la hip´ otesis que se presenta en el Cap´ ıtulo 4 queda definida como: ¿Es posible jerarquizar autom´ aticamente un modelo de proceso ya descubierto, utilizando el conocimiento de dominio y, por lo tanto, mejorar la interpretabilidad del modelo de proceso? En este cap´ ıtulo se describe c´ omo se consigue este objetivo en tres pasos diferentes. En primer lugar, el modelo de proceso se extrae autom´ aticamente de las secuencias registrados a trav´ es de los algoritmos de miner´ ıa de procesos desarrollados. A continuaci´ on, se aplica un algoritmo basado en conocimiento sobre la estructura de control de destino para determinar qu´ e componentes deben ser creados. Por ´ ultimo, se extraen autom´ aticamente las reglas de adaptaci´ on a partir de los registros de eventos —m´ as espec´ ıficamente, a partir de los valores de las variables de los registros de eventos— a trav´ es de un algoritmo de aprendizaje de tipo ´ arbol de decisi´ on, y se integran en la estructura del lenguaje destino. En este campo, a pesar de que buscamos una aproximaci´ on general independiente de cualquier dominio en particular, la validaci´ on e implementaci´ on de este proceso de jerarquizaci´ on de modelos de proceso se ha llevado a cabo en el campo educativo. El catalizador de esta decisi´ on se debe a la existencia de IMS LD, un est´ andar de metadatos que describe todos los elementos del dise˜ no de un pro-
vii ceso de ense˜ nanza-aprendizaje. Por lo tanto, los diferentes componentes de este proceso de jerarquizaci´ on se han analizado utilizando un conjunto de nueve cursos reales con diferentes grados de complejidad. Los resultados experimentales mostraron que la miner´ ıa proceso es una buena soluci´ on para recuperar una estructura de proceso de un conjunto de archivos de registro de eventos. Concretamente, en todos los casos se extrajo correctamente la estructura IMS LD original. Finalmente, la tesis termina con las conclusiones y el trabajo futuro presentados en el Cap´ ıtulo 5.
Contents 1 Introduction 1 1.1 Motivation ........................................................................... 1 1.2 Process discovery ................................................................... 8 1.3 Enhancing process models ......................................................... 14 1.4 Process hierarchization ............................................................. 17 1.5 Objectives ........................................................................... 20 1.6 Research Contributions ............................................................. 21 1.7 Publications ......................................................................... 24 1.8 Thesis Outline ....................................................................... 28 2 ProDiGen: Mining complete, precise and minimal structure process models 31 2.1 Abstract.............................................................................. 32 2.2 Introduction ......................................................................... 33 2.3 Process Discovery................................................................... 35 2.4 RelatedWork ....................................................................... 37 2.5 ProDiGen: Process Discovery through a Genetic algorithm ..................... 39 2.6 Experimentation .................................................................... 50 2.7 Conclusions ......................................................................... 65 3 Enhancing Discovered Processes with Duplicate Tasks 67 3.1 Abstract.............................................................................. 68 3.2 Introduction ......................................................................... 69 3.3 State of the art ....................................................................... 72 3.4 Splitting Labels After Discovery ................................................... 73
Contents ix 3.5 Experimentation .................................................................... 84 3.6 Conclusions ......................................................................... 98 4 Recompiling Learning Processes from Event Logs 99 4.1 Abstract.............................................................................. 100 4.2 Introduction ......................................................................... 101 4.3 IMS Learning Design ............................................................... 103 4.4 State of the Art ...................................................................... 104 4.5 Framework .......................................................................... 108 4.6 Mining the learning flow from event logs ......................................... 111 4.7 Mining adaptive rules from event logs ............................................. 114 4.8 IMS LD reengineering .............................................................. 118 4.9 Results ............................................................................... 126 4.10 Conclusions and Future Work ...................................................... 131 5 Conclusions 133 Bibliography 137 List of Figures 157 List of Tables 159 List of Algorithms 161
CHAPTER 1 INTRODUCTION 1.1 Motivation In the last years, there has been an incredible investment to develop technologies to automate all the different tasks carried out in an organization and to store all the information generated during these processes. In particular, regarding business processes, the area of interest in this dissertation, this has lead to an incredible growth on the amount of process-related data, i.e, execution traces of business activities. Hence, with this flood of information in today’s organizations, there has raised a special interest, or even a need, for extracting valuable knowledge from such process-related information [68], and thereby to understand what data really say. Clearly, the explosion of this kind of information has opened the door to provide insights into the actual way of working in an organization, to detect deviations in the process or to improve the way certain business activities are executed. In this context, a business process, henceforth a process or process model, is understood as a collection of related structured activities that produce a specific outcome, e.g., a product or a service [132]. These activities are performed by a set of actors to achieve the purpose of the process. For instance, in education, the learning design of a course is a process where learners must undertake a sequence of learning activities, e.g., posting in forums, making exercises and exams, etc., in order to achieve the pedagogical objectives of the course. Typically, these processes have a detailed description, i.e., there is a design of the process where its activities and the actors participating in these steps are clearly described. In essence, processes are usually designed to force people or machines to work in a particular way. Unfortunately, there might be differences between the designed process model, and how the process is being executed
2Chapter 1. Introduction Log Event logs records events, e.g. messages, transactions, etc. Information Systems discovery conformance enhancement (process) model Model Analyze Implements "world" people machines business processes components organizations Supports /Control Specifies Configures Analyzes Figure 1.1: Process mining framework (Adapted from [122]). in reality [119, 122]. For instance, following with the previous example in the educational domain, learners can undertake additional learning activities, like check the bibliography or interact with other learners, apart from those that were explicitly specified in the learning process designed by a teacher. The reasons behind this gap are manifold. It might be that there were human errors while implementing the process model in the information system. Maybe, the system allows to skip an activity, to change the order in which some activities must be executed, or to execute activities not defined in the process. Perhaps a particular instance of a process needs to be restarted or prematurely canceled with no reasons. In a nutshell, creating process models is a difficult and error-prone task, and there is an evident gap between what we think is going on (the designed process model) and what is really happening (the real process model). This deprecates the actual value of process models in organizations [122]. In this scenario, process mining has emerged as a way to analyse the behavior of an organization by extracting knowledge from event logs, i.e., process-related data, and by offering techniques to discover, monitor and enhance real processes. In other words, process mining allows us to understand what is really happening in a business process, and not what we think is going on [122]. Figure 1.1 depicts the process mining framework. The general view is that process mining aims to model the real world which is supported and controlled by various
1.1. Motivation 3 LogLog (a) Discovery. LogLog (b) Conformance checking. LogLog (c) Enhancement. Figure 1.2: Types of tasks in process mining (Adapted from [16]). types of information systems. To do that, it takes as starting point the event data stored in the form of event logs by the information systems while executing the defined process. Hence, process mining provides links between the actual observed process execution and the modeled process behavior. Typically, process mining techniques have been categorized in three different main groups (Figure 1.2): •The first group is Discovery (Figure 1.2(a)), which aims to retrieve different kinds of models based on the information of an event log. For instance, through discovery techniques it is possible to retrieve a Petri net model explaining the behavior recorded in the log. In general, discovery techniques do not take into account any domain knowledge to derive models, although there are a few techniques that assume a-priori knowledge to retrieve a model [10, 38, 48, 97]. •The second group is Conformance Checking (Figure 1.2(b)), also known as conformance analysis, where a process model is compared with a log of the same process to analyse and quantify the differences between the expected and the real behavior as recorded in the log. For instance, when manufacturing a mobile phone, it has always to be checked at the end of the assembly process. Through conformance checking it is possible to detect if this rule is followed or not. Hence, these kind of techniques are generally used to detect, locate, explain and measure the severity of the deviations. •The third group of process mining techniques is Enhancement (Figure 1.2(c)). In this group, a process model is dynamically improved, enriched or extended based on the information of a (new) log and/or a defined process model. Whereas conformance checking aims to detect and quantify the deviations, process enhancement tries to extend and/or change the a-priori process model. An example of enhancement is repair, i.e., to modify a process model to better depict reality. For example, correcting a process where a particular activity was modeled as optional, i.e., it could be skipped, but in
4Chapter 1. Introduction Table 1.1: A fragment of an event log loosely based on a fictional loan application process [40], where each individual line corresponds to an event. Case Activity Resource Time-stamp ··· . . .. . .. . .. . .. . . 3554 Check application form John 2016-10-08T09:45:37+00:00 ··· 3555 Check application form Lucy 2016-10-08T10:12:37+00:00 ··· 3554 Check credit history Harold 2016-10-08T10:14:25+00:00 ··· 3555 Check credit history Harold 2016-10-08T10:31:02+00:00 ··· 3554 Appraise property Pete 2016-10-08T10:45:22+00:00 ··· 3554 Assess loan risk Harold 2016-10-08T10:49:52+00:00 ··· 3555 Assess loan risk Harold 2016-10-08T11:01:51+00:00 ··· 3553 Return application to client John 2016-10-08T11:03:18+00:00 ··· 3556 Check application form Lucy 2016-10-08T11:05:10+00:00 ··· 3555 Assess eligibility Harry 2016-10-08T11:06:22+00:00 ··· 3554 Assess eligibility Harry 2016-10-08T11:33:42+00:00 ··· 3554 Reject application Harry 2016-10-08T11:45:42+00:00 ··· 3557 Check application form Lucy 2016-10-08T13:48:12+00:00 ··· 3555 Prepare acceptance pack Sue 2016-10-08T14:02:22+00:00 ··· . . .. . .. . .. . .. . . reality is a mandatory step. Another type of enhancement is extension, i.e., add new information to a process model, for instance, adding the timestamps to a process to show bottlenecks, throughput times, or for time prediction [130]. Other type of extensions can involve adding information about resources, decision rules, quality metrics, etc. As can be seen, all the different groups in which process mining is divided share one component: an event log. Consider Table 1.1 showing a snapshot of an event log of a fictional loan application handling process. We can see that each event, i.e., each individual row, refers to an activity. Furthermore, it refers to one case, i.e., a process instance, it has a timestamp, and it shows which resource executed the task. For instance, let us consider all activities related to the case 3554. First, John Checks the application form, after which Harold Checks the applicant’s credit history. Pete Appraises the property, after which Harold performs a Loan risk assessment. Finally, Harry assesses the eligibility of the client for the loan and, at the end, he decides to Reject the application. A sequence of events, e.g., the execution of the activities related to a process instance, e.g., the case 3554, is referred to as a trace. Thereby, in essence, an event log is a group of traces that consist of events.
1.1. Motivation 5 From the point of view of process mining, it is a minimum requirement that the events in the log refer to i) acase,ii) an activity, and iii) apoint in time (timestamp). Having this information available, it is possible, for instance, to discover a process model from an event log. In practice, the actual data stored within a company’s information system might not necessarily be of the form presented in Table 1.1. Hence, the extracted data often needs to be transformed. Anyway, such type of required data is present in almost any information system. Often, a wealth of additional attributes are available in an event log, e.g., customer id, credit balance, etc. In situations where the log provides a rich source of data, analysts can decide upon various log perspectives [132] to drive the execution of a process mining technique. We can distinguish the following perspectives [106, 107, 109, 108, 110] regarding the analysis of an event log: -Control flow perspective. The most common perspective. It captures aspects related to control-flow dependencies between various tasks, i.e., the ordering of activities in the event log. For example, “check the credit history always after checking the application form”. -Resource perspective. It focuses on how the resources, i.e., human (e.g., people) or nonhuman (e.g., equipment) actors, are involved and related to the process. “Assessing the loan risk has to be made by the manager” is an example handled by this perspective. -Data perspective. It deals with the flow of data through the process, i.e., the passing of information between activities, the scope of variables, etc. An example of this perspective would be “if the credit balance is negative, reject the application”. -Exception handling perspective. This perspective focuses on problems and failures. In other words, it deals with the various causes of exceptions and the various actions that need to be taken as a result of exceptions, e.g., “if the application has an error, call the client for an amendment”. -Time perspective. This perspective is related to time and performance aspects, e.g., bottlenecks, monitor the utilization of resources, etc. For example, “in January, checking the application takes more than one day”. Within this dissertation we primarily focus on the control-flow perspective, i.e., the sequential ordering of activities w.r.t. cases. Thus, from the control-flow perspective, case 3554 can be
12 Chapter 1. Introduction different improvements such as mining duplicate activities. Although these heuristicsbased algorithms use replay fitness as their guiding principle, they do not guarantee optimal results as they only focus on the main behavior of the event log. On the other hand, Inductive Miner [70] is an approach that produces block-structured [120] process models able to replay the whole event log, i.e., it guarantees a perfect replay fitness. However, it is quite sensitive to incompleteness (although different extensions to face this issue are proposed in [71, 72, 73]), as well as duplicate labels and invisible activities, falling back to a flower model when it cannot find a strong relation between activities. Hence, the Inductive Miner (and extensions) can lead to process models with a lack of precision and very good generalization. •Search-based algorithms. These techniques are based on the paradigm of evolutionary algorithms [8, 43]. In a nutshell, an evolutionary algorithm is a heuristic search that mimics the process of natural selection, using techniques like crossover, mutation and selection to generate a set of possible solutions which are optimized through several iterations until a convergence criterion is reached. The major characteristics of a genetic algorithm are its capability to explore large search spaces, and its flexibility to incorporate prior knowledge virtually in any part of the algorithm. Within this context, the first approach presented following this paradigm was Genetic Miner [30]. Alves de Medeiros et al. proved that it is possible to mine all common constructs and be robust to noise, all at once, but it cannot ensure simple process models as some of the mined solutions have implicit places or needless arcs. Another recently proposed approach, so called Evolutionary Tree Miner (ETM) [18, 141], guides its search taking into account a balance between the four objectives previously described, but considering only block structured solutions. However, the expressiveness of block structured process models is limited as they do not allow certain behavior, such as arbitrary loops, NFC, unbalanced split/join points, or certain patterns such as the milestone [144]. Moreover, many real life processes are not block structured [122]. Additionally, although alignments5are the de facto standard instrument for conformance checking [6, 124], computing them is a combinatorial problem and hence, extremely costly [149]. Another search-based algorithm is presented in [16], where the authors present the initial results of a new evolutionary algorithm for discovering declarative process models. 5Basically, alignments map as many events as possible from a trace with activities of a process model [5].
1.2. Process discovery 13 •Algorithms based on theory of regions. These algorithms can be classified in two groups based on their behavioral process specification: state-space and language based. - The state-space algorithms perform two steps: first, they build a transition system [129], i.e., a set of states and transitions between states, and then they construct a Petri net according to that transition system [9, 25, 42, 113]. This group of algorithms focuses on the synthesis of a Petri net whose reachability graph is similar to the transition system. As discussed in [129] and [138] the main problem of this solution is the non-trivial construction of the state information from a log, because usually logs almost never carry state information. Other problem is that it usually results in overfitting process models that can only replay the log without any form of generalization, hence being very sensitive to noise and incompleteness, leading to very complex processes. - In contrast, language-based algorithms assume that the log contains words (traces) of a specific language (the activities are the letters), whereas the target net allows just words of this language. In [12], the authors distinguish between two methods to derive Petri nets from event logs: i) using a basis representation, which cannot tackle duplicate tasks or non-free-choice constructs; and ii) using separating representation [12, 78] to mine duplicate tasks but not non-free-choice constructs. These algorithms usually guarantee a perfect replay fitness. However, a problem of language-based regions is that, in order to construct a Petri net, it is necessary to solve a linear inequation system which, unfortunately, has many solutions. Moreover, this approach usually leads to overfitted process models due to the restrictive assumptions about process logs. Additionally, the number of places introduced by both approaches is theoretically high. To overcome these drawbacks, in [138], authors propose to use Integer Linear Programming to avoid overffited process models and minimize the upper bound number of places. Nevertheless, pure region-based techniques still have problems with incomplete behavior, resulting in overly complex processes. Extensions such as [144] try to avoid this overffitting through heuristics and filtering feedback from the user. •Machine learning. These algorithms apply different machine learning techniques to discover the control-flow of the activities. An example of this technique, based on inductive logic programming, was presented by Goedertier et al. [47]. They designed
14 Chapter 1. Introduction AGNES, an algorithm that introduces artificially generated negative events, i.e., traces that describe a particular path that is not allowed for a process. Unfortunately, event logs hardly ever contain information about disallowed behavior. This idea of introducing negative events was latter applied in [91]. Another approach recently proposed is the algorithm NPM [76]. This technique, instead of mining the relationship between two events, mines a set of patterns that could cover all the traces seen in an event log. Another approach is presented in [159], where the authors describe a technique to discover declarative process models based on regular expressions and (finite) automata. •Partial approaches. All the aforementioned techniques focus their search on retrieving an end-to-end process model. However, in the state of the art we can also distinguish different process discovery algorithms focused on producing rules or frequent patterns from an event log. For instance, there are approaches based on sequential pattern mining [116] and episode mining [69], as well as approaches to learn declarative (based on temporal properties) languages [127]. In summary, a large amount of work has been done in this specific area by addressing solutions from different points of view. Unfortunately, the review of the state of the art shows that many end-to-end process discovery algorithms focus on one or two of the aforementioned dimensions, or the used notation does not allow to represent all possible behavior. In other words, current techniques have difficulties to retrieve models with high levels of replay fitness, but being as precise and simple as possible. Considering this scenario, the hypothesis of this PhD Thesis regarding process discovery can be stated as follows: H1.Is it possible to retrieve high quality process models, in general domains, through a hierarchical criteria of replay fitness, precision and simplicity? 1.3 Enhancing process models The visualization of a process model plays an important role in order to correctly gain insights about the process [135]. That is, process models that are too much complex, can hinder the real behavior of the process rather than to provide insights of what is really happening. Within this context, this dissertation focuses on the concept of duplicate tasks. The notion of duplicate tasks, or activities, refers to situations in which multiple tasks in the process have the same label. Concerning the visualization of a process model, this kind of behavior is useful i) when
1.3. Enhancing process models 15 Sequence of events case1Attend lecture, Turing Elevator, Check Bibliography, Quiz, Recursive Languages, Quiz, Results. case2Attend lecture, Turing Elevator, Check Bibliography, Quiz, Check Bibliography, Recursive Languages, Quiz, Results. case3Attend lecture, Turing Vending Machine, Check Bibliography, Quiz, Recursive Languages, Check Bibliography, Quiz, Results. case4Attend lecture, Check Bibliography, Turing Vending Machine, Check Bibliography, Quiz, Recursive Languages, Quiz, Results. . . .. . . casen... (a) Traces extracted from a synthetic event log. Attend Lecture Quiz Check Bibliography Turing elevator Turing Vending Machine Recursive languages Results (b) Process model without duplicate labels. Results Attend Lecture Turing elevator Turing Vending Machine Quiz Check Bibliography Recursive languages Quiz Check Bibliography (c) Process model with duplicate labels. Figure 1.5: A log and two process models (Petri nets) exemplifying a lecture of Automata Theory and Formal Languages. a particular task is used in different contexts in a process and ii) to enhance the readability of a model by reducing overly connected tasks. Figure 1.5 shows an example on how the addition of duplicate tasks to a process model improves its readability and structural clarity. In this example, considering the sample log of Figure 1.5(a), the events Quiz and Check Bibliography, are executed at most twice in each trace. Between the multiple possibilities of modeling the behavior of the log, we can assume i) an injective relation between the events in the log and the activities in the process model (Figure 1.5(b)); or ii) that multiple activities can share the same label, i.e., a process model with duplicate activities (Figure 1.5(c)). In this example, although both process models perfectly reproduce all the behavior recorded in the log, i.e., both have a perfect replay fitness, the process model depicted in Figure 1.5(b) allows to execute both Quiz and Check Bibliography as many times as we want at any time in the process, hence, this process model is not a rigorous picture of the recorded behavior of the log: its precision is lower. On the other hand, if both activities are duplicated, the resulting process model (Figure 1.5(c)) is more suitable, i.e., more precise w.r.t. the recorded behavior in the log, as it does not allow, for example, to check
16 Chapter 1. Introduction the bibliography (Check Bibliography) during the exam (Quiz), as the model in Figure 1.5(b) does. Hence, the ability to discover these duplicate tasks may greatly enhance, not only the readability of the final solution, but the precision of the process model by disallowing unseen behavior. From the perspective of process discovery, including duplicate tasks in the mining process is a well known challenge [136] as, usually, different tasks can be recorded with the same label in the log, hindering the discovery of the process model that better fits the log. Thus, algorithms have to find out which events of the log belong to which tasks. In the state of the art of process discovery, many techniques [33, 71, 96, 138, 147, 153, 155] assume an injective relation between tasks and events in the log, considering that there cannot be two different activities with the same label. Therefore, these algorithms, when discovering processes that can generate logs with duplicate labels, usually give as a result process models with overly connected nodes or needless loops, decreasing the precision and simplicity of the process model. Further, there are techniques that do not make such a restrictive assumption [15, 20, 23, 24, 30, 47, 75]. Typically, all these techniques identify the potential duplicate activities in a pre-mining step, or during the mining process. One example is the α∗-algorithm [75], an extension of the α-algorithm [137] to mine duplicate tasks. However, the heuristic rules used in this algorithm require a noise-free and complete log [140]. Fodina [15] is an algorithm based on heuristics that infers the duplicate tasks transforming the event log into a task log following the heuristics defined in [30]. Other solutions, like DGA [30] and ETM [20] (based on evolutionary algorithms), or AGNES [47] (an approach based on inductive programming) include the possibility to mine duplicate tasks. However, these techniques do not allow to unfold loops [30], or they are very permissive allowing to duplicate any activity in the log [20]. Region-based algorithms [23, 24] are also able to mine duplicate tasks, but, when searching for regions, they usually allow to split any label in the log without any bound. In [94] the authors present an approach for discovering duplicate tasks specifically based on BPMN models using the Heuristics Miner. On the other hand, besides these process discovery techniques, the closest works that follow the idea of improving the readability of an already mined process model are presented in [34, 44]. However, these techniques do no try to enhance a process model with the inclusion of duplicate labels. A recent technique [118] introduces the concept of label refinements, i.e., the authors perform the label splitting based on data attributes of the recorded events, for instance, using the time attribute of events.
1.4. Process hierarchization 17 To sum up, although very valuable results have been achieved in this field, the state of the art algorithms have different weaknesses. Some obtain, in specific logs, worse solutions than without duplicated tasks [15]. Others allow to duplicate any activity in the log [20], or generate solutions with a lower simplicity [24], i.e., more complex solutions. Finally, other proposals use heuristics that do not consider duplicate activities in some workflow patterns such as loops [30, 75]. Therefore, based on the above overview, the hypothesis of this PhD Thesis regarding enhancing process models can be stated as follows: H2.Is it possible to improve the structural clarity of a process model by duplicating the activities of a process model after the discovery process? 1.4 Process hierarchization In the previous section, we showed that taking into account duplicate labels can drastically change how a process depicts the behavior recorded in the log. However, it is possible to reach a further level of readability of a process model by applying hierarchization techniques, through the use of domain knowledge. The exploitation of domain knowledge to retrieve richer process models is still in an incipient phase with some recent studies [10, 38, 48, 97], mostly because domain knowledge is, in most of the cases, very difficult to obtain. However, there is one particular difference with these approaches and the idea of process hierarchization. Instead of using domain knowledge during the discovery phase, process hierarchization aims to use domain knowledge to translate an already discovered process model to a more specific representation within a particular domain, and, thus, retrieve a more interpretable process model. This idea of process hierarchization using domain knowledge is, to the extent of our knowledge, a rather new approach, with no previous work directly related within the field of process mining. Nonetheless, it follows the same idea as methods that aim to decompose process models [74, 87, 121]. However, decomposition techniques focus on the reduction of the complexity of the models by slicing them, i.e., to partition larger process models and event logs into smaller parts that can be analyzed independently. Thereby, the resultant process model using decomposition techniques is still a flatten representation of the original process model, i.e., through these techniques they do not completely hierarchize a process model. Another notable technique worth mentioning is the Fuzzy Miner [54, 55], an approach that can construct hierarchical process models, by moving less frequent activities to subprocesses
18 Chapter 1. Introduction or clusters of activities. Hence, this hierarchization is driven by the frequency of use of the different activities and arcs. In [14], the authors present an extension of the Fuzzy Miner, called Fuzzy Map Miner, that follows a two-phase approach, by first simplifying the log to a desired level of granularity, and later discovering the models from this simplified log. More specifically, the discovery of hierarchical process models is enabled through the automated discovery of abstractions (of activities), during the first step of the approach. These abstractions are defined through the discovery of common execution patterns in the log [13]. Another approach based on this idea of hierarchical process models is presented in [50, 51]. In this approach, the idea is to produce hierarchical views of the process that satisfactorily capture the behavior of the log at different levels of detail. In other words, it aims to discover different variants (different usage scenarios) of the process by means of clustering. Hence, instead of a single, possible intricate and complex process model of the whole process, the aim is to retrieve a collection of more compact and easier to understand process models. Concerning this PhD Thesis, although we seek for a general approach independent of any particular domain, we focus the process hierarchization in the educational field. The catalyst behind this decision is due the existence of IMS LD [46], a meta-data standard that describes all the elements of the design of a teaching-learning process. In this specification, one of the main components is the learning design. This component is understood as the coordination of the learning activities to be performed by the participants to achieve the pedagogical objectives, i.e the learning design describes the learning flow, or learning path, to be followed by learners. To describe this learning design, the IMS LD specification follows a theater metaphor where there are a number of plays, that can be interpreted as the runscripts for the execution of the course and that are concurrently executed, being independent of each other. Each one of these plays is composed by a set of acts, which can be understood as a module or chapter in a course. Acts are performed in sequence and define the activities that participants must do. This model also allows the assignation of roles to the participants and the partitioning of the activities of an act according to those roles, which are called role-parts. In this case, each one of the partitions can run in parallel. Finally, in each of these partitions, activities or activity structures are selected. The latter may consist of a sequence or a selection of activities. Taking this structure into account, the hierarchization process would consist of identifying the different IMS LD elements from a discovered process model, e.g., a Petri net, where these elements are also represented as Petri nets. However, a Petri net is a flatten process, while
1.4. Process hierarchization 19 IMS LD is a hierarchical structure in which each layer is composed of a different type of elements, i.e., each layer of the tree corresponds to a layer of IMS LD. Specifically, the first layer represents plays, the second acts, the third role-parts, and the remaining layers activities or activity structures. Moreover, as IMS LD also allows to specify adaptive learning strategies, through this process it would also be necessary to extract the adaptive rules that constrict the learning flow. Hence, the the problem to be solved is how to hierarchize an IMS LD course from a process model and an event log, i.e., how to transform a process model into the IMS LD standard to depict a more readable process model. In this way we can provide a more interpretable process model to teachers, as they can work directly with learning elements. For instance, a teacher can directly change a sequence of learning activities, or even a role part, without further knowledge about Petri nets. Furthermore, thanks to this standardization of a process model, the learning processes become reusable between different platforms. That is, teachers would be able to take the reconstructed course, change it, and use it as a new course in a different environment. In the state of the art, we can find several approaches related to this idea of reconstructing an IMS LD course. In [82], the authors focus on the reconstruction of an IMS LD course based on a visual language, which hides the complexity of the process model. Moreover, this approach requires a close collaboration between developers and teachers to simplify the gap between the technical and pedagogical point of view of the course. In [2], and later in [1], the authors present a four-step approach for process reenginering in higher education. However, the reengineering process is also not fully automatic, as it requires the participation and feedback from all the appropriate personnel and users. In [67], the authors present PETRA, a system to extract new knowledge rules about transitions and learning activities in processes from previous platform executions. However, this tool is not oriented towards process reconstruction and discovery, but on process extension, i.e., it requires an already defined process model in order to enrich such process. In summary, the main drawback of the state of the art approaches is that the course is not automatically reconstructed from scratch and needs the supervision of teachers and even developers. In other words, teachers need to provide feedback to map the discovered model to the IMS LD representation. Therefore, considering the aforementioned state of the art, the hypothesis of this PhD dissertation on this scenario can be stated as follows: H3.Is it possible to automatically hierarchize an already discovered process model, using domain knowledge, and, thus, retrieve a more interpretable process model?
20 Chapter 1. Introduction 1.5 Objectives As previously stated in Section 1.1, we defined two main objectives in this PhD Thesis: i) to design a process discovery algorithm focusing its search towards replay fitness, precision and simplicity; and ii) to enhance the interpretability of the discovered process models. To achieve that, different specific objectives have been pursued: O.1 Process discovery algorithm guided by replay fitness, precision and simplicity The first objective in this PhD thesis is to design a process discovery algorithm. Thus, from the control-flow perspective, the approach should be able to tackle the usual workflow patterns. Furthermore, it should be able to mine process models with high levels of replay fitness and precision, i.e., the discovered process models should represent, as best as possible, the main behavior recorded while retrieving the simplest process model as possible. Additionally, the algorithm should be able to deal with different levels of noise in the event log. O.2 Enhance models through the inclusion of duplicate activities The next objective is to extend the mined process models with more behavior, in particular, with duplicate labels. This is of particular interest from the point of view of readability and structural clarity of a process model, as with duplicate labels it is possible to disengage two activities with the same name that take place in different contexts of the process. The main problem behind this idea is that including duplicate activities as part of the semantics of a discovery algorithm can significantly increase the search space, hindering the discovery process. Furthermore, if any activity can be duplicated without any bound, this can result in overly-specific process models. Thus, the main objective is to enhance an already mined process model by duplicating the overly connected activities, improving the readibility of the resultant process model without adversely affecting its quality in terms of replay fitness and precision. O.3 Hierarchization of process models The last objective relates to the improvement of the interpretability and structural clarity of a process model. More specifically, the idea is to hierarchize a process model using domain knowledge. In other words, the pursued objective is to use domain knowledge to translate an already discovered process model to a more specific representation, within a particlar domain, and, thus, retrieve a more interpretable process model. This idea of
1.6. Research Contributions 21 process hierarchizarion is of particular interest in domains such as education, due the existence of the IMS LD standard, a meta-data model that describes all the elements of a learning process. Thus, taking as an example the educational scenario, the idea is to use the event logs generated during a course to extract the learning flow structure using the previously developed algorithms, then to obtain the underlying rules that control the adaptive learning of students, and finally to combine them into an educational modeling language standard. 1.6 Research Contributions The main contributions of this PhD dissertation are as follows: C.1 Process discovery through a genetic algorithm We developed a genetic process discovery algorithm (ProDiGen) that automatically searches for process models with high levels of replay fitness, precision and simplicity, while being robust to noise. Furthermore, the algorithm is able to face all the common workflow patterns at once. Thus, through this algorithm we are able to retrieve high quality process models regardless the domain. More specifically, the novelties of ProDiGen are: - A hierarchical fitness function that takes into account replay fitness, precision and simplicity. - A new definition of precision based on the log and the mined process model. - A new definition of simplicity based on the mined process model. - A crossover operator that selects the crossover point from a Probability Density Function (PDF) generated from the errors of the mined process model. - A mutation operator guided by the causal dependencies of the log. C.2 Mining duplicate labels from discovered process models SLAD (Splitting Labels After Discovery) is a novel algorithm that enhances an already discovered process model by splitting the behavior of its activities. Through this algorithm, we analyse the possibility of tackling duplicate tasks after mining a process model, without adversely affecting the quality of the initial solution. Before the execution of SLAD, a process discovery technique mines a log without considering duplicate
28 Chapter 1. Introduction 1.8 Thesis Outline Figure 1.6 shows the main structure of this thesis: - Chapter 2 presents ProDiGen, a genetic algorithm for process discovery guided by replay fitness, precision and simplicity. The algorithm uses a hierarchical fitness function that takes into account completeness, precision and simplicity (with new definitions for both precision and simplicity) and uses heuristics to optimize the genetic operators: i) a crossover operator that selects the crossover point from a Probability Density Function (PDF) generated from the errors of the mined model, and ii) a mutation operator guided by the causal dependencies of the log. Furthermore, ProDiGen was compared with four state of the art algorithms using 39 process models. - Chapter 3 focuses on improving the structural claririty and readability of discovered process models through the inclusion of duplicate labels. For this purpose, we developed SLAD (Splitting Labels After Discovery), an algorithm that takes as starting point an already mined model, and using the local information of the log, tries to improve the replay fitness, precision and simplicity of the model by splitting the overly connected nodes into two or more activities. In order to validate the performance of the approach, we present a detailed evaluation with 54 mined models from three process discovery algorithms. Furthermore, the results have been compared with eight different algorithms from the state of the art. - Chapter 4 presents a novel framework for the hierarchization of process models through the inclusion of domain knowledge. More specifically, we show how the hierarchization Log Process hierarchization Process simplification Chapter 2 Chapter 3 Chapter 4 Role part 2 Role part 1 Act 2 Act 1 Play Chapter 1: Introduction Process discovery Chapter 5: Conclusions Figure 1.6: Dissertation structure.
1.8. Thesis Outline 29 of a process model using domain knowledge can enhance its interpretability within tan specific domain. Furthermore, we have implemented this framework in the educational domain, enabling the hierarchization of a process model into the standard IMS LD. The main components of this framework are: i) the automatic discovery of learning processes from event logs and its automatic hierarchization to IMS LD; ii) the automatic identification of the adaptive rules from event logs; iii) a new framework to facilitate the reuse of courses between different virtual learning environments. Moreover, an important feature of the described approach is its independence from any target language. Each one of the three parts of the reengineering approach has been analyzed separately using a set of nine real courses with different degrees of complexity. - Chapter 5 presents the main conclusions and future work.
CHAPTER 2 PRODIGEN: MINING COMPLETE,PRECISE AND MINIMAL STRUCTURE PROCESS MODELS WITH A GENETIC ALGORITHM Log Process hierarchization Process simplification Chapter 2 Chapter 3 Chapter 4 Role part 2 Role part 1 Act 2 Act 1 Play Chapter 1: Introduction Process discovery Chapter 5: Conclusions Process discovery aims to obtain a process model that specifies the relations between activities in an event log, by combining different control structures such as sequences, choices, loops, among others, that are used to coordinate the control-flow of the activities in the workflow. As indicated in Chapter 1 very valuable results have been achieved in this field. Unfortunately, many process discovery algorithms focus on one or two quality dimensions or the used notation does not allow to properly represent all possible behavior. For instance, algorithms that only are able to retrieve block-structured process models cannot tackle non-free-choice constructs, arbitrary loops, or other common patterns in a real life process model. In other words, current techniques have difficulties to retrieve models with high levels of replay fitness,
32 Chapter 2. ProDiGen: Mining complete, precise and minimal structure process models but being as precise and simple as possible. To tackle this scenario, in this chapter we present ProDiGen (Process Discovery through a Genetic algorithm), a process discovery algorithm that guides its search towards replay fitness, precision, and simplicity. More specifically, the algorithm uses a hierarchical fitness function that takes into account replay fitness, precision and simplicity (with new definitions for both precision and simplicity) and uses heuristics to optimize the genetic operators: (i) a crossover operator that selects the crossover point from a Probability Density Function (PDF) generated from the errors of the mined model, and (ii) a mutation operator guided by the causal dependencies of the log. In order to validate the performance of ProDiGen, we have used 39 models from the literature with several levels of noise and different degrees of complexity, giving a total of 111 different logs. Moreover, we have compared our approach with four state of the art algorithms using a collection of conformance checking metrics. This chapter includes a full copy of the following journal paper that describes in detail the proposed approach: B. V´ azquez-Barreiros1, M. Mucientes1, and M. Lama1. ProDiGen: Mining complete, precise and minimal structure process models with a genetic algorithm. Information Sciences, 294:315–333, 2015. (DOI: 10.1016/j.ins.2014.09.057). 2.1 Abstract Process discovery techniques automatically extract the real workflow of a process by analyzing the events that are collected and stored in log files. Although in the last years several process discovery algorithms have been presented, none of them guarantees to find complete precise and simple models for all the given logs. In this paper we address the problem of process discovery through a genetic algorithm with a new fitness function that takes into account both fitness replay, precision and simplicity. ProDiGen (Process Discovery through a Genetic algorithm) includes new definitions for precision and simplicity, and specific crossover and mutation operators. The proposal has been validated with 39 process models and several noise levels, giving a total of 111 different logs. We have compared our approach with the state of 1Centro Singular de Investigaci´ on en Tecnolox´ ıas da Informaci´ on (CiTIUS), Universidade de Santiago de Compostela. Santiago de Compostela, Spain.
2.2. Introduction 33 the art algorithms; non-parametric statistical tests show that our algorithm outperforms the other approaches, and that the difference is statistically significant. 2.2 Introduction In the last decade, a great effort for developing technologies to automate the execution of processes has been made in different application domains such as industry, education or medicine [41]. In this context, a process is understood as a collection of tasks —or activities— with coordination requirements among them [132]. These tasks are performed by a set of actors to achieve the purpose of the process. For instance, in education the learning design of a course is a process where learners must undertake a sequence of learning activities, e.g., posting in forums, making exercises and exams, etc., in order to achieve the pedagogical objectives of the course. Typically, these processes have a detailed description, i.e., there is a design of the process where its activities and the actors participating in these steps are clearly described. However, even in this situation there might be differences between what is actually happening and what is predefined in the process. For instance, following with the example of the education domain, learners can undertake additional learning activities —like check the bibliography or interact with other learners— apart from those that were explicitly specified in the learning process designed by a teacher. At this point, Process Mining (PM) techniques are needed to get information about what is really happening in the execution of a process, and not what the people think it is happening [137]. Typically these techniques use the log files that collect information about the events detected and stored by the information system in which the process has been performed. PM techniques can be classified in three different groups [122]. The first one is process discovery, which aims to retrieve the process model that represents the behavior recorded in an event log. These algorithms are used to discover the underlying process that has been followed by users to achieve an objective. The second class of process mining techniques is conformance checking, where a process model is compared with a log of the same process to analyze and quantify the deviations between the observed and the real behavior, as recorded in the log. These techniques are focused on providing an understanding of the real processes that take place in an organization. The third group is enhancement, where a process model is dynamically modified or extended based on the information from the log. In this paper, we address the problem of process discovery. More specifically, our interest lies in the control-flow of the
34 Chapter 2. ProDiGen: Mining complete, precise and minimal structure process models recorded events, i.e., the ordering of the activities. Over the last decade, several papers have dealt with the discovery problem in process mining [19, 30, 32, 137, 138, 155, 156, 157]. Unfortunately, existing techniques may produce models that are unable to replay the log, may produce complex and unreadable models, or may retrieve erroneous models. For instance, those approaches based just on the local information provided by the log [137] are only capable to overcome specific weak points in the field under some conditions —completeness and noise-free logs—, like short loops [32], non-free- choice constructs [156] or invisible tasks [157], but not all at once. Other papers solve the process discovery problem with search-based approaches, based on heuristics or on theory of regions [19, 30, 138, 155]. Some techniques guarantee sound models [19], others guarantee the rediscoverability of the main behavior of the log [155], some guarantee perfect fitness replay [138] and others can tackle all the different and main pattern constructs at once [30] but leaving simplicity aside. Nevertheless, there is no discovery algorithm that can tackle all the different structures at once, and that can find complete, precise and simple models. Furthermore, many of them have problems while dealing with noise. In this paper we present ProDiGen2(Process Discovery through a Genetic algorithm), a process discovery algorithm that searches complete, precise and simple models. The contributions of this proposal are: 1. A hierarchical fitness function that takes into account completeness, precision and simplicity. 2. A new definition of precision based on the log and the mined model. 3. A new definition of simplicity based on the mined model. 4. A crossover operator that selects the crossover point from a Probability Density Function (PDF) generated from the errors of the mined model. 5. A mutation operator guided by the causal dependencies of the log. The proposal has been tested with 39 models with several noise levels and different degrees of complexity, giving a total of 111 different logs. Moreover, we have compared our approach with four of the state of the art algorithms using a collection of conformance checking metrics. The results of the comparison have been validated with non-parametric statistical tests. 2http://tec.citius.usc.es/processmining/prodigen
2.3. Process Discovery 35 The remainder of this paper is structured as follows. Section 2.3 introduces the process discovery problem, and Section 2.4 describes the different approaches that have already been proposed. Then, Section 2.5 presents the proposed genetic algorithm for process discovery. Section 2.6 shows the obtained results and the comparison with other approaches, and, finally, Section 2.7 points out the conclusions. 2.3 Process Discovery The goal of process discovery is to obtain a process model that specifies the relations between tasks —or activities— in an event log. The basic assumption is that there is a process model that generates the log with the following rules: i) each event is a well-defined step in some process; ii) each event is related to a particular case; and iii) the events are sequentially saved no matter the type of pattern behind. Figure 2.1(a) represents a simple log with 18 events, 6 different activities and performed by three different users. To discover the underlying process, the proposal presented in this paper only needs the list of events in the log and their corresponding case identifiers. Other process discovery techniques can use more information, like the timestamp [21, 133] or the data attributes that affect the routing of the cases [104]. The event log of Figure 2.1(a) shows the process instances of three different students during the course Automata Theory and Formal Languages. In this log, all the students started with an introductory class, and then they attended to four different lessons (finite automaton,regular grammar,context-free grammar and pushdown automaton). Once all these four lessons are finished, they make an exam. Using the information provided by the log, the discovery of a process model can take place with different objectives [102]: •Completeness. Measures how much of the behavior observed in the log can be reproduced by the mined model. A model is complete when it can reproduced all the behavior in the log. •Precision. The objective of this metric is to avoid overly general models. The model in Figure 2.1(c) is able to parse all the traces in the log. However, it is an overly general model, as it allows more behavior than the contained in the log. For example, one valid trace for this model is the possibility to make the exam after attending only to the introductory class.
36 Chapter 2. ProDiGen: Mining complete, precise and minimal structure process models User Event Lifecycle Timestamp Pablo Introductory class complete 07-03-2013:10:00 Borja Introductory class complete 09-03-2013:16:00 Pablo Finite Automaton complete 11-03-2013:19:30 Pablo Regular Grammar complete 17-03-2013:15:28 Borja Finite Automaton complete 20-03-2013:10:12 Manuel Introductory class complete 20-03-2013:11:42 Borja Regular Grammar complete 21-03-2013:14:34 Manuel Regular Grammar complete 23-03-2013:09:21 Pablo Context-Free Grammar complete 01-04-2013:12:36 Manuel Finite Automaton complete 01-04-2013:15:54 Borja Pushdown Automaton complete 04-04-2013:17:20 Manuel Context-Free Grammar complete 06-04-2013:20:00 Pablo Pushdown Automaton complete 21-04-2013:11:02 Borja Context-Free Grammar complete 22-04-2013:15:09 Manuel Pushdown Automaton complete 28-04-2013:17:45 Pablo Exam complete 06-05-2013:18:45 Manuel Exam complete 06-05-2013:19:01 Borja Exam complete 06-05-2013:19:22 (a) An event log b c e d fa (b) A complete, specific and general model: Completeness +, Precision +, Generalization +, Simplicity + b c d e f a (c) A complete over-general model: Completeness +, Precision -, Generalization +, Simplicity + ec a c e b b c b d d ed f (d) A complete over-specific model: Completeness +, Precision +, Generalization -, Simplicity - Figure 2.1: Discovery of a process model prioritizing different objectives. The models are represented as Petri nets. The name of the activities are: Introductory class (a), Finite Automaton (b), Regular Grammar (c), Context-free grammar (d), Pushdown automaton (e) and Exam (f)).
2.4. Related Work 37 •Generalization. This metric tries to prevent overly precise models. For instance, although the model in Figure 2.1(d) is complete, it is overly specific because it merely recreates each one of the traces of the log, not allowing extra behavior. When mining models, there is a tradeoff between precision an generalization, which can be compared to the bias-variance tradeoff. •Simplicity. Indicates to models with a minimal structure that reflects the behavior in the log. For example, the model in Figure 2.1(d) creates one path for every possible trace of the log, i.e., it is not simple as it contains several duplicated tasks, which make the model difficult to read. Figure 2.1(b) shows a model that takes into account the four objectives. This model is well-structured, providing not only the behavior shown in the log, but allowing also the trace “Intro, Regular Grammar, Finite Automaton, Pushdown Automaton, Context-Free Grammar, Exam”. Moreover, the model does not allow random behavior. 2.4 Related Work Since Cook and Wolf [27] coined the term process discovery, and later on, Agrawal et al. [7] applied this idea in the context of workflow management systems, dozens of process discovery methods have been proposed [122]. Although some mining techniques use a specific target model for control-flow discovery [55], most of the process discovery algorithms are based on Petri nets [88]. These algorithms can be classified in four groups [140]: •Abstraction-based algorithms. This type of algorithms are based on a complete and noise free-log. All of them are derived from the α-algorithm [137] to address some of its drawbacks. The limitations solved with these extensions are: short loops (α+- algorithm [32]), non-free-choice constructs (α++-algorithm [156]), invisible tasks (α#- algorithm [157]) and duplicate tasks (α∗-algorithm [75]). Despite the different extensions, none of the abstraction-based algorithms can tackle all the complex constructs at once. In general, this type of algorithms focuses on simplicity, retrieving very simple models but with poor completeness. •Heuristics-based algorithms. In [154, 155], Weijters et al. presented the Heuristics Miner, an extension of the α-algorithm but taking into account the frequency of ordering relations. One of its main advantages is its ability to handle noise based on a
44 Chapter 2. ProDiGen: Mining complete, precise and minimal structure process models AD B E YC X (a) Mined model with needless branches. DA B CX E Y (b) Simplest mined model. Figure 2.4: Two possible solutions with the same completeness and precision. We illustrate the relevance of simplicity to mine the original model with a simple example of two traces repeated three times: << X,B,C,E,Y>3, < X,A,C,D,Y>3>. Figure 2.4 shows two mined models that discover the non-free-choice4construction, and have the same completeness and precision: i) both can parse exactly the same tasks, i.e., completeness =1.0; and ii) they enable exactly the same number of tasks during the parsing (36), thus precision = 1/36. However, the model in Figure 2.4(a) has a simplicity =1/24 while the model in Figure 2.4(b) has a simplicity =1/20 and, therefore, the second one is a better model. The difference between these two solutions —in terms of simplicity— is caused by the output function of the task X and the input function of the task C: i) the causal matrix of the model in Figure 2.4(a) has O(X) = {{A,B},{B,C}}, and I(C) = {{A,B},{B,X}} which increases the complexity of the model by 8; ii) the causal matrix of the model in Figure 2.4(b) has O(X) = {{A,B}}, and I(C) = {{A,B}} which increases the complexity of the model by 4. Fitness ProDiGen uses completeness, precision and simplicity to evaluate the mined models. However, instead of combining these three objectives in a weighted sum —which requires the definition of a new weight parameter for each criteria— it defines a hierarchical fitness 4A non-free-choice construction is a mixture of a synchronization and a choice [30]. For example, in Figure 2.4, the execution of Dor Edepends on whether the task Aor Bhas been executed.
2.5. ProDiGen: Process Discovery through a Genetic algorithm 45 function that establishes priorities among the objectives: F(a) >F(b) ⇐⇒ {Cf(a)>Cf(b)}∨ {Cf(a) = Cf(b)∧Pf(a)>Pf(b)}(2.3) ∨{Cf(a) = Cf(b)∧Pf(a) = Pf(b)∧Sf(a)>Sf(b)} where F(a),Cf(a),Pf(a)and Sf(a), are respectively the fitness,completeness,precision and simplicity of a process model a. The advantage of using this hierarchical fitness function over a weighted fitness function is that, during the first stage of the evolutionary process, the GA focuses the search on those individuals that are complete. Once these individuals become representative in the population, the second level of the hierarchy takes the control, modifying the models that are complete in order to improve their precision. Finally, in the third stage, the fitness function guides the GA to improve the simplicity of those models that are both complete and precise. If we change the hierarchical order of the fitness measure, the algorithm may find a different solution, as completeness, precision and simplicity are three opposed objectives. Figure 2.5 shows four different models that can be found mining two traces: << X,B,C,E,Y>, <X,A,C,D,Y>> but prioritizing different objectives. For example, both the models of Figure 2.5(b) and Figure 2.5(a) have the same completeness but, in order to achieve a better simplicity, the solution of Figure 2.5(a) retrieves a lower precision than the solution of Figure 2.5(b). If we want to retrieve a simple model (Figure 2.5(c)) the solution will have a lower completeness. On the other hand, if we want to retrieve a model with a better precision (Figure 2.5(d)), both the completeness and the simplicity will be lower. X A B C D E Y (a) Cf=1.0, Pf=1/12, Sf=1/20. X A B C D E Y (b) Cf=1.0, Pf=1/14, Sf=1/16. EB C YX (c) Cf=0.2, Pf=1/18, Sf=1/8. E DA C B Y X (d) Cf=−0.2, Pf=1/6, Sf=1/20. Figure 2.5: Four different models prioritizing the different search criteria.
46 Chapter 2. ProDiGen: Mining complete, precise and minimal structure process models Genetic operators The process to create new individuals starts with the selection phase. ProDiGen uses as selection mechanism a binary tournament selection, in which two individuals of the population are randomly picked —with replacement—, and the best of them is selected. Then, each pair of individuals in the selected population is crossed and mutated. Crossover The crossover operator replaces causality relations of an individual with causality relations of another individual. As the process models are represented through causal matrices, and the size of the causal matrix increases with the number of activities in the log, the number of possible crossover points could be really large. Therefore, picking the crossover point at random produces a poor performance of the crossover operator, as most of the offspring have a fitness lower than their parents. ProDiGen makes the selection of the activity that is going to be crossed using a non uniform PDF. This PDF assigns a null probability of being selected to those activities that have been correctly fired during the parsing of the traces in the log. On the other hand, those activities that were incorrectly fired receive a uniform probability, inversely proportional to the number of incorrectly parsed activities, of being crossed. Algorithm 2.2: Crossover operator. 1r←getRandomNumber() // returns a random number between [0,1) 2if r<crossoverRate then 3incorrectlyFiredActivities ←/0 4if fitness(parent1)>=fitness(parent2)then 5incorrectlyFiredActivities ←set of incorrectly fired activities of parent1 6else 7incorrectlyFiredActivities ←set of incorrectly fired activities of parent2 8if incorrectlyFiredActivities 6=/0 then 9crossoverPoint ←randomly select an activity tfrom incorrectlyFiredActivities 10 else 11 crossoverPoint ←randomly select an activity tfrom the bag of all possible tasks in the log 12 offspring1,offspring2←doCrossover(parent1,parent2,crossoverPoint) 13 Repair offspring1and offspring2
2.5. ProDiGen: Process Discovery through a Genetic algorithm 47 Algorithm 2.2 summarizes the behavior of the crossover operator. By incorrectly fired activities we mean i) activities that need extra tokens in their inputs to be fired, i.e., tasks that do not have the correct input arcs, and ii) activities that have left tokens in their outputs after the parsing, i.e., activities that do not have the correct output arcs. This process generates, for each individual, a bag of incorrectlyFiredActivities. Thereby, the crossover point is selected from the set of incorrectlyFiredActivities of the fittest parent (Algorithm 2.2:4). Note that if the fittest individual has a completeness equal to 1, the set of incorrectlyFiredActivities of the fittest individual is empty (Algorithm 2.2:8); thereby the crossover point is randomly chosen from the bag of all the possible tasks in the log (Algorithm 2.2:11). After the crossover point is selected, the crossover (Algorithm 2.2:12) is performed as defined in [30]. The following example illustrates how the crossover operator works. Let’s suppose that the crossover point is task A, and the input of the individual 1 for that task is I1(A) = {{D},{B}} and for individual 2 is I2(A) = {{D,B},{C}}. First, both input sets are split randomly. This process generates four sets, two for each input function: •I1 1(A) = {{D}} and I2 1(A) = {{B}}. •I1 2(A) = {{D,B}} and I2 2(A) = {{C}}. Then, these four sets are swapped — I1 1(A)with I2 2(A)and I1 2(A)with I2 1(A)— in order to generate the new input sets for the task A of the offspring. During this process, each subset of these sets can be added as a new subset into the other set or merged with another subset of the other set. For instance, the subset of I1 1(A)can be added as a new subset of I2 2(A), resulting in I0 1(A) = {{D},{C}}; and the subset of I1 2(A)can be joined with the existing subset of I2 1(A), resulting in I0 2(A) = {{D,B}} —subsets do not allow duplicate tasks. Finally, this process is repeated for the output set of the crossover task A. Note that when adding/removing causal relations from an input/output (I/O) set of a task t—being tthe crossoverPoint— there may be inconsistencies. For instance, a task t0does not appear in the output set of the task t, but the input set of t0contains the task t. Therefore, after an I/O set is modified, we have to check the consistency of the individual (Algorithm 2.2:13). This process first checks those relations that were removed during the modification of the individual, and after that, it checks those relations that were created. This prevents to create again a relation that was previously removed.
48 Chapter 2. ProDiGen: Mining complete, precise and minimal structure process models Mutation The mutation operator modifies the causality dependencies of the individual by adding or removing relations. The mutation operator may perform one of the following three actions to the input/output set of a task: i) randomly add a task t’ to input or output sets of a task t; ii) randomly remove a task t’ from the I/O sets of a task t; and iii) randomly redistribute the elements from the I/O sets of a task t. Algorithm 2.3: Mutation operator. 1while the individual does not change do 2Randomly choose one task tin the individual 3mutationType ←getRandomNumber() // returns a random number between [0,1) 4if mutationType <1/3then 5Randomly add a new task t’ to I(t), being t’ a task from inputDependencies(t) 6if getRandomNumber() <1/2then 7Randomly choose one subset X ∈I(t) and add the task t’ to X 8else 9Create a new subset X, add the task t’ to X, and add X to I(t) 10 else if mutationType <2/3then 11 Randomly choose one subset X ∈I(t) and remove a task t’ from X, where t’∈ X. If X is empty after this operation, exclude X from I(t) 12 else 13 Randomly redistribute the elements from I(t) 14 Repeat from line 3, but using O(t) instead of I(t) and outputDependencies(t) instead of inputDependencies(t) 15 Repair the individual There are four differences between our mutation operator and the one used in Genetic Miner [30]: i) the individual is iteratively mutated until it is different from its parent —a mutation could generate an individual equal to its parent due to a reparation; ii) only one task is affected by the mutation operator; iii) individuals are always forced to mutate —the mutation probability is 1; and iv) the task t0added to the I/O set of a task tmust belong to the set of tasks that have an input/output dependency with t. The major goal of these modifications is to avoid duplicate individuals within the same population, or at least minimize its duplicates. Hence, although the offspring are equal to their parents after the crossover, we force each
2.5. ProDiGen: Process Discovery through a Genetic algorithm 49 offspring to mutate until it changes, creating different individuals with new features. With these modifications, we have a more diverse population. Algorithm 2.3 describes in detail the mutation operator. It uses two sets for the addition of a new task: outputDependencies(t) and inputDependencies(t). Both sets are created when calculating the dependencies between tasks at the first stages of the algorithm. ProDiGen uses these sets to reduce the set of tasks that are appropriate to be inserted in an I/O set, preventing the inclusion of a new task that never appears in a trace of twithin the log. A first approach could be to include in the dependencies sets those tasks that have a dependency with tas calculated in the initialization phase. However, if we only take into account these dependencies, there will be not enough new material to discover, for instance, the non-free- choice constructs. Therefore, inputDependencies(t) will be the set of tasks appearing before t in any trace of the log and, in the same way, outputDependencies(t) will be the set of activities that appear after tin any trace of the log. In this way, the mutation operator focuses only on those regions of the search space that represent information contained in the log. As a result, the success of the mutation operator increases, finding better offspring. Again, after each mutation the individual has to be repaired (Algorithm 2.3:15) following the same strategy as explained with the crossover. Replacement At each iteration, the algorithm generates Noffspring, being N the size of the population. These offspring and the parent population —current population— are joined and sorted — using the fitness— generating a 2N-size population, and then the replacement operator selects the Nbest individuals. In order to maintain a diverse population, those repeated individuals are placed at the bottom of the ranking, keeping one representative in the original ranking position. Reinitialization A reinitialization takes place when the value of timesRun goes under 0 (Algorithm 2.1:15), which indicates that the search process was not improving in the last iterations. This situation is detected in two ways. The first one (Algorithm 2.1:11) is when the new population of an iteration has no new individuals —in comparison with the initial population of that iteration. The second indicator (Algorithm 2.1:13) is the fact that the best individual does not improve. Each time that one of these situations is detected, timesRun decreases. The initial population
50 Chapter 2. ProDiGen: Mining complete, precise and minimal structure process models after a reinitialization is generated in the same way as in the initialization stage. Moreover, ProDiGen also includes in the new population a mutation of the best individual of the last iteration. The maximum number of reinitializations is limited, and when it reaches the threshold (maxRestarts) ProDiGen ends. 2.5.2 Pre-processing and post-processing steps Noise can be defined as a low-frequent incorrect behavior in the log [140]. The main difficulty to deal with noise is that the logs —usually— contain only positive examples, i.e., there is no explicit information about the characteristics of the noisy traces. Additionally, there is lowfrequent correct behavior in the log that cannot be easily distinguished from the low-frequent incorrect cases. ProDiGen explicitly handles the noise in two phases: i) a pre-processing of the log; and ii) a post-processing of the mined model. In the pre-processing of the log, ProDiGen groups all the traces that are equal, and calculates the normal distribution of the frequency of the traces N(µ,σ), where µand σare respectively the weighted mean and the weighted standard deviation. Finally, all those traces with frequency(trace) <µ−ξσ will be removed, where ξis a parameter. Therefore, ProDiGen eliminates those traces that are infrequent, and the threshold depends on the characteristics of the log. The post-processing stage of ProDiGen consists in a post-pruning over the mined model. It removes those arcs that are used less frequently than a certain threshold, being this threshold a percentage of the frequency of the most used arc. This post-pruning was also applied in other process discovery techniques [30, 52, 58]. 2.6 Experimentation ProDiGen has been validated with 111 different logs. We have classified these tests in two different groups: i) 18 process models to generate logs with five noise levels —0%, 1%, 5%, 10%, and 20%—, which results in 90 logs; and ii) 21 unbalanced logs, i.e., logs that contain traces with very different frequencies, which correspond with 21 process models that contain many interleaving situations. Moreover, we have also compared the performance of ProDiGen with four of the state of the art process discovery algorithms, using non-parametric statistical tests. The selected algorithms are: i) α++-algorithm [156]; ii) Heuristics Miner (HM) [155]; iii) Genetic Miner
2.6. Experimentation 51 (GM) [30]; and iv) ILP [138]. These are well-known algorithms for process models discovery from event logs, and they are available in the ProM framework [139], a very complete and excellent tool for process mining and analysis. 2.6.1 Logs The algorithms have been tested with 39 process models, and a total of 111 different logs5. From those models, 18 out of 39 were used to generate 90 synthetic logs with different degrees of noise. The rest of the logs —21 out of 111— come directly from [19] and [30] with their corresponding original models. Balanced logs We have conducted an experiment with 18 different process models with increasing degrees of complexity. Table 2.2 summarizes the structural complexity of these models ranging from 5 to 16 tasks that contain sequences, choices, parallelism, loops and non-free-choice constructs. For each of these models, a synthetic log was randomly generated with all the possible paths represented in the model. Table 2.2 also shows the characteristics of the logs, where column #traces indicates the number of traces and the column #events the number of total activities in the event log. Afterwards, each noise-free log was used to generate another four logs with 1%, 5%, 10% and 20% of noise. Four different types of noise were used [83]: i) missing head;ii) missing body;iii) missing tail; and iv) swap tasks. We followed the same strategy as [30] to generate the noisy traces. Assuming that each trace is defined as σ=t1···tn, these noise types behave as follows. The first three types, respectively, randomly remove sub-traces of events from the head, body and tail. The head goes from t1to tn/3, the body goes from t(n/3)+1to t2n/3and the tail goes from t(2n/3)+1to tn. Swap noise interchanges two random chosen events. To incorporate noise, the traces of the original noise-free logs were randomly selected and then one of the four noise types was applied —each one with an equal probability of 0.25. This combination of noise types is called mixed noise. We focus our tests on this noise type, as it is the typical noise in real logs. Note that the number of traces of each log is the same after applying the noise, but the number of events may change —some type of noise may remove events from cases, reducing the number of total events in the log. 5The reader can found all the logs and models used in our experimentation in http://tec.citius.usc. es/processmining.
52 Chapter 2. ProDiGen: Mining complete, precise and minimal structure process models Table 2.2: Process models used in the experimentation. Balanced logs. Activity structures Log content Model #Tasks Sequence Choice Parallelism Length-One Loop Length-Two Loop Arbitrary Loop Structured Loop Non-local NFC Local NFC Invisible tasks #traces #events Caminatas 12 XX X 700 4,200 A8 7XXX 300 1,200 D2 6X X 300 1,200 Ml1lSkip [30] 6 X X X X 500 4,757 Ma5 [30] 7 X X X X 300 2,178 Ml2l [30] 6 X X X 300 4,668 MDriverLL [30] 11 X X X X X X 700 13,303 allLoops 5X X X X X X 300 1,035 l2la 6X X X X 300 2,264 Ma7 [30] 9 XXX 500 2,427 Herbst6p37 [30] 16 X X 700 12,600 MexampleL [30] 8 XXX 300 1,645 Ma6nfc [30] 8 X X X 300 2,006 MParallel5 [30] 10 X X 700 12,600 NC 7X X X X 300 1,704 L2LP 7X X X X X X X 300 5,476 NCB 7X X X X X 300 2,950 DWS [49] 12 X X X X 500 4,033 Unbalanced logs The second type of logs consisted in 21 more complex case scenarios without noise. These models and logs6are summarized in Table 2.3. Some of the models used in this experimentation contain unbalanced AND-split/join points, i.e., there is not a one-to-one relation between the AND-split points and the AND-join points. Moreover, all the logs are imbalanced, i.e., they contain traces with very different frequencies, as it is unrealistic to assume that, from a model with many interleaving situations, all the possible paths are equally executed. Hence, with this experiment, we can check whether an algorithm overfits or underfits the data due to the unbalanced frequencies of the traces in the log. 6In this experiment, both the process models and the logs were taken from other papers [19, 30].
2.6. Experimentation 53 Table 2.3: Process models used in the experimentation. Unbalanced logs. Activity structures Log content Model #Tasks Sequence Choice Parallelism Length-One Loop Length-Two Loop Arbitrary Loop Structured Loop Invisible tasks Unbalanced AND-join/split #traces #events g2 [30] 22 X X X X X X 300 4501 g3 [30] 29 XXX XXX 300 14599 g4 [30] 29 X X X X X 300 5975 g5 [30] 20 XXX XX 300 6172 g6 [30] 23 X X X X X 300 5419 g7 [30] 29 X X X X X 300 14451 g8 [30] 30 X X X X X X X 300 5133 g9 [30] 26 X X X X X X 300 5679 g10 [30] 23 XXX XX 300 4117 g12 [30] 26 X X X X X X 300 4841 g13 [30] 22 X X X X X X X 300 5007 g14 [30] 24 X X X X X X 300 11340 g15 [30] 25 X X X X X 300 3978 g19 [30] 23 X X X X X X 300 4107 g20 [30] 21 X X X X X X 300 6193 g21 [30] 22 X X X X 300 3882 g22 [30] 24 X X X X X X 300 3095 g23 [30] 25 X X X X X 300 9654 g24 [30] 21 X X X X X X 300 4130 g25 [30] 20 X X X X X 300 6312 ETM[19] 7 X X X X 100 790 2.6.2 Metrics The performance of the process discovery algorithms over the different logs has been measured with two different sets of metrics: i) metrics based on the original model; and ii) metrics based on the event log. Metrics based on the original model We use the metrics defined in [30] to compare the original and mined models. Behavioral precision (Bp) and Behavioral recall (Br) detect, respectively, if the mined model can process traces that cannot be parsed by the original model, and if the original model can parse traces that cannot be processed in the mined model. On the other hand, Structural precision (Sp) and Structural recall (Sr) checks, respectively, if there are causality relations of the mined model
60 Chapter 2. ProDiGen: Mining complete, precise and minimal structure process models Table 2.7: Non-parametric test for the balanced logs. (a) Friedman ranking. Algorithm Ranking ProDiGen 1.63 HM 2.52 GM 3.27 ILP 3.5 α++ 4.1 Friedman p-value: 5.34E-11 (b) Holm post-hoc, α=0.05. iComp. z p α/iHypothesis 4α++ 10.4 9.73E-26 0.013 Rejected 3 ILP 7.9 2.87E-15 0.017 Rejected 2 GM 6.95 3.57E-12 0.025 Rejected 1 HM 3.77 1.62E-4 0.05 Rejected dominance and then we used these ranks as input for the Friedman test. Table 2.7 summarizes the results of the tests. As can be seen, ProDiGen has the best ranking, whereas Heuristics Miner gets the second position, as it retrieves very competitive results when dealing with noisy logs, but it still has problems with non-free-choice constructs and some short loops. On the other hand, Genetic Miner has the third position, closely followed by ILP miner. In general Genetic Miner retrieves better solutions than ILP, as ILP cannot handle invisible tasks and infrequent behavior. Finally, α++-algorithm has the worst ranking. This is due the inability of this algorithm to tackle invisible tasks and handle infrequent behavior in the log, giving as a result incomplete and very underfited models. The p-value of the Friedman test (Table 2.7(a)) is really low, indicating a high level of confidence. Furthermore, based on the results of the Friedman test, we performed a Holm’s post-hoc test (Table 2.7(b)), starting with the initial hypothesis that all the tested algorithms are equal to ProDiGen. The test rejects the null hypothesis in all the cases for a confidence level of α=0,05 —the p-value of each algorithm has to be lower than α/iin order to reject the hypothesis. This means that ProDiGen outperforms all the other algorithms, and that the difference is statistically significant for that confidence level. We have repeated this test considering only the model metrics, and also taking into account only the log metrics —the results of the tests do not change. 2.6.5 Results on unbalanced logs Table 2.8 shows the results on the 21 unbalanced logs. ProDiGen mines the original model in 17 of the logs —the values of the four model metrics are 1—, while in the other 4 logs the mined model is very similar to the original one. The difficulties in these 4 logs arise when i) mining logs with parallel constructs with more than two branches and with two or
2.6. Experimentation 61 Table 2.8: Results on the unbalanced logs. Logs g2 g3 g4 g5 g6 g7 g8 g9 g10 g12 g13 g14 g15 g19 g20 g21 g22 g23 g24 g25 EMT ProDiGen Model metrics Bp1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.96 1.0 Br1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.99 1.0 Sp1.0 1.0 0.96 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.91 1.0 Sr1.0 1.0 0.97 1.0 1.0 1.0 0.94 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.98 0.91 1.0 Log metrics C1.0 1.0 0.78 1.0 1.0 1.0 0.52 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.98 1.0 P1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 S1.0 1.0 1.0 1.0 1.0 1.0 0,93 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0,94 1.0 GM Model metrics Bp1.0 0.61 0.78 1.0 1.0 1.0 0.84 0.96 0.99 1.0 0.98 0.61 0.8 0.98 1.0 1.0 0.97 0.57 0.83 0.81 1.0 Br1.0 0.97 0.97 1.0 1.0 1.0 1.0 1.0 0.97 1.0 0.99 1.0 0.97 0.9 1.0 1.0 1.0 0.88 0.88 0.96 0.83 Sp1.0 0.81 0.81 1.0 1.0 1.0 1.0 0.97 0.9 1.0 0.95 0.95 0.88 0.95 1.0 1.0 0.85 0.76 0.75 0.76 0.85 Sr1.0 0.81 0.81 1.0 1.0 1.0 0.94 0.98 0.92 1.0 0.94 0.94 0.87 0.89 1.0 1.0 0.85 0.74 0.75 0.74 0.85 Log metrics C1.0 0.31 0.59 1.0 1.0 1.0 0.26 0.48 0.48 1.0 0.75 1.0 0.15 0.2 1.0 1.0 0.43 0.2 0.72 0.41 0.3 P1.0 0,6 1.0 1.0 1.0 1.0 0,15 1.0 1.0 1.0 1.0 0,81 0,14 0,08 1.0 1.0 0,96 0,42 0,99 0,75 0,94 S1.0 1.0 0,97 1.0 1.0 1.0 0,72 0,96 0,88 1.0 0,95 0,99 0,88 0,95 1.0 1.0 1.0 0,88 1.0 0,82 1.0 HM Model metrics Bp1.0 1.0 0.94 1.0 0.9 0.97 0.87 1.0 0.96 1.0 1.0 0.97 0.96 0.97 1.0 1.0 0.99 0.6 0.92 0.76 0.81 Br1.0 0.98 0.92 1.0 0.98 0.97 0.99 0.98 0.95 1.0 1.0 0.97 0.98 1.0 1.0 1.0 0.99 1.0 0.88 0.94 0.96 Sp1.0 0.97 0.96 1.0 0.93 0.97 0.95 1.0 0.96 1.0 1.0 0.96 1.0 1.0 1.0 1.0 0.97 0.91 0.89 0.85 0.76 Sr1.0 0.97 0.86 1.0 0.97 1.0 0.86 1.0 0.96 1.0 1.0 0.92 0.86 0.9 1.0 1.0 0.91 0.94 0.81 0.85 0.74 Log metrics C1.0 1.0 0.78 1.0 0.66 1.0 0.52 0.74 0.78 1.0 1.0 0.91 0.87 0.85 1.0 1.0 0.9 0.0 0.93 0.23 0.37 P1.0 1.0 1.0 1.0 0,99 1.0 1.0 1.0 1.0 1.0 1.0 0,99 1.0 1.0 1.0 1.0 1.0 0,42 0,97 0,97 0,98 S1.0 1.0 1.0 1.0 0,99 0,98 0,93 0,96 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0,93 1.0 0,94 1.0 α++ Model metrics Bp0.8 0.81 0.95 1.0 0.88 0.92 0.87 0.96 0.94 0.95 0.93 0.58 0.85 0.9 0.64 0.84 0.93 0.71 0.81 0.94 0.99 Br0.85 0.91 0.94 1.0 0.99 0.9 0.94 0.94 0.9 1.0 0.94 0.92 0.85 0.94 0.94 0.89 0.85 0.67 0.7 0.92 0.93 Sp0.89 0.94 0.98 1.0 0.79 0.98 0.83 0.98 0.81 0.96 0.88 0.86 0.9 0.9 0.92 0.93 0.82 0.66 0.85 0.91 1.0 Sr1.0 0.98 0.97 1.0 1.0 1.0 0.94 1.0 1.0 1.0 0.97 1.0 0.97 1.0 0.87 1.0 0.97 1.0 1.0 0.98 0.91 Log metrics C0.33 0.0 1.0 1.0 0.45 0.0 0.35 0.48 0.563 1.0 0.48 0.0 0.05 0.25 0.46 0.68 0.43 0.0 0.0 0.97 0.89 P0,96 0,18 0,97 1.0 1.0 0,12 1.0 1.0 1.0 0,97 1.0 0,82 0,14 0,98 0,86 0,09 1.0 0,42 0,11 0,26 1.0 S0,78 0,79 1.0 1.0 0,76 0,93 0,74 0,79 0,76 0,99 0,79 0,79 0,97 0,75 1.0 0,83 0,32 0,34 0,42 0,89 1.0 ILP Model metrics Bp0.9 0.89 1.0 1.0 0.96 0.96 0.9 0.94 0.92 0.95 0.93 0.85 0.87 0.91 0.72 0.87 0.9 0.58 0.78 0.66 0.98 Br1.0 0.98 0.99 1.0 0.99 0.99 0.99 0.99 0.97 1.0 0.99 0.99 1.0 0.99 0.95 1.0 0.99 0.88 0.94 0.96 1.0 Sp0.83 0.85 0.98 1.0 0.78 0.94 0.76 0.89 0.73 0.96 0.78 0.78 0.67 0.85 0.85 0.92 0.72 0.5 0.77 0.64 0.91 Sr1.0 0.98 0.97 1.0 1.0 1.0 0.96 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.97 1.0 1.0 0.98 1.0 Log metrics C1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 P0,97 0,97 1.0 1.0 0,99 1.0 0,98 0,98 0,95 0,97 0,07 0,95 0,96 0,98 0.96 0,96 0,93 0,83 0,89 0,8 1.0 S0,93 0,92 0,96 1.0 0,74 0,93 0,66 0,9 0,68 0,99 0,97 0,69 0,76 0,79 0,79 0,97 0,52 0,28 0,7 0,59 0,93 more tasks in each branch, and ii) when mining logs that came from models with unbalanced AND-join/split points. These type of patterns are even more difficult to mine considering that not all the possible combinations admitted by the original model are represented in the log, and not all the traces have the same frequency. Therefore, ProDiGen tries to better fit the most frequent behavior of the log, overfitting the data. •The mined model for log g8 (Figure 2.6(c)) has a behavioral precision and recall equal to 1. However, the model is not complete because it cannot tackle the output dependencies of the tasks timeout and return-contract, considering them as final tasks. This results in a incomplete mined model, because all the traces involving these two tasks will have an extra token at the end of the parsing.
62 Chapter 2. ProDiGen: Mining complete, precise and minimal structure process models XOR Send_bill (complete) 610 XOR XOR No_payment_within_3_weeks (complete) 310 XOR 310 XOR Customer_pays_within_3_weeks (complete) 300 XOR 300 310 XOR And_join (complete) 300 XOR 300 XOR Pick_up_car (complete) 66 XOR XOR Return_car_to_customer (complete) 66 XOR 66 XOR Return_replacement_car (complete) 66 66 (a) Detail of the mined model for the log g4.The tasks highlighted in grey are involved in a unbalanced AND-join/split point, making very difficult to correctly mine their inputs and outputs. XOR Packaging_SB (complete) 152 XOR XOR and XOR AND_Split (complete) 167 XOR and XOR 167 85 XOR and XOR Cancel_SB (complete) 67 XOR 67 XOR and XOR Cancel_CB (complete) 66 XOR 66 XOR respond (complete) 105 XOR 105 XOR No_responce (complete) 88 XOR 88 20 25 46 42 XOR Packaging_CB (complete) 82 XOR 82 82 (b) Detail of the mined model for the log g24. In the original model, the missing relation is never used, therefore it is impossible to mine it. XOR Start_procedure (complete) 142 XOR and XOR 44 XOR return_contract (complete) 52 52 XOR start_collect_info (complete) 184 XOR and XOR 142 XOR timeout (complete) 90 90 XOR 184 XOR 184 43 (c) Detail of the mined model for the log g8. Both tasks hihglighted in grey are involved in an unbalanced AND-join/split. XOR Start_Production (complete) 293 XOR and XOR and XOR and XOR XOR Earphone_Machina_B (complete) 155 XOR 155 XOR Production_Keyboard (complete) 293 XOR and XOR 293 XOR Production_Frame_1 (complete) 293 XOR 293 XOR Production_Cover (complete) 293 XOR 293 XOR Earphone_Machine_A (complete) 138 XOR 138 XOR Production_Frame_2 (complete) 293 XOR 155 XOR Outsourced_Keys_Production (complete) 293 XOR 293 XOR Production_Board (complete) 293 XOR 293 XOR and XOR Assemble_Keyboard (complete) 293 XOR 293 XOR Production_Electronics (complete) 293 XOR 293 XOR and XOR Assemble_Frame (complete) 293 XOR 293 XOR Paint_Silver (complete) 143 XOR 143 XOR Paint_Black (complete) 150 XOR 150 XOR and XOR End_Phone_Production (complete) 293 XOR 143 293 293 XOR and XOR Assemble_Phone (complete) 293 XOR 293 293 XOR Check_Phone (complete) 596 XOR 293 303 293 138 150 (d) Heuristic net of the mined model for the log g25. The mined model incorrectly finds the AND-join point at the task ”End phone product”. This leads to other incorrect relations trying to better fit the log. Figure 2.6: Heuristics nets of the mined models for the unbalanced logs: g4,g8,g24 and g25.
2.6. Experimentation 63 •The results for log g24 (Figure 2.6(b)) shows that the mined model is almost equal to the original one, except in only one relation between two tasks (tasks in grey, Figure 2.6(b)). •The mined model for log g4 (Figure 2.6(a)) has a behavioral precision and recall of 1, i.e., the mined model allows the same behavior as the original one w.r.t the information contained in the log. The difference between the mined and original models is that the mined model cannot find —as with log g8— the output dependencies of the task return replacement car, therefore it considers that task as final, generating an extra final token every time the model parses a trace involving this task. •For log g25 (Figure 2.6(d)) the behavioral recall and precision are closer to 1. This means that, even when the model is not as precise as the original, it does not allow for too much extra behavior than the original one. The mined model cannot mine the original AND-join point. Analyzing the results of the other algorithms, HM focuses its search on the main behavior of the log —finding solutions with high levels of simplicity. Hence, it cannot find the original model on those logs that came from models with many interleaving situations, as it tries to better fit the most frequent behavior recorded in the log —as the logs are unbalanced, not all the possible relations have the same frequency. On the other hand, ILP tends to retrieve complete models, but they usually are very general and, therefore, very different from the original model. Additionally, although ILP retrieves complete models when possible, it cannot tackle invisible tasks, giving poor results with the models containing this kind of constructs. With respect to Genetic Miner, based on its fitness definition —always benefits the individuals that portrait the most frequent behavior in the log—, it has problems to obtain complete and precise models when dealing with logs with many interleaving situations. This results in solutions with poorly precision values and very complex —with many silent tasks. Finally, the α++-algorithm gets the worse results since it cannot deal with logs with many interleaving situations, giving as a result very poor values of completeness and precision for almost all the logs. Comparing the results of the five algorithms: ProDiGen correctly mines, i.e., finds the original model, the 81% (17 out of 21) of the cases. For the other algorithms, the percentage of correctly mined models was: GM in the 33% (7 out of 21), HM in the 28% (6 out of 21), and both α++ and ILP in the 5% (1 out of 21). Tables 2.9(a) and 2.9(b) show the results for the non-parametric tests for the unbalanced logs. Again, the p-value of the Friedman test is really low, indicating that there are significant differences among the algorithms with a
64 Chapter 2. ProDiGen: Mining complete, precise and minimal structure process models Table 2.9: Non-parametric test for the unbalanced logs. (a) Friedman ranking. Algorithm Ranking ProDiGen 1.55 HM 3.17 GM 3.31 ILP 3.43 α++ 3.55 Friedman p-value: 3.58E-7 (b) Holm post-hoc, α=0.05. iComp. z p α/iHypothesis 4α++ 4.1 4.15E-5 0.013 Rejected 3 ILP 3.85 1.15E-4 0.017 Rejected 2 GM 3.61 3.05E-4 0.025 Rejected 1 HM 3.31 9.06E-4 0.05 Rejected Table 2.10: Average runtimes of the algorithms on the 21 unbalanced logs. ProDiGen GM8HM α++ ILP Initial Sol.Best Sol.Total Total Total Total Total Average Time 2.5s 4.7m 32m 65m 606ms 128ms 33.8s high level of confidence. Holm’s test also rejects the null hypothesis between ProDiGen and each of the algorithms used in the comparison. Therefore, we can conclude that ProDiGen also outperforms all the algorithms with unbalanced logs, and the difference is statistically significant. We also did the test with only the model metrics and only the log metrics —with no differences. Table 2.10 shows the average runtimes of all the algorithms over the unbalanced logs of Section 2.6.1. As can be seen, Heuristics Miner, α++ and ILP have on average very fast runtimes, being the quality of the results of Heuristics Miner the highest of the three. On the other hand, ProDiGen improves the execution time of Genetic Miner. The comparison between the runtimes of ProDiGen and Heuristics Miner requires to take into account that ProDiGen is an iterative algorithm —it obtains thousands of solutions per execution—, while HM only gets one solution per execution. The initial solution runtime (Table 2.10) shows the time that ProDiGen needs, on average, to pre-process the log and retrieve de best solution of the initial population. The quality of that solution is at least as good as the solution of Heuristics Miner —as ProDiGen uses the Heuristics Miner solution as part of the initial population. Both the 8Genetic Miner is an iterative algorithm and, therefore, it would be possible to measure the runtimes of the first and best solutions and the total runtime. We only show the total runtime as the implementation of Genetic Miner (ProM 6.3) does not measure other runtimes. Nevertheless, the runtime for the initial solution is very similar to that of ProDiGen, although the quality of that solution for Genetic Miner is usually very low.
2.7. Conclusions 65 runtimes of the initial solution and HM are fast —as mining algorithms do not have real time requirements. Moreover, the extra-time inverted by ProDiGen in finding the best solution (Table 2.10) is worth, as ProDiGen improves the solutions of Heuristics Miner in 58 out of 111 logs —15 out of 21 unbalanced logs— in a fast way for process mining requirements. 2.7 Conclusions We have presented ProDiGen, a genetic algorithm for process mining that can tackle all the different constructs at once, and obtains models that are complete, precise, and simple. ProDi- Gen uses a new hierarchical fitness function that includes new definitions for precision and simplicity. Moreover, the proposal uses genetic operators that focus the search on specific parts of the model: i) the crossover operator selects the crossover point based on the errors of the mined model; and ii) the mutation operator is guided by the causal dependencies of the log. ProDiGen has been validated with 111 different logs with all kind of workflow patterns, noise, and unbalanced logs. Also, we have compared ProDiGen with 4 of the state of the art process discovery algorithms using non-parametric statistical tests. Results conclude that using a hierarchical fitness based on completeness, precision and simplicity shows a great performance when retrieving the original model. Moreover, ProDiGen outperforms the other process mining algorithms, as it is able to retrieve the original model in the 84% of the tested logs.
CHAPTER 3 ENHANCING DISCOVERED PROCESSES WITH DUPLICATE TASKS Log Process hierarchization Process simplification Chapter 2 Chapter 3 Chapter 4 Role part 2 Role part 1 Act 2 Act 1 Play Chapter 1: Introduction Process discovery Chapter 5: Conclusions In Chapter 2 we presented an algorithm for the automatic discovery of process models. Here, we introduce a new algorithm to support the mining of additional behavior, in particular, duplicate labels. How to face this type of behavior is of particular interest in process discovery as, usually, duplicate events are recorded with the same label in the log, hindering the discovery of the model that better fits the recorded behavior. Taking into account duplicate activities can enhance the comprehensibility of the mined model. For instance, in the genetic algorithm presented in the previous chapter, introducing duplicate activities before or during the mining process can lead to a search space explosion. Furthermore, the incorrect identification of duplicate labels can lead to an incorrect representation of the behavior recorded in the event log. In order to keep the search space within bounds, one possible solution is to duplicate the most convenient activities after mining the model.
68 Chapter 3. Enhancing Discovered Processes with Duplicate Tasks To tackle this issue, in this chapter we present SLAD (Splitting Labels After Discovery), an algorithm that takes as starting point an already mined model, and using the local information of the log, tries to improve the comprehensibility and understandability of the model by splitting the overly connected nodes into two or more activities. More specifically, the contributions presented in this chapter are: i) the discovering of the duplicate activities is performed after the discovery process, in order to unfold the overly connected nodes than may introduce extra behavior not recorded in the log; ii) new heuristics to focus the search of the duplicated tasks on those activities that better improve the model; and iii) new heuristics to detect potential duplicate activities involved in loops. This proposal has been validated with 54 different mined models from three process discovery algorithms. Furthermore, the results have been compared with eight different algorithms from the state of the art. This algorithm, as well as the aforementioned comparison, is described in the following publication: B. V´ azquez-Barreiros1, M. Mucientes1, and M. Lama1. Enhancing Discovered Processes with Duplicate Tasks. Information Sciences, 373:369–387, 2016. (DOI: 10.1016/j.ins.2016.09.008)). 3.1 Abstract Including duplicate tasks in the mining process is a challenge that hinders the process discovery, as it is also necessary to find out which events of the log belong to which transitions. To face this problem, we propose SLAD (Splitting Labels After Discovery), an algorithm that uses the local information of the log to enhance an already mined model, by performing a local search over the tasks that have more probability to be duplicated in the log. This proposal has been validated with 54 different mined models from three process discovery algorithms, improving the final solution in 45 of the cases. Furthermore, SLAD has been tested in a real scenario. 1Centro Singular de Investigaci´ on en Tecnolox´ ıas da Informaci´ on (CiTIUS), Universidade de Santiago de Compostela. Santiago de Compostela, Spain.
3.2. Introduction 69 3.2 Introduction In the recent years, a lot of work has been made for developing technologies to automate the execution of processes in different application domains such as industry, education or medicine [80]. In particular, for business processes, there has been an incredible growth on the amount of process-related data, i.e, execution traces of business activities. Within this context, process mining has emerged as a way to analyze the behavior of an organization based on these data —event logs— offering techniques to discover, monitor and enhance real processes, i.e., to understand what is really happening in a business process [122]. Based on this idea, and in order to model what is really happening in an organization, process discovery techniques aim to find the process model that better portraits the behavior recorded in an event log. There are four quality dimensions to measure how good is a model and, hence, identify which model is the best: fitness replay, precision, generalization and simplicity. Fitness replay measures how much of the behavior recorded in the log can be reproduced in the process model. On the other hand, precision and generalization measure if the model overfits —it disallows for new behavior not recorded in the log— or underfits —it allows additional behavior not recorded in the log— the data, respectively. Finally, simplicity, quantifies the complexity of the model, for instance, the number of arcs and tasks. Hence, the idea behind process discovery is to maximize these metrics in order to obtain an optimal solution that better describes the flow of the events that occur within the process. In order to discover the optimal solution, one key question is how to describe the ordering and flow of events that occur in a process [134]. From the control-flow perspective, a model can be represented with many different workflow patterns, such as sequences,parallels,loops,choices, etc. Furthermore, to improve the quality of the solution, models can be extended with more behavior: duplicate activities,non-free-choice constructs2, etc. Within the scope of this paper, the notion of duplicate tasks —or activities— [136] refers to situations in which multiple tasks in the process have the same label, i.e., they can appear more than once in the process. As previously said, the inclusion of duplicate tasks is useful to improve the precision and simplicity of a model, and, hence, enhance its comprehensibility [15, 31]. Figure 3.1 shows an example on how the addition of duplicate tasks to a model improves its understandability and structural clarity. In this example, considering the sample log of Fig. 3.1(a), the events Quiz and Check Bibliography, are executed multiple times — 2A non-free choice (NFC) construct is a special kind of choice, where the selection of a task depends on what has been executed before in the process model.
76 Chapter 3. Enhancing Discovered Processes with Duplicate Tasks case1case2case3 A D G J A D B D H J A D B D B J (a) Log. tI(t) O(t) A{} {{D}} D{{A,B}} {{G,B,H}} G{{D}} {{J}} J{{G,B,H}} {} B{{D}} {{D,J}} H{{D}} {{J}} A J G D H B (b) Initial solution. tI(t) O(t) A{} {{D2}} D1{{B2}} {{B1,H}} G{{D2}} {{J}} J{{G,B1,H}} {} B1{{D1}} {{J}} H{{D1}} {{J}} D2{{A}} {{G,B2}} B2{{D2}} {{D1}} B1 D2 H B2J G D1 A (c) Final solution. Step t Local variables Unrepaired Solution Repaired Solution 1potentialDuplicates = [D] 2 D Subsequences from parsing ind0: ADG,ADB,BDBand BDH 3 D Combinations: c[0].inputs = [A] c[0].out puts = [G,B] c[0].sharedOut puts = [B]; c[0].sharedInputs = []; c[1].inputs = [B] c[1].out puts = [B,H] c[1].sharedOut puts = [B]; c[1].sharedInputs = []; 4 D Duplicate D into D1and D2 using the previous combinations and repair the causal dependencies → tI(t) O(t) A{} {{D1}} D1{{B}} {{B,H}} G{{D1}} {{J}} J{{G,B,H}} {} B{{D1}} {{D1,J}} H{{D1}} {{J}} D2{{A}} {{G,B}} → tI(t) O(t) A{} {{D2}} D1{{B}} {{B,H}} G{{D2}} {{J}} J{{G,B,H}} {} B{{D1,D2}} {{D1,J}} H{{D1}} {{J}} D2{{A}} {{G,B}} 5 After duplicating D: potentialDuplicates = [] potentialDuplicatesL2L= [B,G,H] 6 B Subsequences from parsing ind0: D2BD1and D1BJ 7 B Combinations: c[0].inputs = [D2] c[0].out puts = [D1] c[0].sharedInputs = [] c[0].sharedOut puts = [] c[1].inputs = [D1] c[1].out puts = [J] c[1].sharedInputs = [] c[1].sharedOut puts = [] 8 B Duplicate B into B1and B2 using the previous combinations and repair the causal dependencies → tI(t) O(t) A{} {{D2}} D1{{B1}} {{B1,H}} G{{D2}} {{J}} J{{G,B1,H}} {} B1{{D1}} {{J}} H{{D1}} {{J}} D2{{A}} {{G,B1}} B2{{D2}} {{D1}} → tI(t) O(t) A{} {{D2}} D1{{B2}} {{B1,H}} G{{D2}} {{J}} J{{G,B1,H}} {} B1{{D1}} {{J}} H{{D1}} {{J}} D2{{A}} {{G,B2}} B2{{D2}} {{D1}} (d) Steps of SLAD. Figure 3.2: An example on how SLAD works.
3.4. Splitting Labels After Discovery 77 for a task tthe upper bound is greater than 1, then tis considered as a potential task for being duplicated and, hence, it is added to potentialDuplicates (Alg.3.1:4-6). Definition 4 (Duplicate task).Let L be an event log over T. Let t,t0∈T , |t>Lt0|the total number of times that task t0follows t, and |t0>Lt|the total number of times that task t0 precedes t. A task t is considered as a duplicate task iff: max(min(|t>Lt0|,|t0>Lt|),1)>1. We use this strategy as a first step to detect the potential duplicates, and as a way to retrieve the local context of the activities. Step 1 in Fig. 3.2(d) shows the potential duplicate tasks detected after applying the described heuristic over the log of Fig. 3.2(a). In this case, only Dis detected as a potential duplicate task: task Dis preceded by tasks Aand Band directly followed by B,Gand H. Hence, as max(min(3,2),1)>1, activity Dis a potential candidate for label splitting. In the next steps of the algorithm, we extend this heuristic in order to get more information about the duplicate activities and perform the adequate split of the tasks (Section 3.4.2). Moreover, we improve this heuristic to detect potential duplicate activities in loops (Section 3.4.3). One particular scenario of this initial approach to detect the potential duplicate tasks is related to the start and end activities of a trace. For instance, if we consider the trace σ= {A,B,C,A}, the activity Ais never going to be selected as a potential duplicate task through this method, as Ais only followed by Band preceded by C, i.e., max(min(1,1),1) = 1. To overcome this situation, one possible solution is to add a dummy start and end activity to each trace (Definition 5). Thus, by changing σto σ0={start,A,B,C,A,end}, it is possible to add the activity Ainto potentialDuplicates, as max(min(2,2),1)>1. Definition 5 (Dummy tasks).Let L be an event log over T. Let ‘start’ be a dummy task with no predecessors, i.e. |t0>Lstart|=0, and ‘end’ be a dummy task with no successors, i.e., |end >Lt0|=0. Then L+is an event log over T +with the dummy activities such as: T+=T∪{start,end}, L+={start σend |σ∈L}. 3.4.2 Extending the model with duplicate tasks Once all the potential duplicates are identified, the algorithm splits the input and output dependencies of these activities of the model into multiple tasks with the same label through
78 Chapter 3. Enhancing Discovered Processes with Duplicate Tasks the function localSearch (Alg. 3.1:8). Within this function, the algorithm calculates the input and output combinations for each activity in potentialDuplicates (Alg. 3.1:11-13), in order to split their behavior among new tasks. To compute these combinations, the algorithm firstly finds all the subsequences —Definition 6— (Alg. 3.1:12) in the log Lthat match the pattern t1tt2—window of size 1— where t1∈I(t) and t2∈O(t) in the model —being I(t) and O(t) the inputs and outputs of task t, respectively. We add this input/output constraint to focus only on those patterns that can be reproduced by the initial model. Following with the example shown in Figure 3.2, when iterating over potentialDuplicates, the algorithm must find the subsequences that match the pattern t1Dt2in the traces of the log L. The resultant subsequences are shown in the Step 2 in Fig. 3.2(d). Note that all these subsequences satisfy the input and output dependencies of the task D in the initial model of Fig. 3.2(b). Definition 6 (Subsequences).Let CM be a causal matrix (T,I,O). Let L be an event log. Let σ=t1t2...tnand i ∈ {1,...,n−1}be a trace such that σ∈L. The subsequences of a task t∈T are defined by: S={(ti−1titi+1)|ti−1,ti,ti+1∈σ∧ti−1>Lt∧t>Lti+1∧ti−1∈I(t)∧ti+1∈O(t)}. Algorithm 3.2: Compute the combinations of a task. 1Function calculateCombinations(subsequences, t) 2combinations ←/0 3forall ((t1tt2)∈subsequences) do 4c←/0 5Create a set c.inputs with the subsequences that share the same t1and add in c.out puts their respective t2 6Add cto combinations 7foreach c∈combinations do 8if c.out puts =c’.outputs where c0∈combinations then 9c.inputs =c.inputs ∪c’.inputs and c.out puts =c.out puts ∪c’.outputs 10 combinations =combinations \c0 11 if c.out puts shares an element e with another c’.outputs then 12 c.sharedOut puts ←c.sharedOut puts ∪{e} 13 if c.inputs shares an element e with another c’.inputs then 14 c.sharedInputs ←c.sharedInputs ∪ {e} 15 return combinations After obtaining such subsequences, the algorithm creates the combinations —through the
3.4. Splitting Labels After Discovery 79 function calculateCombinations (Alg.3.2)— which will serve as the basis to split the original task into multiple activities. These combinations —Definition 7— represent the context in which the original task is involved —in terms of relations— with the other tasks of the log. calculateCombinations builds such combinations of a task tfollowing three rules (Alg.3.2:7-14). First, given two subsequences t1tt2and t3tt4, if t1=t3, then SLAD merges both subsequences into a new combination (Alg.3.2:3-6). Second, and after identifying all the combinations, given two different combinations cand c0, if they share the same out puts, i.e., c.outputs =c’.outputs, these two combinations are merged (Alg.3.2:8-10). With these two rules SLAD can split the behavior of the task into different contexts combining the mined causal dependencies and the local information of the log. Finally, if the intersection between two combinations is not the empty set, SLAD records which inputs and outputs are shared by both combinations (Alg.3.2:11-14) —this information is later used in the repairing step. Step 3 in Fig. 3.2(d) shows the combinations generated from the subsequences in which task Dis involved. For instance, one of the combinations is generated based on the subsequeces ADGand ADB; and the other one is based on the subsequences BDBand BDH. In this case, task Bis shared in the out puts of both combinations, therefore c[0].sharedOutputs = [B]and c[1].sharedOutputs = [B]; in the same way, none of the combinations share an element in their inputs, therefore both sharedInputs subsets are empty. Definition 7 (Combinations).Let S be a set of subsequences. We define a combination c as a group of subsequences such as: C={c∈P(S)| ∀(xyz),(i jk)∈S:x=i∧y=j}. Let n be the total number of combinations c ∈C and m the total number of subsequences s∈c. Hence, for a task t, each c ∈C represents a set of k grouped subsequences (t0tt00)where: c.inputs = {Sm i=1t0|t0>Lt∈sm} c.out puts ={Sm i=1t00 |t>Lt00 ∈sm} c.sharedInputs ={Tn i=1ci.inputs |ci∈C} c.sharedOut puts ={Tn i=1ci.out puts |ci∈C} After building all the possible combinations, the next steps in Alg. 3.1 are straightforward. For each combination c(Alg.3.1:14), SLAD creates a new task t0equal to the original task t of the current model (Alg.3.1:15). Then, it removes from Input(t)all the tasks shared with c.inputs, but keeping the tasks that are in c.sharedInputs (Alg.3.1:16). On the other hand, for the new task t0, it retains only the elements in Input(t0)that are contained in c.inputs
80 Chapter 3. Enhancing Discovered Processes with Duplicate Tasks (Alg.3.1:17). The same process is applied for the outputs of both tand t0but with c.outputs and c.sharedOutputs (Alg.3.1:18-3.1:19). With this process the algorithm redistributes the inputs and outputs of the original task among the new task. If these two tasks are compliant with the model, i.e. both their inputs and outputs are not empty5(Alg.3.1:20), the new task is included in ind0—the actual model—, and the original task of ind0is updated (Alg. 3.1:21). Otherwise the model goes back to its previous state and tries a new combination. Following with the example, SLAD, using the combinations previously calculated (Step 3 of Fig. 3.2(d)), splits the inputs and outputs of the original task Damong two new tasks D1and D2—for the sake of the argument we label the duplicate tasks with different subscripts. This process gives as a result the unrepaired model shown in Step 4 of Fig. 3.2(d). Definition 8 (Repairing process).Being t the original task, t0a new task split from t, a Causal Matrix (T,I,O)is repaired as follows: ∀t00 ∈O(t0)→I(t00) = I(t00 :t→t0) ∀t00 ∈I(t0)→O(t00) = O(t00 :t→t0) When including this new task, the model has to be repaired (Alg.3.1:22), as some of the dependencies of the original task tare now in a new task t0with the same label, resulting in an inconsistent model, e.g., the activity D2has the activity Bas output, but activity Bhas no activity D2as input, i.e., it still has the activity D1. The repairing process works as stated in Definition 8. In summary, being tthe original task and t0the new task, for each task t” that was eliminated from O(t), the process checks if t∈I(t00). If that is true, thas to be replaced in each subset of I(t00) with t’. This process is repeated also for the input sets. Then, the algorithm performs a post-pruning of the model removing the unused arcs, i.e., arcs whose frequency of use is zero (Alg.3.1:23). In order to evaluate the models (Alg.3.1:24), we based their quality on three criteria: fitness replay,precision and simplicity. To measure these criteria we used the hierarchical metric defined in [147], that first compares the fitness replay, then the precision and last the simplicity of the process models: Definition 9 (Process models dominance).Let x, x0be two process models. Let F(x), P(x) and S(x)be, respectively, the replay fitness, precision and simplicity of the process model x. 5Based on Definition 5, only the dummy activities start and end should have an empty input and output set, respectively, as they are the only initial and final activities of the event log L.
3.4. Splitting Labels After Discovery 81 The process model x is better than the process model x0iff: xx’ ⇐⇒ [F(x)>Fx0] ∨[F(x) = Fx0∧P(x)>Px0] ∨[F(x) = Fx0∧P(x) = Px0∧S(x)>Sx0] Thus, replay fitness is the primary ordering criteria. When two solutions have the same replay fitness, precision is used to decide the best solution. When two solutions have the same replay fitness and precision, simplicity is the decisive criterion. Finally, if the new model with duplicate tasks is better, it means that the task twas correctly duplicated. Therefore, the best solution indbest is replaced with ind0(Alg.3.1:28). Otherwise, the model goes back to its previous state and repeats the process with a new combination. In the previous example, after splitting Dinto two new activities, SLAD ends up with an inconsistent model (Step 4 of Fig. 3.2(d)). Therefore, the dependencies of the model have to be repaired as explained. Note the task Bis shared by both outputs of tasks D1and D2. This has to be taken into account when repairing the process model, as Bmust now contain both tasks as inputs. When this situation occurs, the repairing process must add a new relation into the model. In other words, if O(t) and O(t0) share an activity t00 when repairing the model, t0 should be added in the same subset as tin I(t00). Thus in the repaired solution shown in the Step 4 of Fig. 3.2(d), I(B) contains as input both tasks D1and D2. Finally, in this example, the new repaired model after duplicating task Dhas a better precision than the initial solution, and therefore the best model is updated. 3.4.3 Handling length-two-loops One of the novelties of SLAD is its ability to duplicate tasks in loops, specially in Lengthtwo-Loops (L2L). In process mining, there is a well known relation between duplicate tasks and loops [136]. For example, in Fig. 3.2(a) the sequence of activities BD is executed multiple times, i.e., twice, but, as shown in the model depicted in Fig. 3.2(c), it can be considered that it is not a loop. Depending on the perspective, modeling this behavior as a loop could be a valid solution —for instance, by generalizing the model and hence allowing more executions of the loop than the recorded number in the log. With SLAD, we are going to consider that this type of behavior, i.e., situations where a sequence of activities is executed multiple times —twice as maximum—, will be modeled with duplicate tasks with the aim of improving the precision of the model. Otherwise, these situations —more than two repetitions— will be modeled as
82 Chapter 3. Enhancing Discovered Processes with Duplicate Tasks a Length-one-Loop (L1L) or Length-two-Loop (L2L) —we do not want to unfold a loop by converting it into a large sequence. Detecting if the behavior can be modeled as a L1L or with two tasks with the same label can be detected with the previous process (Section 3.4.2). The problem arises when deciding if a L2L can be modeled with duplicate tasks. The main limitation of the heuristic followed to detect the possible duplicate tasks of the log —Definition 4— is that it does not cover all the search space, particularly with tasks involved in a Length-two-Loop situation, as it breaks the rule of two tasks sharing the same input and output dependencies (Definition 3). For instance, considering the log of Fig. 3.2(a), only the activity Dis identified as a potential duplicate activity, making it impossible to include in the search space the model depicted in Fig. 3.2(c), as Bis not identified as a duplicate task: based on the log, Bis only preceded by Dand followed by Dand J, hence max(min(2,1),1) = 1. Making this process recursive can solve this drawback: when a task tis detected as a duplicate activity, the upper bound for all the tasks t0that directly follow tmust be updated, because these tasks will now have multiple tasks with the same label as input. Note that updating only the tasks t0that directly follow tis sufficient, as this situation only occurs when loops of length two are involved in the computation of this heuristic —a task in a L2L usually have the same activity as input and output. To avoid a infinite recursion —Theorem 1—, the maximum number of times a task tcan be modified by this recursive operation is twice. This bound is set also to avoid ending with a potential trace-model by unfolding a loop into a large sequence. In order to mimic this behavior in the proposed algorithm, if a task tis correctly duplicated in the model (Alg.3.1:28), we add the tasks that directly follow tinto potentialDuplicatesL2L (Alg.3.1:29). Following with the previous example, when duplicating D, the algorithm also needs to include Bas a potential duplicate task. Therefore, after splitting the behavior of D among the new tasks D1and D2, the algorithm adds to potentialDuplicatesL2Lthe outputs of D, i.e. potentialDuplicatesL2L= [B,G,H]as shown in the Step 5 of Fig. 3.2(d). Theorem 1 (Infinite recursion).Given a trace with a very long length-two-loop, recursively applying Definition 2 after splitting an activity can lead to a trace-model. Proof. Let Tbe a set of tasks. Let Lbe a log over Tand σ=...t1t2t3t4t5... be a fragment of trace where label(t2) = label(t4) = a, and label(t3) = b, i.e., σ=...t1abat5.... Based on Definition 4, the task ais selected to be duplicated. Assuming that this task is correctly split, this results in σ=...t1a1ba2t5.... As b∈O(a), task bis selected as a potential duplicate
3.4. Splitting Labels After Discovery 83 task. If the task bis correctly split, as a2∈O(b),a2is going to be added again as a potential duplicate task. Let’s consider now that label(t5) = b2, i.e., σ=...t1a1b1a2b2.... As b2∈O(a2), b2is selected again as a duplicate task. If the L2L between tasks aand bin σis infinite, i.e., {...abababa...}, this could lead to an infinite recursion between these two tasks as long as they are correctly split. Once the algorithm ends its iteration over the main loop (Alg.3.1:11-31), it checks if there are tasks that were affected by the duplication of other activities, i.e., it checks if potentialDuplicatesL2Lis empty (Alg.3.1:32). If this condition is false, the algorithm makes a recursive call but considering potentialDuplicatesL2Las input (Alg.3.1:33) —following with the example, now the algorithm has to iterate over [B,G,H]. In this new iteration, the process is the same as explained before. Considering that the new task to be duplicated in this new iteration is B, the algorithm first retrieves the context in which this task is involved. In this new particular case, we have to take into account that the original task Dfrom the log was duplicated in the model, generating D1 and D2. Therefore, when reproducing the solution over the log, we can check which activities with the same label D∈I(B) were executed just before Band which activities t∈O(B) were executed after B. With this process, the algorithm creates the sequences needed to generate the combinations to split B: when D2is executed before B, then D1is always executed, and when D1is executed before B,Jis always executed later —where J,D1∈O(B). These subsequences are shown in the Step 6 of Fig. 3.2(d). Then, with these subsequences the algorithm builds the combinations considering that the tasks with the same label are different (Step 6 in Fig. 3.2(d)), and create two different combinations as explained in Section 3.4.2. The resultant combinations are shown in the Step 7 in Fig. 3.2(d). Note that, as these combinations do not share neither inputs nor out puts, both sharedInputs and sharedOut puts are empty. With this process, the algorithm is able to split Binto two tasks B1and B2, obtaining the model shown in the Step 8 in Fig. 3.2(d). After repairing the solution —for instance, I(D1) has to be updated—, this model achieves a better quality than the best solution so far (Step 8 in Fig. 3.2(d)), allowing to unfold the loop into a sequence of tasks, and retrieving the model depicted in Fig. 3.2(c). If we would have extended the log with a new trace repeating the sequence BD more than twice, i.e., a case like <A,D,B,D,B,D,H,J>, the obtained model would have a lower fitness replay than the actual best solution —it would be impossible to execute the tasks more than twice— and therefore this behavior would be modeled as a L2L instead of unfolding the loop.
84 Chapter 3. Enhancing Discovered Processes with Duplicate Tasks At this point the algorithm will continue to check if the other tasks can be duplicated — and even make another recursive call with the outputs of the already split task B. However, the model cannot be further improved by SLAD, as it perfectly models the behavior of the log. 3.5 Experimentation The validation of SLAD has been done with a set of synthetic models from [30, 75]. Table 3.1 summarizes the original known models on the basis of their activities and the workflow patterns that each net contains6, For example, the FlightCar model has eight different tasks structured in sequences, choices and parallel constructs. It also has duplicate tasks in sequence7, meaning that, although the model contains eight different labels, it can be represented with more than eight activities. For each of these models, there is log with 300 traces. Table 3.1 shows the total number of events in each log. Note that, in these logs, we also included two additional dummy activities —a start and end activity—, as some algorithms used in the experimentation, including SLAD, are very sensitive when handling event logs with more than one start and/or end points [15, 30, 147, 155]. 3.5.1 Metrics The quality of the models retrieved by the proposed approach were measured by taking into account three objectives: fitness replay, precision and simplicity. To measure the fitness replay (F), we use the proper completion metric [105]: F=PPT |L|(3.1) where PPT is the number of properly parsed traces, and |L|is the total number of traces in the event log. Hence, proper completion takes a value of 1 if the mined model can process all the traces without having missing tokens or tokens left behind. Also, the precision (P) is evaluated as follows: P=1−max{0,P0 o−P0 m}(3.2) 6All the datasets and experiments can be found in http://tec.citius.usc.es/processmining/ SLAD. 7Models with duplicate tasks in parallel mean that the activities with the same label are executed in different branches, whereas duplicate tasks in sequence are executed in the same branch.
3.5. Experimentation 85 Table 3.1: Process models used in the experimentation. Activity structures Log content Model Name #Labels Sequence Choice Parallelism Length-One Loop Length-Two Loop Structural Loop Non-local NFC Invisible tasks Duplicates in Sequence Duplicates in Parallel #traces #events betaSimpl [30] 13 X X X X X 300 4,209 FlightCar [30] 8 X X X X 300 2,385 Fig5p1AND [30] 5 X X X 300 2,400 Fig5p1OR [30] 5 X X X 300 2,100 Fig5p19 [30] 8 X X X X X 300 2,428 Fig6p9 [30] 7 X X X X 300 2,592 Fig6p10 [30] 11 X X X X X 300 4,376 Fig6p25 [30] 21 X X X X X X 300 5,661 Fig6p31 [30] 9 X X X 300 2,400 Fig6p33 [30] 10 X X X 300 2,504 Fig6p34 [30] 12 X X X X X X 300 5,406 Fig6p38 [30] 7 X X X 300 3,000 Fig6p39 [30] 7 X X X X 300 2,684 Fig6p42 [30] 14 X X X X X 300 3,420 RelProc [30] 16 X X X X 300 4,155 Alpha [75] 11 XXX XX 300 3,978 Loop 7X X X X 300 2,175 FoldedOr 6X X X 300 2,200 where P0 oand P0 mare, respectively, the precision of the original model and the precision of the mined model, both evaluated through alignments. More specifically, we used the metric defined in [6], considering all possible optimal alignments. It takes a value of 1 if all the behavior allowed by the model is observed in the log. As the original model is the optimal solution, we use it to normalize the precision. Therefore, Pwill be equal to 1 if the mined model has a precision (P0 m) equal or higher than the original model (P0 o). When the precision of the mined model is worse than that of the original model, Pwill take a value under 1 — the lower the precision of the mined model, the closer the value of Pto 0. Finally, for the simplicity (S) we use: S=1 1+max{0,S0 m−S0 o}(3.3)
92 Chapter 3. Enhancing Discovered Processes with Duplicate Tasks Table 3.4: Friedman ranking for all the algorithms with SLAD. Algorithm Ranking ProDiGen+SLAD 25.528 Fodina+D+SLAD 35.583 HM+SLAD 40.611 Fodina+SLAD 44.278 p-value: 0.0941 We also compared in more detail the solutions retrieved with Fodina detecting the duplicate activities after (Fodina+SLAD) and before (Fodina+D) mining the model —rows 7-8 of Table 3.2. Within this context, detecting the duplicate activities through SLAD improves 14 out of 18 solutions, whereas detecting the duplicate activities before the mining process, improves 13 out of 18 solutions. In particular, there are some solutions that were improved performing the label splitting before —for instance, log Fig6p9—, and after —for instance, log Fig5p19— the process mining. On the other hand, as previously indicated, in three of the solutions Fodina+D retrieved a worse model than the one without duplicate activities, whereas with SLAD the final solution is always the same or better than the original. It should be noted that performing the label splitting before and after the mining process is not exclusive, i.e. it is possible to apply SLAD to a solution that already contains duplicate activities. Therefore, we carried out this experiment with the solutions retrieved by Fodina+D (Fodina+D+SLAD) and DGM (DGM+SLAD). Fodina+D+SLAD enhances a total of 7 out of 18 models —row 12 of Table 3.2— of the solutions retrieved by Fodina+D. On the other hand, SLAD was unable to enhance any of the models mined by DGM, therefore we omitted this row in the table, as the results where the same as the achieved by the DGM —row 9 of Table 3.2. Finally, we compared the algorithms that include the duplicate activities in the mining process with the best algorithm with SLAD. In order to select the best algorithm with SLAD, we applied the Friedman Aligned Ranks test [61], using the rank solutions based on the Pareto dominance. This test computes the ranking of the results of the algorithms rejecting the null hypothesis —which states that the results of the algorithms are equivalent— with a given confidence or significance level (α). Then we applied the Holm’s post-hoc test [62] for detecting significant differences among the results. Table 3.4 summarizes this test, ranking ProDiGen+SLAD as the best algorithm. We omitted the Holm’s post-hoc test, as based on the
3.5. Experimentation 93 p-value of the previous test, the differences are not significant. Table 3.5: Non-parametric test. (a) Friedman ranking. Algorithm Ranking ProDiGen+SLAD 22.527 Fodina+D 40.833 ETM 44.666 DGM 50.277 TS 69.194 p-value: 0.0248 (b) Holm post-hoc, α= 0:05. Comparison Adj. p-value Hypothesis ProDiGen+SLAD vs TS 0.0000 Rejected ProDiGen+SLAD vs DGM 0.0043 Rejected ProDiGen+SLAD vs ETM 0.0220 Rejected ProDiGen+SLAD vs Fodina+D 0.0355 Rejected The comparison of Fodina+D, ETM, DGM, TS and ProDiGen+SLAD is summarized in Table 3.5. After applying the Friedman Aligned Ranks test ProDiGen+SLAD has the best ranking (Fig. 3.5(a)). Based on the results of the Friedman Aligned Ranks, we performed a Holm’s post-hoc test (Fig. 3.5(b)), starting with the initial hypothesis that all the tested algorithms are equal to ProDiGen+SLAD. The test rejects the null hypothesis in all the cases for a confidence level of α= 0.05 —the p-value of each algorithm has to be lower than αin order to reject the hypothesis. This means that ProDiGen+SLAD outperforms all the other algorithms, and that the difference is statistically significant for that confidence level. ProDiGen+SLAD obtains the original model in 15 out of 18 logs. The most difficult situations for SLAD are the duplicates in parallel. Nevertheless, as previously said, this problem is more related to the input solution, rather than to the performance of the proposed algorithm (Figs. 3.4 and 3.5) as it cannot create new behavior in the mined model. More specifically: •For log Alpha (Fig. 3.4), although the algorithm correctly detects the tasks eand das potential duplicates, due to the original model retrieved by ProDiGen (Fig. 3.4(a)), it cannot construct a model with those tasks repeated in the different branches (Fig. 3.4(b)). This is because ProDiGen finds a non-free-choice pattern that mimics the same behavior as the model with duplicate tasks disabling the possibility to split the causal dependencies of these activities. In other words, both tasks dand eare always executed in the same trace. Therefore, ProDiGen mines a parallel construct involving these two tasks. Then, depending on the execution of gor f, the next task to be executed can be hor i, respectively.
94 Chapter 3. Enhancing Discovered Processes with Duplicate Tasks e f h x d g i (a) Detail of the mined model by ProDiGen without duplicate tasks. SLAD does not improve this part of the model. e f h x ed d g i (b) Detail of the original model with duplicate tasks. Figure 3.4: Two models depicting the same behavior for the log Alpha, but with and without duplicate tasks. •For model Fig6p39 (Fig. 3.5) the algorithm cannot correctly obtain the parallelism with the task A, which is again executed multiple times in different branches. Based on this, ProDiGen tries to reproduce as much behavior as possible overly connecting the same task Ain only one branch (Fig. 3.5(a)). For this reason, SLAD tries to split the task A(Fig. 3.5(b)), improving the precision but still allowing for more behavior than the recorded in the log. This is one example of how duplicate activities executed in different branches are isolated when mining the log without considering the duplicity. X S A C B J Y (a) Initial solution retrieved by ProDiGen without duplicate tasks. X S A C B J Y A A B (b) The same model after the local search. Figure 3.5: Two models from the log Fig6p39 with and without duplicate tasks. One of the objectives of SLAD is to retrieve high values of precision, i.e., to create a more specific process model and, therefore, to reduce the generalization that overly-connected
3.5. Experimentation 95 Table 3.6: Generalization values for 18 logs before and after SLAD. Logs Alpha Folded Loop Fig6p25 betaSimpl. flighCar Fig5p19 Fig5p1AND Fig5p1OR Fig6p10 Fig6p31 Fig6p33 Fig6p34 Fig6p38 Fig6p39 Fig6p42 Fig6p9 RelProc ProDiGen G0.99991 0.99997 0.99991 0.99945 0.70556 0.51282 0.75333 0.0 0.0 0.9992 0.41667 0.38462 0.99986 0.6375 0.94324 0.96336 0.62308 0.99796 ProDiGen + SLAD G0.99991 0.99995 0.99991 0.99945 0.38889 0.51282 0.75333 0.0 0.0 0.99887 0.41667 0.38462 0.99982 0.6375 0.9301 0.95229 0.62308 0.99591 HM G 0.99993 0.99997 0.99991 0.9995 0.79722 0.47619 0.75333 .44444 0.33333 0.9992 0.68254 0.69597 0.99984 0.7 0.97596 0.96493 0.725 0.99796 HM + SLAD G0.99992 0.99995 0.99991 0.99945 0.72639 0.2381 0.75333 0.0 0.0 0.99887 0.41667 0.38462 0.99976 0.5875 0.92241 0.96183 0.725 0.99591 Fodina G0.99993 0.99997 0.99991 0.9995 0.7911 0.40000 0.5297 0.1363 0.33333 0.9992 0.68254 0.69597 0.99986 0.6375 0.93467 0.97421 0.83334 0.99797 Fodina + SLAD G0.99991 0.99995 0.99991 0.99945 0.72639 0.40000 0.5297 0.1363 0.0 0.99887 0.41667 0.38462 0.99982 0.6375 0.93467 0.97421 0.83334 0.99797 Fodina + D G0.99993 0.99997 0.99993 0.99945 0.72639 0.51282 0.85278 0.0 0.0 0.99901 0.41667 0.38462 0.99987 0.6375 0.9783 0.96115 0.62308 0.9976 Fodina + D + SLAD G0.99993 0.99995 0.99993 0.99945 0.72639 0.51282 0.85278 0.0 0.0 0.99887 0.41667 0.38462 0.99987 0.6375 0.96799 0.96014 0.62308 0.9971 Original Model G0.99993 0.99995 0.99991 0.99945 0.38889 0.51282 0.75333 0.0 0.0 0.99887 0.41667 0.38462 0.99982 0.6375 0.9246 0.95229 0.62308 0.99591 nodes and unnecessary loops can introduce to the process model. As precision and generalization are opposed objectives [19, 122], and SLAD is trying to increase the precision and reduce the generalization, we evaluated the generalization separately to analyse how much this dimension decreases when SLAD introduces duplicate labels. Table 3.6 presents the values for the generalization —G—, for the models retrieved by ProDiGen, HM, and Fodina, before and after SLAD, using the Alignment Based Probabilistic Generalization metric [124]. Table 3.6 also shows the values of generalization for the original model as a baseline. Note that a generalization value closer to 1 means that the process model is too general —a less specific process model— whilst a value closer to 0 means that there is no room for reproducing unseen behavior —a more specific process model. Furthermore, for each pair of algorithms, we have shadowed those cases where the generalization changes after applying SLAD. As can be seen, for ProDiGen the generalization was lower after applying SLAD in 7 out of 18 cases. The cases where SLAD retrieved the same generalization is because ProDiGen, through its hierarchical fitness function —Definition 9—, already tries to reduce this dimension of a process model by focusing in precise process models —generally through the inclusion of non-free- choice constructs. On the other hand, for HM, in 15 out of 18 cases the label splitting process retrieved a more specific process model. With Fodina, SLAD reduced the generalization in 9 of the cases —both Fodina and HM usually introduce a high number of unnecessary loops and overly connected nodes that can be executed any time in the process. Finally, with the Fodina extension to mine duplicate labels —Fodina+D—, SLAD retrieved a more specific process model in 6 out of 18 cases —Fodina+D already mines models with duplicate labels, therefore it retrieves solutions reducing the generalization. It should be noticed that in all the cases SLAD retrieved equal or lower generalization than its respective process model without duplicate labels.
96 Chapter 3. Enhancing Discovered Processes with Duplicate Tasks In summary, SLAD was able to detect the duplicate tasks and significantly improve the precision in 45 out of 54 solutions —considering the initial solutions of ProDiGen, HM and Fodina— and also the fitness replay in some of the cases. More specifically, after applying SLAD, 35 out of 54 solutions were equal to the original model. Furthermore, the algorithm was able to unfold those situations detected as a loop, i.e., situations with repeated sequences —at most two times— that can be represented with duplicate tasks in order to improve the precision of the model. Additionally, in none of the cases the presented approach retrieved the trace-model after the label splitting process, avoiding the overfitted models with one path per trace. Also, none of the resulting models after applying SLAD were worse than its respective initial solution. Complexity analysis. With respect to the runtime of SLAD, we can identify two main time consuming parts in the algorithm: discovering the duplicate tasks (Alg. 3.1:4-6), and evaluating the solutions (Alg. 3.1:24). On the one hand, discovering the duplicate tasks is a costly function as, in order to detect the follows relation of each activity, it is necessary to build a dependency graph, which requires one pass through the log and, for each trace, one scan through the trace. This translates to a complexity O(n), where nrepresents the total number of events in the log. Fortunately, most process discovery algorithms [15, 30, 147, 155] already compute this dependency graph from an event log in order to mine a process model. Therefore SLAD can reuse this information without the need to recompute it, which reduces this process to check only once —at the beginning of the algorithm— each of the different activities (T) of the log, i.e O(T). On the other hand, evaluating each solution is the main bottleneck of SLAD. Each time SLAD generates a new potential solution after splitting a task, the algorithm needs to evaluate its replay fitness, precision and simplicity. Unfortunately, with current state of the art conformance checking metrics, such as alignments or token replay techniques, this is a very time consuming process when dealing with large event logs. Nevertheless, we can approximately relate the complexity of a greedy conformance checking technique to the number (t) and length (l) of the traces in an event log, hence O(t·l). In fact, this is equal to traverse all the events of the log, therefore we can set O(t·l)to O(n). Regardless the complexity of the conformance checking metric, SLAD has to check and split each one of the activities detected as a potential duplicate. Thereby, the complexity of this part can be set as O(d·c)where d is the total number of potential duplicate activities and cis the number of times the activities
3.5. Experimentation 97 can be split. In summary, the complexity of SLAD is O(d·c·n). This does not include the complexity of building the initial dependency graph. Regarding the logs used in the experimentation, the runtime of SLAD was, on average, 9 seconds —considering the time needed to compute the dependency graphs. In particular, the highest time was achieved when applying SLAD over the solution retrieved by ProDiGen with the log Fig6p42, that took 12 seconds. Experiments in a real-life scenario. Finally, we have tested ProDiGen+SLAD in a real-life scenario: a process model within an IT Service Management platform [145]. This process is related to handling incidents and requests, henceforth tickets, in a service desk, i.e., a central point of communications between users and staff in an organization. The process model has 7 different activities. However one of these activities, notification, is executed multiple times during the process. In particular, albeit its purpose is to notify different involved staff during the process of handling a ticket, it is always recorded with the same label. Hence, using this process model we generated an even log containing 300 traces to check if it is possible to obtain again the original process. Figure 3.6(a) shows the process model discovered with ProDiGen, and Figure 3.6(b) displays the same process model after applying SLAD. In this example, both process models have a perfect replay fitness. However, the precision of the model without duplicate labels is lower —0.58— than the precision of the process model after applying SLAD —0.87. The low precision of the model without duplicate labels (Fig. 3.6(a)) is due the overly-connected Start process update impact analysis & resolution notification validation rejected End process warning pending validation (a) Initial solution retrieved by ProDiGen without duplicate tasks. Start process update impact analysis & resolution notification validation rejected End process warning pending validation notificationnotification (b) The same model after applying SLAD. Figure 3.6: Process models mined for a real event log before and after SLAD.
98 Chapter 3. Enhancing Discovered Processes with Duplicate Tasks activity notification, that enables to repeat the shadowed part of the model without any limit. On the other hand, the model retrieved after applying SLAD (Fig. 3.6(b)) removes this loop by duplicating notification three times. Furthermore, the only difference between the designed process model, and the one retrieved by SLAD, is the shadowed part in Fig. 3.6(b). In reality, there are always two notifications that are performed in parallel: one of the notifications is for the Incidents manager and the other one is for the Senior manager. This two activities always happen as a sequence sharing the same label. As we do not have any other information regarding this situation, it is impossible to distinguish them, thus its representation as a sequence. 3.6 Conclusions We have presented SLAD, an algorithm to tackle duplicate tasks in an already discovered model. Our proposal takes as starting point a model without duplicate tasks and its respective log and, based on heuristics, the local information of the log, and the causal dependencies of the input mined model, it improves the fitness replay, precision and simplicity of the model. SLAD has been validated with 18 different logs and 54 different initial solutions from three different process mining algorithms. Results show that the algorithm was able to enhance the initial solutions in 45 of the 54 tested scenarios. Moreover, we have compared SLAD with the state of the art process discovery algorithms with duplicate tasks. Statistical test have shown that the best SLAD algorithm (ProDiGen+SLAD) is better, and that the differences are statistically significant. As a future work, and based on the obtained results, we want to extend SLAD with the possibility to not only redistribute the already mined dependencies of the model, but introduce new relations based on the combinations of the potential duplicate activities, in order to enhance those models with a lower fitness.
CHAPTER 4 RECOMPILING LEARNING PROCESSES FROM EVENT LOGS Log Process hierarchization Process simplification Chapter 2 Chapter 3 Chapter 4 Role part 2 Role part 1 Act 2 Act 1 Play Chapter 1: Introduction Process discovery Chapter 5: Conclusions The visualization of a process model plays an important role in order to correctly gain insights about the process. That is, models that are unnecessary complex, can hinder the real behavior of the process rather than to provide insights of what is really happening. As shown in Chapter 3 taking into account duplicate labels can drastically change how a process depicts the behavior recorded in the log. But this simplification of a process model can be achieved even further through its hierarchization. However, to get a proper level of hierarchization, it is necessary to introduce domain knowledge within the process. To this end, in this chapter we present the insights about how to use domain knowledge to translate an already discovered process model to a more specific representation, within a particular domain and, thus, retrieve a more interpretable process model. Specifically, we present a framework to automatically hierarchize a process model using domain knowledge.
100 Chapter 4. Recompiling Learning Processes from Event Logs This objective is achieved in three different steps. Firstly, the process model is automatically extracted from the logged sequences through the developed process mining algorithms. Then, an algorithm based on the knowledge about the target language control structure is applied to determine which components should be created. Finally the adaptive rules are automatically extracted form the event logs (more specifically, from the values of the variables in the logs) by a decision tree learning algorithm, and integrated into the target language structure. Hence, an important feature of the presented approach is its independence from any target modelling language. We have implemented and validated this framework within the educational domain, enabling the translation of a discovered process model into a standardized learning process model more suitable for teachers, i.e., the standard IMS LD. For a proper evaluation, the three parts of the presented framework for the hierarchization process models have been analyzed separately using a set of nine real courses with different degrees of complexity. All these contributions are encompassed in the following publication: J.C. Vidal1, B. V´ azquez-Barreiros1, Manuel Mucientes1, and Manuel Lama1. Recompiling Learning Processes from Event Logs. Knowledge-Based Systems, 100:160–174 2016. (DOI: 10.1016/j.knosys.2016.03.003). 4.1 Abstract In this paper a novel approach to reuse units of learning (UoLs) —such as courses, seminars, workshops, and so on— is presented. Virtual learning environments (VLEs) do not usually provide the tools to export in a standardized format the designed UoLs, making thus more challenging their reuse in a different platform. Taking into account that many of these VLEs are legacy or proprietary systems, the implementation of a specific software is usually out of place. However, these systems have in common that they record the events of students and teachers during the learning process. The approach presented in this paper makes use of these logs i) to extract the learning flow structure using process mining, and ii) to obtain the underlying rules that control the adaptive learning of students by means of decision tree learning. Finally, iii) the process structure and the adaptive rules are recompiled in IMS 1Centro Singular de Investigaci´ on en Tecnolox´ ıas da Informaci´ on (CiTIUS), Universidade de Santiago de Compostela. Santiago de Compostela, Spain.
4.2. Introduction 101 Learning Design (IMS LD) —the de facto educational modelling language standard. The three steps of our approach have been validated with UoLs from different domains. 4.2 Introduction While designing a course, there are two main concerns that worsen the realization of an educational scenario: i) how to model a practical pedagogical scenario to achieve the educational objectives, and ii) how to reuse this scenario in another context than the original. Teachers do not only define the learning content to be consumed by the learners, but they also include the different educational objectives, the order in which the learning activities must be undertaken to achieve these objectives, the evaluation methods, etc. Hence, to reuse and better validate an educational scenario, it should be explicitly written. Although these learning designs, i.e the descriptions of the educational process, are usually portrayed with documents that use natural language, they can be formally described through Educational Modelling Languages (EMLs). Moreover, when interacting with a virtual learning environment (VLE), learners also perform additional activities than the specifically defined by the teachers, such as interacting in the forum, checking the bibliography, etc. This information should be also highlighted to enable teachers to improve the learning flow, i.e the real workflow of learning activities, as well as the evaluation process [101]. Therefore, the defined educational scenario is more complex than the learning design explicitly documented by teachers. In the last decade a great effort has been made for developing EMLs. The main idea underlying these languages is to describe, from a pedagogical point of view, the learning process of the course, i.e., the sequence of steps the learners should undertake to achieve the educational objectives of the course, by using the available educational resources and services. Regarding the wide variety of specifications for representing learning designs, one standard de facto has jumped into e-learning panorama: the IMS Learning Design (IMS LD) specification [46]. IMS LD enables the formal description of learning processes for a wide range of pedagogical contexts in a VLE. Although there is some controversy about whether IMS LD is too complex to be understood by teachers from a practical point of view [37] — especially with the levels B and C—, most of authors highlight this complexity as a barrier for adopting IMS LD [82]. To deal with this issue, a number of user-friendly authoring tools have appeared [1, 28, 53,
108 Chapter 4. Recompiling Learning Processes from Event Logs 4.5 Framework Figure 4.1 depicts the conceptual framework for reconstructing IMS LD UoLs from the events generated by learners. It shows all the main parts involved in the reconstruction of the IMS LD UoLs. The first component of this framework is the educational world. Teachers and learners are the typical participants in any learning activity. On the one hand, teachers design the learning flows based on some educational methodology, and support the learning activities of the course. On the other hand, learners are the core of the educational world since they undertake the learning flow activities by using the resources and services available in the virtual learning environment. The rest of the components are: the virtual learning environment, the event log system, the learning flow discovery, the the learning flow hierarchization, and the adaption rules. •Virtual Learning Environment. From an educational point of view, virtual learning environments (VLEs) provide the means to carry out the learning activities planned for an UoL, allowing learners to access to the learning contents and executing the services required to facilitate those activities such as interacting with other learners or looking for information in libraries. Furthermore, VLEs detect and register all the relevant events generated by learners when undertake the learning activities. These events are stored in an event log database that contains data about the activities execution, including who participates in an activity, when it has been performed, the properties values of the UoL such as a mark of a test, and so forth. •Event Log System. When a learner undertakes a learning activity, such as answering a test, uploading an exercise or even asking a question in the forum, the VLE stores in a database the information generated as result of performing this learning activity. However, in order to be able to extract the needed information for reconstructing the IMS LD, it is necessary to translate this information into an input format for both the process mining and the decision tree algorithm. As Figure 4.2 depicts, this translation is carried out by VLE-specific adapters that generate an event log register in a standard format for process mining, so-called eXtensible Event Stream3(XES) format [150]. XES is a well-known logging standard for process mining, and we have adapted it with user-defined extensions in order to include in the same file all the outstanding information to both obtain the learning flow —by storing the sequence of steps undertaken by 3www.xes-standard.org
4.5. Framework 109 each learner— and the adaptive rules —by storing the information generated as result of performing the learning activities. Figure 4.2 shows an example of the framework used to translate the event log from any VLE to an event log in XES format4through specific VLE-adapters. These adapters and the use of XES standard provide the independence of reconstructing the IMS LD with the particular VLE in which the learning-teaching process takes place, enabling furthermore to generalize the proposed architecture to any virtual environment. The only restriction required for the VLE is that it must register the user activity —along with the variable modifications— that takes place in the learning context. Log mdl_logstore_standard_log transition_log Moodle adapter Log OPENET4LD adapter Virtual Learning Environment Event Log System VLE adapters Event Log Database Log Figure 4.2: Event log infrastructure. Each VLE accesses the event log system through a specific adapter to transform its log format to XES, the standard format for process mining. •Learning Flow Discovery. This component implements the algorithm whose aim is to discover the workflow of learning activities, i.e the learning flow, that learners undertake during a UoL. Note that this algorithm must guarantee that all the learning paths followed by learners are represented in the discovered learning flow. Furthermore, this 4Note that we have omitted some of the standard metadata of XES in the event log shown in Figure 4.2 to make the image more readable.
110 Chapter 4. Recompiling Learning Processes from Event Logs discovered learning flow should be as simple as possible in order to facilitate the hierarchization of the learning flow into the IMS LD control structure. This component is explained in detail in Section 4.6. •Learning Flow Hierarchization. Once the learning flow has been extracted from the event logs, an algorithm will translate this learning flow to the control structure defined by the IMS LD specification. This algorithm starts by detecting sequences and selections of learning activities and then uses the knowledge about IMS LD to create activity structures, acts , and plays. The learning flow hierarchization is explained in detail in Section 4.8. •Adaptation Rules. The IMS LD specification has an extensive set of adaptation conditions, but this framework is focused on extracting the conditions related to the selection of learning activities — show and hide mechanism — based on the changes in the properties values of the UoL. A decision tree technique was implemented to automatically obtain these conditions, since it is an effective approach to deal with this kind of problems. This process is explained in Section 4.7. It is important to emphasize that, although we are depicting this framework for IMS LD UoLs reconstruction, the framework described can be applied to reconstruct any UoL to any particular target EML. Both the process mining step and the adaptive rules mining from variable values are totally independent from the target language. In fact, process mining retrieves graph-based structures independent from IMS LD. On the one hand, graphs are based on Petri nets, which is the most used formalism for modelling processes. On the other hand, a decision tree algorithm is used to get the adaptive rules that will guide the students along the UoL. The learned knowledge is represented through binary trees and, thus, not tied to the specificity of IMS LD rules. The last step of this framework, i.e., the combination of these two models into the target language, is the only dependency between the reenginering process and the target EML. Nevertheless, the algebra that we are using —explained in Section 4.8— in the reconstruction of the IMS LD is not so different from any particular EMLs —if -then-else,AND,OR,sums, etc—. Hence, it is possible to modify the knowledge applied in the last step of the reeinginering process in order to reconstruct an UoL from any particular VLE to any particular EML.
4.6. Mining the learning flow from event logs 111 4.6 Mining the learning flow from event logs The goal of process mining is to automatically obtain a process model that specifies the relations between activities from concurrent processes. Therefore, the aim of the process discovery algorithm in the reconstruction of the IMS LD is to identify the workflow that represents the learning flow followed by the learners during the UoL [11]. To achieve this objective, the process discovery algorithm only needs to consume the log in XES format —as this is the standard format for process mining— and it will retrieve a learning flow representing the behavior recorded in the event log. From the perspective of process mining [103], the quality of a learning flow is measured taking into account the following criteria: •Fitness replay, which indicates how much of the behavior observed in the event log can be reproduced by the discovered learning path. A discovered learning path is considered complete when it can reproduce all the events contained in the log database. In order to guarantee a feasible and correct reconstruction of IMS LD UoLs, all the activities undertaken by the learners have to be included in the mined learning flow. Additionally, from the educational point of view, in order to guarantee feasible and correct evaluations of the learning paths, teachers need to access to all the activities performed by learners. Therefore, the fitness replay of discovered learning paths is a hard requirement. •Precision, which measures if the discovered learning path allows an additional behavior that is not represented in the log, i.e., behaviour never undertaken by the students. Thus, a discovered learning path is considered as precise when it cannot reproduce events that are not available in the log database. From the point of view of the learners’ evaluation, this kind of learning paths are desirable, but it is not a requirement as hard as the fitness replay: the additional learning paths are not needed for the reconstruction of the IMS LD control structure, since they did not happen. Our focus is on the exact behavior of the learners, i.e., what they really did, not in the prediction of their behavior; therefore we want to avoid overly-general models. •Simplicity, which refers to discovered learning paths with the minimal structure that reflects the behavior contained in the log database. A desirable requirement for process discovery is to obtain simple learning flows, since the simpler is the discovered learning flow, the easier is to reconstruct the IMS LD control structure.
112 Chapter 4. Recompiling Learning Processes from Event Logs I IV II yes no III ProDiGen End Step Description IBuild the initial population II Evaluate each solution III Stopping conditions fulfilled? IV Generate the new population Figure 4.3: Simplification of the main steps of ProDiGen. In general all process discovery algorithms make assumptions regarding the event log and, hence, the emphasis on these three different quality dimensions. For example, Heuristics Miner [153] usually retrieves models with high levels of precision, but lacking fitness replay and/or simplicity. Another example is the ILP miner [138] that guarantees a perfect replay fitness but resulting in very complex models. Inductive Miner [71], on the other hand, can guarantee a perfect replay fitness and high levels of simplicity, but the precision is low. Overall, a large amount of work has been done in this specific area by addressing different algorithms from different points of view. However, in this paper, and considering the three previous criteria and their importance when mining a learning process, we selected ProDi- Gen [147] as process mining algorithm. ProDiGen is a genetic algorithm for process discovery that focuses its search towards solutions that replay all the behavior as possible, with high levels of precision and simplicity. In order to better understand how this algorithm works, Figure 4.3 shows a simplification of its mains steps: i) the initialization of the population; ii) the evaluation of the individuals; iii) the stopping criteria; and iv) the generation of the new population. The evolutionary cycle involves the II, III and IV steps, where the population evolves based on a fitness function. Finally, the algorithm stops whether it reaches a maximum number of generations, or it gets stuck on a local minimal solution for a certain number of times. 4.6.1 ProDiGen The first step in any evolutionary algorithm is the initialization of the population. In this phase, a population is created with a group of individuals where each individual is a potential solution, e.g., a learning flow. In ProDiGen, each individual of the population codifies a learning path using a causal matrix representation, which can be easily translated into a Petri
4.6. Mining the learning flow from event logs 113 net [30]. In terms of causality, both the Petri net and the causal matrix represent the same behavior —which learning activities enable the execution of other learning activities. Figure 4.4 shows an example of the mapping between a Petri net (Figure 4.4(a)) and its respective causal matrix (Figure 4.4(b)). This causal matrix has a row for each learning activity tin the log, and two columns corresponding to the inputs, I(t), and outputs, O(t), of the activity. The input and output sets are composed of several subsets, modelling the following relations: •In the same subset: –Tasks in the same subset of the conditional function O(t)have an OR-split relation. –Tasks in the same subset of the conditional function I(t)have an OR-join relation. •Between different subsets: –Tasks in different subsets of the conditional function O(t)have an AND-split relation. –Tasks in different subsets of the conditional function I(t)have an AND-join relation. Once the initial population is created through heuristics based on the local information of the log, the individuals —causal matrices— of the population are modified through crossover and mutation operations to create new potential solutions, i.e., learning flows. These operators D B C A E start end (a) Example of a Petri net. Task I(Task) O(Task) A{} {{D},{C B}} B{{A}} {{E}} C{{A}} {{E}} E{{D},{B,C}} {} D{{A}} {{E}} (b) Causal matrix of the Petri net. Figure 4.4: Mapping of a Petri net into a causal matrix. This Petri net represents the learning flow of an UoL about polymorphism. The name of the activities are: Read about polymorphism (A), Exercise 1 (B), Exercise 2 (C), Answer test (D) and Exam (E).
114 Chapter 4. Recompiling Learning Processes from Event Logs add and/or remove5causal dependencies of the individual by modifying the input and output conditional functions of the tasks. Then, these new individuals are evaluated based on a fitness function. In ProDiGen, the quality of an individual is measured taking into account fitness replay, precision, and simplicity, as ordering criteria, respectively. Hence, when contrasting two possible solutions, fitness replay is the primary ordering criteria. When two solutions have the same fitness replay, precision is used to decide the best solution. Finally, when two solutions have the same fitness replay and precision, simplicity is the decisive criterion. Thus, when two solutions have to be compared, the individual with highest fitness replay will be the benefited one. If the values for the fitness replay are equal for both solutions, the second parameter to be checked is the precision, and, if the same as before occurs, the last one to be compared is the simplicity. Note that if we change the hierarchical order of the fitness measure, the algorithm may find a different solution, as fitness replay, precision and simplicity are three opposed objectives [147]. 4.7 Mining adaptive rules from event logs Using log files of VLEs can help to determine who has been active in the course, what they did, and when they did it. In this section we use these data to obtain the adaptive rules of the UoLs that determine the learning flow and the contents and services presented to students. Unfortunately, the log files provided by VLEs do not follow a standard and therefore a generic solution cannot be formulated for such purpose. In fact, log files are seldom used mainly because it is difficult to interpret and exploit them. In most of the cases, the data aggregated are incomplete or even not logged. Taking this into account, in this section we describe our approach based on the extract of the log file represented in Figure 4.5. This log was recorded in OPENET4LD [151], and exemplifies the typical elements saved by VLEs. Of course, the records formats or even how they are stored may vary, e.g., Moodle saves this information in tables of a relational database—, but usually VLEs present very similar information. This particular example has two parts. On the one hand, the first four records represent the execution of activities and contain information about the UoL id, its name, the user that performed the activity, the execution time, and the specific name of the activity, among other information. On the other 5For example, the mutation operation can add a new subset into the output function of a task t, resulting in an AND-split.
4.7. Mining adaptive rules from event logs 115 (3, ’UOLID 201’, ’GeoQuiz3’, ’root’, ’2013-10-14 01:44:51’, ’13193839-3ddf-41e2-a4b8-7af8dc13d059’), (4, ’UOLID 201’, ’GeoQuiz3’, ’root’, ’2013-10-14 01:44:52’, ’e4901d0f-8232-4cce-a166-20e29133d279’), (5, ’UOLID 201’, ’GeoQuiz3’, ’root’, ’2013-10-14 01:44:52’, ’e4901d0f-8232-4cce-a166-20e29133d279’), (6, ’UOLID 201’, ’GeoQuiz3’, ’d9’, ’2013-10-14 01:44:52’, ’e4901d0f-8232-4cce-a166-20e29133d279’), ... (289, ’OPENET RMI SOID 0’, ’UOLID 201’, ’setproperty’, ’2013-10-14 01:59:30’, ’user 2’, ’d2’, ’Student’, ’ locpers property 12 ’, ’Answer1’, ’locpers property’, ’string’, ’Venezuela’), (290, ’OPENET RMI SOID 0’, ’UOLID 201’, ’change property value 0’, ’2013-10-14 01:59:30’, ’user 2’, ’d2’, ’Student’, ’ locpers property 1 ’, ’Value1’, ’locpers property’, ’integer’, ’2’), (291, ’OPENET RMI SOID 0’, ’UOLID 201’, ’change visibility’, ’2013-10-14 01:59:30’, ’user 2’, ’d2’, ’Student’, ’ learning activity 5 ’, ’flow3’, ’locpers property’, ’boolean’, ’false’), (292, ’OPENET RMI SOID 0’, ’UOLID 201’, ’setproperty’, ’2013-10-14 01:59:33’, ’user 2’, ’d2’, ’Student’, ’ locpers property 13 ’, ’Answer2’, ’locpers property’, ’string’, ’Siria’), ... Figure 4.5: Example of a text-based log file. hand, the last four records represent events on the properties used by the UoL. Specifically, each one of these records contains information about the UoL id, the operator that favor the change, the type of the property, and the new assigned value. 4.7.1 Identification of variables and activities The identification of variables and activities is highly dependent on the type of events recorded in the log files. Since each VLE may record the events in a different format, the syntactic patterns used to identify these events are usually different. For example, the identified variables are highlighted in Figure 4.5. In this case, a simple regular expression with the keywords ”setproperty” and ”change visibility” were used to identify the variables, but a different pattern should be used to identify these same variables in an XML-based log file. However, the main issue in the identification of variables is that they are not always recorded in the log files. When this situation happens, the mechanism for learning the adaptation rules presented in this section cannot be applied. 4.7.2 Determining the variable values for each activity In the ideal situation, each time an event is produced, i) the state of the variables is saved in a log file. This means that, e.g., at the end of an activity the values of the variables of a UoL are stored in the corresponding log file. Moreover, ii) in this context a value change is also
116 Chapter 4. Recompiling Learning Processes from Event Logs considered an event and so is also recorded. However, reality is different and usually both mechanisms are not supported at the same time —e.g., in the log extract of Figure 4.5 only variable changes are included. The variables values are subsequently associated to an activity, so we can determine the state of the properties before and after the activity is performed. Therefore, each time a variable value changes we must determine when and by who it was modified. In this procedure, the time of the event is crucial since it will determine the initial value of variables in the next activity. 4.7.3 Learning rules with a decision tree IMS LD rules use the following grammar to define the learning flow adaptation: rule ::= IF <expression> THEN <action> | IF <expression> THEN <action> ELSE <action> | IF <expression> THEN <action> ELSE <rule> In addition, IMS LD declares three types of actions: action ::= SHOW <activity_id> | HIDE <activity_id> | <property_id> = <value> The first and second actions are used to make visible or invisible a learning/support activity, activity structure, play, item, or environment. It’s the main adaptation mechanism of IMS LD used to hide or show a part of the UoL based on some expression value. The last type of expression is a simple assignment. IMS LD grammar for expressions include logical operators, and,or, and not, some comparative operators, ≤,<,=,6=. >, and ≥, and some multiplicative and additive operators. Moreover, it also defines operators to check specifics of UoLs. For instance, to verify if a play, act, or activity has already finished, or, e.g., the specific role of users. In this paper, the identification of the adaptive rules is performed by means of the J48 decision tree algorithm [95]. We selected this type of algorithm because of its simplicity, performance, and especially because adaptive rules can be transformed to a decision tree. As previously mentioned, IMS LD adaptive rules have an if-then-else structure very similar to the right part of Figure 4.6, which can be deduced from the graph structure returned by a decision tree algorithm. A decision tree is a graph-like structure in which each internal node
4.7. Mining adaptive rules from event logs 117 represents a test on an attribute, each branch represents the outcome of the test and each leaf node represents the class label —or decision taken after computing all attributes. A path from the root to the leaf represents classification rules, and in our case, an adaptive rule. Transforming a decision tree to an adaptive rule is straightforward since these trees can easily be modelled as DNF (Disjunctive Normal Form) rules. For instance, the right part of Figure 4.6 shows the corresponding rules for this tree. Specifically, each branch is converted into a rule, where: •The condition is set as the conjunction of the arc tests of a branch. •The action of the rule is the leaf node of the branch —class/decision. •The disjunction of all the rules has the semantics of the decision tree. Notice that the rules extracted by the J48 support most of the grammar of IMS LD —logical and comparative operators—, although this is not the main objective here. In fact, we selected decision trees because they provide a simple but also generic grammar, that should be compatible with most of the adaptation mechanisms used in legacy systems. Therefore, it does not make sense to learn, e.g., IMS LD specific operators. There are however some limitations since we do not cover complex conditions that combine mathematical operators. Tree complexity has its effect on the accuracy and is usually determined by the total number of nodes, total number of leaves, depth of tree, and number of attributes used in the tree IF T1 <= 40 THEN visible (Task 1) IF T1 > 40 AND T1 <= 80 AND T2 <= 50 THEN visible (Task 2) IF T1 > 40 AND T1 <= 80 AND T2 > 50 THEN visible (Task 3) IF T1 > 40 AND T1 > 80 THEN visible (Task 4) T1 <= 40 T1 > 40 T1 <= 80 T1 > 80 T2 <= 50 T2 > 50 Task 1 Task 2 Task 3 Task 4 Figure 4.6: Transformation of a decision tree to a DNF rule base.
124 Chapter 4. Recompiling Learning Processes from Event Logs 4.8.4 Consistency of role-parts In order to check that role-parts are correctly defined we must verify that: •All the activities included in the role-part have the same role. •The groups identified in the role part are in parallel. Since the conditions are similar to those imposed to plays, we will not detail the algorithm used to verify the consistency of role-parts. For instance, the node 10 pointed by the parent node 00 is a valid configuration since the activity Ais in parallel with the activities Band C. As aforementioned, all configurations that are valid at the play level are also valid at this level, but, in addition, nodes must also be compatible with its parent node. Therefore, if the parent node is 11, the node 10 would no longer be a valid configuration. 4.8.5 Consistency of activities In IMS LD, activities can be simple or structured as sequences or selection of activities. Taking this into account, Algorithm 4.4 checks that all the groups verify one of these categories. Specifically, the function activity only checks that the group has q unique element. The function sequence verifies that the elements of the group are in sequence, in the same way as Algorithm 4.3 checks that all the acts of a play are in sequence. Finally, the function selection checks the last activity structure of IMS LD. Notice that selections are a complex structure since they combine two patterns, such as a choice between several activities (simple or complex), and a loop, so students may select the same activity more than once. The main issue here is that process mining algorithms are not able to detect this pattern as it is modelled in Algorithm 4.4: activities. Input: nis the node to evaluate Data: Mis the causal matrix obtained during the process mining procedure Output: A boolean that indicates if the node verifies the UoL constraints of IMS LD. 1foreach group k of the parent node of n do 2g←the groups defined in nthat are contained in the father group k 3foreach group giin g do 4if not activity(gi)or not sequence(gi)or not selection(gi)then 5return false
4.8. IMS LD reengineering 125 Algorithm 4.5: Selection. Input: gis the group of activities to evaluate Data: Mis the causal matrix obtained during the process mining procedure Output: A boolean that indicates if the group verifies the selection structure of IMS LD. 1if length(g)<2then 2return false 3foreach activity aiin g do 4if aiis not in a choice with another activity in g then 5return false 6if father node is a selection then 7return false IMS LD [151]. Instead they usually detect partial choices and combine them with multiple loops. In order to identify this pattern from the logs we just need to detect if the activities are in a choice with any other activity in the selection since the loops spread the choice dependencies, lines 3-5 of Algorithm 4.5. Finally, we do not allow the concatenation of selections (lines 6-7) since they do not change the behaviour of the net and just complicate the design: a subselection can be moved to a father selection without changing the behaviour of the control construct. For instance, Figure 4.9 represents different ways in which process mining may retrieve A B C (a) Choice of activities. A B C (b) Selection where the activities are in choice and in a loop. B A C (c) Selection where one of the branches is a sequence of two activities with two loops. Figure 4.9: Three different ways of representing a selection. Transitions colored in gray represent the activities of the UoL.
126 Chapter 4. Recompiling Learning Processes from Event Logs a selection of three activities. Figure 4.9(a) depicts the simplest selection pattern in which the three activities complete for the tokens of their input place and thus only one of them can be chosen. In Figure 4.9(b), the first branch also includes a loop, and thus students can select more than one activity. Finally, Figure 4.9(c) combines a choice, a loop, and a sequence structure. Notice, that our algorithm detects both the three cases since activities A,B, and C share the same input. 4.9 Results The validation of the presented approach has been done with a set of UoLs with different degrees of complexity. In a first batch, four UoLs of the Degree of Computer Science, at the University of Santiago de Compostela, were performed in the real environment of OPENET4LD [151] by students. To complete the dataset, we selected another five UoLs, collected by the Open University in the Netherlands from different European projects6, and simulated their behaviour in OPENET4LD environment but with virtual students. All UoLs were generated in IMS LD, half of the units were performed in a real environment by students while the other half was simulated, and logs were recorded by OPENET4LD7. The objective of this experiment is to recompile the UoLs in IMS LD format and minimize information loss. Table 4.1 lists the nine UoLs tested, on the basis of their activities, structures of activity, acts, plays, and properties, ranging from UoLs with one only act to UoLs with several acts and different activity structures: •AutomatonClass is an adaptative UoL about Automata Theory and Formal Languages. •TALF is another UoL on the topic of Automata Theory and Formal Languages. •Boeing is an UoL about the safety regulations when removing certain parts of a Boeing engine (simulated). •Cam specifies the activities and exercises needed to complete a lecture (simulated). •Driving specifies the process of a driving school (simulated). •Programming is about learning imperative programming. 6http://dspace.ou.nl/handle/1820/16/ 7Logs and Petri nets available at http://tec.citius.usc.es/SoftLearn/Compiling.html
4.9. Results 127 Table 4.1: Structural features of the UoLs that have been used in the experiment. Activity structures UoL #LA #ST #AC #PL #RU #PR Sequence Choice Parallelism Loop PeerReview 14 7 2 1 10 15 X X X Cam 10 2 3 1 7 13 X X X POO 9 3 6 1 6 12 X X X X Driving 7 3 5 1 3 5 X X Boeing 10 5 4 1 9 12 X X X AddWork 7 2 3 1 3 8 X X Automaton 9 2 5 1 7 9 X X X TALF 11 5 7 1 8 9 X X X Programming 4 1 2 1 2 4 X X X #LA, #ST, #AC, #PL, #RU, and #PR stands for the number of activities, structures of activity, acts, plays, rules and properties, respectively. •POO is a UoL about learning object oriented programming. •PeerReview explains the interaction in a peer review process (simulated). •AddWork represents a quiz with different outcomes depending on the results (simulated). Summarizing, four of the UoLs belong to courses of the Computer Science degree, while the remaining UoLs were taken from tutorials, seminars, and workshops previously recorded in OPENET4LD. 4.9.1 Process mining results In order to check the efficiency of ProDiGen for learning flows discovery, we have conducted an experiment with the nine UoLs shown in Table 4.1 that have been undertaken in the OPENET4LD environment. OPENET4LD collects all the events generated by the learners when they perform the learning activities of an UoL, and then, with the OPENET4LD Adapter, we transform this behavior into a XES log. Although some of these UoLs are designed to be undertaken by several roles collaborating among them, ProDiGen discovers the learning flow related to each role. Table 4.2 shows the number of instances —traces— of each example. As we can see, only Drive and Programming UoL have less than 100 instances, i.e students that have participated in the courses. The remaining units are in between 120 and 190 instances,
128 Chapter 4. Recompiling Learning Processes from Event Logs Table 4.2: Number of instances of each UoL. PeerReview Cam POO Driving Boeing AddWork Automaton TALF Programming #instances 186 186 190 97 134 120 120 144 42 Table 4.3: Performance of the genetic algorithm for learning flow discovery. UoLs PeerReview Cam POO Driving Boeing AddWork Automaton TALF Programming Fr1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 P0.85 0.85 0.90 1.00 0.95 0.82 0.90 1.00 0.86 (#A,#P,#T)(15,7,6) (38,13,13) (36,12,18) (26,10,11) (24,10,10) (36,15,16) (34,12,17) (34,12,17) (37,13,16) which is enough to perform with a high degree of confidence the mining process —for both the models and the rules (Section 4.9.2). The performance of ProDiGen over the UoLs has been measured taking into account completeness —fitness replay—, precision and simplicity with two metrics of the state of the art. For completeness, we use the proper completion measure [105], which is the fraction of properly completed process instances. Proper completion (C) takes a value of 1 if the mined model can process all the traces without having missing tokens or tokens left behind. On the other hand, to measure the simplicity, we used the alignment precision (P) defined in [124]. For the simplicity, we show the number of arcs (#A), places (#P) and transitions (#T) of the retrieved Petri net. Table 4.3 shows the results of ProDiGen over the 8 UoLs. As can be seen, ProDiGen is able to retrieve, for all the cases, a model that perfectly fits the behavior of the recorded event logs, i.e the fitness replay is equal to one in all the UoLs. Moreover the precision of the mined models is high, which indicates that the models do not underfit the log, i.e., they do not show much more behavior than the actually observed in the logs. Related to these precision levels, in none of the cases the retrieved model is the overfitted trace model, a solution that creates a path for each trace of the log, which can be seen with the simplicity measure —the number of actual transitions and arcs. 4.9.2 Rules mining results A ten fold cross-validation has been performed for each one of the rules of each UoL detailed in Table 4.1. Table 4.4 details the results of the adaptive rules mining. We can see that, in
4.9. Results 129 Table 4.4: Performance of the adaptive rules mining, where the percentage shows the instances that have been correctly classified by the rule learned by the decision tree. Rule id Correctly PeerReview 1 100% 2 86.02% 3 100% 4 98.39% 5 88.07% 6 95.70% 7 100% 8 53.22% 9 100% 10 95.70% Driving 1 97.93% 2 90.72% 3 86.60% Rule id Correctly Cam 1 100% 2 100% 3 98.82% 4 97.93% POO 1 100% 2 99.47% 3 100% 4 100% 5 100% Programming 1 100% 2 100% Rule id Correctly Boeing 1 89.55% 2 74.62% 3 95.52% 4 79.10% 5 72.39% 6 88.06% TALF 1 100% 2 100% 3 100% 4 100% 5 100% 6 100% 7 86.81% Rule id Correctly AddWork 1 100% 2 100% Automaton 1 99.17% 2 100% 3 100% 4 100% 5 100% 6 100% 7 100% 54.54% of the cases, the rule did classify correctly the 100% of the instances. In fact, the results are quite good considering that in 77.27% of the cases at least 90% of instances were correctly categorized, percentage that even grows to 90.91% if we consider the cut level of 80%. Only four cases obtain less positive results. Specifically, three of them are in the Boeing UoL and one in the PeerReview UoL. For instance, one of the rules of the Boeing UoL in this situation is defined as follows: visible_Test_components = false: false visible_Test_components = true | visible_Test_hazard = false: true | visible_Test_hazard = true | | Lessons_components_counter <= 1 | | | visible_Extra_Lessons_hazards = false | | | visible_Extra_Lessons_hazards = true | | Lessons_components_counter > 1: false As we can see, this rule uses four different variables to correctly classify 72.39% of the instances. In this and the other cases in which the learning process obtained weaker results, the number of examples were clearly insufficient to get the convergence of the algorithm. How-
130 Chapter 4. Recompiling Learning Processes from Event Logs Table 4.5: Results of the reengineering process. PeerReview Cam POO Driving Boeing AddWork Automaton TALF Programming #solutions 2 12 9 90 2 394 44 55 2 Time (ms) 184531 10960 29476 603 1162 2273 7003 65335 144 ever, it would be misleading to point out that the number of variables is the unique factor, since most of the other units have rules with a similar number of variables. In these cases, we concluded that the complexity of the rule has more influence and would require a greater number of examples to obtain better results. Finally, it should be mentioned that learning these rules is usually a difficult task, since the criteria used for the adaptation are not always clear. For instance, in many cases the instructor does manually the adaptation and not always with a uniform criteria. However, in these cases rules mining may achieve a secondary objective since it will precisely clarify these criteria from the event logs. 4.9.3 Reenginering results Table 4.5 shows the results of the reengineering part of our proposal. As we can see, the processes were recompiled successfully for all UoLs. It should be noted the huge number of solutions that can be derived from the causal matrix in some of the cases. For instance, there are 394 different possibilities to structure a valid UoL from AddWork logs. There is a simple explanation: IMS LD is mainly structured with parallels and sequences. Plays and role-parts are parallel structures, while acts and sequences of activities are an ordered list of elements. Therefore, the number of possible combinations grows as the number of parallels and sequences increases. Notice that there would be even more solutions if we did not limit the concatenation of selections between a father and a child node. The time required to obtain all the results depends on two factors. On the one hand, the net complexity, i.e the greater is the number of structures, the more combinations. On the other hand, the structures of activities play an important role in computational time since they increase the depth of the search tree. Therefore, it is not surprising that PeerReview and TALF UoLs need more time since the have more structural elements and activities. It should be noted that, from a practical viewpoint, it does not make sense to show all the
4.10. Conclusions and Future Work 131 reengineering results to an instructor. For instance, the selection of the most suitable structure from the 394 solutions returned for the AddWork UoL would be unmanageable for an instructor without a proper way to filter the results. For this reason, solutions are ordered according to criteria identified in [37]. In this study, participants were asked to transform a given textual design description into an IMS LD UoL. The analyses identified a number of conceptual structures which presented challenges to teachers’ understanding, e.g., the management of role-parts. Specifically, in our proposal we use the following ordering criterion: •Simplicity. UoLs with fewer structural elements take precedence. •Plays precedence. Plays and role-parts are used to define parallel structures within a UoL, but plays have precedence over role-parts. •Acts precedence. Acts and activity-structures are used to define sequences of activities within a UoL, but acts have precedence over activity-structures. 4.10 Conclusions and Future Work In this paper we have proposed a global approach that facilitates the reuse of UoLs defined in legacy systems or VLEs. Our solution has been implemented to support the mining of event log files (i) to obtain the learning flow, formalized as a Petri net, and performed by students and instructors, and (ii) to identify the adaptation rules, represented as decision trees, used to adapt the learning flow to each student. An important feature of the described approach is its independence from any target EML, although in this paper the reengineering part of the framework is tied to IMS LD. However, it is sufficient to define the translation, from the Petri net models to the specific process representation, and from the decision tree to the rules grammar used by the EML, to have a compete specification of the UoL. In fact, as future work we plan to use this framework to recompile the same event logs to a different EML, such as ADL SCORM. To validate this approach, we tested our framework with 9 UoLs with different degrees of complexity. Specifically, the three parts of the reengineering approach have been analyzed separately. Firstly, we showed that process mining is a good solution to retrieve a process structure from a set of event log files. Specifically, ProDiGen had a precision greater than 90% in most of the cases, and where the worst precision was of 82%. These high precision values minimize the number of UoLs obtained by the reengineering process. Secondly, the
132 Chapter 4. Recompiling Learning Processes from Event Logs identification of the adaptive rules also obtained very good results. In fact, the exact rule was extracted in most of the analyzed cases and at least 80% of the instances correctly classified in nearly all the remaining cases. Finally, we must mention that the correct IMS LD structure was retrieved for all the analyzed UoLs. It should be remarked that a secondary objective of this paper is to facilitate the reuse of UoLs but from the perspective of instructors. In this sense, our system only requires the participation of instructors to select the most suitable process structure from the set of solutions recompiled by our framework. Notice that this is still a difficult task, since instructors do not always have a deep knowledge of how IMS LD structures a UoL. This decision is more complex as the number of recompiled structures, that match the logs, grows. Therefore, as future work we plan to define some criteria, in addition to those identified in [37], to order the recompiled UoLs, making this selection easier. So far our experience makes us think that the complexity is in the activities part of the UoL, since plays, acts, and role-parts are usually not considered when designing a UoL in non-IMS LD environments. However, this point must still be verified.
CHAPTER 5 CONCLUSIONS Log Process hierarchization Process simplification Chapter 2 Chapter 3 Chapter 4 Role part 2 Role part 1 Act 2 Act 1 Play Chapter 1: Introduction Process discovery Chapter 5: Conclusions In this PhD dissertation we have addressed the problem of automatic discovery of process models. Particularly, we have focused on obtaining models, in general domains, with high levels of replay fitness, precision and simplicity, while paying special attention in retrieving highly interpretable process models. For this purpose, we first developed ProDiGen, a genetic algorithm tailored towards the search of process models with high levels of replay fitness, precision, and simplicity. Using the results retrieved by ProDiGen, we then focused on retrieving high interpretable process models. To this end, we proposed two different approaches. On the one hand, we developed SLAD, a local search algorithm to improve the readability of an already discovered process model through the inclusion of duplicate labels. On the other hand, we developed a framework for the hierarchization of process models, providing a well known structure to a process model. More specifically, regarding the latter, the discovery of hierarchical process models is enabled through the inclusion of domain knowledge. The main conclusions can be summarized as follows: