Skip to main content
QUICK REVIEW

[Paper Review] Transformer Embeddings of Irregularly Spaced Events and Their Participants

Chenghao Yang, Hongyuan Mei|arXiv (Cornell University)|Dec 31, 2021
Morphological variations and asymmetryMathematics9 citations
TL;DR

This paper proposes a Transformer-based architecture for modeling irregularly spaced event sequences in continuous time, replacing recurrent LSTMs with self-attention mechanisms to enable parallel computation and improved modeling of long-range dependencies. The method achieves competitive or superior performance to prior models, including neuro-symbolic frameworks, on real-world datasets like RoboCup and IPTV, with significant gains in event type prediction and log-likelihood under both standard and rule-injected settings.

ABSTRACT

The neural Hawkes process (Mei & Eisner, 2017) is a generative model of irregularly spaced sequences of discrete events. To handle complex domains with many event types, Mei et al. (2020a) further consider a setting in which each event in the sequence updates a deductive database of facts (via domain-specific pattern-matching rules); future events are then conditioned on the database contents. They show how to convert such a symbolic system into a neuro-symbolic continuous-time generative model, in which each database fact and the possible event has a time-varying embedding that is derived from its symbolic provenance. In this paper, we modify both models, replacing their recurrent LSTM-based architectures with flatter attention-based architectures (Vaswani et al., 2017), which are simpler and more parallelizable. This does not appear to hurt our accuracy, which is comparable to or better than that of the original models as well as (where applicable) previous attention-based methods (Zuo et al., 2020; Zhang et al., 2020a).

Motivation & Objective

  • To develop a more efficient and scalable alternative to recurrent neural network (RNN)-based models for continuous-time event sequence modeling.
  • To extend the Transformer architecture to handle irregularly spaced events by incorporating continuous-time positional encodings.
  • To integrate domain-specific logic rules (via NDTT) with attention-based models for improved interpretability and performance.
  • To demonstrate that self-attention mechanisms can match or exceed the performance of RNNs and prior attention-based models in low-data regimes and complex event dynamics.

Proposed method

  • Uses continuous-time positional encodings to allow query vectors at time t to attend to past events while respecting their temporal spacing.
  • Constructs event embeddings at time t by attending over all previous events using query vectors that include time-specific positional information.
  • Derives embeddings for possible future events at time t in the same way as observed events, enabling prediction of instantaneous event intensities.
  • Introduces A-NHP, a Transformer-based neural Hawkes process, which avoids parametric decay functions by computing embeddings de novo at each time t.
  • Extends the framework to A-NDTT by integrating it with the neuro-symbolic NDTT framework, where event embeddings depend on symbolic facts rather than direct event attention.
  • Employs residual connections and multi-head attention across layers to build deep contextual representations of event sequences.

Experimental results

Research questions

  • RQ1Can a self-attention mechanism effectively model irregularly spaced event sequences without relying on recurrent architectures?
  • RQ2Does replacing LSTMs with Transformers improve performance in continuous-time event modeling, especially in low-data regimes?
  • RQ3Can attention-based models outperform or match the performance of neuro-symbolic models like NDTT while using a simpler, flatter architecture?
  • RQ4How does the integration of domain-specific logic rules (via NDTT) affect the performance of attention-based models in event sequence generation?
  • RQ5To what extent does continuous-time positional encoding enable attention mechanisms to model temporal dynamics without parametric decay functions?

Key findings

  • A-NHP achieves significantly better log-likelihood and event type prediction than the original NHP model on both RoboCup and IPTV datasets (p < 0.05, paired permutation test).
  • The A-NDTT model achieves comparable performance to the original NDTT model but with a simpler, shallower architecture, indicating that attention does not provide a significant boost in this specific rule-based setting.
  • On the IPTV dataset, both rule injection and attention mechanisms independently improve NHP’s log-likelihood and reduce event type prediction error, with the combination yielding the best results.
  • The attention-based model outperforms or ties with prior state-of-the-art Transformer-based models on both synthetic and real-world datasets, including those with complex temporal dynamics.
  • The method successfully eliminates the need for arbitrary parametric decay functions by computing embeddings de novo at each time t using attention over past events and time-specific query vectors.
  • The model enables parallel computation of log-likelihood during training, unlike autoregressive RNNs, due to its non-recurrent, self-attention mechanism.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.