Abstract
Language-TPP is a unified framework designed to bridge the gap between Temporal Point Processes (TPPs) and Large Language Models (LLMs). By encoding continuous time intervals into specialized byte-tokens, the framework enables standard LLMs to simultaneously predict event timing, categorize event types, and generate rich textual descriptions. Our approach outperforms both traditional TPP models and existing LLM-based hybrids across multiple real-world datasets, demonstrating the benefits of unifying temporal and textual modalities.
Introduction
Real-world events are multi-faceted, typically characterized by a timestamp, a category, and unstructured textual context, such as product reviews or incident reports. Historically, Temporal Point Processes (TPPs) have been the standard for modeling event sequences, yet they struggle to incorporate rich text. Conversely, Large Language Models (LLMs) excel at text processing but lack native mechanisms for handling continuous time. Previous attempts to merge these fields often relied on inefficient string-based time representations or could only use text as input. Language-TPP addresses these limitations by introducing a coherent integration of standard LLM architectures with TPP principles.
Methodology
The core innovation of Language-TPP lies in its ability to treat continuous time as a first-class citizen within the LLM's token space.
Byte-Token Encoding
To avoid the token inefficiency of representing timestamps as long strings (e.g., "0.075999237"), Language-TPP parses 32-bit floating-point numbers into four specialized byte-tokens. This allows the model to process precise continuous time intervals using a compact, fixed-length vocabulary, significantly reducing the sequence length compared to standard string representations.
Unified Framework and Training
Every event is structured using a unified text template with special tokens like <|start_of_event|> and <|time_prefix|>. This transforms multi-modal event sequences into a standard token stream compatible with causal Transformers.
The training pipeline consists of three stages:
- Continued Pre-training: Adapting the base model (Qwen2.5) to the general structure of event sequences.
- Next-event Fine-tuning: Training the model to predict the next event's time, type, and description via instruction-style prompting.
- Intensity Alignment: To capture the statistical "intensity" of events—a fundamental TPP concept—a small projection layer is fine-tuned to map the LLM's hidden states to a conditional intensity function $\lambda^*(t)$.
Experimental Results
Language-TPP was evaluated on five diverse datasets, including traditional TPP benchmarks (Retweet, Stackoverflow, Taobao, Taxi) and a multi-modal dataset (Amazon Review).
Performance Benchmarks
The model achieved state-of-the-art performance in log-likelihood (TLL) across all traditional datasets, outperforming established models like Neural Hawkes Processes (NHP) and Transformer Hawkes Processes (THP). On the Amazon Review dataset, Language-TPP achieved an RMSE of 106.03, a significant improvement over the previous leader, ANHP-G3.5 (RMSE 130.00).
Synergy of Modalities
A key finding is the mutual benefit of combining text and time. Incorporating textual descriptions improved temporal prediction accuracy, while including temporal data enhanced the quality of generated text (scoring 24.78 ROUGE-L). Qualitative analysis further revealed that Language-TPP's generated reviews better preserved the sentiment distribution of the ground truth compared to models ignoring temporal context.
Discussion and Conclusion
Language-TPP demonstrates that treating continuous numbers as raw bytes is highly efficient for LLMs, reducing token counts while maintaining precision. Interestingly, smaller models (0.5B parameters) often outperformed larger variants (1.5B), suggesting higher parameter efficiency for specialized TPP tasks. While context window limitations and computational costs for long sequences remain challenges, this work paves the way for integrating other modalities like images or audio into a unified TPP-LLM framework.
Summary updated