Next Activity Prediction (NAP)
- Next Activity Prediction (NAP) is a conditional forecasting problem that predicts the immediate next action based on partial execution histories and diverse contextual setups.
- Robust evaluation of NAP is challenged by example leakage and generalization issues, demanding refined train-test splitting and scenario-specific benchmarks.
- Recent advances leverage deep sequence models, graph-based structures, and explanation mechanisms to improve accuracy and interpretability across varied domains.
Next Activity Prediction (NAP) denotes the problem of predicting the immediately subsequent activity from a partial execution history. In Predictive Process Monitoring (PPM), it is typically defined over prefixes of event-log traces, with each prefix labeled by the next activity in the same case (Abb et al., 2023). Related formulations retain the same predictive core while changing the unit of analysis: resource-centric NAP predicts the next activity in an individual resource’s timestamp-ordered activity sequence (Kurowski et al., 26 Aug 2025), object-centric NAP predicts the next activity for a primary object in an object-centric event log (Wang et al., 2 Jul 2026), multimodal next action prediction forecasts a user’s next computer interaction from screenshots and interaction history (Shaikh et al., 6 Mar 2026), and action-anticipation work formulates NAP over observed video clips and future action labels (Liu et al., 2024). This suggests that NAP is better understood as a family of conditional forecasting problems whose shared abstraction is prefix-to-next-event prediction, but whose notions of context, structure, and generalization differ by domain.
1. Formal problem space
In the case-centric PPM formulation, an event log is a multiset of completed traces, each trace being a finite sequence of events. Each event carries at least an activity label , and a prefix of length is . NAP then treats a prefix projected onto activity labels as a feature vector , the next activity as its label, and learns a predictor with (Abb et al., 2023).
Several extensions preserve this prefix-label structure while changing the semantics of the prefix. Resource-centric NAP replaces case traces with per-resource sequences in timestamp order and predicts 0 from 1 (Kurowski et al., 26 Aug 2025). Object-centric NAP operates on OCELs, where events may involve multiple business objects; for a primary object 2, the prefix includes observed lifecycle events, co-participating objects, and contextual events linked through those objects, with the target 3 (Wang et al., 2 Jul 2026).
Outside process mining, the same predictive pattern recurs with different state spaces. In multimodal HCI, an interaction stream is 4 with 5, where 6 is a natural-language action description and 7 an optional screenshot; the goal is to predict the next 8 events from a context window 9 (Shaikh et al., 6 Mar 2026). In smart-home prediction, the target is often a pair 0, comprising the next activity and its duration (Doctorarastoo et al., 20 Jan 2026). In video action anticipation, an observed clip sequence 1 is encoded into feature sequence 2, and a causal decoder predicts the next action label 3 from 4 (Liu et al., 2024).
2. Evaluation methodology and the generalization problem
A central issue in NAP research is that common evaluation protocols may not measure generalization in any robust sense. For case-centric event logs, the standard procedure randomly or temporally splits completed traces into training and test subsets, then derives prefixes from each. Abb et al. show that this induces extensive example leakage because many control-flow prefixes recur in both splits. They define leakage as
5
and report leakage far above 6, often close to 7, on Helpdesk, BPIC2012, BPIC2013, BPIC2017, and MobIS. In the same study, a trivial lookup-table baseline nearly matches a state-of-the-art deep model: on Helpdesk, leakage is approximately 8, baseline accuracy 9, MPPN accuracy 0, and the control-flow accuracy limit 1; on MobIS the corresponding values are approximately 2, 3, 4, and 5; on BPIC12 they are approximately 6, 7, 8, and 9 (Abb et al., 2023).
The implication is not merely that some benchmarks are easy, but that distinct generalization scenarios have been conflated. Abb et al. distinguish at least three broad types: unseen control-flow variants, unseen attribute-activity combinations, and truly unseen activities or values. They further argue that robust evaluation should prevent prefix overlap entirely, for example by leave-one-variant-out splitting or by prefix-level temporal separation, and should explicitly test concurrency, loops, context dependency, and unknown-value cases (Abb et al., 2023).
Subsequent work reinforces the importance of this distinction. Resource-centric NAP reports variant-to-resource ratios of approximately 0 and example leakage below 1, in contrast to case-centric variant-to-case ratios of 2–3 with leakage up to 4, and attributes part of its gains to the fact that resource behavior is less dominated by memorized prefixes (Kurowski et al., 26 Aug 2025). A later benchmark comparing LSTMs, Transformers, vocabulary-adapted LLMs, and a counting-based argmax baseline across seven BPI logs finds that the argmax baseline matches or approaches billion-parameter LLMs on most datasets; differences between argmax and learned models are significant only on BPI12 and BPI17 (Weytjens et al., 14 Jun 2026).
3. Model families in process-monitoring NAP
A large portion of the literature studies case-centric NAP on classical event logs using supervised sequence models and tabular encodings. An empirical comparison of context-enriched NAP evaluates MLP, LSTM, and 1D CNN architectures combined with ordinal, binary, one-hot, hash, and Word2Vec encodings across five real-life event logs. Across folds, logs, architectures, and encodings, the reported averages are 5 Accuracy, 6 AUC7, and 8 F1-score; Hash encoding is the best overall encoding at 9 over the mean, while LSTM is the best architecture at 0 over the mean, and significant differences are reported via Friedman and Nemenyi tests (Weinzierl et al., 2020).
Interpretability-oriented work keeps the predictive architecture close to standard sequence models but augments it with explanation mechanisms. XNAP uses a one-layer bidirectional LSTM with 1 per direction, softmax next-activity prediction, and layer-wise relevance propagation to assign event-level relevance scores 2. On helpdesk it reports 3 Accuracy and 4 F1-score; on bpi2019 it reports 5 Accuracy and 6 F1-score. The explanatory output highlights, for example, “Resolve ticket” when predicting “End” in helpdesk traces and “Record Invoice Receipt” when predicting “Clear Invoice” in bpi2019 traces (Weinzierl et al., 2020).
Transformer-based and language-model-based variants extend NAP beyond symbolic activity sequences. A Symbolic[Neuro] system combines a Transformer encoder with a Petri-net compliance score that modulates beam-search suffix generation at inference time. The neural model is trained purely by categorical cross-entropy, while process knowledge enters through a fuzzy fitness term 7 used to reweight candidate extensions. Reported micro-averaged Damerau–Levenshtein similarity improvements include 8 on a synthetic exceptional-branch setting and 9 on BPIC2012, with smaller gains on several other logs (Donadello et al., 2023).
SNAP transfers NAP into a text-classification setting by transforming event-log prefixes into semantic contextual stories and fine-tuning language foundation models on the resulting narratives. On six benchmark logs, SNAP-G reports 0 Accuracy on BPI13cp, 1 on EnvPermit, 2 on Sepsis, and 3 on the semantically rich MIP dataset; ablations show that story inputs outperform “list of values” inputs on most logs, and that omitting user utterances on MIP reduces Accuracy from 4 to 5 and F1 from 6 to 7 (Oved et al., 2024).
Two recent lines directly question whether larger models are inherently preferable. “David vs. Goliath” reports no consistent benefit from pretraining, little effect of model size, and competitiveness of a first-order argmax baseline across seven logs (Weytjens et al., 14 Jun 2026). An entropy-driven selection framework instead proposes choosing the model class from the process entropy: on the high-entropy Sepsis log, DAW-Transformer achieves 8 Accuracy versus 9 for Limited window Multi-Transformers and approximately 0 for CNN-LSTM-SAtt, while on the low-entropy Road Traffic Fine log Random Forest reaches 1 versus 2 for DAW-Transformer (Zare et al., 14 Feb 2025). This line of work makes the complexity–interpretability trade-off explicit rather than assuming a monotonic benefit from more expressive architectures.
Graph-based structure preservation is another major trend. RLHGNN converts prefixes into heterogeneous process graphs with forward, backward, and repeat edges, uses a DQN to select one of four graph structures per prefix, and then applies heterogeneous graph convolution for next-activity prediction. Averaged over six logs, it reports 3 Accuracy versus 4 for the best static baseline, 5 F1-score versus 6, and approximately 7 ms inference latency per instance (Wang et al., 3 Jul 2025).
4. Alternative units of prediction and prescriptive extensions
Resource-centric NAP shifts attention from case progression to the behavior of individual resources. The formulation extracts, for each resource, a timestamp-ordered activity sequence and applies classifiers to feature encodings such as capability, 2-gram transitions, repetition statistics, and their concatenation. Across four BPIC logs, LightGBM and Transformer perform best with 2-gram transition encoding, while Random Forest benefits most from the combined 8 encoding; the best average accuracies are 9 for BPIC2013 with RF+0, 1 for BPIC2017 with RF+2, 3 for BPIC2018 with RF+4, and 5 for BPIC2019 with Transformer+6 (Kurowski et al., 26 Aug 2025).
Object-centric NAP addresses logs where events are shared by multiple typed business objects. EHHN represents each prefix as a heterogeneous hypergraph whose event–object hyperedges bind co-participating objects and whose lifecycle hyperedge groups the primary object’s observed events. A dual-stream architecture combines a micro-spatial stream for event-driven object-state evolution with a macro-evolution stream for temporal dynamics using retrieved global prototypes. Across four OCEL benchmarks, EHHN reports the best Accuracy and macro F1-score on all datasets, with gains of up to 7 and 8 percentage points over the strongest baselines; relative to the strongest OCEL-native graph baseline, peak GPU memory on BPI 2017 drops from 9 GB to 0 GB, a 1 reduction (Wang et al., 2 Jul 2026).
Clinical NAP introduces domain knowledge directly into similarity computation. TS4NAP uses ICD-10-CM and ICD-10-PCS taxonomies, Sánchez information content, Sánchez–Lin semantic similarity, and bipartite matching over diagnosis lists and procedure sequences derived from MIMIC-IV. Over 36 event logs defined by primary-diagnosis categories with at least 500 cases, the taxonomy-aware variant TS4NAP2 outperforms the Boolean baseline TS4NAP3 in 34 of 36 logs at 4, with AverageSimilarity ranging from about 5–6 for TS4NAP7 versus 8–9 for TS4NAP00 (Kuhn et al., 5 Mar 2025).
A distinct but adjacent line turns NAP from predictive into prescriptive analytics. Goal-oriented next best activity recommendation formulates suffix recommendation as an MDP whose valid actions are constrained by a Directly-Follows Graph, predicts KPI consequences with a GAN-LSTM model, and uses Maskable-PPO to explore conformant suffixes that satisfy completion-time or outcome goals. Reported results include 01–02 rescue rates for goal-violating cases, GS03 of approximately 04–05, 06 conformance by construction, and 07–08 percentage-point improvements in GS09 over a state-of-the-art next-best-action baseline (Agarwal et al., 2022). This suggests a boundary case in which NAP becomes one component of a longer-horizon decision problem.
5. NAP beyond process mining
The same predictive pattern appears in video understanding, smart environments, and human-computer interaction, often under the names next action prediction or action anticipation. Time Perception Machine combines a hierarchical RNN with temporal point processes to predict when, where, and what the next activity will be in streaming video or trajectory data. On NBA it reports timing mAE 10 ms and mDR 11 for TPM12, compared with Hawkes at approximately 13 ms and 14; on NBA category prediction it reports 15 mAP versus 16 for the best 17-order Markov baseline (Zhong et al., 2018).
Graphing the Future represents partially observed videos as semantic–motion graphs and matches them to fully observed references with normalized Graph Edit Distance. On MSR Daily Activities, early activity prediction accuracy rises from 18 at 19 observation to 20 at full observation; on CAD-120, next-active-object prediction reaches 21 at a 2.00 s horizon and 22 at a 0.25 s horizon (Manousaki et al., 2022).
ARR explicitly decomposes action anticipation into action recognition and sequence reasoning. A video encoder produces clip-level action features, and a causal Transformer decoder is trained with a shifted-label NAP objective to learn statistical correlations among actions. Reported results include class-mean Top-5 recall of 23 on Epic-Kitchens-100, Top-1 Accuracy of 24 on 50Salads, and consistent gains from unsupervised decoder pretraining on unlabeled videos (Liu et al., 2024).
Human-computer interaction introduces an unbounded action space and long multimodal histories. LongNAP uses a vision-language policy, a memory bank of past reasoning traces, and a lexical retriever combining BM25, temporal decay, and MMR. On one month of phone-use data from 20 users, it reports mean similarity 25 versus 26 for supervised finetuning and 27 for the best prompted baseline, human win-rate 28, cross-user generalization 29 versus 30, pass@[email protected] 31, and pass@[email protected] 32 (Shaikh et al., 6 Mar 2026).
In smart-home forecasting, retrieval-augmented prompting with temporal, spatial, behavioral-history, and persona context is used to query a pre-trained LLM. On CASAS Aruba, zero-shot, one-shot, and two-shot settings yield Accuracy 33, 34, and 35, with MAE 36, 37, and 38 minutes respectively; normalized DTW for the LLM remains 39–40, compared with 41 for a time-aware Markov baseline (Doctorarastoo et al., 20 Jan 2026).
6. Robustness, explainability, and open research directions
Current research identifies three recurring pressure points for NAP: whether models genuinely generalize, whether their predictions can be interpreted, and whether they remain reliable under distributional change. The generalization critique is strongest in the leakage literature: evaluation must distinguish unseen control-flow variants, unseen attribute–activity combinations, and truly unseen activities or values; principled systems for the last case may emit an UNKNOWN token or return a probability distribution with a confidence measure such as entropy (Abb et al., 2023).
Explainability has been pursued both intrinsically and post hoc. XNAP provides per-event relevance scores through layer-wise relevance propagation, making the influence of specific historical events inspectable by process analysts (Weinzierl et al., 2020). TS4NAP is explicitly case-based and exposes similar historical traces, code matches, and taxonomic similarities for each clinical recommendation (Kuhn et al., 5 Mar 2025). Knowledge-driven modulation integrates a Petri-net compliance score into suffix decoding, so that rare but procedurally admissible continuations can be boosted even when they are under-sampled in the training data (Donadello et al., 2023).
Concept drift and recurring tasks require additional machinery beyond static train-test evaluation. CNAPwP adapts DualPrompt to continual next activity prediction by combining a shared model with global prompts and bucket-specific expert prompts, plus task recognition based on prefix-tree dissimilarity. On synthetic RandomTasks and RecurrentTasks it reports the best average accuracies, 42 and 43, while remaining below 44 ms per event even on real logs such as BPIC2015rec and BPIC2017 (Hassani et al., 1 Apr 2026). The paper also introduces a task-specific forgetting metric defined as the accuracy gap between the first and later occurrences of the same task, targeting recurrent drift rather than one-off adaptation (Hassani et al., 1 Apr 2026).
A broad methodological tension remains unresolved. On one side are increasingly elaborate architectures—semantic story models, graph and hypergraph encoders, retrieval-augmented vision-language systems, and continual-learning prompt frameworks. On the other side are repeated findings that simple baselines can be remarkably competitive when evaluation protocols leak examples or when the transition structure is low-entropy (Abb et al., 2023). Benchmark work on LSTMs, Transformers, and LLMs concludes that pretraining confers no consistent improvement, model size shows little effect, and a first-order argmax baseline matches or approaches large LLMs on most event logs (Weytjens et al., 14 Jun 2026). A plausible implication is that future progress in NAP depends as much on leakage-free evaluation design and scenario-specific benchmark construction as on architectural novelty itself.