## 4 A Multi-View Detecting Framework
### View 1: Measuring Control-Flow Similarity  
This section introduces the approach used to calculate similarity for the control-flow relations of activity labels. Redundant activity labels should share similar control-flow relations or ordering patterns. This similarity indicates not only identical control-flow relations but also closed distribution patterns. As shown in Figure 4, the overall idea behind a control-flow view is that, for each pair of activity labels \((a_{i},a_{j})\in A\), we adopt EMD to compare the directly-follows and the strong indirectly-follows relations along with their frequency distributions. Each directly-follows and strongly-indirectly follows comparison can be further divided into directly and indirectly outgoing (i.e., consequence) and incoming (i.e., precedent) relations. Thus, we obtain four different values, with the final similarity being the weighted average of these values. The control-flow view is separated by directly-follows and strong indirectly-follows comparisons. We would like to place most of our effort on explaining the directly-follows comparison, because the strong indirectly-follows comparison follows the same algorithm, only the relations are strong indirectly follows. The reason we also consider strong indirectly-follows relations is to handle non-free-choice problems (i.e., whether we choose a task is dependent on what has been executed in the prior process [41]). For instance, both activities \(C\) and \(D\) in Figure 3 have identical directly-follows relations, but \(D>>_{W}G\) (i.e., the dashed line) also exists. Thus, \(C\) and \(D\) should not be regarded as redundant. Algorithm 1 presents our approach for calculating the directly-follows similarity. The starting point is to construct a directly-follows graph obtained from the event log (Line 1). For each activity label, we then calculate its outgoing and incoming activity sets (Line 2-4). By using Equation (3), the weights are calculated for each element in the activity set (Line 5-6), (e.g., \(A\bullet_{W}=\{\frac{1}{2},\frac{1}{2}\}\)). Afterwards, for each pair of activity labels, we adopt EMD to calculate the similarity between incoming and outgoing activity sets by using the ground distance function \(D_{cf}\) from Equation (4) (Line 7-9). The activities in the sets (e.g., \(a\bullet\)) are clusters. The weights in the sets (e.g., \(a\bullet_{W}\)) are the associated weights for each cluster. For instance, suppose we would like to calculate the similarity between outgoing activity sets for \(H\) and \(B\) in Figure 3; the input signatures for EMD would be \(P=\{(C,0.46),(D,0.48),(F,0.02)\}\) and \(Q=\{(C,0.5),(D,0.5)\}\). Lastly, the directly incoming and outgoing similarities are averaged to obtain the final directly-follows similarity for each pair of activity labels and added to the set \(S_{d}\) (Line 10-11). The equation for calculating the weight of a single activity in incoming/outgoing activity sets is defined as:  
\[W=\frac{|(b,a)|}{\sum\{|(e,a)|e\in\bullet a\}}\qquad or\qquad\frac{|(a,b)|}{ \sum\{|(a,e)|e\in a\bullet\}} \tag{3}\]The ground distance function \(D_{cf}\) for EMD between any two clusters \(p_{i},q_{j}\) from activity sets is defined as:  
\[D_{cf}= \begin{cases}0&\text{if }p_{i}=q_{j}\\ 1&\text{otherwise}\end{cases} . \tag{4}\]  
_Principle._ The same activity label has no cost, and different ones have a unit cost. This cost function can be easily extended based on other matrices, e.g., global location for activity labels. Here, we just show the most basic version for better undesirability. The same algorithm applies to the calculation of indirectly incoming and outgoing similarities. We construct a strong indirectly-follows graph from the event log. We have a set that contains strong indirectly-follows similarities as well. Thus, for each pair of activity labels, the overall control-flow similarity is the weighted average of directly- and strong indirectly-follows similarities, where there is a value between 0 and 1.