Retrieving Continuous-Time Event Sequences Using Neural Temporal Point Processes with Learnable Hashing

Vinayak Gupta, Srikanta Bedathur, Abir De

TL;DR

This paper introduces NeuroSeqRet, a novel framework for retrieving relevant continuous-time event sequences (CTESs) from large datasets. It tackles the challenge of "unwarping" query sequences to match variations in timing and introduces a learnable hashing mechanism for efficient, scalable retrieval.

What Problem Does This Paper Address?

The paper addresses the growing challenge of retrieving relevant continuous-time event sequences (CTESs) from massive datasets. CTESs are ubiquitous in applications like finance, health monitoring, and social network analysis. While marked temporal point processes (MTPPs) have shown promise in modeling these sequences, efficiently searching and retrieving similar sequences from large corpora has been largely overlooked. Existing methods often struggle with the inherent variability in event timing and the need to capture nuanced relevance beyond simple similarity.

Methods

NeuroSeqRet employs a two-pronged approach:

  • Query Unwarping: A trainable function is applied to the query sequence to align its temporal characteristics with corpus sequences. This "unwarping" ensures that chronological order is preserved while allowing for variations in timescale, making comparisons more robust.
  • Neural Relevance Scoring: MTPP-based neural models are used to compute a relevance score between the unwarped query and corpus sequences. Two variants are proposed:
  • SelfAttn-NeuroSeqRet: Uses a self-attention mechanism for query-agnostic corpus sequence likelihood computation, enabling pre-computation and efficient hashing.
  • CrossAttn-NeuroSeqRet: Employs a cross-attention mechanism, allowing corpus sequence likelihoods to depend on the query, leading to higher accuracy but making direct hashing more complex.
  • Learnable Hashing (HASH-CROSSATTN-NEUROSEQRET): To enable scalable retrieval, a trainable hashing mechanism is introduced. This method learns binary hash vectors for sequences, optimizing for efficient bucketing and retrieval by minimizing a pairwise ranking loss based on KL divergence. This approach offers a trade-off between accuracy and efficiency.

Datasets

The authors evaluated their models on seven real-world datasets:

  • Audio: Spoken commands with speaker demographics.
  • Sports: Actions in sports sequences.
  • Celebrity: Frames from YouTube videos of celebrities.
  • Electricity: Power consumption records from smart homes.
  • Health: ECG records for patients.
  • Twitter: Stream of retweets.
  • Amazon: User reviews for products.

For the Health, Celebrity, and Electricity datasets, where ground truth relevance was lacking, a heuristic was used to generate relevance labels.

Key Insights and Ideas

  • Temporal "Unwarping" is Crucial: Directly comparing event sequences can be misleading due to variations in timing. A trainable unwarping function is essential for capturing true relevance.
  • MTPP for Relevance, Not Just Similarity: The paper highlights that MTPP models can go beyond simple similarity to capture nuanced relevance between event sequences.
  • Hashing for Scalability: For large-scale retrieval, efficient indexing is paramount. The proposed learnable hashing mechanism significantly speeds up retrieval without substantial accuracy loss.
  • Cross-Attention for Expressiveness: The cross-attention mechanism in CrossAttn-NeuroSeqRet allows for a more expressive modeling of query-corpus interactions, leading to improved performance.

Key Results

  • Accuracy: Both CrossAttn-NeuroSeqRet and SelfAttn-NeuroSeqRet significantly outperformed existing baselines across various metrics (MAP, NDCG@10, MRR, NDCG@20) on all seven datasets. CrossAttn-NeuroSeqRet generally achieved higher accuracy due to its greater expressive power.
  • Efficiency: The HASH-CROSSATTN-NEUROSEQRET model demonstrated a strong trade-off between accuracy and efficiency, achieving competitive results with significantly reduced comparison counts compared to exhaustive search.
  • Query Length Impact: Performance deteriorates with shorter query sequences, but CrossAttn-NeuroSeqRet still maintained an advantage over baselines.
  • Qualitative Analysis: Visualizations showed that the inter-event times of retrieved sequences closely matched those of the query sequences, validating the model's ability to capture temporal patterns.

Limitations and Future Work

  • Limitations: The paper notes that while HASH-CROSSATTN-NEUROSEQRET offers a good trade-off, it might not be directly compatible with hashing in the same way as SelfAttn-NeuroSeqRet. The performance can also be affected by query length.
  • Future Work: The authors suggest exploring the design of generative models for relevance sequences and counter-factual explanations for relevance label predictions. They also mention the potential for human-in-the-loop retrieval systems and privacy-preserving retrieval for sensitive domains like mobility records.

Summary updated

BibTeX
@article{gupta2023retrieving,
  author = {Vinayak Gupta and Srikanta Bedathur and Abir De},
  title = {{Retrieving Continuous-Time Event Sequences Using Neural Temporal Point Processes with Learnable Hashing}},
  journal = {ACM Trans. Intell. Syst. Technol.},
  year = {2023},
  url = {https://openreview.net/forum?id=-7SH-MNWKHs},
}
Figure