Introduction
In the rapidly evolving landscape of hyperautomation, a significant gap exists between Process Mining—the analysis of human-centric business processes—and Robotic Process Automation (RPA)—the deployment of software agents to execute those processes. Traditional process discovery algorithms typically output mathematical models like Petri nets. While theoretically robust, these models are often incompatible with mainstream RPA tools and difficult for software engineers to interpret.
Researchers from Blue Prism AI Labs have introduced a novel "agglomerative" process discovery algorithm designed to bridge this gap. By generating block-structured programs directly from execution traces, this approach facilitates the seamless synthesis of executable RPA scripts.
The Problem: Abstract Models vs. Executable Code
Existing process discovery methods, such as the popular "Inductive Miner," often employ a top-down approach. These methods frequently struggle with "duplicate activities"—instances where the same action occurs in different logical parts of a process. To maintain mathematical consistency, these algorithms often introduce "silent activities" (represented as $\tau$), which are invisible steps that have no real-world counterpart. This makes the resulting models "alien" to the structured programming environments used in RPA.
Methodology: The Agglomerative Miner
The proposed Agglomerative Miner shifts the paradigm from top-down decomposition to bottom-up condensation. The process involves four key stages:
- Directly-Follows-Graph (DFG) Construction: Event logs are first transformed into a graph where nodes represent activities and edges denote sequential execution.
- Bottom-Up Condensation: The core of the algorithm involves iteratively applying ten specific graph-rewriting rules. These rules identify local patterns—such as loops, sequences, or parallel branches—and condense them into single nodes representing structured code blocks.
- Structured Constructs: The miner maps these patterns to standard programming logic, including sequences, selections (if-else), iterations (while loops), and concurrence (parallel execution).
- Algebraic Simplification: To ensure the final output is clean and readable, the algorithm applies simplification rules akin to regular expression reduction.
The strength of this approach lies in its ability to recognize local control flow logic before attempting to resolve the global structure. By working from the bottom up, the miner avoids the "hard choices" that often lead to inaccuracies in top-down methods.
Evaluation and Results
The Agglomerative Miner was evaluated against two primary benchmarks: the BPI-Challenge 2020 (real-world travel expense logs) and the Karel Programming Dataset (educational robot movement traces).
- Accuracy and Simplicity: On the BPI-Challenge logs, the Agglomerative Miner outperformed industry standards like the Alpha Miner and Inductive Miner, achieving the highest F1-scores and Simplicity scores across all test cases.
- Program Recovery: In tests focused on program synthesis (Karel dataset), the miner demonstrated a remarkable ability to recover original code. It achieved an Exact-Match rate of 56.37%, a significant improvement over the Inductive Miner's 5.69%.
- Scalability: The algorithm maintains a quadratic computational complexity ($O(n^2)$), ensuring it remains performant even with large-scale event logs.
Conclusion and Future Directions
The Agglomerative Miner represents a significant step toward automated RPA script generation. By embracing duplicate activities and avoiding "ghost" steps, it produces models that are intuitive for human developers to audit and refine.
However, challenges remain. The current iteration focuses on control flow structure but does not yet extract the specific data-driven conditions (e.g., "If amount > $1000$") that govern branching. Future work will explore integrating decision tree learning to capture these logical conditions and enhancing the algorithm's robustness against "noisy" or infrequent real-world behavior.
Summary updated