Learning Dynamic Embeddings from Temporal Interactions

Srijan Kumar, Xikun Zhang, Jure Leskovec

Abstract

Dynamic systems such as e-commerce platforms and social networks involve users and items that evolve through their interactions. Traditional embedding methods often fail to capture the mutual influence between these entities or the temporal drift that occurs between interactions. We present JODIE (Joint Dynamic User-Item Embeddings), a framework that uses coupled recurrent neural networks (RNNs) to model co-evolving trajectories. JODIE incorporates a unique projection step to account for time-dependent state changes and a novel batching algorithm, t-Batch, which enables parallel training. Experimental results show that JODIE outperforms state-of-the-art models in interaction prediction and user state change detection while achieving up to a 9x speedup in training time.

Introduction

In modern digital ecosystems, users and items are inherently dynamic. A user's preferences shift over time, and an item's perception evolves based on its interaction history. Most existing representation learning techniques treat these entities as static or update them in isolation. This ignores the "mutual influence" where a user's action changes an item's state, and the item's characteristics simultaneously influence the user's future behavior. Furthermore, sequential models like RNNs are difficult to scale because temporal dependencies typically require one-by-one processing. JODIE addresses these challenges by jointly modeling user-item trajectories and introducing a scalable training paradigm.

Methodology

The JODIE framework is built upon three core components designed to capture the nuances of temporal interactions.

1. Update Function

At the heart of JODIE are two coupled RNNs—one for users and one for items. When a user $u$ interacts with an item $i$ at time $t$, the user’s RNN updates its hidden state using the item’s current embedding as an input. Simultaneously, the item’s RNN updates its state using the user’s embedding. This coupling ensures that the embeddings reflect the mutual influence inherent in the interaction.

2. Projection Function

Users do not remain static between interactions; their interests may "drift" over time. JODIE employs a projection function, inspired by Kalman Filters, to forecast a user’s embedding at any future time $t + \Delta$. This function applies a time-context vector to the user's last known state, allowing the model to differentiate between a user returning after a short interval versus a long absence.

JODIE Architecture: The framework consists of an update function with coupled RNNs, a projection function for temporal drift, and a prediction function for the next item embedding.

3. Prediction Function

To optimize inference, JODIE directly predicts the embedding vector of the next item a user will interact with, rather than calculating a probability distribution over all possible items. This approach bypasses the computational bottleneck of a large softmax layer, enabling faster real-time recommendations via nearest-neighbor search in the embedding space.

Scalability with t-Batch

Training sequential models on large datasets is often slow due to the requirement of maintaining chronological order. The authors developed t-Batch, a parallel batching algorithm. t-Batch constructs training batches such that each user and item appears at most once per batch. This allows interactions within a single batch to be processed in parallel while strictly maintaining temporal dependencies across successive batches.

Experimental Results

JODIE was evaluated on four real-world datasets: Reddit postings, Wikipedia edits, LastFM listens, and MOOC student actions.

Prediction Accuracy

JODIE demonstrated a significant improvement in predicting the next item of interaction, outperforming baselines like DeepCoevolve and RRN by up to 22.4%.

User State Change Detection

The model proved highly effective at predicting critical state changes, such as Reddit user bans or MOOC student dropouts. Notably, in the MOOC dataset, JODIE could predict a student's dropout up to five interactions in advance, providing a valuable early warning system.

Training Efficiency

The introduction of t-Batch resulted in substantial performance gains. As shown in the figure below, JODIE achieved an 8.5x speedup compared to standard sequential training, making it highly suitable for large-scale industrial applications.

Training Speedup: The t-Batch algorithm achieves significant speedups (up to 8.5x) for JODIE and other sequential models like DeepCoevolve.

Conclusion and Future Work

JODIE provides a robust framework for learning dynamic embeddings by explicitly modeling the co-evolution of users and items. While highly effective for bipartite interactions, future research could extend this work to incorporate hierarchical item categories or group-level dynamics. Additionally, addressing the "cold-start" problem for entirely new entities remains an area for further refinement.

Summary updated

BibTeX
@misc{kumar2018learning,
  author = {Srijan Kumar and Xikun Zhang and Jure Leskovec},
  title = {{Learning Dynamic Embeddings from Temporal Interactions}},
  year = {2018},
  eprint = {1812.02289},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1812.02289},
}
Figure