On the use of online clustering for anomaly detection in trace streams

Renato Vertuam Neto, Gabriel M. Tavares, Paolo Ceravolo, Sylvio BarbonSbsi 2021

Introduction

In modern business environments, process mining (PM) is essential for analyzing event logs—digital footprints of activities like insurance claims or manufacturing steps. Traditionally, anomaly detection in PM has been an offline process, requiring historical data and pre-defined process models for conformance checking. However, the real-time nature of contemporary business demands immediate detection of fraudulent transactions or skipped safety steps.

This paper introduces a real-time, unsupervised approach for spotting anomalies in business process data streams. By combining NLP-inspired encoding with an autonomous clustering algorithm, the system detects irregular behavior on the fly without needing labeled training data or prior knowledge of the process model.

Methodology

The proposed system utilizes a three-stage pipeline designed to handle continuous "trace streams" (sequences of activities belonging to specific cases):

  1. Trace Acquisition: Incoming events are grouped into discrete traces using a sliding window mechanism.
  2. Encoding (word2vec): To transform activity names into a format suitable for machine learning, the system employs word2vec. This Natural Language Processing technique converts sequences of activities into numerical vectors, capturing the semantic context of workflows (e.g., understanding that "Invoice Received" typically precedes "Payment Authorized").
  3. Online Clustering (Autocloud): The core engine is Autocloud, an evolutionary clustering algorithm. Unlike static methods like K-Means, Autocloud creates "Data Clouds" dynamically based on incoming data. It utilizes Typicality and Eccentricity Data Analysis (TEDA) to determine if a new trace fits an existing cloud or is an "eccentric" outlier, signaling a potential anomaly.
Overview of the proposed anomaly detection pipeline, from event log stream to anomaly identification.

Experimental Evaluation

The approach was evaluated using a massive synthetic benchmark consisting of 630 datasets generated via the PLG2 tool. The evaluation covered:

  • Process Complexity: Six models ranging from "Small" to "Gigantic" and "Wide."
  • Anomaly Diversity: Six types including Skip (missing steps), Insert (extra steps), Rework (repeated steps), and Attribute (incorrect data values).
  • Scalability: Streams of 1,000, 5,000, and 10,000 traces with anomaly incidence rates between 5% and 20%.

Results and Key Insights

The system demonstrated high precision, achieving an overall F1-score of approximately 0.97 for logs with 5% anomalies. Performance remained robust even as anomaly rates increased to 20%, with F1-scores staying around 0.89.

A critical finding involved the sensitivity hyperparameter $m$ within the Autocloud algorithm. While the default value is often 3, experimental results indicated that $m=2.5$ provides the optimal balance between sensitivity and accuracy across various process types.

The relationship between the hyperparameter m and the F1-Score, highlighting the performance plateau starting at m=2.5.

Further insights revealed that the system is particularly adept at catching "Insert" anomalies (F1-score of 0.96), while "Attribute" anomalies remain the most challenging. Most significantly, the system achieved these results without any prior knowledge of the "correct" process diagram, effectively discovering the process and identifying deviations simultaneously.

Conclusion and Future Work

While the current approach is highly effective, the authors identify several areas for future research. These include handling "incomplete traces" in true real-time settings where windows may not have closed, and benchmarking Autocloud against other online clustering competitors like DenStream or CluStream. Additionally, further refinement is needed to better distinguish between one-time noise and systematic anomalies using TEDA statistical thresholds.

Summary updated

BibTeX
@inproceedings{neto2021use,
  author = {Renato Vertuam Neto and Gabriel M. Tavares and Paolo Ceravolo and Sylvio Barbon},
  title = {{On the use of online clustering for anomaly detection in trace streams}},
  booktitle = {Sbsi},
  year = {2021},
  doi = {10.1145/3466933.3466979},
}
Figure