# A Framework for Extracting and Encoding Features from Object-Centric Event Data

- Type: Conference paper
- URL: https://www.gyunam.com/publication/2022-icsoc/
- Date: 2022-01-01
- Authors: Jan Niklas Adams, Gyunam Park, Sergej Levich, Daniel Schuster, Wil M. P. van der Aalst
- Venue: Service-Oriented Computing - 20th International Conference, ICSOC 2022, Seville, Spain, November 29 - December 2, 2022, Proceedings
- DOI: https://doi.org/10.1007/978-3-031-20984-0_3
- PDF: https://www.gyunam.com/publication/2022-icsoc/paper.pdf
- Link (URL): https://doi.org/10.1007/978-3-031-20984-0_3
- Research lines: [Object-centric process mining](https://www.gyunam.com/research-line/object-centric-process-mining/index.md)

## Abstract

Traditional process mining techniques take event data as input where each event is associated with exactly one object. An object represents the instantiation of a process. Object-centric event data contain events associated with multiple objects expressing the interaction of multiple processes. As traditional process mining techniques assume events associated with exactly one object, these techniques cannot be applied to object-centric event data. To use traditional process mining techniques, object-centric event data are flattened by removing all object references but one. The flattening process is lossy, leading to inaccurate features extracted from flattened data. Furthermore, the graph-like structure of object-centric event data is lost when flattening. In this paper, we introduce a general framework for extracting and encoding features from object-centric event data. We calculate features natively on the object-centric event data, leading to accurate measures. Furthermore, we provide three encodings for these features: tabular, sequential, and graph-based. While tabular and sequential encodings have been heavily used in process mining, the graph-based encoding is a new technique preserving the structure of the object-centric event data. We provide six use cases: a visualization and a prediction use case for each of the three encodings. We use explainable AI in the prediction use cases to show the utility of both the object-centric features and the structure of the sequential and graph-based encoding for a predictive model.

## Practical problem

Companies that want to predict how long an order will still take, cluster similar executions or chart process performance over time first have to turn their event data into features. The established feature frameworks assume every event belongs to exactly one case, but data from ERP (enterprise resource planning) systems links one event to an order, several items and an invoice at once. To use the existing frameworks, analysts flatten the data onto one object type, which drops events, duplicates them and invents orderings between activities that were actually independent, so features such as 'preceding activity' or 'elapsed time' come out wrong. Flattening also discards the graph shape of the data, which no tabular or sequential encoding can represent, so predictive models never see how objects interact.

## Research questions

1. How can the features of the established process enhancement framework be computed natively on object-centric event data so that they are accurate rather than distorted by flattening?
2. How can object-centric features be encoded as tables, sequences and graphs so that different visualization and prediction techniques can consume them?
3. Do object-centric features and the structure preserved by sequential and graph encodings carry information that predictive models actually use?

## Contributions

- A general framework that translates the control-flow, data-flow, resource and performance features of de Leoni et al. to object-centric event logs and adds an object perspective and object-centric performance features.
- Formal definitions of the object graph, process executions and two extraction techniques, connected components and leading object type, on Object-Centric Event Logs (OCELs).
- Three formally defined feature encodings, tabular, sequential and a new graph-based encoding whose nodes are events and whose edges follow each object's lifecycle.
- Six use cases on the BPI Challenge 2017 loan application log, one visualization and one remaining-time prediction per encoding, with SHAP values to explain feature and structure importance.
- An open-source implementation in the `ocpa` Python library and a GitHub repository to reproduce the experiments.

## Key findings

- A qualitative analysis of 25 features classifies most control-flow, data-flow and performance features as misleading when computed on flattened data, while synchronization, pooling, lagging time and object-count features exist only on object-centric data.
- Predicting normalized remaining time on the loan log with the same four features, test MAE (mean absolute error) is 0.5087 for linear regression on the tabular encoding, 0.4568 for an LSTM (Long Short-Term Memory) network on sequences and 0.4497 for a graph neural network, against 0.7598 for predicting the training mean.
- SHAP values of the regression model show that a Call activity among preceding activities and a higher number of previous offer objects both lower the predicted remaining time, so the new object feature is informative.
- For the LSTM, features at all four positions of the input sequence carry high SHAP importance, and for the graph neural network edge importances differ substantially across edges, so both encodings' structure is used by the models.
- The evaluation is illustrative rather than a benchmark: one log, a single 0.7/0.3 split, inputs truncated to four events, and the sequential encoding still imposes precedence relations that the log does not contain.


