Introduction
Predictive Process Monitoring (PPM) is a critical field in business process management that leverages historical event data to forecast future process behavior. A primary task within PPM is Next Activity Prediction (NAP), where models attempt to determine the subsequent step in a running process instance. While modern deep learning architectures, particularly Neural Networks (NNs), have demonstrated high accuracy in these tasks, they often suffer from a "majority bias." This bias leads models to favor the most frequent process paths (the "happy paths") while failing to accurately predict rare but valid exceptional variants.
This paper introduces a hybrid "Symbolic[Neuro]" approach that modulates Transformer-based neural predictions with formal process knowledge represented as Petri nets. By integrating background knowledge directly into the inference process, the authors aim to bridge the gap between data-driven pattern recognition and rule-based process compliance.
The Challenge: Majority Bias and Data Scarcity
Standard neural networks are inherently data-hungry and probabilistic. In environments like healthcare or finance, processes often involve "concept drifts" or infrequent but critical sequences. When a specific sequence is under-represented in the training data, an NN will likely assign it a low probability, even if it is a perfectly valid path according to business logic. This limitation makes standard NNs less reliable for predicting "second-best" variants—paths that share a prefix with common sequences but eventually deviate into exceptional cases.
Methodology: KB-Modulation
The authors propose a system called KB-Modulation, which moves beyond simple post-hoc filtering. Instead of checking for compliance after a prediction is made, the system modulates the prediction in real-time during the generation of the activity sequence.
1. The Transformer Predictor
The core architecture utilizes a Transformer encoder equipped with an attention mechanism. This allows the model to capture complex, long-range dependencies between activities in a process trace more effectively than traditional Recurrent Neural Networks (RNNs).
2. Knowledge Representation
Background knowledge is formalized using Petri nets, a mathematical modeling language for describing distributed systems. These nets define the "legal" transitions and states possible within a process, providing a structural guardrail for the neural network.
3. Modulation via Beam Search
The system employs a modified Beam Search algorithm to explore potential future paths. At each step of the search, the score for a candidate activity is calculated as a weighted combination of two signals:
- The Data-Driven Signal ($P_{NN}$): The probability distribution produced by the Transformer.
- The Knowledge-Driven Signal ($F_{Petri}$): A fitness score calculated via token-based replay against the Petri net.
This is governed by a hyperparameter ($w$), which determines the influence of the background knowledge:
Score = (1 - w) * P_NN + w * F_Petri
This "fuzzy" modulation allows the system to be nudged by the process model without being strictly constrained by it, enabling the prediction of valid but infrequent activities that the NN might otherwise ignore.
Experimental Evaluation
The framework was evaluated using a synthetic log (designed to test infrequent variants) and five real-world benchmarks: Sepsis, RoadTraffic, Helpdesk, BPIC2013 (I & CP), and BPIC2012. To specifically address the majority bias problem, the authors constructed test sets focused on "second-best" variants—sequences that deviate from the most common paths.
Key Results
The primary evaluation metric was Damerau-Levenshtein similarity, measuring the closeness of the predicted suffix to the actual outcome.
- Significant Gains: On the synthetic dataset, KB-Modulation improved similarity by 0.274 over the baseline NN. The most substantial real-world improvement occurred in the BPIC2012 dataset, which saw a similarity increase of +0.362.
- The Weight of Knowledge: The study found that while background knowledge is beneficial, a weight ($w$) that is too high (e.g., $>0.9$) can degrade performance. This suggests that the data-driven signal is still necessary to distinguish between different frequencies of valid paths.
- Rescuing Predictions: The system effectively acts as a data-augmenter, allowing the model to correctly predict paths it has rarely seen in training by relying on the structural possibilities defined in the Petri net.
Limitations and Future Work
Despite its success, the current approach has limitations. The weight $w$ currently requires manual tuning; future iterations could benefit from automated tuning based on the frequency of variants in the training data. Additionally, the model focuses exclusively on control-flow (the sequence of activities). Real-world processes are often influenced by data attributes (e.g., loan amounts) and temporal constraints. The authors plan to extend this work by integrating these attributes and moving from Petri nets to fuzzy Linear Temporal Logic (LTLf) checkers for more nuanced knowledge integration.
Conclusion
By shifting from post-hoc compliance checking to proactive modulation during inference, the KB-Modulation framework provides a robust solution to the majority bias in predictive process monitoring. It demonstrates that combining the flexibility of Transformers with the formal rigor of process models can significantly improve the accuracy of predictions in complex, real-world environments.
Summary updated