Predictive process monitoring (PPM) focuses on predicting future process trajectories, including next activity predictions. This is crucial in dynamic environments where processes change or face uncertainty. However, current frameworks often assume a static environment, overlooking dynamic characteristics and concept drifts. This results in catastrophic forgetting, where training while focusing merely on new data distribution negatively impacts the performance on previously learned data distributions. Continual learning addresses, among others, the challenges related to mitigating catastrophic forgetting. This paper proposes a novel approach called Continual Next Activity Prediction with Prompts (CNAPwP), which adapts the DualPrompt algorithm for next activity prediction to improve accuracy and adaptability while mitigating catastrophic forgetting. We introduce new datasets with recurring concept drifts, alongside a task-specific forgetting metric that measures the prediction accuracy gap between initial occurrence and subsequent task occurrences. Extensive testing on three synthetic and two real-world datasets representing several setups of recurrent drifts shows that CNAPwP achieves SOTA or competitive results compared to five baselines, demonstrating its potential applicability in real-world scenarios. An open-source implementation of our method, together with the datasets and results, is available at: https://github.com/SvStraten/CNAPwP.
Figures & tables
Figure 1: Catastrophic forgetting in sequential image classification. The model trains on realistic elephant photos (Task 1) and subsequently on bird drawings (Task 2), which typically causes it to forget the initial task. When Task 1 recurs as elephant drawings , performance drops, illustrating the need to leverage task-invariant features to preserve knowledge during shifts.
Table 2
Figure 2: Framework for Continual Next Activity Prediction with Prompts (CNAPwP). When concept drift is externally detected, a new task-specific E-Prompt is initialized. When no drifts are detected, a prompt detection mechanism dynamically selects and attaches the appropriate general G-Prompt and E-Prompt to the MHSA layers for accurate prediction.
Dataset
window_size γ
buffer_size ρ
threshold E
RandomTasks
250
100
0.5
ImbalancedTasks
500
100
0.6
RecurrentTasks
250
150
0.6
Recurrent BPIC2015
250
100
0.8
BPIC2017
500
100
0.5
Table 2: The final parameter settings for all datasets.
Method
Dataset
RandTasks
ImbalTasks
Recur BPIC15
RecurTasks
BPIC17
CNAPwP (ours)
.813 ± .004
.797 ± .007
.662 ± .003
.789 ± .002
.818 ± .002
DynaTrainCDD [ 11 ]
.747 ± .005
.758 ± .006
.543 ± .007
.731 ± .004
.820 ± .004
TFCLPM [ 25 ]
.795 ± .001
.817 ± .004
.655 ± .002
.781 ± .001
.839 ± .000
GAN [ 23 ]
.739 ± .001
.704 ± .004
.604 ± .005
.694 ± .001
.693 ± .000
Landmark [ 16 ]
.800 ± .007
.796 ± .007
.670 ± .006
.780 ± .002
.798 ± .004
Table 3: Average accuracy and standard deviation (after 5 runs over each evaluation set). Bold indicates the highest accuracy, while italic and underlined second- and third-highest values, respectively.
Figure 3: The accuracy per event for all methods on the ImbalancedTasks dataset. The plot reveals that while baselines like TFCLPM initially perform well, they suffer from degradation in later stages of the stream. In contrast, CNAPwP (dark blue line) demonstrates robust adaptation, maintaining higher stability and positive performance deltas even as task frequencies vary significantly throughout the stream.
Figure 4: Heatmaps showing the accuracy drop per task (task-specific forgetting) for the ImbalancedTasks dataset for the four best-performing methods. Warm colors indicate positive knowledge retentions (improvements), white indicates stability and cold colors indicate forgetting.
Figure 5: The accuracy per event for all methods on the RecurrentTasks dataset. It highlights CNAPwP’s ability to recover accuracy swiftly following task transitions, whereas DynaTrainCDD takes noticeably longer to regain performance. The graph also exposes the instability of the IncrementalUpdate baseline (w = LastDrift), which suffers from deep, catastrophic spikes during specific task transitions due to insufficient training data.
Figure 6: Heatmaps showing the accuracy drop per task (task-specific forgetting) for the RecurrentTasks dataset for the four best-performing methods. While methods like TFCLPM and DynaTrainCDD exhibit high retention on specific tasks, CNAPwP demonstrates balanced and stable retention across all tasks, leading to the overall highest accuracy.
Figure 7: The accuracy per event for all methods on the RandomTasks dataset. In this scenario of randomized task batches, CNAPwP consistently secures a higher baseline performance compared to competitors. While most methods experience significant dips during task transitions, the prompt-based approach effectively mitigates these drops in most cases, maintaining superior average accuracy across the evaluation phase.
Figure 8: Heatmaps showing the accuracy drop per task (task-specific forgetting) for the RandomTasks dataset for the four best-performing methods.The heatmaps isolate specific weaknesses in competing methods, such as the severe forgetting observed in the Incremental Update baseline on Task 1’s third occurrence (-23.72% accuracy drop). CNAPwP avoids such drastic failures, showing broader stability that outweighs the localized gains seen in methods like TFCLPM.
Figure 9: The accuracy per event for all methods on the Recurrent BPIC2015 dataset. The plot shows high volatility for all methods due to the complexity of the underlying process and the high number of classes. While the Landmark method achieves slightly higher overall accuracy, CNAPwP remains highly competitive and follows similar convergence patterns despite the difficult environment.
Figure 10: Heatmaps showing the accuracy drop per task (task-specific forgetting) for the Recurrent BPIC2015 dataset for the four best-performing methods. CNAPwP exhibits exceptional retention capabilities on Tasks 2, 3, and 4, indicated by deep red cells with high positive deltas where other baselines such as GAN and IncrementalUpdate (w = LastDrift). However, it does experience some localized forgetting on Task 1 in later occurrences, which slightly offsets its overall gains compared to the stable Landmark method.
Figure 11: The accuracy per event for all methods on the BPIC 2017 dataset. This dataset (arguably) represents a stable environment with no abrupt drifts, allowing most methods to converge to high accuracy levels after a brief adaptation period. TFCLPM and CNAPwP perform similarly well, whereas the GAN-based approach struggles significantly, failing to reach the high accuracy standards set by the other methods.
Method
Dataset
RandTasks
ImbalTasks
Recur BPIC15
RecurTasks
BPIC17
CNAPwP (ours)
3.29 ± 2.13
2.98 ± 1.42
25.04 ± 1.76
3.16 ± 2.34
10.12 ± 1.98
DynaTrainCDD [ 11 ]
2.06 ± 1.24
1.90 ± 1.37
9.13 ± 1.84
2.45 ± 0.87
8.41 ± 1.12
TFCLPM [ 25 ]
2.23 ± 2.31
4.62 ± 2.65
12.14 ± 3.12
2.81 ± 1.72
11.02 ± 1.33
GAN [ 23 ]
5.08 ± 2.15
5.22 ± 2.79
22.50 ± 1.38
5.23 ± 1.95
4.56 ± 2.78
Landmark [ 16 ]
63.85 ± 6.47
18.45 ± 8.32
229.25 ± 7.68
33.98 ± 9.13
13.59 ± 7.98
Table 4: Processing time per event and standard deviation after 5 runs of each method over each dataset (in milliseconds).
Condition
CNAPwP
E-Prompt
G-Prompt
No Prompt
Average Accuracy
.789
.773
.770
.709
Table 5: Average accuracy value for each condition on the RecurrentTasks dataset.
Figure 12: The accuracy for each event index for the four conditions in the ablation study. It confirms that combining both E-Prompts and G-Prompts (the CNAPwP line) yields the highest performance. The distinct roles are visible: the G-Prompt helps in reducing sharp performance drops immediately after task transitions, while the E-Prompt is crucial for aiding the model’s rapid recovery.
Prefix tuning (Pre-T)
Prompt tuning (Pro-T)
Accuracy
Duration (s)
Accuracy
Duration (s)
RandomTasks
.813
264.26
.800
325.47
RecurrentTasks
.789
318.20
.780
401.55
ImbalancedTasks
.797
103.82
.798
104.08
Recurrent BPIC2015
.662
801.80
.657
1073.63
BPIC2017
.818
2114.40
.812
2509.76
Table 6: Total accuracy with a prompting function, where bold text shows the highest accuracy or lowest running time for each prompting function and dataset.
Department of Mathematics and Computer Science, Eindhoven University of Technology, The Netherlands · Department of Mathematics and Computer Science, University of Wuppertal, Germany
Department of Mathematics and Computer Science, Eindhoven University of Technology, The Netherlands · Department of Mathematics and Computer Science, University of Wuppertal, Germany