<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Taking on Infrequent Behavior in Event Logs using Hypothesis Tests</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Patrizia Schalk</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Lisa Petrak</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Augsburg</institution>
          ,
          <addr-line>Universitätsstraße 6a, 86159 Augsburg</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>When an event log is generated based on the real-life data of an existing process, there is a high probability that apart from events that happen frequently and therefore should be represented in the process model, infrequent behavior is featured in the event log that would make a model generated from this log hardly readable. There are many process discovery algorithms that work with such outliers by filtering infrequent behavior just before or during the creation of an appropriate process model. Less common methods make use of statistical tests to detect infrequent behavior in a preprocessing step. This paper aims to simplify the use of hypothesis tests introduced by Petrak et al. and proposes an approach to delete infrequent behavior without generating unwanted side efects for the process model. Furthermore, we solve a problem regarding the use of hypothesis tests for a process that contains loops and compare the results of hypothesis tests to well-known discovery techniques.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Process Mining</kwd>
        <kwd>Process Discovery</kwd>
        <kwd>Filtering Outliers</kwd>
        <kwd>Detection of Infrequent Behavior</kwd>
        <kwd>Hypothesis Test</kwd>
        <kwd>Directly Follows Graph</kwd>
        <kwd>Loop Shortening</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>Finding mathematical models for real-life processes is a highly relevant task, since such models
can easily be analyzed in a way that shows exactly where the process has its weaknesses and
where it can be optimized. However, constructing such a process model by hand leads to results
that describe what the process should look like instead of how it actually looks. Therefore, it is
highly desired to create such models automatically and analyze them afterwards, so there is no
bias present in the model. To automatically construct such a model, a record of the behavior of
the process, e.g. in the form of an event log, is needed. However, there are several challenges
that make it hard to construct a model from an event log, especially if such a model has to meet
some criteria like being readable.</p>
      <p>
        One example of such a challenge is the existence of outliers in the event log – data that is
present in the log but is so infrequent that it does not belong to the important parts of a process.
Related to the existence of outliers is the existence of noise – data in the event log that cannot
occur in the process. There are several causes for noise, such as human error ("I meant to log
a diferent task than I actually did") or technical failure ("A part of the system shut down and
didn’t log a status during a period of time"). While noise is erroneous behavior and should not
be featured in the event log, outliers can very well be part of the actual behavior of the process.
However, removing edge cases of the event log promises to make the remaining behavior and
therefore a suitable process model more clear and readable. Finding such a reasonable model
despite the existence of outliers in the event log is the task of process discovery. Most such
techniques handle noise by using heuristics or by setting thresholds for the maximum amount of
behavior that may be deleted [
        <xref ref-type="bibr" rid="ref1 ref2 ref3 ref4 ref5 ref6">1, 2, 3, 4, 5, 6</xref>
        ]. Fewer discovery techniques make use of statistical
theory to detect infrequent behavior in event logs [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
      </p>
      <p>
        As mentioned before, a discovered model needs to meet some quality measures. For example,
we want a process model that is able to replay most of the behavior present in the event log
(but not everything, since infrequent behavior should be excluded) – this trait is measured by
the fitness of a process model. However, fitness alone is not enough for a good process model,
since we can accomplish perfect fitness by simply allowing every behavior, even behavior
that has nothing to do with the process. Therefore, another quality measure is the precision,
which ensures that the process model cannot replay way more than is present in the event
log. The notion of generalization describes how open the model is for reasonable extensions,
i.e. behavior that was not recorded in the log but can happen in the process. Finally, a process
model should be simple and easy to read, so that a human can understand and analyze it –
this trait is measured by the simplicity of the discovered process model. More information on
quality measures for process models can be found in [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
      </p>
      <p>
        In this paper, we continue research on the question of how to discover a "good" process
model for the main behavior of an event log by filtering out infrequent behavior. The idea to
use hypothesis tests to find such outliers in an event log was presented in [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], where one-sided
hypothesis tests are used to decide whether the direct neighborhood of two events should
be classified as main or infrequent behavior. However, the approach of said paper creates
unwanted side efects by deleting single events out of a trace and therefore creating new direct
neighborhood relations that might be simply wrong. We present a new approach without this
problem that is graphical, therefore easy to follow, and gives the user more power over the
result he wishes to get. We first lay the foundation for our approach by defining needed notions
in Section 2 and revisit the general idea to use hypothesis tests to find infrequent behavior
in Section 3 by simplifying the used techniques described in [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] and investigating a running
example that is small and easy to follow. In Section 4 we propose to use a Directly Follows Graph
to represent the directly follows relations between events after we detected infrequent direct
neighbors using hypothesis tests and show how we can delete infrequent behavior without
risking side efects. We address a problem concerning loops that feature many iterations in the
event log in Section 5 and propose a simple solution that is based on the well-studied Chinese
Postman Problem [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. Section 6 evaluates the results by comparing the accomplished fitness,
precision, generalization and simplicity with those of well-known discovery techniques, namely
the Inductive Miner infrequent [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] and the Directly-Follows Miner [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], with which our approach
shares similar ideas. Section 7 concludes the paper.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Basic Definitions</title>
      <p>We denote the set of natural numbers {1, 2, 3, . . . } by N and define N0 := N ∪ {0}. For an
arbitrary set  we call  :  → N0 a multiset over  . For any  ∈  , () is the number
of occurences of the element  in the multiset . We write  ∈  if this number is greater
than zero, i.e.  ∈  :⇔ () &gt; 0. We also write a finite multiset  over  with elements
1, . . . ,  in the form [1(1), . . . ,</p>
      <p>()].</p>
      <p>
        Definition 1 (Event, Trace, Event log [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]). Let  be a set of activity names. A sequence of
activities  = ⟨1, . . . , ⟩ ∈  * is called a trace. An activity  ∈  is contained in  if it occurs
in  at any time, i.e.  ∈  :⇔  = ⟨1, . . . , ⟩ ∧ ∃ ∈ {1, . . . , } :  = . For an arbitrary
trace  = ⟨1, . . . , ⟩ ∈  * with  ≥ 1 we define  ( ) := 1 and ( ) := .
An event log  :  * → N0 over  is a multiset of traces. The occurrence of an activitiy  ∈  in
 is called an event.
      </p>
      <p>
        Regarding a real-life process, we give every event that takes place a name, which can be an
artificial one (like , , , . . . ) or a descriptive one (like _). A trace then describes a
sequence of events that happened for a special case, e.g. for a customer or a general object.
Definition 2 (Ordering relations [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]). Let  be an event log over a set of activities  . For
any ,  ∈  we introduce the following binary causal relations on  :
•  &gt;  if and only if  is directly followed by  somewhere in a trace  in , i.e. if a trace
 = ⟨1, . . . , ⟩ ∈  and a number  ∈ {1, . . . ,  − 1} exist, with  =  and +1 = 
•  →  if and only if  &gt;  and  ≯  
•  ←   if and only if  ≯   and  &gt; 
•  #  if and only if  ≯   and  ≯  
•  ‖  if and only if  &gt;  and  &gt; .
      </p>
      <p>From these ordering relations &gt; will be of great interest for us, since we want to investigate
the neighborhood of two events and decide whether two events directly following each other
happen often (i.e. main behavior) or rarely (i.e. infrequent behavior). To do so, we need to know
how often two events follow each other, which we can store in the Correlation Matrix:
Definition 3 (Correlation matrix). Let  be an event log over  with ,  ̸∈  .
Further, take  :=  ∪ {},  :=  ∪ {} and  := ⟨⟩, the empty trace. We denote the
number of times  ∈  is directly followed by  ∈  in all traces contained in  by |(, )|&gt; .
The correlation matrix for an event log  is defined as the square matrix  :  ×  → N0
with
, =
⎪⎧|(, )|&gt; if ,  ∈ 
⎪
⎪⎪⎨∑︀ ∈∖{ },( )= ( ) if  = Start,  ∈ 
⎪⎪∑︀ ∈∖{ },( )= ( )
⎪
⎪⎩( )
if  ∈  ,  = End
if  = Start,  = End.</p>
      <p>Recall that  is a multiset and hence, for any  ∈ , ( ) denotes the number of times the trace
 is contained in .</p>
      <p>Apart from the Correlation Matrix, we can store the information related to which events
are directly followed by one another in the Directly Follows Graph, which is a simple directed
graph containing all events as vertices. Two vertices  and  are connected by an edge (, ) if
somewhere in the event log  is directly followed by . The weight on the edge shows how
often this happens in the event log.</p>
      <p>Definition 4 (Directly Follows Graph). Let  be an event log over a set of activities  . The
Directly Follows Graph (DFG) for  is a weighted directed graph  = (, , ) with
•  :=  ∪ {, },
•  := &gt; ∪ {(, ) | ∃ ∈  :  =  ( )}</p>
      <p>∪ {(, ) | ∃ ∈  :  = ( )} and
•  :  → N0, ((, )) := ,.</p>
      <p>
        An example for a Directly Follows Graph will be given in Figure 1 in Section 4, where
we first need the DFG. A useful property of the DFG is that it can easily be translated to a
language-equivalent Petri-net. Leemans et al. [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] showed that if the DFG is sound, the respective
language-equivalent Petri-net is also sound.
      </p>
      <p>
        Definition 5 (Soundness of the Directly Follows Graph [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]). Let  = (, , ) be a DFG
for an event log .  is sound if every node  ∈  is on a path from  to , i.e.
∀ ∈  : ∃1, . . . ,  : 1 =  ∧
 =  ∧
∃ ∈ {1, . . . } :  =  ∧
∀ ∈ {1, . . . ,  − 1} : (, +1) ∈
      </p>
      <p>As a running example for this paper we take a set of activities  = {, , , } and an artificial
event log  which is defined as</p>
      <p>= [⟨, , , ⟩100, ⟨, , ⟩50, ⟨, , ⟩100, ⟨, ⟩1000, ⟨, ⟩1000, ⟨, , , , , ⟩100].
To construct the Correlation Matrix, we simply count how often an event 1 ∈  is followed
by an event 2 in the event log and add this quantity to the Correlation Matrix in row 1 and
column 2.</p>
      <p>The artificial event  () is used to record how often an event  ∈  is the first (last)
event in a trace of . The Correlation Matrix is very handy to calculate values needed for the
execution of hypothesis tests, which are described in the next section.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Hypothesis Tests</title>
      <p>
        Rather recently, Petrak et al. [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] showed in their article that hypothesis tests can be used
to determine whether the direct neighborhood of two events that was observed in the event
log should be classified as infrequent behavior, i.e. noise, or not. We shortly revisit this idea,
simplify it slightly, and give some simple examples that show how this method difers from
simply considering the direct neighborhood that is the least frequent in the event log as noise.
      </p>
      <p>Generally speaking, hypothesis tests can be used to check whether a certain hypothesis is
valid with a "suficiently high" probability. Such a hypothesis makes a statement about a certain
property of the objects in a population. As a simple example, take the set of all researchers in
the field of process mining as the population and the statement "At least 80% of researchers in the
ifeld of process mining like process discovery" . Since this is a statement that can’t be proved or
falsified without asking every single researcher in the population (which would be a rather costly
operation) one could easily doubt the correctness of this statement. So next to the already stated
Null-Hypothesis 0, we formulate an Alternative Hypothesis 1 stating the contrary: "Less than
80% of researchers in the field of process mining like process discovery" . To check which of the two
hypotheses is correct, we take a small sample of the population and check how many researchers
of this population like process discovery. We then perform a left-sided hypothesis test to check
whether this sample implies that the Null-Hypothesis 0 or the Alternative Hypothesis 1 is
true.</p>
      <p>
        In general, let  ∈ [
        <xref ref-type="bibr" rid="ref1">0, 1</xref>
        ] be an unknown probability (in our example the actual percentile of
researchers who love process discovery) and 0 ∈ [
        <xref ref-type="bibr" rid="ref1">0, 1</xref>
        ] a parameter given by the user (in our
example 0 = 0.8). Using data from a sample of the population, a left-sided hypothesis test
can be used to decide whether  ∈ [0, 0[ or  ∈ [0, 1] is true, i.e. whether the Null Hypothesis
0:  ≥ 0 or the Alternative Hypothesis 1:  &lt; 0 is true. Since a hypothesis test comes to
this decision based on a sample of the full data, there is a certain probability that the wrong
decision will be made. The probability that this happens can be estimated, making it possible to
formulate rather reliable statements about which of the two hypotheses holds.
      </p>
      <p>
        The probability that we chose 1 when in reality 0 is true is called the  -error; the
probability that we chose 0 when in reality 1 is true, is called  -error. In the context of this
paper, we are especially interested in the  -error, which can be bounded by a given  when using
hypothesis tests. We then want to find a value  such that for a random variable  (which can
be understood as the number of elements in a random sample that fulfill the property defined in
0)  ( ≤  | 0 is true) ≤  is true. The values of  for which this inequality holds can be
determined by using the density-function of the given probability distribution. However, since
this computation is quite time-consuming, we use an approximation for  if said probability
distribution is a binomial distribution and the standard-deviation   := √︀ · 0 · (1 − 0)
satisfies   &gt; 3. In this case, we approximate  by
 = ⌈0 −   · 1−  ⌉,
(1)
where 1−  is the (1 −  )-quantile of the standard normal distribution. A more formal
description of hypothesis tests can be found in [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ].
      </p>
      <p>
        To detect noise in an event log, Petrak et al. [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] understand the neighborhood relation
between two events as a binomial distribution and use hypothesis tests to check whether the
sighting of two events 1, 2 ∈  directly following each other is main behavior (0 is true)
or infrequent behavior (1 is true). To achieve this, they define the population as the pairs
(, ′) ∈  that can follow each other in the process and where  = 1 or ′ = 2 and view the
event log as a sample where some of these direct neighborhoods were randomly drawn. Hence,
the population is defined as:
      </p>
      <p>(1,2) := {(, ) ∈  ×  | ( = 1 ∨  = 2) ∧ |(, )|&gt; &gt; 0},
which defines the sample size  as the number of events that can follow 1 or can be followed
by 2 in the process:
 := |(1,2)| = ∑︁ |(1, )|&gt; + ∑︁ |(, 2)|&gt; − | (1, 2)|&gt; .</p>
      <p>∈ ∈
With the user-given constants 1 − 0 and  they then execute a right-sided hypothesis test,
which means, for a pair of events (1, 2), they estimate  by ⌈0 −   · 1−  ⌉ and decide
for 0 when  − | (1, 2)|&gt; &lt; . Since this is equivalent to estimate  by the formula in
Equation 1 and deciding for 0 when |(1, 2)|&gt; &gt; , we can instead perform a left-sided
hypothesis test with the probability 0 as described at the start of this section.</p>
      <p>
        With this idea we can calculate the critical value  for which  ( ≤  | 0 is true) ≤ 
holds and check afterwards whether |(1, 2)|&gt; &gt; . If this is true, we accept the Null
Hypothesis 0 and consider 2 directly following 1 as main behavior. Otherwise, we reject the Null
Hypothesis, which means we accept the Alternative Hypothesis 1 and consider 2 directly
following 1 as infrequent behavior. However, if   ≤ 3, we need to calculate the critical value
by evaluating the binomial distribution and finding a  for which the integral of the density
function from 0 to  is less than 1 −  . For a more detailed description of this idea, see [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] and
[
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. Using these ideas leads to the procedure shown in algorithm 1.
◁  &gt; 0, so |(1, 2)|&gt; &gt; 0.
      </p>
      <p>It is notable that in this example the direct neighborhood of the events  and  has the lowest
frequency, but the result of the hypothesis test implies that  being directly followed by  is
main behavior. This is due to the fact that  is only followed by  or  and  is only preceded by
 or . The number of sightings where  precedes  or  follows after  is rather small, so that
the neighborhood between  and  can be considered as main behavior.
100
150
1100</p>
      <p>1000

1
0
0</p>
      <p>Executing the hypothesis test for every pair of events leads to the result that the pairs
(, ), (, ), (, ), (, ) and (,  ), of direct neighbors are infrequent. Petrak et al.
propose to simply delete these direct neighborhood relations from the footprint and use the
footprint that was constructed in this way to mine a process model.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Using the results to construct a DFG</title>
      <p>We use the approach presented by Petrak et al., but construct a Directly Follows Graph (see
Definition 4) instead of a footprint. Gaining a Petri-net from a DFG is rather simple, and we can
easily check the soundness of a DFG by performing two Depth First Searches, which gives us
the possibility to easily construct a DFG that is sound.</p>
      <p>By applying the hypothesis tests to the event log with Algorithm 1 we immediately get a
set  ⊆ ( ∪ {, })2 of direct neighbors that are part of the main behavior of the
event log and a set  ⊆ ( ∪ {, })2 of direct neighbors that are infrequent behavior.
Obviously, no direct neighborhood can be both main and infrequent behavior, so  ∩  = ∅.
Let  = (, ) be the DFG for our event log. Since we only add behavior to  or  if we have
seen the direct neighborhood at least once in the event log,  ⊆  and  ⊆  hold. On the
other hand, due to the definition of , there is no pair of events in  ∪  that is not present in
, since  contains every pair of direct neighbors that was observed in the event log. Therefore,
we can conclude that  ∪  = . The DFG for our running example is shown in Figure 1, the
black edges are those of the set  and the highlighted edges are those of the set .
300
200
50
100
150
1000



150
100</p>
      <p>100
2000</p>
      <p>When deleting edges from the DFG, we need to be careful, since the deletion of the whole set
 may lead to a result that is not sound according to Definition 5. This is also the case for the
DFG in Figure 1, since without all the highlighted edges, the events  and  do not lie on a path
from  to . A process model constructed directly from such a DFG is not sound, so the
goal is to delete as many infrequent edges as possible without sacrificing the soundness of the
DFG. Deleting every highlighted edge except the edges (,  ) and (, ) leads to the
result shown in Figure 2.</p>
      <p>1
0
0</p>
      <p>In general, it is not always clear which set  ⊆  should be deleted from the DFG, since the
deletion of an edge  could lead to a situation where other edges are needed for soundness,
whereas said edges would not be needed if  wasn’t deleted. Finding the "best" subset of  to
delete from the DFG is a dificult problem, since it is not clear when one subset is better than
another. If we define a function  : () → N0 which maps every subset of  to a numerical
value, where a high value indicates that the subset is a better candidate for deletion than another
candidate with a lower value, we have an optimization problem at hand: Maximize  ( ) where
′ = (,  ∖  ) is a sound DFG and  ⊆ . As a default for  we propose  ( ) := | |, so that
edge sets that contain more infrequent edges are preferred for deletion. A naive implementation
that solves this problem can be found in Algorithm 2.</p>
      <p>Algorithm 2 Deleting infrequent edges from the DFG
Input:  = (, ), ,  ⊆  with  ∪  =  and  ∩  = ∅,  : () → N0
Output: ′ = (, ′)</p>
      <p>←
end if
end for
return (,  ∖ )
 ← ∅
for each  ⊆  do
′′ ← (,  ∖  )
if  ( ) &gt;  () and ′′ is sound then</p>
      <p />
      <p>This algorithm needs (2|| · (| | + ||)) time and is therefore exponential in time, but since
the number of infrequent edges, and therefore the cardinality || of , is rather small in the
most cases, we accept this naive implementation, since it allows for an easy exchange of the
user-given function  that should be optimized, and is easy to read. In our running example,
this algorithm leads to the sound DFG shown in Figure 2.</p>
    </sec>
    <sec id="sec-5">
      <title>5. Handling of Loops</title>
      <p>As can be seen in the example of Figure 1, loops in the DFG can have a high impact on the
population for our hypothesis tests. In this example, executing the loop between  and  some
times artificially increases the number of times when  was preceded by another event than
 and the number of times when after  followed another event than . Even though the
edges (,  ) and (, ) are only encountered in the same trace as the edges (, ) and
(,  ), the repetition of this loop leads to the efect that (,  ) and (, ) are classified as
infrequent behavior. In the example of Figure 1 this is not a problem, since these two infrequent
edges are not deleted for the sake of soundness. However, the following simple event log shows
that we are not always in such a lucky situation:
⟳ = [⟨, , . . . , , ⟩10, ⟨, , , ⟩40, ⟨, , ⟩100]</p>
      <p>Executing hypothesis tests on this log leads to the classification of the direct neighborhood
between  and  as infrequent.</p>
      <p>Every other direct neighborhood is classified as main behavior by the hypothesis tests, so we
get the DFG for ℒ that is shown in Figure 3.</p>
      <p>Check (, ) ∈&gt;⟳ :
⇒ (, ) ∈&gt;⟳ is infrequent behavior.</p>
      <p>Deletion of the highlighted edge would not violate the soundness of the DFG, but doing so
would remove the entire behavior of  being followed by one or more s, which is followed by a
single . This is a problem, since the neighborhood (, ) would not be classified as infrequent
behavior if the event log would feature fewer iterations of the -loop:</p>
      <p>To eliminate this problem, we propose a preprocessing step for the hypothesis tests to reduce
the number of loop iterations if there is a loop present in the process. To do so, we alter the
traces of our event log that contain such a loop for the hypothesis tests. The idea is to construct
a DFG for this single trace and find a path from  to  that cycles less frequently through
the loop in the trace, if this is possible. To do so, we firstly introduce the notion of a Trace DFG:
Definition 6 (Trace DFG).
multigraph  = (, ) with</p>
      <p>Let  = ⟨1, . . . , ⟩ be a trace. The Trace DFG for  is a directed
•  := {, } ∪ {1, . . . , } and
•  : ( ∪ {, })2 → N0,
((1, 2)) =
{︃1
|{ |  = 1 ∧ +1 = 2}|
if 1 =  or 2 = 
otherwise</p>
      <p>For a trace  , the Trace DFG is therefore the DFG of the log [ ], where the edge weights of
said DFG are interpreted as multiple edges. The Trace DFG for the trace ⟨, , , ⟩ for example
is a simple path, the Trace DFG for the trace ⟨, , . . . , , ⟩ is shown in Figure 4.
⏟51 tim⏞es
50</p>
      <p>To reduce the number of loop iterations in the Trace DFG we first introduce a new, artificial
edge from  to , as shown by the dashed dart in Figure 4. The resulting multigraph 
is eulerian, which means there is a eulerian cycle in .</p>
      <p>Theorem 1. Let  ∈  * be a trace and  = (, ) the Trace DFG of  . Then, the graph
′ = (,  ∪ {(, )} is eulerian, i.e. contains a eulerian cycle.</p>
      <p>Proof. By construction of the Trace DFG,  is a path from  to  that uses every edge
in  exactly once. With the artificial edge (, ) in ′ this path becomes a cycle that
uses every edge in ′ exactly once, i.e. a eulerian cycle.</p>
      <p>
        Since this extended Trace DFG ′ is eulerian, we can find the shortest cycle through ′ that
uses every type of edge in ′ at least once, but no more than the multiplicity of the edges allow.
The problem of finding this shortest cycle is known as the Chinese Postman Problem, which
was introduced by Edmonds et al. [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] and can be solved in (| |3) time. In the example for ⟳ ,
the shortest cycle is (, , , , , , ), which cycles only once through the loop at
the vertex . From this cycle we can easily construct the shortened trace ⟨, , , ⟩ that features
less loop iterations than the original trace and hence does not disrupt the hypothesis tests. We
therefore use this trace instead of the original trace to execute the hypothesis tests and find
that the neighborhood (, ) is main behavior. However, when constructing the DFG for ⟳ ,
we calculate the multiplicities based on the original (i.e. not shortened) traces.
      </p>
    </sec>
    <sec id="sec-6">
      <title>6. Evaluation</title>
      <p>
        We implemented the algorithm described in this paper in python, version 3.8, using the process
mining library pm4py [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. The latter provides functions to calculate the fitness, precision,
generalization and simplicity for a given Petri net. To calculate these quality-measures, we used
the following techniques provided by pm4py:
• Fitness: The alignment-based fitness is computed and the percentage of completely fit
traces is returned, as well as the average fitness value of the single traces,
• Precision: The Align-ETConformance is computed and returned, see [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ],
• Generalization: Computed as described in [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ],
• Simplicity: Computed as described in [15].
      </p>
      <p>To check the Petri net for soundness, the external tool WOFLAN [16] is used. Aside from
pm4py there are other tools, like Entropia [17], that are also interesting for eficient and robust
conformance checking. We plan to investigate these tools in the future and use them to further
evaluate our results.</p>
      <p>We chose some real-life event logs that are often used to evaluate new process discovery
techniques, to test and compare our implementation to other mining-techniques. We used
• BPI_Challenge_2012.xes (BPI12), which can be found at [18],
• DomesticDeclarations.xes (DD),
• InternationalDeclarations.xes (ID),
• PermitLog.xes (PL),
• PrepaidTravelCost.xes (PTC),
• RequestForPayment.xes (RFP), all of which can be found at [19].</p>
      <p>
        We also compared our approach to the technique presented in [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], where hypothesis tests
are executed, and all infrequent edges are deleted from the DFG without the goal to maintain
soundness. For this approach, we chose 0 = 0.95 and  = 0.05, so the hypothesis tests are
performed exactly like with the new technique.
      </p>
      <p>Since the DFM and our approach result in a DFG instead of a Petri net, we also need to
convert the DFG into a Petri net to compute the quality measures as implemented in pm4py. To
do so we constructed a labeled Petri net  = (, , , ) from a DFG  = (, , ) as follows:
• For each node  ∈  a place  ∈  is added.
• For each edge (, ) ∈  × ( ∖ {}), a transition , ∈  with (,) =  is added.
• For each edge (, ) ∈  × { }, we also add an edge , ∈  . However, this is
a silent transition, i.e. (,) =  .</p>
      <p>• Finally, for each transition , ∈  two arcs are added: (, ,) ∈  and (,, ) ∈  .</p>
      <p>The results of executing the algorithms and the conformance checking methods on the
resulting Petri nets can be found in Figure 5. For all evaluated methods and logs, Fitness and
Generalization were similarly good. Simplicity also showed consistently good values, except for
a few very good results from the DFM. The percentage of fitting traces was consistently very
good for DFM, while the other techniques achieved variously good values for diferent logs. The
largest diferences between the methods were observed for the Precision and the F-Score. Here,
the results for diferent logs vary greatly for the DFM, while IMi achieves rather low results.
Both of our new approaches achieve very good values most of the time in these two categories.</p>
      <p>
        It is notable that the approach of [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] (which we call HT) always leads to a better precision
than our new approach, which is not surprising considering that we leave some infrequent
edges in the graph to maintain soundness. For example, if there is a single trace featuring much
infrequent behavior, from which almost everything is deleted from the DFG except for an edge
, it is possible to use this edge  in the resulting Petri Net, even though it does not fit to any
behavior seen in the event log. Due to the higher precision, the F-Score is also better than in
our approach. Further, the simplicity of the net mined by HT is often much higher than in the
new approach, simply because more edges are deleted. However, contrary to our new approach,
HT never led to a sound net for any of the tested event logs.
      </p>
      <p>IMi scores similary to our approach, except for precision and therefore F-Score. This is due to
the fact that IMi classifies edges as infrequent with a rather local argument – the frequency of an
edge is compared to the frequencies of all other outgoing edges, but not to the frequencies in the
full graph. Hence, IMi may often delete single edges from many traces. For example, for the very
simple event log [⟨, , ⟩], it can easily be forced to delete the edge (, ) by introducing a trace
⟨, , ⟩  +1 to the event log. Then, the edge (, ) in the DFG becomes infrequent compared
to the other outgoing edge (, ) and is therefore deleted. Then, the trace ⟨, , ⟩ can not be
replayed, which leads to a worse fitness, but the trace ⟨, , ⟩ can be replayed, even though it
is not present in the event log.</p>
      <p>With the user-chosen threshold that afects the behavior of the DFM, we have direct control
over the fitness of the mined model, so this metric features always very good values. However,
since DFM deletes only traces and not single edges, it seems odd that the precision of DFM is
as low as it is for some event logs. This may be associated with the fact that in the DFG there
is exactly one vertex for every event present in the event log, and therefore some traces that
share an event name but have nothing else in common lead to a Petri net where traces can be
replayed that are not part of the event log. However, our approach shares the same problem
concerning the DFG, which makes it unclear why the precision of our approaches have a much
higher precision most of the time. To investigate this behavior further could be an interesting
task for future work.</p>
      <p>When comparing the simpler version of our method to the one with loop reduction, it can be
seen that both versions achieve similar results, which can be explained by the structure of the
chosen event logs. It may be interesting to investigate further how the two variants difer on
event logs with many loops.</p>
      <p>During the execution of the diferent algorithms, the times required to construct a model
in each case were measured. These do not include the calculation of the metrics that were
afterwards calculated on it. In Table 2, all execution times are given in seconds. Hence, for all
event logs and algorithms evaluated, a result could be calculated within a few seconds.</p>
    </sec>
    <sec id="sec-7">
      <title>7. Conclusion</title>
      <p>
        In this paper, we revisited the use of hypothesis tests of Petrak et al. [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] to detect infrequent
neighborhood relations in a given event log. We proposed a simpler variant for these tests in
the form of a left-sided hypothesis test and changed the output to a Directly Follows Graph
instead of a footprint, in order to be able to selectively remove infrequent behavior without
destroying the soundness of the resulting DFG. Furthermore, we showed theoretically that
high loop iterations in an event log can lead to undesired results of the hypothesis tests and
solved this problem by implementing a preprocessing step that reduces the number of loop
iterations to an amount small enough that the sample size used for the hypothesis tests is not
bloated by the loop. The proposed techniques are very easy to understand and implement. We
compared both the hypothesis tests without loop-shortening and the hypothesis tests with
loop-shortening with the results of the old technique using hypothesis tests [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], the Inductive
Miner infrequent [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] and the Directly Follows Miner [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] and found that our results for fitness,
precision, generalization, simplicity and F-score are rather consistent and high – also compared
to these techniques.
      </p>
      <p>Further research should include the evaluation of logs with high loop iterations to verify that
the shortening of loops is not only reasonable in theory, but also in practice. It is interesting how
often the loop-shortening is relevant in real-life logs and under what circumstances (concerning
the underlying process) the necessity of loop-shortening is probable. Also, there are some
more techniques that outliers before mining a process model [20, 21, 22], some of which also
use statistical ideas. It would be very interesting to see how our approach competes to these
techniques. Since the DFG loses information on concurrency, a preprocessing step to detect
concurrency may be a topic of further research – as well as the investigation on the existence
of event logs that lead to bad results with our approach due to concurrency.
[15] F. R. Blum, Metrics in process discovery, 2015.
[16] W. M. P. van der Aalst, Woflan: A Petri-net-based Workflow Analyzer, Systems analysis
modelling simulation 35 (1999) 345–357. URL: https://publications.rwth-aachen.de/record/
714622.
[17] A. Polyvyanyy, H. Alkhammash, C. D. Ciccio, L. García-Bañuelos, A. A. Kalenkova, S. J. J.</p>
      <p>Leemans, J. Mendling, A. Mofat, M. Weidlich, Entropia: A Family of Entropy-Based
Conformance Checking Measures for Process Mining, CoRR abs/2008.09558 (2020). URL:
https://arxiv.org/abs/2008.09558. arXiv:2008.09558.
[18] B. van Dongen, BPI Challenge 2012, 2012. URL: https://data.4tu.nl/articles/dataset/
BPI_Challenge_2012/12689204/1.
doi:10.4121/uuid:3926db30-f712-4394-aebc75976070e91f.
[19] B. van Dongen, BPI Challenge 2020, 2020. URL: https://data.4tu.nl/collections/
BPI_Challenge_2020/5065541/1.
doi:10.4121/uuid:52fb97d4-4588-43c9-9d043604d4613b51.
[20] R. Conforti, M. L. Rosa, A. H. t. Hofstede, Filtering Out Infrequent Behavior from Business
Process Event Logs, IEEE Transactions on Knowledge and Data Engineering 29 (2017)
300–314. doi:10.1109/TKDE.2016.2614680.
[21] X. Lu, D. Fahland, W. M. van der Aalst, Interactively Exploring Logs and Mining Models
with Clustering, Filtering, and Relabeling, in: BPM, 2016.
[22] D. Brons, R. Scheepens, D. Fahland, Striking a new Balance in Accuracy and Simplicity
with the Probabilistic Inductive Miner, in: 2021 3rd International Conference on Process
Mining (ICPM), 2021, pp. 32–39. doi:10.1109/ICPM53251.2021.9576864.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>S. J. J.</given-names>
            <surname>Leemans</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Fahland</surname>
          </string-name>
          ,
          <string-name>
            <surname>W. M. P. van der Aalst</surname>
          </string-name>
          ,
          <article-title>Discovering Block-Structured Process Models from Event Logs Containing Infrequent Behaviour</article-title>
          , in: Business Process Management Workshops - BPM 2013 International Workshops, Beijing, China,
          <year>August 26</year>
          ,
          <year>2013</year>
          ,
          <string-name>
            <given-names>Revised</given-names>
            <surname>Papers</surname>
          </string-name>
          , volume
          <volume>171</volume>
          <source>of Lecture Notes in Business Information Processing</source>
          ,
          <year>2013</year>
          , pp.
          <fpage>66</fpage>
          -
          <lpage>78</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>C. W.</given-names>
            <surname>Günther</surname>
          </string-name>
          ,
          <string-name>
            <surname>W. M. P. van der Aalst</surname>
          </string-name>
          , Fuzzy Mining -
          <article-title>Adaptive Process Simplification Based on Multi-perspective Metrics</article-title>
          , in: Business Process Management,
          <year>2007</year>
          , pp.
          <fpage>328</fpage>
          -
          <lpage>343</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>A.</given-names>
            <surname>Weijters</surname>
          </string-name>
          , W. Aalst, van der,
          <string-name>
            <surname>A. Alves De Medeiros</surname>
          </string-name>
          ,
          <article-title>Process mining with the HeuristicsMiner algorithm</article-title>
          , BETA publicatie : working papers,
          <source>Technische Universiteit Eindhoven</source>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>A. J. M. M. Weijters</surname>
            ,
            <given-names>J. T. S.</given-names>
          </string-name>
          <string-name>
            <surname>Ribeiro</surname>
          </string-name>
          ,
          <article-title>Flexible Heuristics Miner (FHM)</article-title>
          ,
          <source>in: 2011 IEEE Symposium on Computational Intelligence and Data Mining (CIDM)</source>
          ,
          <year>2011</year>
          , pp.
          <fpage>310</fpage>
          -
          <lpage>317</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>S. J. J.</given-names>
            <surname>Leemans</surname>
          </string-name>
          , E. Poppe, M. T. Wynn,
          <source>Directly Follows-Based Process Mining: Exploration &amp; a Case Study</source>
          , in: International Conference on Process Mining,
          <string-name>
            <surname>ICPM</surname>
          </string-name>
          <year>2019</year>
          , Aachen, Germany, June 24-26,
          <year>2019</year>
          , IEEE,
          <year>2019</year>
          , pp.
          <fpage>25</fpage>
          -
          <lpage>32</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>S. J. J.</given-names>
            <surname>Leemans</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Fahland</surname>
          </string-name>
          ,
          <string-name>
            <surname>W. M. P. van der Aalst</surname>
          </string-name>
          ,
          <article-title>Discovering Block-Structured Process Models from Incomplete Event Logs</article-title>
          , in: G. Ciardo, E. Kindler (Eds.),
          <source>Application and Theory of Petri Nets and Concurrency - 35th International Conference, PETRI NETS</source>
          <year>2014</year>
          , Tunis, Tunisia, June 23-27,
          <year>2014</year>
          . Proceedings, volume
          <volume>8489</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2014</year>
          , pp.
          <fpage>91</fpage>
          -
          <lpage>110</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>L.</given-names>
            <surname>Petrak</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Lorenz</surname>
          </string-name>
          ,
          <article-title>Detecting Infrequent Behavior in Event Logs using Statistical Inference</article-title>
          ,
          <source>in: Proceedings of the International Workshop on Algorithms &amp; Theories for the Analysis of Event Data</source>
          <year>2020</year>
          , June 24,
          <year>2020</year>
          , volume
          <volume>2625</volume>
          <source>of CEUR Workshop Proceedings</source>
          ,
          <year>2020</year>
          , pp.
          <fpage>33</fpage>
          -
          <lpage>48</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>J.</given-names>
            <surname>Carmona</surname>
          </string-name>
          ,
          <string-name>
            <surname>B. F. van Dongen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Solti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Weidlich</surname>
          </string-name>
          , Conformance Checking - Relating
          <source>Processes and Models</source>
          , Springer,
          <year>2018</year>
          . URL: https://doi.org/10.1007/978-3-
          <fpage>319</fpage>
          -99414-7. doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>319</fpage>
          -99414-7.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>J. R.</given-names>
            <surname>Edmonds</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E. L.</given-names>
            <surname>Johnson</surname>
          </string-name>
          , Matching,
          <article-title>Euler tours and the Chinese postman</article-title>
          ,
          <source>Math. Program. 5</source>
          (
          <year>1973</year>
          )
          <fpage>88</fpage>
          -
          <lpage>124</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>W. M. van der Aalst</surname>
            ,
            <given-names>B. F. van Dongen</given-names>
          </string-name>
          ,
          <article-title>Discovering Petri Nets from Event Logs</article-title>
          ,
          <source>in: Transactions on Petri Nets and Other Models of Concurrency VII</source>
          , Springer,
          <year>2013</year>
          , pp.
          <fpage>372</fpage>
          -
          <lpage>422</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>G.</given-names>
            <surname>Hornsteiner</surname>
          </string-name>
          , Daten und Statistik,
          <article-title>Eine praktische Einführung für den Bachelor in Psychologie und Sozialwissenschaften</article-title>
          . Berlin/Heidelberg (
          <year>2012</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>A.</given-names>
            <surname>Berti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. J. Van</given-names>
            <surname>Zelst</surname>
          </string-name>
          ,
          <string-name>
            <surname>W. van der Aalst</surname>
          </string-name>
          ,
          <article-title>Process Mining for Python (pm4py): bridging the gap between process-and data science</article-title>
          , arXiv preprint arXiv:
          <year>1905</year>
          .
          <volume>06169</volume>
          (
          <year>2019</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>A.</given-names>
            <surname>Adriansyah</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Munoz-Gama</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Carmona</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Dongen</surname>
          </string-name>
          , W. Aalst,
          <article-title>Measuring precision of modeled behavior</article-title>
          ,
          <source>Information Systems and e-Business Management</source>
          <volume>13</volume>
          (
          <year>2014</year>
          ).
          <source>doi:10.1007/s10257-014-0234-7.</source>
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>J.</given-names>
            <surname>Buijs</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Dongen</surname>
          </string-name>
          , W. Aalst, Quality Dimensions in Process Discovery: The Importance of Fitness, Precision, Generalization and Simplicity,
          <source>International Journal of Cooperative Information Systems</source>
          <volume>23</volume>
          (
          <year>2014</year>
          )
          <article-title>1440001</article-title>
          . doi:
          <volume>10</volume>
          .1142/S0218843014400012.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>