Learning Temporal Point Processes for Efficient Retrieval of Continuous Time Event Sequences

Vinayak Gupta, Srikanta Bedathur, Abir De

Abstract

Continuous-Time Event Sequences (CTESs) are ubiquitous in real-world applications, yet retrieving relevant sequences from large databases remains a significant challenge. We introduce NEUROSEQRET, a novel framework that addresses the complexities of CTES retrieval through neural temporal alignment and generative similarity measures. By employing a trainable unwarping function and a Fisher kernel-based relevance score, NEUROSEQRET achieves state-of-the-art accuracy. Furthermore, a supervised hashing mechanism ensures scalability to massive datasets. Our evaluations across five diverse datasets demonstrate substantial improvements in both retrieval precision and computational efficiency.

Introduction

In many real-world scenarios, data arrives as a sequence of events with precise timestamps and categorical "marks"—for instance, a patient’s hospital visits or social media activity. These are known as Continuous-Time Event Sequences (CTESs). While significant research has focused on predicting future events using Marked Temporal Point Processes (MTPP), the problem of retrieval—identifying relevant sequences within a large corpus—has been largely overlooked.

Existing retrieval methods, such as Dynamic Time Warping (DTW), often struggle with CTESs because they prioritize raw signal shapes over the underlying stochastic processes. Furthermore, sequences that are fundamentally similar may appear distinct due to temporal "warping" (e.g., varying speeds of task completion). Finally, the computational cost of searching through millions of sequences necessitates efficient indexing strategies.

The NEUROSEQRET Framework

NEUROSEQRET addresses these challenges through a three-stage pipeline: query unwarping, neural relevance scoring, and trainable hashing.

Query Unwarping

To account for idiosyncratic temporal variations, NEUROSEQRET utilizes an Unconstrained Monotone Neural Network (UMNN) to "unwarp" the query sequence. This process aligns the query's timing with the corpus sequences while strictly preserving the chronological order of events. This normalization is crucial for identifying similarities that are obscured by different timescales.

Visualizing the effect of the neural unwarping function $U_\phi$ on aligning query sequence $H_q$ with corpus sequence $H_c$.

Neural Relevance Scoring via Fisher Kernels

Rather than comparing raw timestamps, NEUROSEQRET compares the generative distributions of sequences. It employs a Fisher Kernel, which measures similarity based on the gradients of the log-likelihoods of the sequences. This approach captures latent structural similarities and results in a dot-product formulation, which is essential for compatibility with efficient hashing techniques. The framework offers two primary variants: SELFATTN for rapid pre-indexing and CROSSATTN for high-precision reranking.

Scalable Retrieval with Trainable Hashing

To enable large-scale search, the authors developed a supervised Locality Sensitive Hashing (LSH) method. A neural network is trained to compress high-dimensional sequence embeddings into compact binary hash codes. This mechanism preserves similarity in the latent space, allowing for lightning-fast lookups even in massive datasets.

Experimental Evaluation

The model was evaluated on five large-scale datasets: Audio, Sports, Celebrity, Electricity, and Health, totaling over 60 million events.

Performance and Ablation

NEUROSEQRET consistently outperformed traditional baselines (e.g., MASS, UDTW) and MTPP models (e.g., RMTPP, SAHP), typically by 5-10% in Mean Average Precision (MAP). Ablation studies confirmed that both the unwarping component and the Fisher kernel are vital for performance.

Ablation study showing the impact of different components on retrieval performance (MAP) across three datasets.

Efficiency and Scalability

The trainable hashing method demonstrated a significant "reduction factor" in search time. The system could reduce the number of required comparisons by up to 75% while maintaining retrieval quality (NDCG) nearly identical to that of an exhaustive search. This "telescopic search" strategy—using SELFATTN for candidate generation and CROSSATTN for reranking—provides an optimal balance between speed and accuracy.

Conclusion

NEUROSEQRET represents a significant step forward in the retrieval of continuous-time event sequences. By combining neural temporal alignment with generative kernels and scalable hashing, it provides a robust "search engine" for complex temporal data. Future work may extend this framework to multi-modal event data or sequences of evolving graphs.

Summary updated

BibTeX
@inproceedings{gupta2022learning,
  author = {Vinayak Gupta and Srikanta Bedathur and Abir De},
  title = {{Learning Temporal Point Processes for Efficient Retrieval of Continuous Time Event Sequences}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.1609/aaai.v36i4.20317},
}
Figure