In-Context Learning of Temporal Point Processes with Foundation Inference Models

David Berghaus, Patrick Seifner, Kostadin Cvejoski, César Ojeda, Ramsés J. Sánchez · DOI

Introduction

Temporal Point Processes (TPPs) serve as the mathematical framework for analyzing systems that generate asynchronous, irregular events, such as social media interactions, financial trades, or neural activity. Traditionally, modeling a new dataset required training specialized neural networks from scratch. Researchers from the Lamarr Institute and the University of Bonn propose a paradigm shift with the Foundation Inference Model for Point Processes (FIM-PP). This model leverages "in-context learning" to infer underlying dynamics from a few example sequences without extensive retraining.

Problem Statement

Marked Temporal Point Processes (MTPPs) are complex because they model both the timing and the type (mark) of events. Existing state-of-the-art models are typically "one-offs," lacking the ability to generalize across different dynamical regimes. A model trained on urban mobility data, for instance, cannot be directly applied to e-commerce behavior. FIM-PP addresses this gap by providing a general-purpose inference engine capable of zero-shot generalization.

Methods: The FIM-PP Architecture

The core of FIM-PP is a hierarchical Transformer architecture designed for amortized inference.

The FIM-PP architecture utilizes a context encoder and history decoder to estimate intensity parameters from event sequences.

The model's workflow consists of three primary components:

  1. Synthetic Pretraining: The model is pretrained on a massive synthetic dataset of 14.4 million events across 72,000 simulated processes, including Hawkes and Poisson processes with various kernels.
  2. Hierarchical Transformer: A Context Encoder processes example sequences to capture global dynamics, while a History Decoder uses the current sequence's history to query the context.
  3. Intensity Parametrization: FIM-PP predicts the parameters ($\alpha, \beta, \mu$) of a conditional intensity function, allowing for continuous and interpretable output.

Datasets and Evaluation

FIM-PP was trained on a custom synthetic dataset covering diverse Hawkes process families. Evaluation was conducted on five real-world benchmarks:

  • TAXI: NYC taxi patterns.
  • TAOBAO: E-commerce user behavior.
  • STACK OVERFLOW: Badge award timestamps.
  • AMAZON: Product review histories.
  • RETWEET: Social media information cascades.

Key Results and Insights

FIM-PP demonstrates that synthetic data can serve as a powerful prior for real-world dynamics. The model performs "amortized inference," mapping observed sequences directly to intensity functions.

Zero-shot intensity estimation by FIM-PP compared to ground truth on synthetic Hawkes processes and the Retweet dataset.
  • Zero-Shot Performance: In zero-shot mode, FIM-PP matches specialized models like CDiff on multi-event prediction tasks.
  • Efficient Fine-Tuning: With minimal fine-tuning, FIM-PP consistently outperforms baselines. On the TAXI dataset, it achieved an Optimal Transport Distance (OTD) of 17.91, surpassing the best baseline of 21.01.
  • Interpretability: The model successfully recovers complex intensity patterns, such as the "ping-pong" effect in multi-type event sequences.

Limitations and Future Work

While robust, FIM-PP's zero-shot performance can decline if real-world patterns (e.g., specific high-frequency oscillations) are absent from the synthetic training set. Current constraints include a maximum of 22 marks and 2000 events per sequence. Future research will focus on broadening the synthetic prior and exploring intensity-free foundation models for even more irregular data.

For more information, visit the project page at fim4science.github.io/OpenFIM/.

Summary updated

BibTeX
@inproceedings{berghaus2026context,
  author = {David Berghaus and Patrick Seifner and Kostadin Cvejoski and César Ojeda and Ramsés J. Sánchez},
  title = {{In-Context Learning of Temporal Point Processes with Foundation Inference Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=h9HwUAODFP},
}
Figure