arXiv:2610.17503cs.LGOct 2026

Manuscript Offprint

arXiv:2610.17503

Foundation Models for Event Prediction Across Heterogeneous Event Logs

Fabian Spaeh, Sean Jaffe, Shandian Zhe, Bin Shen

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Event logs are ubiquitous across real-world domains, including business processes, manufacturing workflows, healthcare, and many other operational systems. Yet event logs can differ substantially in their event semantics, label spaces, interaction patterns, and temporal scales, making it difficult to build a single foundation model that generalizes directly to previously unseen systems. We address this challenge with the Foundation Event Predictor (FEP), a simple and scalable in-context architecture that performs next-event prediction through learned, event-level nonparametric inference. Causal self-attention encodes context and target histories into key and query representations, respectively, while the observed next context events are encoded as values. Cross-attention then performs learned, relevance-weighted aggregation of next-event outcomes over all context transitions, allowing the entire nonparametric prediction procedure to be expressed as standard attention operations and efficiently parallelized with modern kernels such as FlashAttention. To promote cross-system generalization, we introduce permutation-robust embedding learning and random fixed embeddings to decouple event IDs from persistent semantics, together with empirical quantile transforms and robust normalization to handle diverse temporal scales. We pretrain FEP on 696 real-world event datasets spanning heterogeneous event systems and evaluate it on 50 held-out datasets unseen during pretraining. Across these datasets, FEP generalizes effectively to new event systems without parameter adaptation, frequently approaching the performance of strong models trained separately on each target dataset while substantially outperforming existing foundation-model baselines, particularly on challenging prediction tasks.

1 Introduction

Event logs arise across numerous real-world domains and modern operational systems. Examples include loan applications and claims processing in financial services, purchasing and replenishment in supply chains, order-to-cash and procure-to-pay workflows in enterprise systems, production and maintenance events in manufacturing, patient visits and clinical procedures in healthcare, and alarms and incidents in computing infrastructure. In each setting, an event log records sequences of discrete activities together with their occurrence times and potentially other descriptive information. Given an ongoing event sequence, predicting what event will occur next and when it will occur is a fundamental problem for understanding, monitoring, and anticipating the evolution of the underlying process. Accurate next-event prediction can support applications ranging from process monitoring, optimization, and resource planning to anomaly detection and proactive intervention (Di Francescomarino and Ghidini, 2022; Ceravolo et al., 2024; Lee et al., 2022).

Building a general-purpose predictive model for event logs is challenging because event systems can differ substantially in their event semantics, label spaces, interaction patterns, sequence characteristics, and temporal scales. An event ID representing a purchase order in one system may have no relationship to the same ID in a clinical or manufacturing log. Consequently, most existing predictive approaches train a separate model for each event log, tying the learned predictor to the activity vocabulary, temporal scale, and dynamics of that particular system (Mei and Eisner, 2017; Zuo et al., 2020; Shchur et al., 2020; Evermann et al., 2017; Tax et al., 2017; Bukhsh et al., 2021). Recent foundation-model approaches have begun to relax this restriction (Berghaus et al., 2026; Berti and van der Aalst, 2026b), but generalizing directly across highly heterogeneous event systems remains challenging.

To address this problem, we propose Foundation Event Predictor (FEP), a simple and scalable in-context architecture for next-event prediction across heterogeneous event logs. FEP treats observed context sequences as a collection of event-level predictive examples, each pairing an observed history with its subsequent event. Causal self-attention encodes context histories into keys and target histories into queries, while the observed subsequent context events form the corresponding values. Cross-attention then performs learned, relevance-weighted aggregation of next-event outcomes over the context, implementing an event-level nonparametric predictor. Its output is decoded into the next event type and inter-arrival time. In this way, FEP exploits the finest-grained supervision available in an event log—the multitude of observed history-to-next-event transitions—and learns across systems how to transfer these predictive relationships to unseen systems. At the same time, expressing the entire nonparametric inference procedure through standard attention enables highly parallel computation over large context sets and direct use of optimized kernels such as FlashAttention (Dao et al., 2022; Dao, 2024).

To further improve generalization across systems with unrelated event vocabularies, we prevent FEP from associating fixed event IDs with persistent semantics. We introduce two complementary strategies: permutation training, which randomly permutes the mapping from event types to a shared learned embedding table in each training episode, and random fixed embeddings, which generate fresh non-trainable event-type representations in each episode. Both encourage FEP to infer predictive structure from the observed context rather than memorize dataset-specific label identities. To accommodate heterogeneous temporal scales and large within-log variation, we further introduce two context-dependent transformations of event inter-arrival times: an empirical quantile transform and a robust log-based normalization. FEP is trained using these normalized time representations to improve robustness across diverse temporal distributions.

We systematically evaluate FEP on a large and heterogeneous collection of real-world event logs, pretraining on 696 datasets and testing on 50 held-out datasets unseen during pretraining. We compare against strong event-prediction models trained separately on each held-out dataset as well as existing foundation models for event data, including FIM-PP (Berghaus et al., 2026) and FM-v2 (Berti and van der Aalst, 2026b). Across different difficulty levels, FEP consistently approaches the strongest local models in both event-type accuracy and inter-arrival-time prediction error while substantially outperforming competing foundation models. Moreover, FEP substantially outperforms an architecture-matched local counterpart on average, demonstrating the benefit of cross-dataset pretraining for generalization. We further conduct ablations on context size, the number of pretraining datasets, model dimension, and other design choices to characterize the factors driving FEP's performance, and analyze its inference efficiency and scalability.

References (53)