CoSMo: a Framework for Implementing Conditioned Process Simulation Models

Rafael Seidi Oyamada, Gabriel M. Tavares, Paolo Ceravolo

Abstract Process simulation serves as a critical tool for business analysts, allowing them to predict the impact of workflow changes on organizational performance. While deep learning (DL) models capture complex patterns in event logs more effectively than traditional data-driven simulation (DDS) methods, they often function as "black boxes" that lack the flexibility to enforce specific logical constraints. This paper presents CoSMo (Conditioned process Simulation MOdel), a novel framework that bridges this gap. By integrating declarative constraints directly into a recurrent neural network (RNN) architecture, CoSMo enables user-directed control over process simulations. Our evaluation across five real-world datasets demonstrates that CoSMo can accurately generate process traces that adhere to both historical patterns and novel, user-defined "what-if" constraints.

Introduction

In the field of Process Mining, simulation is essential for evaluating how modifications—such as staffing changes or workflow re-engineering—affect overall performance. Historically, practitioners have faced a trade-off between two paradigms: Data-Driven Simulation (DDS) and Deep Learning (DL). DDS models are interpretable and easily adjustable but often rely on simplistic assumptions that fail to reflect real-world complexity. Conversely, DL models excel at capturing intricate patterns but are typically stochastic "black boxes," making it difficult to enforce specific conditions or test hypothetical scenarios (e.g., "What if a specific sequence of events is strictly forbidden?").

CoSMo addresses this lack of flexibility by providing a bridge that allows users to guide a deep learning model using a-priori knowledge or specific logical constraints.

Methods and Architecture

The core innovation of CoSMo is the Conditioned Recurrent Architecture. Unlike standard RNNs that predict the next event solely based on historical sequence, CoSMo incorporates several key components to enable constraint-aware generation:

  1. Constraint Vectors ($\Phi$): These vectors represent a set of rules derived from the DECLARE language, a standard for specifying process constraints.
  2. Learnable Parameter ($K$): A specialized weight matrix captures the relationship between these constraints and the sequential flow of events.
  3. Residual Connections: The architecture employs residual skip-connections to stabilize learning, ensuring the model retains input information while satisfying constraints.
The CoSMo framework architecture, illustrating the flow from event log preprocessing to the conditioned RNN layer and final event prediction.

The workflow begins with a preprocessing phase where constraints are extracted from event logs. During training, the model learns the conditional probability of an event given both the history and the constraints. In the simulation phase, users can modify these constraints to observe how the model generates new, compliant process traces.

Datasets

The effectiveness of CoSMo was evaluated using five diverse, real-world event logs from the 4TU.ResearchData repository. These logs represent various domains and complexities, ranging from incident management to healthcare.

Characteristics of the five real-world event logs used in the evaluation, including activity counts, total events, and case lengths.

The logs include BPI12 (loan applications), BPI13 (incident management), BPI17 (large-scale complex traces), BPI20 (travel permits), and SEPSIS (patient pathways).

Key Results and Insights

The researchers compared CoSMo against a "Vanilla" DL model (without constraints) and an "Original" model (using rules found in raw data).

  • Precision in "What-If" Scenarios: When simulating traces based on inverted rules (scenarios not present in the training data), CoSMo achieved a median precision of 81%. In contrast, the Vanilla model's performance was near-random at 58%.
  • Fidelity to Original Data: When replaying original rules, CoSMo maintained high fidelity with a 99% median precision.
  • Generalization vs. Memorization: A significant finding is the model's ability to generalize. It can fulfill inverted rules it never encountered during training, suggesting it learns the underlying logic rather than just memorizing sequences.
  • Complexity Penalty: The study noted that "Positive Relations" (e.g., Chain Response) are more difficult for the model to learn than "Existence" rules, likely due to the increased dimensionality they introduce to the feature vector.

Conclusion and Future Work

CoSMo demonstrates that stochastic deep learning models can be effectively "bounded" by logical rules without sacrificing performance. However, several areas for improvement remain. Currently, redundant DECLARE rules can clutter the learning process; future iterations will focus on pruning these correlated features. Additionally, while this study used data-driven rule selection, real-world applications should involve domain experts in defining constraints. Finally, the authors plan to expand the framework beyond logical flow to include time-related constraints and resource availability.

Summary updated

BibTeX
@inproceedings{oyamada2024cosmo,
  author = {Rafael Seidi Oyamada and Gabriel M. Tavares and Paolo Ceravolo},
  title = {{CoSMo: a Framework for Implementing Conditioned Process Simulation Models}},
  booktitle = {Bpm},
  year = {2024},
  doi = {10.1007/978-3-031-70396-6\_19},
}
Figure