Prompt-augmented Temporal Point Process for Streaming Event Sequence

Siqiao Xue, Yan Wang, Zhixuan Chu, Xiaoming Shi, Caigao Jiang, Hongyan Hao, Gangwei Jiang, Xiaoyun Feng, James Y. Zhang, Jun Zhou

Introduction

In modern data ecosystems—ranging from high-frequency financial markets and healthcare monitoring to social media engagement—data arrives as a continuous stream of discrete events. Temporal Point Processes (TPPs) have emerged as the standard mathematical framework for modeling these sequences, capturing both the timing and the nature of events. However, traditional TPPs are typically designed for static environments. They are trained on fixed datasets and struggle to adapt when the underlying data distribution shifts over time.

When a standard TPP is updated with new streaming data, it often suffers from catastrophic forgetting: the model improves its performance on recent patterns but loses its ability to accurately model historical behaviors. Existing Continual Learning (CL) strategies often rely on "rehearsal buffers" (storing old data, which poses privacy and memory risks) or require explicit "task identities" (knowing exactly when a distribution shift occurred). In real-world streaming scenarios, these requirements are often impractical. This paper introduces PromptTPP, a novel framework designed to bring task-agnostic continual learning to TPPs without the need for data storage or manual task labeling.

Methodology: The PromptTPP Framework

PromptTPP addresses the limitations of static TPPs by integrating a base neural TPP (such as a Neural Hawkes Process) with a Continuous-time Retrieval Prompt Pool (CtRetroPromptPool). This architecture allows the model to dynamically retrieve and apply relevant knowledge based on the current context of the event stream.

1. Continuous-time Temporal Prompts

Unlike standard prompts used in Natural Language Processing, the prompts in PromptTPP are specifically engineered for temporal dynamics. Each prompt in the pool consists of two parts:

  • Structural Component: A learnable embedding that captures general pattern characteristics.
  • Temporal Component: A component that utilizes continuous-time positional encodings. These encodings are based on the average time intervals between events, allowing the prompt to remain sensitive to the "rhythm" of the sequence.

2. Task-Agnostic Retrieval Mechanism

To ensure the model can function without explicit task labels, PromptTPP employs a retrieval mechanism based on Maximum Inner Product Search (MIPS). The model uses the hidden state of the current event sequence as a "query" to find the most relevant "keys" within the prompt pool. This allows the model to autonomously determine which learned knowledge is most applicable to the current input, effectively handling distribution shifts as they occur.

3. Prompt-Event Interaction via Prefix-Tuning

Once the relevant prompts are retrieved, they are integrated into the base TPP using Prefix-Tuning. The prompts act as specialized instructions that guide the base model's layers on how to process the current sequence. This method is highly efficient; the authors note that PromptTPP only adds approximately 8% to 12% more parameters compared to the base model.

4. Asynchronous Refresh

To maintain computational efficiency during training, the framework utilizes an asynchronous refresh strategy. The embeddings within the prompt pool are updated periodically rather than at every individual time step, ensuring that the model remains scalable for high-velocity streams.

Experimental Evaluation

The framework was evaluated using three diverse real-world datasets, partitioned into "rolling slides" to simulate a continuous streaming environment:

  • Taobao: User click behaviors (10 tasks, partitioned by day).
  • Amazon: User reviews of clothing and jewelry (10 tasks, partitioned by 2-year intervals).
  • StackOverflow: User award and badge sequences (6 tasks, partitioned by 5-month intervals).

Key Findings

  • Performance and Stability: PromptTPP consistently outperformed seven major baselines, including standard TPPs and existing Continual Learning methods. It achieved state-of-the-art results in both event type prediction and time prediction.
  • Mitigating Forgetting: In longitudinal analyses, the authors demonstrated that while standard models saw a sharp decline in performance on old tasks after learning new ones, PromptTPP maintained high accuracy across the entire sequence of tasks. This confirms the model's ability to "store" and "retrieve" knowledge effectively.
  • Efficiency: The model achieves these gains with minimal parameter overhead and without the privacy risks associated with storing raw historical data in a rehearsal buffer.

Conclusion and Future Work

PromptTPP represents a significant step forward in making Temporal Point Processes viable for real-world, non-stationary streaming data. By treating time as a first-class citizen in the prompting process and utilizing a task-agnostic retrieval system, the model bridges the gap between static modeling and the dynamic nature of event streams.

While highly effective, the authors note that the model still requires a sufficient volume of data to learn effectively, potentially facing challenges in "cold-start" scenarios. Future research may explore more complex interactions between prompts and base model layers, as well as the ethical implications of deploying highly accurate behavioral tracking models in sensitive domains.

Summary updated

BibTeX
@inproceedings{xue2023prompt,
  author = {Siqiao Xue and Yan Wang and Zhixuan Chu and Xiaoming Shi and Caigao JIANG and Hongyan Hao and Gangwei Jiang and Xiaoyun Feng and James Y. Zhang and JUN ZHOU},
  title = {{Prompt-augmented Temporal Point Process for Streaming Event Sequence}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=LswqtKU9op},
}
Figure