# Process Discovery for Event Logs with Multi-Occurrence Event Types
## 3 Proposed Schema Induction Method
### Equivalence Prediction  
If, for two nodes \(n_{1},\ n_{2}\) in the input traces, \(n_{1}\ \Lambda\ n_{2}\), then, they share the same neighborhood context in the workflow schema model. Thus, they will share similar neighborhood contexts in the trace level, too. It means that in the trace level neighborhood, the values and positions of the event type should be similar. It is important to preserve not only the value distribution, but also the position parameters. For example, in the two traces \begin{tabular}{l l} _trac1_: & _t0, t1, t2, t3, t4_ \\ _trac2_: & _t0, t4, t3, t2, t1_ \\ \end{tabular}   
The right-side contexts of event type _t0_ share the same set of event types, but the positions are very different. To preserve both the value and position information in a more efficient way, we propose to use a similarity matrix to describe context similarity. **Definition 1** (Multi-perspective embedding). : _Having \(a_{1},\ldots,a_{M}\) different aspects, the multi-perspective embedding feature description is represented by a set of embedding vectors instead of a single vector._  
\[v(n)=<v_{1}(n),\ldots,v_{M}(n)> \tag{16}\]  
_where \(v_{i}(n)\) is an embedding vector of a node \(n\) related to aspect \(a_{i}\)._  
Figure 1: Sample similarity matrices. **Example 1**. : _In a graph, for the context description of a node, we can generate distinct description vectors for the different distance positions. Thus, \(a_{i}\) denotes the subcontext description related to nodes \(n_{j}\) with a distance value \(i\) from the current node \(n\). The perspective here is based on the distance value in the graph. Each aspect has a corresponding subcontext:_  
\[C_{i}(n)=\left\{ \begin{array}{c}n_{j}\mid\text{dist}\left(n,n_{j}\right)=i \end{array} \right\} \tag{17}\]  
_In general, the different aspects may also have overlapping subcontexts. Having the multi-perspective embedding, we apply a novel similarity operator which generates a similarity matrix instead of a scalar similarity value._  
**Definition 2** (Context similarity matrix). : _The context similarity matrix \(S\) for two contexts \(C_{1},\ C_{2}\) is a \(M^{*}M\) matrix with_  
\[S_{i,j}=similarity\left(v_{i}(n_{1}),\ v_{j}(n_{2})\right) \tag{18}\]  
_where we assume that all aspects are comparable, and we can calculate a similarity value. In the binary case,_  
\[S_{i,j}=\left\{ \begin{array}{c}1\ if\ v_{i}(n_{1})=v_{j}(n_{2})\\ 0,\ otherwise\end{array} \right. \tag{19}\]  
_In our problem domain, having only directed sequence contexts, we apply the distance-based aspect definition. In the formula, the aggregation collects all element pairs from the graph neighborhood having the distances \(i\) and \(j\). The aggregation function in the algorithm for feature calculation can be any of the usual operators like the average or max operators. In the case of directed graphs, we propose two \(S\) matrices \((S_{i},\ S_{o})\) for a given node, where \(S_{i}\) is for the context of incoming edges and \(S_{o}\) is for the outgoing edges._  
**Example 2**. : _Let us take following three traces:_ \begin{tabular}{l l} _trace1 context:_ & _1,_ _12,_ _13,_ _14_ \\ _trace2 context:_ & _14,_ _13,_ _12,_ _11_ \\ _trace3 context:_ & _11,_ _12,_ _15,_ _14_ \\ \end{tabular}   
_The corresponding similarity matrices are_  
\[S(trace1c,trace2c)=\left[ \begin{array}{c}[0\ 0\ 01\ 1]\\ [0\ 0\ 1\ 0]\\ [1\ 0\ 0\ 0]\\ [1\ 0\ 0\ 0]\end{array} \right],\ S(trace1c,trace3c)=\left[ \begin{array}{c}[1\ 0\ 0 0]\\ [0\ 1\ 0\ 0]\\ [0\ 0\ 0\ 0]\\ [0\ 0\ 0\ 1]\end{array} \right]\]  
_Thus, we use matrices for the context similarity, instead of the usual cosine similarity. In our current problem domain, as the context is always a simple directed sequence, we apply the \((S_{i},\ S_{o})\) matrices as similarity representations of two nodes._  
For the prediction of the equivalence of two nodes, \(n_{1},\ n_{2}\), we utilize a neural network architecture. As the input is a squared matrix, we employ the convolutional neural network (CNN).