Marked Temporal Dynamics Modeling Based on Recurrent Neural Network

Yongqing Wang, Shenghua Liu, Huawei Shen, Jinhua Gao, Xueqi Cheng

Introduction

Predicting future events in complex streams—such as high-frequency trading, social media interactions, or user check-ins—requires understanding not just when an event will occur, but also what type of event it will be. Traditional temporal dynamics modeling often treats these two variables as independent or focuses on one at the expense of the other. This paper introduces RNN-TD, a Recurrent Neural Network-based framework designed to model the joint probability of event types (marks) and their timing, acknowledging their deep inherent interdependence.

The Interdependence of "What" and "When"

A fundamental flaw in many existing models is the assumption that timing and event types are independent given the history. In real-world scenarios, the choice of an action often dictates its timing. For instance, in a restaurant recommendation system, the time a user eats is highly dependent on the chosen location; a distant restaurant necessitates a longer travel interval than a nearby cafe.

Figure 1: (a) Time interval distribution for different marks on Dianping, showing significant variance. (b) The proposed RNN-TD architecture.

Statistical analysis of the Dianping dataset (shown in Figure 1a) confirms this premise: the cumulative distribution functions (CDF) of time intervals vary significantly depending on the target mark (store). This measurable dependency forms the core motivation for the RNN-TD approach.

Methodology: The RNN-TD Framework

The RNN-TD architecture (Figure 1b) processes event sequences through three primary stages to capture long-term dependencies without the state-space explosion typical of Markov models:

  1. History Embedding: An RNN processes the sequence of past event-time pairs to generate a fixed-size history vector ($h_i$). This allows the model to learn complex representations of history automatically.
  2. Joint Modeling: Using the Bayesian chain rule, the model decomposes the joint probability of the next mark and time. It first calculates the transition probability of the mark using a standard softmax function.
  3. Mark-Specific Intensity Function: The model's "secret sauce" is a conditional intensity function $\lambda_e(t)$ unique to each possible mark. This function represents the arrival rate of a specific event type at a specific time, explicitly capturing how the choice of "what" influences the "when."

Experimental Evaluation

The researchers evaluated RNN-TD on two large-scale datasets: Memetracker (1.4 million posting sequences across 165 topics) and Dianping (221,000 sequences representing restaurant check-ins). The model was compared against several baselines, including standard Markov Chains, vanilla RNNs, and the Recurrent Marked Temporal Point Process (RMTPP).

Figure 2: Performance comparison of RNN-TD against baselines on Memetracker and Dianping datasets.

Key Results and Discussion

As shown in the performance table (Figure 2), RNN-TD consistently outperformed state-of-the-art methods across multiple metrics:

  • Mark Prediction: RNN-TD achieved higher Mean Reciprocal Rank (MRR) and Accuracy (Acc@k) than RMTPP. On the Dianping dataset, the RNN-TD(c) and RNN-TD(exp) variants showed a notable lead in predicting the correct store.
  • Time Prediction: The model significantly outperformed Poisson and Hawkes process baselines in time accuracy (Acc@$\theta$), particularly when utilizing an exponential time-shaping function.
  • Semantic Robustness: Case studies indicated that even when the top prediction was incorrect, the predicted marks were often semantically related to the ground truth, suggesting the model learns meaningful latent relationships between event types.

Conclusion

RNN-TD offers a mathematically grounded and high-performing approach to modeling event streams. By replacing hand-crafted kernels with learned RNN embeddings and utilizing mark-specific intensity functions, the framework successfully captures the nuanced relationship between event types and their temporal dynamics. Future work may explore more complex time-shaping functions and modern architectures like Transformers to further enhance history representation.

Summary updated

BibTeX
@inproceedings{wang2017marked,
  author = {Yongqing Wang and Shenghua Liu and Huawei Shen and Jinhua Gao and Xueqi Cheng},
  title = {{Marked Temporal Dynamics Modeling Based on Recurrent Neural Network}},
  booktitle = {PAKDD},
  year = {2017},
  url = {https://openreview.net/forum?id=pZxPkRKeh-},
}
Figure