<!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>Transforming Process Mining: A Transformer-Based Approach to Semantic Clustering in Event Log Analysis</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Zineddine Bettouche</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Deggendorf Institute of Technology (DIT)</institution>
          ,
          <addr-line>Dieter-Goerlitz-Platz 1; 94469 Deggendorf</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>Can the employment of transformer models and clustering algorithms facilitate event log analysis in process mining by forming more cohesive case clusters that capture meaningful semantic coherence, allowing for the representation of specific behavioral patterns within the logs?</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Motivation</title>
      <p>The field of process mining plays a pivotal role in optimizing business processes by examining
digital footprints. Central to process mining is event log analysis, where event sequences are
scrutinized to unveil patterns, irregularities, and potential bottlenecks. While traditional deep
learning networks, such as recurrent neural networks (RNNs), have excelled in predicting
process behaviors due to their precision and adaptability, they face challenges in handling
long-range dependencies, gradient issues, and computational eficiency for lengthy sequences.
Addressing these challenges led to the introduction of the attention mechanism, embodied by
transformer models.</p>
      <p>Transformer models excel in tasks like machine translation and natural language processing.
Encoder-only transformers have consistently achieved state-of-the-art results, particularly when
paired with clustering techniques. This extends beyond the domain of natural language
processing to structured data, where encoding textual information and subsequently clustering the
encoded representations can lead to semantically coherent clusters, providing valuable insights
and revealing hidden patterns. These patterns can be critical in areas such as understanding
customer behavior in e-commerce, optimizing manufacturing processes in industry, or tracking
disease progression in healthcare. Discovering these patterns informs decision-making and
process improvements across various domains. However, despite their demonstrated success in
various applications, the application of transformer models in process mining remains a largely
unexplored frontier.
This research adopts a two-step approach. Initially, a transformer model will be trained as
a masked language model, requiring it to predict masked portions of input data based on
surrounding context. This training process ensures that the encoder learns to represent input
data as vectors in a latent space, capturing both contextual and semantic relationships.</p>
      <p>The second step involves developing a methodology that leverages the encoder model to
transform event logs into semantically meaningful vectors within the latent space. These
encoded vectors will then be subjected to a suitable clustering algorithm, aiming to create
meaningful clusters that reveal behavioral patterns in the event logs. However, assessing
the quality of the constructed semantic clusters requires the introduction of novel evaluation
measures.</p>
      <p>When selecting a tokenizer for transformer models, careful consideration must be given to
model compatibility, granularity of the text, and domain specificity. The eficiency of the chosen
tokenizer impacts computational costs and sequence lengths, which must align with practical
constraints such as available computational resources and tool support. Empirical testing on the
specific task and dataset is essential to strike a balance between performance and computational
requirements.</p>
      <p>
        Configuring the transformer model, including decisions on the number of encoder layers
and attention heads, should be driven by dataset size, task complexity, and available
computational resources. While initial configurations can be informed by established architectures like
BERT [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] or RoBERTa [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], fine-tuning these settings based on validation performance is critical.
A systematic hyperparameter search, combined with insights from recent literature, will guide
this decision-making process to optimize model performance and computational eficiency.
      </p>
      <p>
        To address the challenges of clustering high-dimensional vectors generated by transformers
for structured data like event logs, dimensionality reduction techniques, such as t-SNE [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]
or PCA [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], will be applied before clustering. Alternatively, algorithms like DBSCAN [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] or
HDBSCAN [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], which do not require a priori specification of the number of clusters and can
handle varying densities, will be explored for clustering.
      </p>
      <p>
        Beyond the pre-training phase, the research will evaluate the versatility of the model through
ifne-tuning tasks. An exemplary task is anomaly detection, evaluated using metrics such as
the Area Under the Receiver Operating Characteristic Curve (AUC-ROC) [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] and the Area
Under the Precision-Recall Curve (AUC-PR) [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. These metrics, especially AUC-ROC, efectively
capture the model’s ability to distinguish between normal and anomalous sequences, serving as
a testament to its post-fine-tuning efectiveness.
      </p>
      <p>
        Additionally, the research will incorporate novel metrics, as proposed by Sommers et al. [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ],
to assess the model’s capacity to generalize beyond its training data. These metrics will address
fundamental questions: Can the neural network efectively learn its task? How do the
rediscovered models (semantic clusters) compare to their original counterparts both structurally and
behaviorally? How does the model perform in real-world scenarios without a definitive ground
truth? Incorporating these evaluation metrics will provide a robust framework for analyzing
the eficacy and versatility of the research findings.
Deep neural networks, since their introduction in the field of process mining, have improved
business process monitoring and discovery. Evermann et al. [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] introduced the use of recurrent
neural networks (RNNs) to predict real-time process behaviors. Building on this, a range of
prediction models grounded in RNNs and their derivatives like the long-short term memory
(LSTM) networks have emerged. They involved several tasks such as predicting the next
activity [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ], sufix generation [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], and more.
      </p>
      <p>
        However, there are notable limitations with these networks, especially when handling lengthy
sequences. For instance, the eficiency of LSTM networks tends to decrease in relation to the
increasing length of event sequences [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. This is undesired since the intricacies of event logs
often involve control flows linking activities, creating the need for recognizing both short and
long-range dependencies. Also, due to their sequential nature, LSTMs and RNNs don’t support
parallel processing, leading to significant ineficiencies during learning and inference phases.
      </p>
      <p>
        To address these limitations, the attention mechanism was introduced [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]. It has proven
efective in handling long-range dependencies in sequences. Transformer neural network
architectures, using the self-attention mechanism, have become prominent in neural machine
translation and natural language processing. Their contributions span a wide range of tasks
such as text generation [15], sentiment analysis [16], and more. Transformers have also been
applied to non-textual data, such as images [17] and protein sequences [18]. Their applications
include information retrieval tasks with structured data [19].
      </p>
      <p>In the context of event log analysis, trace clustering [20] is a fundamental technique for
understanding and enhancing process behaviors. Deep learning techniques have gained traction
in predictive analytics for process mining, particularly in tasks like predicting the next event or
remaining time [21]. The significance of trace clustering also extends to customer journey
analysis, which helps us grasp and improve customer behaviors in omnichannel environments [22].
Utilizing domain-informed similarity metrics [23] enhances the quality of customer journey
clustering, contributing to process improvement eforts. Furthermore, the field of predictive process
analytics emphasizes the need for interpretability in deep learning-based models. The work by
Wickramanayake et al. [24] has shown that attention-based models can provide comprehensive
explanations for process predictions, addressing the challenge of "black-box" models.</p>
      <p>The research aims to extend the application of transformer models and attention-based
mechanisms to event log analysis, leveraging their strengths and addressing identified challenges,
including enhancing cluster quality and interpretability in event log analysis. Encoder-only
transformers, like BERT, excel in translating diverse inputs into a unified latent space,
facilitating downstream tasks like clustering and anomaly detection. Although the next-activity
prediction was addressed by training an encoder-decoder transformer [25], their application in
transforming input data into semantically meaningful vectors in the latent space is underutilized
in process mining.</p>
    </sec>
    <sec id="sec-2">
      <title>Acknowledgement</title>
      <p>This paper has received funding from the State of Bavaria in the context of the project KIGA,
funding no. DIK0313.
[15] A. Radford, K. Narasimhan, T. Salimans, I. Sutskever, Improving language understanding
by generative pre-training (2018).
[16] J. Delbrouck, N. Tits, M. Brousmiche, S. Dupont, A transformer-based joint-encoding for
emotion recognition and sentiment analysis, CoRR abs/2006.15955 (2020). URL: https:
//arxiv.org/abs/2006.15955.
[17] A. Dosovitskiy, L. Beyer, A. Kolesnikov, D. Weissenborn, X. Zhai, T. Unterthiner, M.
Dehghani, M. Minderer, G. Heigold, S. Gelly, J. Uszkoreit, N. Houlsby, An image is worth
16x16 words: Transformers for image recognition at scale, in: 9th International Conference
on Learning Representations, ICLR 2021, 2021. URL: https://openreview.net/forum?id=
YicbFdNTTy.
[18] A. Rives, J. Meier, T. Sercu, S. Goyal, Z. Lin, J. Liu, D. Guo, M. Ott, C. L. Zitnick, J. Ma,
R. Fergus, Biological structure and function emerge from scaling unsupervised learning to
250 million protein sequences, Proc. Natl. Acad. Sci. USA 118 (2021) e2016239118. URL:
https://doi.org/10.1073/pnas.2016239118.
[19] Y. Guo, Z. Ma, J. Mao, H. Qian, X. Zhang, H. Jiang, Z. Cao, Z. Dou, Webformer: Pre-training
with web pages for information retrieval, in: SIGIR ’22: The 45th International ACM SIGIR
Conference on Research and Development in Information Retrieval, 2022, pp. 1502–1512.</p>
      <p>URL: https://doi.org/10.1145/3477495.3532086.
[20] S. Sakr, A. Y. Zomaya (Eds.), Encyclopedia of Big Data Technologies, Springer, 2019. URL:
https://doi.org/10.1007/978-3-319-63962-8. doi:10.1007/978-3-319-63962-8.
[21] I. Ketykó, F. Mannhardt, M. Hassani, B. F. van Dongen, What averages do not tell: Predicting
real life processes with sequential deep learning, in: Proceedings of the 37th ACM/SIGAPP
Symposium on Applied Computing (SAC), 2022, pp. 1128–1131. doi:10.1145/3450283.
3450309.
[22] M. Hassani, S. Habets, Predicting next touch point in a customer journey: A use case in
telecommunication, in: European Conference on Modelling and Simulation (ECMS), 2021,
pp. 48–54.
[23] S. van den Berg, M. Hassani, On inferring a meaningful similarity metric for customer
behaviour, in: European Conference on Modelling and Simulation (ECMS), 2021, pp.
234–250.
[24] B. Wickramanayake, Z. He, C. Ouyang, C. Moreira, Y. Xu, R. Sindhgatta, Building
interpretable models for business process prediction using shared and specialised attention
mechanisms, Knowledge-Based Systems 248 (2022) 108773. doi:10.1016/j.knosys.
2022.108773.
[25] Z. A. Bukhsh, A. Saeed, R. M. Dijkman, Processtransformer: Predictive business process
monitoring with transformer network, CoRR abs/2104.00721 (2021). URL: https://arxiv.
org/abs/2104.00721.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>J.</given-names>
            <surname>Devlin</surname>
          </string-name>
          , M.-
          <string-name>
            <given-names>W.</given-names>
            <surname>Chang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Toutanova</surname>
          </string-name>
          , Bert:
          <article-title>Bidirectional encoder representations from transformers</article-title>
          ,
          <source>in: Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies</source>
          , Volume
          <volume>1</volume>
          (Long and Short Papers),
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Ott</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Goyal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Du</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Joshi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Levy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Lewis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Zettlemoyer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Stoyanov</surname>
          </string-name>
          ,
          <article-title>Roberta: A robustly optimized bert pretraining approach</article-title>
          ,
          <source>in: Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP)</source>
          ,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>L.</surname>
          </string-name>
          <year>v</year>
          . d. Maaten, G. Hinton,
          <article-title>Visualizing data using t-sne</article-title>
          ,
          <source>Journal of machine learning research 9</source>
          (
          <year>2008</year>
          )
          <fpage>2579</fpage>
          -
          <lpage>2605</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>I. T.</given-names>
            <surname>Jollife</surname>
          </string-name>
          ,
          <article-title>Principal component analysis</article-title>
          ,
          <source>Wiley interdisciplinary reviews: computational statistics 8</source>
          (
          <year>2016</year>
          )
          <fpage>216</fpage>
          -
          <lpage>222</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>M.</given-names>
            <surname>Ester</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.-P.</given-names>
            <surname>Kriegel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Sander</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Xu</surname>
          </string-name>
          ,
          <article-title>A density-based algorithm for discovering clusters in large spatial databases with noise</article-title>
          ,
          <source>Proceedings of the Second International Conference on Knowledge Discovery and Data Mining</source>
          (
          <year>1996</year>
          )
          <fpage>226</fpage>
          -
          <lpage>231</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>R. J.</given-names>
            <surname>Campello</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Moulavi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Sander</surname>
          </string-name>
          ,
          <article-title>Hierarchical density estimates for data clustering, visualization, and outlier detection</article-title>
          ,
          <source>in: Proceedings of the 2015 SIAM International Conference on Data Mining, SIAM</source>
          ,
          <year>2015</year>
          , pp.
          <fpage>839</fpage>
          -
          <lpage>847</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>T.</given-names>
            <surname>Fawcett</surname>
          </string-name>
          ,
          <article-title>An introduction to roc analysis</article-title>
          ,
          <source>Pattern recognition letters 27</source>
          (
          <year>2006</year>
          )
          <fpage>861</fpage>
          -
          <lpage>874</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>J.</given-names>
            <surname>Davis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Goadrich</surname>
          </string-name>
          ,
          <article-title>The relationship between precision-recall and roc curves</article-title>
          ,
          <source>Proceedings of the 23rd international conference on Machine learning</source>
          (
          <year>2006</year>
          )
          <fpage>233</fpage>
          -
          <lpage>240</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>D.</given-names>
            <surname>Sommers</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Menkovski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Fahland</surname>
          </string-name>
          ,
          <article-title>Process discovery using graph neural networks</article-title>
          ,
          <source>CoRR abs/2109</source>
          .05835 (
          <year>2021</year>
          ). URL: https://arxiv.org/abs/2109.05835.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>J.</given-names>
            <surname>Evermann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.-R.</given-names>
            <surname>Rehse</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Fettke</surname>
          </string-name>
          ,
          <article-title>A deep learning approach for predicting process behaviour at runtime</article-title>
          , in: M.
          <string-name>
            <surname>Dumas</surname>
          </string-name>
          , M. Fantinato (Eds.),
          <source>Business Process Management Workshops</source>
          , Springer,
          <year>2017</year>
          , pp.
          <fpage>327</fpage>
          -
          <lpage>338</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>S.</given-names>
            <surname>Pandey</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Nepal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <article-title>A test-bed for the evaluation of business process prediction techniques (</article-title>
          <year>2011</year>
          )
          <fpage>382</fpage>
          -
          <lpage>391</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>M.</given-names>
            <surname>Camargo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Dumas</surname>
          </string-name>
          ,
          <string-name>
            <surname>O.</surname>
          </string-name>
          <article-title>Gonz´alez-</article-title>
          <string-name>
            <surname>Rojas</surname>
          </string-name>
          ,
          <article-title>Learning accurate lstm models of business processes (</article-title>
          <year>2019</year>
          )
          <fpage>286</fpage>
          -
          <lpage>302</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>D.</given-names>
            <surname>Paperno</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Kruszewski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Lazaridou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Pham</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Bernardi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Pezzelle</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Baroni</surname>
          </string-name>
          , G. Boleda,
          <string-name>
            <given-names>R.</given-names>
            <surname>Fern</surname>
          </string-name>
          <article-title>´andez, The lambada dataset: Word prediction requiring a broad discourse context (</article-title>
          <year>2016</year>
          )
          <fpage>1525</fpage>
          -
          <lpage>1534</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>A.</given-names>
            <surname>Vaswani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Shazeer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Parmar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Uszkoreit</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Jones</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. N.</given-names>
            <surname>Gomez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Kaiser</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Polosukhin</surname>
          </string-name>
          ,
          <article-title>Attention is all you need</article-title>
          ,
          <source>CoRR abs/1706</source>
          .03762 (
          <year>2017</year>
          ). URL: http: //arxiv.org/abs/1706.03762.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>