The Origin of Causal Process Mining

Why classical process mining produces spaghetti models when business objects are connected 1:N or N:M, how Causal Process Mining uses the structure of relational databases and expert knowledge about cause and effect instead, and where you find these ideas in Noreja.

Noreja's approach goes back to research by its founders. The paper Causal Process Mining from Relational Databases with Domain Knowledge by Philipp Waibel, Lukas Pfahlsberger, Kate Revoredo and Jan Mendling (Vienna University of Economics and Business and Humboldt-Universität zu Berlin) introduced Causal Process Mining. This page summarises its ideas and shows where you meet them in Noreja today.

Why Classical Process Mining Struggles

Most process mining tools build on two things: an event log with one case ID for every event, and directly-follows relations, which connect each event to the event that happened next in the same case. This works well for simple processes. It fails when the business objects behind the events are connected in 1:N or N:M relations, as they usually are in an ERP system.

The paper uses the order-to-cash process of a European food producer. A supermarket order is split into several items; each item is picked in the warehouse, packed and delivered, and the order is invoiced and paid. If one order has three items, the event log records the picking steps of these items one after the other. A directly-follows algorithm then concludes that picking follows picking, or that creating an item follows picking. Neither is true: both come from the order having several items.

The results are relationships that don't exist (spurious relations), self-loops and back-jumps. Together they produce the well-known "spaghetti models", and they distort performance figures, for example the throughput time between two activities.

Observing Isn't Enough

The paper refers to Judea Pearl's work on causality: associations in data alone can't tell you which event caused which. A sequence "order, picking, invoice" fits several explanations equally well, however often it is observed. In the food producer's process, the invoice is triggered by the end of picking, but it is only issued on the next business day, after the delivery. An algorithm that only looks at the order of events can't know that.

The way out is to combine the data with knowledge about cause and effect. Much of this knowledge is already stored in the source system: the foreign keys of a relational database say which order an item belongs to and which item a delivery is for. What is missing can be added by people who know the process.

Four Requirements

From this, the paper derives four requirements for a process mining approach:

  • Causal input data: keep the causal structure of the source database instead of flattening it into an event log.
  • Domain knowledge: let experts add cause-and-effect knowledge that the data can't show, and compare the data against it.
  • Cardinalities: record how many events of one type are connected to an event of another type, so that splits, merges and batching are shown correctly.
  • Aggregation: show the process both in detail, for a single case, and in aggregated form, up to the overall process model.

How Causal Process Mining Works

Causal Process Mining skips the event log. It reads the relational data directly and turns it into graphs that are stored in a graph database:

  • Select the tables: choose the tables that hold the events of the process, joined over their foreign keys.
  • Define the Causal Process Template: an expert states which table's events cause which. The template can follow the database schema or deviate from it where the process works differently.
  • Build Causal Event Graphs: every set of connected rows becomes a graph of events and their causal relationships. If one event belongs to several such graphs, for example one delivery for two orders, the graphs are connected, and the shared event is a batching event.
  • Aggregate: the Causal Event Graphs are combined into aggregated graphs that count how often each event type and each relationship occurred, with their cardinalities.
  • Analyse: the graphs are shown as process graphs, key figures are calculated from them, and violations are detected.

Comparison between Classical Process Mining and Causal Process Mining approaches

Because the data isn't flattened, cardinalities and causal relationships are kept. The graphs aren't tied to one predefined case ID, and several applications can query the same data.

Three Levels of Aggregation

  • Level 1: one aggregated graph for each Causal Event Graph, a more general view of a single case.
  • Level 2: one aggregated graph for all cases with the same structure.
  • Level 3: one aggregated graph for all cases, the process model.

Each relationship carries its quantity and its cardinalities as minimum and maximum on both sides, for example 1..1 : 1..3 when one order leads to one to three items.

Violations Instead of Extra Relationships

If an event happened before the event that causes it, the causal relationship is violated in time. Such temporal violations are recorded instead of adding new relationships to the model. A later change to an order, for example, shows up as a violation and doesn't add a back-jump that makes the model more complex.

The Evaluation

The approach was tested with the real data of the food producer: about 70,000 orders with more than 8.5 million events from nine tables of an ERP system on Microsoft SQL Server, used without prior data cleaning. The results were compared with two established tools: a directly-follows graph from PM4Py and a BPMN model from Split Miner 2.0.

  • Directly-follows graph: full of self-loops and relationships that contradict the database structure, for example from picking back to delivery preparation.
  • BPMN model: some orders right, but others reversed or shown as parallel although they happen in sequence, and again many self-loops.
  • Causal Process Mining: no self-loops and none of these spurious relationships, with the order of the activities preserved.

To compare conformance with the expected causal order, the paper adds up all unexpected relationships and temporal violations. The directly-follows graph scored 1,153,710, the causal model 165,124. Even after leaving out the two activities that caused most of the directly-follows graph's score, it remained at 687,053.

Where You Find These Ideas in Noreja

The paper's prototype was built as part of the Noreja tool, and its concepts have product names today:

In the paper

In Noreja

Selected tables joined over foreign keys

An entity with its objects and data connections

Causal knowledge of the expert

The expected order of a perspective

Causal Event Graph

Case instance

Aggregation levels 1, 2 and 3

Case model, variant and process model

Temporal violation

Disarray, one of the process patterns

See Entities Explained, The Expected Order: Perspective Hypothesis, Shortcuts and Backjumps, Process Models and Levels: Case, Variant, Process Model and Process Patterns: Disarray, Negligence, Rework and Allowed Deviations.

Read the Paper

The full paper, with the formal definitions, the figures and the complete evaluation, is available on arXiv: Causal Process Mining from Relational Databases with Domain Knowledge.