Neural Tensor Factorization for Temporal Interaction Learning

Xian Wu, Baoxu Shi, Yuxiao Dong, Chao Huang, Nitesh V. Chawla

TL;DR

Neural Tensor Factorization (NTF) bridges the gap between deep learning and tensor factorization to model dynamic, time-evolving relational data. By fusing an LSTM time encoder with a Multi-Layer Perceptron (MLP), NTF successfully captures both non-linear interactions and complex temporal dynamics, significantly outperforming state-of-the-art collaborative filtering and recurrent recommender models.

What Problem Does This Paper Address?

Recommender systems frequently handle user-item interactions that shift over time due to evolving user tastes or changing item perceptions (e.g., a movie gaining sudden popularity after winning an award). Traditional approaches struggle to capture these dynamics effectively:

  • Static Collaborative Filtering models (like NCF) ignore temporal changes entirely.
  • Conventional Tensor Factorization (TF) incorporates time as a third dimension but treats consecutive time slots as independent, failing to capture sequential patterns or predict future time slots.
  • Recurrent Recommender Networks (RRN) use fixed-length interaction sequences rather than actual time intervals, which distorts timeframes for less popular items.

Furthermore, most traditional factorization methods rely on linear dot products, missing the opportunity to capture complex, non-linear relationships between latent factors.

Methods

The authors propose Neural Tensor Factorization (NTF), a framework that processes a three-way tensor (user-item-time) through a deep neural network architecture:

  1. Raw Time Embedding Layer: One-hot encoded time slots are projected into a continuous embedding space to combat data sparsity.
  2. LSTM Time Encoder: An LSTM network processes the sequence of time embeddings to smoothly model temporal dependencies across time steps, outputting an encoded time representation ($\hat{T}_k$).
  3. Non-linear Fusion via MLP: Instead of combining user, item, and time embeddings via a standard dot product, NTF concatenates them and feeds them into a Multi-Layer Perceptron (MLP). This allows the network to learn intricate, non-linear interactions across all three dimensions.

To maintain training efficiency and prevent internal covariate shift, the architecture integrates Batch Normalization (BN) within the LSTM and projection layers, and utilizes the Adam optimizer for parameter learning.

The Neural network based Tensor Factorization (NTF) Framework.

Datasets

The model was evaluated on two distinct tasks using real-world dynamic datasets:

  • Netflix Rating Data: A dataset containing 68,079 users, 2,328 items, and over 12.3 million ratings spanning 36 months. This was used for the quantitative rating prediction task (regression).
  • Github Archive Data: A dataset tracking user repository forks over 21 weeks, consisting of 81,001 users, 72,420 projects, and nearly 1.4 million fork events. This served as the benchmark for the link prediction task (binary classification).

Key Insights and Ideas

  • Moving Beyond the Dot Product: A core insight of the paper is that the linear dot product heavily restricts the expressive power of tensor factorization. Replacing it with an MLP layer allows the model to uncover deep, implicit patterns of user-item-time interactions.
  • Sequence-Based Time Encoding: By feeding continuous time-slot representations into an LSTM rather than tracking a fixed count of historical events, NTF preserves the actual physical duration between interactions, making it robust for both highly active and niche items.
  • Resilience to Data Sparsity: The performance gap between NTF and baseline models actually widens as the training data becomes sparser. This indicates that the deep temporal embeddings learned by the LSTM provide strong regularization when explicit interaction data is minimal.

Key Results

  • Rating Prediction: On the Netflix dataset, NTF consistently achieved the lowest Root Mean Square Error (RMSE) and Mean Absolute Error (MAE) across all tested time windows. It achieved an average relative improvement of 7.4% over RRN and 8.3% over TDSSM in terms of RMSE.
  • Link Prediction: On the highly unbalanced GitHub dataset, NTF significantly outperformed standard Neural Collaborative Filtering (NCF), yielding a relative improvement of 10.2% in F1-score and 6.8% in AUC.
  • Ablation Verification: The authors tested a variant called NTFdot, which swaps the MLP out for a traditional dot product. NTFdot performed significantly worse across the board, confirming that non-linear modeling is essential for high-accuracy predictions.

Limitations and Future Work

The authors note two primary directions for improving NTF:

  1. Incorporating Auxiliary Data: The current model relies strictly on the interaction tensor. Integrating rich, heterogeneous auxiliary data (such as user demographics or item metadata) could further boost performance.
  2. Complexity vs. Accuracy Trade-offs: Deep recurrent architectures introduce computational overhead. The authors plan to explore ways to adapt NTF into a more time-sensitive model that optimizes the trade-off between training complexity and predictive accuracy.

Summary updated

BibTeX
@inproceedings{wu2019neural,
  author = {Xian Wu and Baoxu Shi and Yuxiao Dong and Chao Huang and Nitesh V. Chawla},
  title = {{Neural Tensor Factorization for Temporal Interaction Learning}},
  booktitle = {WSDM},
  year = {2019},
  doi = {10.1145/3289600.3290998},
}
Figure