Introduction
Temporal Point Processes (TPPs) serve as the mathematical foundation for modeling asynchronous event sequences across various domains, including seismology, finance, and social media. Traditionally, these models are trained using Maximum Likelihood Estimation (MLE). However, MLE is notoriously susceptible to overfitting, particularly when dealing with sparse, noisy, or incomplete real-world datasets. While contrastive learning has emerged as a powerful regularization technique in other fields, its application to TPPs has been hindered by the computational complexity of generating high-quality negative samples and the lack of robust "teacher" models.
Methodology: Hierarchical Contrastive Learning (HCL)
To address these challenges, we introduce the Hierarchical Contrastive Learning (HCL) framework. HCL regularizes TPP training through a two-tier contrastive approach:
- Event-Level Contrastive Loss: This component operates at the individual event level. For each observed event, the model maximizes the probability of the true event type while penalizing unobserved event types at the same timestamp, effectively handling local uncertainty.
- Sequence-Level Contrastive Loss: This tier compares an entire observed sequence against augmented "positive" and "negative" versions.
Model-Guided Thinning
A key innovation of HCL is the "model-guided thinning" process used for sequence augmentation. Unlike traditional methods like Ogata’s thinning, which has $O(N^2)$ complexity, our approach leverages the model’s internal infectivity matrix. This matrix quantifies the impact of past events on future occurrences.
- Positive sequences are generated by removing "insignificant" events (those with low impact).
- Negative sequences are created by removing "significant" events, thereby disrupting the underlying generative mechanism. This method achieves $O(N)$ complexity, making it highly scalable for long event sequences.
Experimental Evaluation
The HCL framework was evaluated on five diverse datasets, including synthetic Hawkes processes (with and without missing data) and real-world datasets such as Retweet (social media), StackOverflow (user badges), and BookOrder (high-frequency finance).
Key Results
Using both classic Hawkes Processes (HP) and Transformer Hawkes Processes (THP) as backbones, HCL consistently outperformed standard MLE and other contrastive baselines.
- Performance: MLE+HCL achieved superior log-likelihood and prediction accuracy. For instance, on synthetic Hawkes data, log-likelihood improved from -0.06 (MLE) to -0.04 (HCL).
- Efficiency: The model-guided thinning process demonstrated significant speedups over Ogata’s thinning, particularly as sequence length increased.
- Robustness: HCL exhibited lower variance in results compared to existing methods like NCE-TPP.
Discussion and Limitations
The synergy between event-level and sequence-level losses allows HCL to capture both local event dynamics and global structural dependencies. However, the framework introduces hyperparameters such as the weights for contrastive losses ($\gamma_1, \gamma_2$) and the number of negative sequences ($K$).
As shown in the sensitivity analysis, performance is influenced by the choice of $K$, with an optimal peak around 20 sequences for the tested configuration. Future work will focus on providing a more rigorous theoretical foundation for this hierarchical structure and exploring integration with other generative frameworks like Wasserstein GANs.
Conclusion
Hierarchical Contrastive Learning provides a scalable and effective solution for regularizing Temporal Point Processes. By utilizing model-guided thinning, HCL overcomes the computational bottlenecks of previous contrastive methods, offering a robust alternative to traditional MLE for complex, real-world event sequences.
Summary updated