[Paper Review] Transformer Hawkes Process
This paper proposes the Transformer Hawkes Process (THP), a novel point process model that leverages self-attention mechanisms to capture both short-term and long-term temporal dependencies in event sequence data, outperforming RNN-based models like NHP in likelihood and prediction accuracy while achieving superior computational efficiency. THP generalizes well to structured data, such as relational graphs, by incorporating structural knowledge through attention mechanisms.
Modern data acquisition routinely produce massive amounts of event sequence data in various domains, such as social media, healthcare, and financial markets. These data often exhibit complicated short-term and long-term temporal dependencies. However, most of the existing recurrent neural network based point process models fail to capture such dependencies, and yield unreliable prediction performance. To address this issue, we propose a Transformer Hawkes Process (THP) model, which leverages the self-attention mechanism to capture long-term dependencies and meanwhile enjoys computational efficiency. Numerical experiments on various datasets show that THP outperforms existing models in terms of both likelihood and event prediction accuracy by a notable margin. Moreover, THP is quite general and can incorporate additional structural knowledge. We provide a concrete example, where THP achieves improved prediction performance for learning multiple point processes when incorporating their relational information.
Motivation & Objective
- To address the limitations of RNN-based point process models in capturing long-term temporal dependencies in event sequences.
- To overcome the computational inefficiency and training instability of recurrent architectures in modeling complex event dynamics.
- To develop a scalable, efficient, and generalizable framework for modeling event streams with both short-term and long-term dependencies.
- To integrate structural knowledge—such as relational or spatial information—into point process modeling for improved performance on complex data.
- To demonstrate state-of-the-art performance in likelihood and event prediction accuracy across diverse real-world datasets.
Proposed method
- The model employs a self-attention mechanism to directly compute attention weights between all event pairs, enabling long-range dependency modeling without recurrence.
- It uses temporal encoding (Eq. 2) to inject relative time differences into the attention mechanism, preserving temporal dynamics.
- Positional encoding is applied to maintain sequence order, following Vaswani et al. (2017), to support the transformer architecture.
- The model is trained end-to-end via maximum likelihood estimation on observed event sequences.
- For structured data, THP incorporates relational information via full attention (THP-F) or neighborhood-based attention (THP-S), using spatial proximity to constrain information flow.
- The framework supports both unstructured and graph-structured event sequences, enabling flexible modeling of complex dependencies.
Experimental results
Research questions
- RQ1Can a self-attention-based architecture outperform RNN-based models in capturing long-term dependencies in event sequence data?
- RQ2Does the Transformer Hawkes Process achieve better likelihood and prediction accuracy than existing models like NHP and TSES?
- RQ3How does the integration of relational or structural information improve modeling performance in multi-node event systems?
- RQ4What is the impact of architectural components such as self-attention and temporal encoding on model performance?
- RQ5How does THP scale in terms of model size and training speed compared to RNN-based baselines?
Key findings
- THP achieves significantly better log-likelihood and event prediction accuracy than NHP and TSES on the 911-Calls and Earthquake datasets, with improvements of up to 3.5 log-likelihood points on Retweets.
- On the Retweets dataset, THP with temporal encoding achieves a log-likelihood of -2.03, compared to NHP’s -5.60, demonstrating a substantial performance gain.
- THP with 100k–200k parameters outperforms NHP (1M parameters) and TSES (2M parameters), showing superior parameter efficiency.
- THP achieves a training speedup of up to 2.56x over NHP, with consistent performance across different model sizes.
- THP-S (structured-THP with neighborhood attention) improves event prediction over THP-F (full attention), especially under low-data regimes, by reducing spurious attention dependencies.
- Ablation studies confirm that both self-attention and temporal encoding are critical components, with removal leading to significant performance drops in log-likelihood.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.