Abstract
In this paper, we propose DeepAlign, a novel approach to multiperspectiveprocess anomaly correction, based on recurrent neural networks andbidirectional beam search. At the core of the DeepAlign algorithm are tworecurrent neural networks trained to predict the next event. One is readingsequences of process executions from left to right, while the other is readingthe sequences from right to left. By combining the predictive capabilities ofboth neural networks, we show that it is possible to calculate sequencealignments, which are used to detect and correct anomalies. DeepAlign utilizesthe caselevel and eventlevel attributes to closely model the decisions withina process. We evaluate the performance of our approach on an elaborate datacorpus of 30 realistic synthetic event logs and compare it to threestateoftheart conformance checking methods. DeepAlign produces bettercorrections than the rest of the field reaching an overall accuracy of 98.45%across all datasets, whereas the best comparable stateoftheart methodreaches 70.19%.
Quick Read (beta)
DeepAlign: Alignmentbased Process Anomaly Correction using Recurrent Neural Networks
Abstract
In this paper, we propose DeepAlign, a novel approach to multiperspective process anomaly correction, based on recurrent neural networks and bidirectional beam search. At the core of the DeepAlign algorithm are two recurrent neural networks trained to predict the next event. One is reading sequences of process executions from left to right, while the other is reading the sequences from right to left. By combining the predictive capabilities of both neural networks, we show that it is possible to calculate sequence alignments, which are used to detect and correct anomalies. DeepAlign utilizes the caselevel and eventlevel attributes to closely model the decisions within a process. We evaluate the performance of our approach on an elaborate data corpus of 30 realistic synthetic event logs and compare it to three stateoftheart conformance checking methods. DeepAlign produces better corrections than the rest of the field reaching an overall accuracy of $98.45\%$ across all datasets, whereas the best comparable stateoftheart method reaches $70.19\%$.
Keywords: Business Process Management, Anomaly Detection, Deep Learning, Sequence Alignments
1 Introduction
Process anomaly detection can be used to automatically detect deviations in process execution data. This technique infers the process solely based on distributions of the execution data, without relying on an abstract definition of the process itself. While these approaches can accurately pinpoint an anomaly in a process, they do not provide information about what should have been done instead. Although, the knowledge about the occurrence of an anomaly is valuable, much more value lies in the knowledge of what was supposed to happen and how to avoid this behavior in the future.
Process mining techniques are centered around the notion of a process model that describes the correct behavior of a process. Conformance checking techniques can be utilized to analyze process executions for their conformance with a process model. This method has the benefit of not only detecting deviations from the defined process but also of providing the closest conforming path through the process, thereby correcting it.
The correctness of the conformance checking result depends on the quality of the process model. Furthermore, a correct execution of a process is not necessarily defined by a correct order of process steps but can depend on a variety of other parameters. For example, it might not be allowed that the same person executes two consecutive process steps or a process might differ depending on the country it is being executed in. All these possibilities have to be accounted for both in the process model and the conformance checking algorithm to ensure a correct result. If no process model is available, conformance checking cannot be used and the creation of a good reference model is a timeconsuming task.
An automatic process anomaly correction is therefore desirable, combining the autonomy of an anomaly detection algorithm with the descriptive results from conformance checking. Against this background, we propose the DeepAlign^{1}^{1} 1 Available on GitHub https://github.com/tnolle/deepalign algorithm, which combines these two benefits. It boroughs from the field of anomaly detection and employs two recurrent neural networks (RNN), trained on the task of next event prediction, as an approximate process model. Inspired by the alignment concept from conformance checking, we show that a bidirectional beam search [sun2017bidirectional] can be used to align a process execution with the process model as approximated by the two RNNs.
DeepAlign can not only detect that process steps have been skipped, but it can also predict which process steps should have been executed instead. Furthermore, it does not rely on a reference model of the process, nor any prior knowledge about it. It can be used to automatically detect anomalies and to automatically correct them.
2 Background
Before we describe the DeepAlign algorithm, we must first introduce some concepts from the field of process mining and deep learning.
2.1 Process Mining
Process mining is centered around the idea of humanreadable representations of processes called process models. Process models are widely used in business process management as a tool for defining, documenting, and controlling business processes inside companies.
During the execution of a digital business process, each process step is stored in a database. This includes information on when the process step was executed (timestamp), what process step was executed (activity), and to which business case it belongs (case identifier). These three fundamental bits of event information are the basis for every process mining algorithm and are usually combined into a single data structure called event log.
A log consists of cases, each of which consists of events executed within a process, and some attributes connected to the case (case attributes). Each event is defined by an activity name and its attributes (e.g., a user who executed the event).
Definition 1
Case, Event, and Log. Let $\mathcal{E}$ be the set of all events. A case is a sequence of events $c\in {\mathcal{E}}^{*}$, where ${\mathcal{E}}^{*}$ is the set of all sequences over $\mathcal{E}$ Let $\mathcal{C}$ be the set of all cases. An event log is a set of cases $\mathcal{L}\subseteq \mathcal{C}$.
Event logs can be used to automatically discover a process model. Discovery algorithms analyze the event logs for process patterns and aim to produce a humanreadable process model that likely produced the event log. Multiple discovery algorithms exist, such as the Heuristics Miner [weijters2011flexible] and the Inductive Visual Miner [leemans2014process].
2.2 Alignments
In process analytics, it is desirable to relate the behavior observed in an event log to the behavior defined in a process model. This discipline is called conformance checking. The goal of conformance checking is to find an alignment between an event log and a reference process model. The reference model can be manually designed or be discovered by a process discovery algorithm.
Definition 2
Alignment. An alignment [bose2010trace] is a bidirectional mapping of an event sequence ${\sigma}_{l}$ from the event log to a possible execution sequence ${\sigma}_{m}$ of the process model. It is represented by a sequence of tuples $({s}_{l},{s}_{m})\in ({\mathcal{E}}^{\gg}\times {\mathcal{E}}^{\gg})\setminus \{(\gg ,\gg )\}$, where $\gg $ is an empty move and ${\mathcal{E}}^{\gg}=\mathcal{E}\cup \{\gg \}$. We say that a tuple represents a synchronous move if ${s}_{l}\in \mathcal{E}$ and ${s}_{m}\in \mathcal{E}$, a model move if ${s}_{l}=\gg $ and ${s}_{m}\in \mathcal{E}$, and a log move if ${s}_{l}\in \mathcal{E}$ and ${s}_{m}=\gg $. An alignment is optimal if the number of empty moves is minimal.
For ${\sigma}_{l}=\u27e8a,b,c,x,e\u27e9$ and ${\sigma}_{m}=\u27e8a,b,c,d,e\u27e9$, the two optimal alignments are
$$\begin{array}{cccccc}\hfill a\hfill & \hfill b\hfill & \hfill c\hfill & \hfill x\hfill & \hfill \gg \hfill & \hfill e\hfill \\ \hfill a\hfill & \hfill b\hfill & \hfill c\hfill & \hfill \gg \hfill & \hfill d\hfill & \hfill e\hfill \end{array}\mathit{\hspace{1em}\hspace{0.25em}}\text{and}\mathit{\hspace{1em}\hspace{0.25em}}\begin{array}{cccccc}\hfill a\hfill & \hfill b\hfill & \hfill c\hfill & \hfill \gg \hfill & \hfill x\hfill & \hfill e\hfill \\ \hfill a\hfill & \hfill b\hfill & \hfill c\hfill & \hfill d\hfill & \hfill \gg \hfill & \hfill e\hfill \end{array}$$ 
where the top row corresponds to ${\sigma}_{l}$ and the bottom row corresponds to ${\sigma}_{m}$, mapping moves in the log to moves in the model and vice versa.
2.3 Recurrent Neural Network (RNN)
Recurrent neural networks (RNN) have been designed to handle sequential data such as sentences. An RNN is a special kind of neural network that makes use of an internal state (memory) to retain information about already seen words in a sentence. It is processing a sentence word for word, and with each new word, it will approximate the probability distribution over all possible next words. Neural networks can be efficiently trained using a gradient descent learning procedure, minimizing the error in the prediction by tuning its internal parameters (weights). The error can be computed as the difference between the output of the neural network and the desired output.
After the training procedure, the neural network can approximate the probability distribution over all possible next words, given an arbitrary length input sequence. With slight alterations, RNNs can be applied to event logs, which we will explain further in Sec. 3.
2.4 Beam Search
In natural language processing, it is common to search for the best continuation of a sentence under a given RNN model. To find the most probable continuation every possible combination of words has to be considered which, for a length of $L$ and a vocabulary size of $V$, amounts to ${V}^{L}$ possible combinations. Due to the exponential search space, this problem is NPhard.
Instead, a greedy approach can be taken, producing always the most likely next word given a start of a sentence, based on probability under the RNN. However, this approach does not yield good results because it approximates the total probability of the sentence continuation based only on the probability of the next word. A more probable sentence might be found, when expanding the search to the second most probable next word, or the third, and so on.
Beam search (BS) is a greedy algorithm that finds a tradeoff between traversing all possible combinations and only the most probable next word. For every prediction, the BS algorithm expands only the $K$ most probable sentence continuations (beams). In the next step, the best $K$ probable continuations over all $K$ beams from the previous step are chosen, and so on. For $K=1$, BS is equivalent to the greedy 1best approach explained above. BS has the advantage of pruning the search space to feasible sizes, while still traversing a sufficient part of the search space to produce a good approximation of the most likely sentence continuation.
The BS algorithm is iteratively applied, inserting new words with each step, until convergence, i.e., the end of a sentence is reached, indicated by the end of sentence symbol.
2.5 Bidirectional Beam Search
The BS algorithm continues a sentence until a special end of sentence symbol is predicted. However, if the sentence has a defined beginning and end, this approach cannot be used because a unidirectional RNN only knows about the beginning of the sentence and not the end. This has been demonstrated and been addressed in [sun2017bidirectional] with a novel bidirectional beam search (BiBS) approach. Instead of using a single unidirectional RNN, the authors propose to use two separate unidirectional RNNs, one reading the input sentences forwards, and one reading them backwards.
The problem that arises with a gap in the middle of a sentence is that the probability of the resulting sentence, after the insertion of a new word, cannot be computed by a single RNN without recomputation of the remainder of the sentence. In BiBS, this probability is approximated by the product of the probability of the beginning of the sentence (by the forward RNN), the end of the sentence (by the backward RNN), and the joint probability of inserting the new word (according to both RNNs). The original BS algorithm is extended to expand the search space based on this joint probability, ensuring a proper fit both for the beginning and the end of the sentence.
The BiBS algorithm is iteratively applied to the original sentence, updating it with each step, until convergence, i.e., no insertions would yield a higher probability in any of the $K$ beams.
3 DeepAlign
In this section we describe the DeepAlign algorithm and all its components. An overview of the algorithm is shown in Fig. 1. Two neural networks are trained to predict the next event, one reading cases from left to right (forwards), the other reading them from right to left (backwards). An extended BiBS is then used to transform the input case to the most probable case under the two RNN models. Lastly, an alignment is calculated based on the search history of the algorithm.
3.1 Next Event Prediction
Next event prediction aims to accurately model the decisions being made in a process. These decisions are based on multiple parameters, such as the history of a case, the attributes connected to past events, and the case level attributes. To succeed, a machine learning model must take into account all of these parameters.
In this paper, we propose a new neural architecture for next event prediction. It has been designed to model the sequence of activities (controlflow), the attributes connected to these activities (event attributes), and the global attributes connected to the case (case attributes). Figure 2 shows the architecture in detail.
At the heart of the network is a Gated Recurrent Unit (GRU) [cho2014learning], a type of RNN. This GRU is iteratively fed an event, consisting of its activity and its event attributes, and must predict the corresponding next event. Each categorical attribute is fed through an embedding layer to map the values into a lowerdimensional embedding space. To include the case attributes, we make use of the internal state of the GRU. Instead of initializing the state with zeros (the default), we initialize it based on a representation of the case attributes. All case attributes are transformed by a case attribute network, consisting of two fullyconnected layers (FC), to produce a realvalued representation of the case attributes. In other words, we initialize the next event prediction with a representation of the case attributes, thereby conditioning it to predict events according to these case attributes. Finally, the GRU output is fed into separate FC layers with Softmax activations to produce a probability distribution over all possible attributes of the next event (i.e., the prediction of the next event).
We train the networks with a GRU size equal to two times the maximum case length on minibatches of size $100$ for $50$ epochs using the Adam optimizer with standard parameters [kingma2014adam]. The first layer of the case attribute network has an output size of the GRU size divided by 8 and the second layer output is equal to the hidden state size of the GRU. These parameters were chosen following an exhaustive grid search, however, we found that any reasonable setting generally worked.
3.2 The DeepAlign Algorithm
In the context of processes, the sentences of words from above will become the cases of events from the event log. By replacing the next word prediction RNNs with next event prediction RNNs in the BiBS algorithm we can apply it to event logs. Instead of only predicting the next word, the RNNs will predict the next event, including the most likely event attributes.
Our goal is to utilize the two RNNs as the reference model for conformance checking and produce an alignment between log and the RNNs. Alignments can be interpreted as a sequence of skip (synchronous move), insertion (model move), or deletion (log move) operations. The BiBS algorithm already covers the first two operations, but not the last. To allow for deletions, we have to extend the BiBS algorithm.
Let $\overrightarrow{\text{RNN}}$ be the forward event prediction RNN and $\overleftarrow{\text{RNN}}$ be the backward RNN. Let further $\text{RNN}(h,c)$ be the probability of case $c$ under RNN, initialized with the hidden state $h$.
The probability of a case $c$ under the two RNNs can be computed by
$$P(c)=\frac{1}{2}\left(\overrightarrow{\text{RNN}}({h}_{0},c)+\overleftarrow{\text{RNN}}({h}_{0},c)\right),$$ 
where ${h}_{0}$ is the output of the case attribute network. If no case attributes are available, the initial state is set to zeros. An example is shown in Fig. 3.
For an insertion of an event $e$ at time $t$ in a case $c$, the probability under the two RNNs can be approximated by
${P}_{\text{ins}}(c,e,t)=$  $\mathrm{}\overrightarrow{\text{RNN}}({h}_{0},{c}_{[1:t]})\cdot \overrightarrow{\text{RNN}}({\overrightarrow{h}}_{t},e)$  
$\cdot \overleftarrow{\text{RNN}}({\overleftarrow{h}}_{t+1},e)\cdot \overleftarrow{\text{RNN}}({h}_{0},{c}_{[t+1:T]}),$ 
where $T$ is the total case length, and ${c}_{[1:t]}$ is the index notation to retrieve all events from $c$ until time t, and ${\overrightarrow{h}}_{t}$ is the hidden state of $\overrightarrow{\text{RNN}}$ after reading ${c}_{[1:t]}$. Similarly, ${\overleftarrow{h}}_{t+1}$ is the hidden state of $\overleftarrow{\text{RNN}}$ after reading ${c}_{[t+1:T]}$. An example is shown in Fig. 4.
The probability of deleting $n$ events at time $t$ in a case $c$ can be approximated by
${P}_{\text{del}}(c,n,t)=$  $\mathrm{}\overrightarrow{\text{RNN}}({h}_{0},{c}_{[1:t]})\cdot \overrightarrow{\text{RNN}}({\overrightarrow{h}}_{t},{c}_{[t+n]})$  
$\cdot \overleftarrow{\text{RNN}}({\overleftarrow{h}}_{t+n},{c}_{[t]})\cdot \overleftarrow{\text{RNN}}({h}_{0},{c}_{[t+n:T]}).$ 
An example is shown in Fig. 5.
Algorithm 1 shows the full DeepAlign process of aligning a case $c$ with the two RNNs. The algorithm is initialized with an initial set of beams $B=\{c\}$, i.e., the original case. For each possible operation, the probabilities are computed using the aforementioned equations, and the topK beams are returned. For simplicity, we assume that topK always returns the updated cases according to the operations with the highest probability. The number of events that can be deleted in one step can be controlled with the parameter $N$. This is necessary because successively deleting single events does not necessarily generate higher probabilities than removing multiple events at once.
Algorithm 1 does not yet return alignments, but the topK updated cases. By keeping a history of the topK operations (skip, deletion, and insertion) in every iteration, we can obtain the alignment directly from the history. A deletion corresponds to an empty move on the model, whereas an insertion corresponds to an empty move in the log.
The topK selection in Alg.1 will select the top K beams based on the probability under the RNN models. In case of ties, we break the tie by choosing the beam with less empty moves (insertions and deletions).
4 Experiments
We evaluate the DeepAlign algorithm for the task of anomaly correction. Given an event log consisting of normal and anomalous cases, an anomaly correction algorithm is expected to align each case in the event log with a correct activity sequence according to the process (without anomalies) that produced the event log.
We use a simple paper submission process as a running example throughout the remainder of this paper. The process model in Fig. 6 describes the creation of a scientific paper. It includes the peer review process, which is executed by a reviewer, whereas the paper is written by an author.
To evaluate the accuracy of the corrections, we generated six random process models using PLG2 [burattin2016plg2]. The models vary in complexity with respect to the number of activities, breadth, and width. Additionally, we use a handmade procurement process model called P2P as in [nolle2018binet].
To generate event attributes we create a likelihood graph [bohmer2016multi] from the process models which includes probabilities for event attributes connected to each step in the process. This method has been proposed in [nolle2019binet]. A likelihood graph for the paper process from Fig. 6 is shown in Fig. 7.
For each process step, the probability of the resource executing it is shown in yellow. Depending on the resource, the probabilities of the next process steps are shown in blue. Note that there is a longterm dependency between the steps Develop Hypothesis and Conduct Study, and, similarly, between Develop Method and Evaluate. That is, Conduct Study never eventually follows Develop Method, and, likewise, Evaluate never eventually follows Develop Hypothesis.
We can generate event logs by using a randomwalk through the likelihood graph, complying with the transition probabilities, and generating activities and attributes along the way. In addition to the event attributes, we also generate case attributes, as well as, dependencies between the case attributes and the output probabilities in the likelihood graph. For the paper process, we generate two case attributes, Decision and Topic.
If the topic is Theory, this implies that Develop Hypothesis will occur in a case, whereas if the topic is Engineering, it implies Develop Method will occur. The decision can be Accept, Weak Accept, Borderline, Weak Reject, or Reject. For simplicity, we define that there will only be a Minor Revision if the Decision is either Accept or Weak Accept. There will be no Minor Revision otherwise. We have generated an event log that follows these rules that we use as an example throughout the remainder of the paper. The paper process was not used in the evaluation.
For each of the 7 process models, we generate 4 random event logs with varying numbers of event and case attributes. Additionally, we introduce noise to the event logs by randomly applying one of 7 anomalies to 30% of the cases in the event log. We gather a ground truth dataset for the anomaly correction problem by retaining the original cases before alteration. The 7 anomalies are defined as follows.

•
Skip: A sequence of up to 2 necessary events has been skipped

•
Insert: Up to 2 random activities have been inserted

•
Rework: A sequence of up to 3 events has been executed a second time

•
Early: A sequence of up to 2 events has been executed too early, and hence is skipped later in the case

•
Late: A sequence of up to 2 events has been executed too late, and hence is skipped earlier in the case

•
Attribute: An incorrect attribute value has been set in up to 3 events
To analyze the impact of the case and event attributes we evaluate four different implementations of DeepAlign: one that does not use any attributes (DeepAlign$\mathrm{\varnothing}$), one that only uses case attributes (DeepAlignC), one that only uses event attributes (DeepAlignE), and one that uses both (DeepAlignCE).
Additionally, we evaluate baseline approaches that first discover a process model using a discovery algorithm and then calculate the alignments [adriansyah2013memory]. We chose the Heuristics Miner [weijters2011flexible] and the Inductive Miner [leemans2014process] using the implementations of the excellent PM4Py library [berti2019process]. For completeness, we also evaluate the conformance checking algorithm using a perfect reference model, i.e., the one used to generate the event logs.
We run the DeepAlign algorithm for a maximum number of 10 iterations with a beam size of $K=5$ and a maximum deletion size of $N=3$, and consider the top1 beam for the evaluation. The Inductive Miner and the Heuristics Miner are used as implemented in PM4Py For the Heuristics Miner, we use a dependency threshold of $0.99$.
5 Evaluation
The overall results are shown in Tab. 1. For each dataset we run the algorithms and evaluate the correction accuracy, that is, an alignment is regarded as correct if the model sequence is exactly the ground truth sequence. For correct alignments, we calculate the optimality of the alignment (i.e., if the number of empty moves is minimal). For incorrect alignments, we calculate the distance from the ground truth sequence by the Levenshtein distance. We average over all cases across all datasets.
Controlflow  Case attr.  Event attr.  Accuracy  Optimal  Error  
Reference Model  ✓  ✗  ✗  94.19%  100.00%  2.85 
Heuristics Miner  ✓  ✗  ✗  70.19%  100.00%  3.20 
Inductive Miner  ✓  ✗  ✗  38.76%  100.00%  2.83 
DeepAlign$\mathrm{\varnothing}$  ✓  ✗  ✗  86.10%  99.79%  2.72 
DeepAlignC  ✓  ✓  ✗  95.75%  99.92%  2.47 
DeepAlignE  ✓  ✗  ✓  97.10%  87.41%  2.21 
DeepAlignCE  ✓  ✓  ✓  98.45%  87.23%  2.32 
Interestingly, DeepAlignC, DeepAlignE, and DeepAlignCE all outperform the perfect Reference Model approach. This is because the Reference Model does not contain any information about the case and event attributes. The Heuristics Miner yields much better results in the anomaly correction task than the Inductive Miner, however, DeepAlign$\mathrm{\varnothing}$ outperforms both, without relying on case or event attributes.
Reference Model, Heuristics Miner, and Inductive Miner all produce optimal alignments because the alignment algorithm guarantees it. The DeepAlign algorithm shows a significant drop in alignment optimality when including the event attributes. The drop in optimality can be attributed to the fact that we always predict the top1 attribute value for inserted events in the DeepAlign algorithm. Furthermore, it might be connected to the attribute level anomalies that we introduced as part of the generation. Including the case and event attributes in the reference model has a significant impact on the accuracy of the DeepAlign algorithm. The best results are achieved when including both the case and the event attributes. Table 2 shows the accuracy for each algorithm per dataset.
P2P  Small  Medium  Large  Huge  Gigantic  Wide  
Reference Model  91.49%  98.11%  92.78%  95.50%  94.72%  91.61%  95.14% 
Heuristics Miner  74.25%  85.29%  60.03%  84.32%  75.09%  42.97%  73.13% 
Inductive Miner  54.02%  35.57%  51.50%  55.61%  35.30%  10.08%  29.26% 
DeepAlign$\mathrm{\varnothing}$  72.09%  96.89%  83.74%  90.53%  92.51%  82.23%  84.72% 
DeepAlignC  97.51%  99.61%  92.99%  95.10%  96.79%  92.33%  95.92% 
DeepAlignE  95.89%  99.45%  94.63%  98.00%  98.67%  94.98%  98.08% 
DeepAlignCE  99.25%  99.87%  96.90%  99.05%  99.22%  95.57%  99.28% 
We want to finish the evaluation with examples from the paper dataset to illustrate the results of the DeepAlign algorithm. This is the resulting alignment for a case with a Skip anomaly,
\makecellIdentify  
Problem  $\gg $  $\gg $  Experiment  Evaluate  Conclude  Submit  Review  … 
\makecellIdentify  
Problem  \makecellResearch  
Related  
Work  \makecellDevelop  
Method  Experiment  Evaluate  Conclude  Submit  Review  … 
this is the result for a case with a Late anomaly,
\makecellIdentify  
Problem  $\gg $  $\gg $  Experiment  \makecellResearch  
Related  
Work  \makecellDevelop  
Method  Evaluate  Conclude  Submit  …  
\makecellIdentify  
Problem  \makecellResearch  
Related  
Work  \makecellDevelop  
Method  Experiment  $\gg $  $\gg $  Evaluate  Conclude  Submit  … 
and this is the result for a case with an Insert anomaly.
\makecellIdentify  
Problem  \makecellResearch  
Related  
Work  \makecellRandom  
activity  
10  \makecellDevelop  
Method  Experiment  Evaluate  Conclude  \makecellRandom  
activity  
12  Submit  …  
\makecellIdentify  
Problem  \makecellResearch  
Related  
Work  $\gg $  \makecellDevelop  
Method  Experiment  Evaluate  Conclude  $\gg $  Submit  … 
The DeepAlign method can also be utilized to generate sequences from nothing, that is, to align the empty case with the most likely case according to the model. Depending on the case attributes that are used to initialize the RNNs, the results will be different.
For $\text{Decision}=\text{Reject}$ and $\text{Topic}=\text{Engineering}$ the resulting sequence is $\u27e8$ Identify Problem, Research Related Work, Develop Method, Experiment, Evaluate, Conclude, Submit, Review, Final Decision $\u27e9$, whereas if we set $\text{Topic}=\text{Theory}$ the resulting sequence is $\u27e8$ Identify Problem, Research Related Work, Develop Hypothesis, Experiment, Conduct Study, Conclude, Submit, Review, Final Decision $\u27e9$. The DeepAlign algorithm correctly generates a sequence including the Develop Method and Develop Hypothesis activities according to the setting of the Topic case attribute. It also does not generate the Minor Revision activity because the Decision is Reject. When setting $\text{Decision}=\text{Accept}$, DeepAlign will generate the sequence including the Minor Revision branch. A similar effect can be observed when altering the event attributes.
This demonstrates that the RNNs are indeed capable of learning the rules behind the decisions in the paper process. Although the paper dataset contains unambiguous dependencies between the case attributes and the resulting correct sequences, the overall results on the randomly generated datasets indicate that case and event attributes ought not to be neglected.
6 Related Work
Anomaly detection in business processes is frequently researched. Many approaches exist that aim to detect anomalies in a noisy event log (i.e., an event log that contains anomalous cases).
Bezerra et al. have proposed multiple approaches utilizing discovery algorithms to mine a process model and then use conformance checking to infer the anomalies [bezerra2013algorithms]. Böhmer et al. proposed a technique based on an extended likelihood graph that is utilizing eventlevel attributes to further enhance the detection [bohmer2016multi]. The approach from [bohmer2016multi] requires a clean event log (i.e., no anomalies in the log), but it has been shown that the same technique can be applied to noisy logs as well [nolle2019binet]. Recently, Pauwels et al. presented an approach based on Bayesian Networks [pauwels2019anomaly]. Deep learning based approaches are presented in [nolle2018analyzing] and [nolle2019binet]. However, none of these approaches can be utilized to correct an anomalous case or to produce an alignment.
Since Bezerra et al. presented their approach based on discovery algorithms in 2013, Mannhardt et al. have proposed both a dataaware discovery algorithm [mannhardt2015multi] and a dataaware conformance checking algorithm [mannhardt2016balanced]. The conformance checking algorithm relies on a configurable cost function for alignments that must be manually defined to include the case and event attributes. Our approach does not rely on a manual definition of the cost function, it traverses the search space based on learned probabilities instead.
Although alignments represent the current stateoftheart in conformance checking [adriansyah2013memory], they often pose a significant challenge because they are computationally expensive. Van Dongen et al. address this issue in [dongen2017aligning], compromising between computational complexity and quality of the alignments. Very recently, Leemans et al. have presented a stochastic approach to conformance checking [leemans2019earth], which can speed up the computation.
All of these approaches either rely on a nondataaware discovery technique, require a manual effort to create a proper cost function, or they cannot generate alignments. To the best of our knowledge, DeepAlign is the first fully autonomous anomaly correction method.
7 Conclusion
We have demonstrated a novel approach to calculate alignments based on the DeepAlign algorithm. When no reference model is available, two recurrent neural networks can be used to approximate the underlying process based on execution data, including case and event attributes. The empirical results obtained in the experiments indicate that RNNs are indeed capable of modeling the behavior of a process solely based on an event log event if it contains anomalous behavior.
To the best of our knowledge, this is the first time that deep learning has been employed to calculate alignments in the field of process mining. Although we evaluate DeepAlign in the context of anomaly correction, many other applications are conceivable. For example, instead of training on a log that contains anomalies, a clean log could be used. Furthermore, a clean log can be obtained from an existing reference model, and DeepAlign could be used to find alignments. In other words, it might be possible to convert a manually created process model into a DeepAlign model. A discovery algorithm based on DeepAlign is also imaginable since DeepAlign can also be utilized to generate sequences from scratch. Depending on the case attributes the resulting predicted sequences will be different. We think that this idea lends itself to further research.
We further believe that the DeepAlign algorithm could be employed to reduce the memory consumption of an alignment algorithm since the search space is efficiently pruned during the bidirectional beam search. However, on the downside, DeepAlign does not guarantee optimal alignments. This weakness can be addressed by employing an optimal alignment algorithm between the input sequence and the corrected sequence, albeit at the expense of efficiency.
In summary, DeepAlign is a novel and flexible approach with great application potential in many research areas within the field of process mining.
Acknowledgments
This work is funded by the German Federal Ministry of Education and Research (BMBF) Software Campus project “R2PA” [01IS17050], Software Campus project “KADet” [01IS17050], and the research project “KI.RPA” [01IS18022D].