Abstract
A user can be represented by their historical actions. A common approach to user modeling involves manually extracting aggregated features over heterogeneous behaviors, which may fail to fully represent the data due to limited human instinct. Recent works often use RNN-based methods to provide an overall embedding of a behavior sequence. However, these methods preserve limited information and can lose the integrity of specific, highly correlated behaviors while introducing noise from unrelated ones. This paper proposes ATRank, an attention-based user behavior modeling framework for recommendation tasks. ATRank projects heterogeneous user behaviors into multiple latent semantic spaces where they interact via self-attention. Downstream applications then utilize these processed behavior vectors through vanilla attention. Experiments demonstrate that ATRank achieves superior performance and faster training. Furthermore, a unified ATRank model can predict different types of user behaviors simultaneously, matching the performance of highly optimized individual models.
Introduction
Recommendation systems rely on understanding a user’s history to predict their next move. Traditionally, this was achieved through manual feature engineering or by using Recurrent Neural Networks (RNNs) and Convolutional Neural Networks (CNNs) to encode behavior sequences.
However, these approaches face significant challenges:
- Information Loss: RNNs often compress long histories into a single fixed-size vector, struggling to preserve long-term dependencies or specific, highly relevant past actions.
- Computational Bottlenecks: The inherently sequential nature of RNNs makes them slow to train and difficult to parallelize.
- Heterogeneity: Users perform diverse actions (browsing, searching, buying). Standard models struggle to integrate these signals into a unified semantic space.
- One-Dimensional Attention: Existing attention mechanisms often use a single scalar score, which can neutralize complex relationships existing across different semantic dimensions.
Methodology
ATRank introduces a modular framework designed to handle heterogeneous behaviors without the need for recurrence:
- Temporal & Behavior Encoding: Instead of using an RNN to learn sequence order, ATRank "bucketizes" time intervals using an exponential scale and encodes behavior types directly into input embeddings.
- Latent Semantic Spaces: The model projects different behavior groups into $K$ multiple latent subspaces. This allows the model to compare disparate actions (e.g., a search query vs. a purchase) by finding common ground in various semantic contexts.
- Self-Attention Layer: Within these subspaces, a self-attention mechanism allows every behavior in a user's history to interact with every other behavior. This captures how one action influences the relevance of another.
- Vanilla Attention for Downstream Tasks: For final prediction, the model uses a standard attention layer where the target item acts as a query to pull relevant information from the processed history.
Evaluation and Results
The authors evaluated ATRank on two major datasets: Amazon Product Data (Electronics and Clothing) and a multi-behavior Taobao dataset.
Accuracy and Convergence
ATRank outperformed Bi-LSTM, CNN+Pooling, and BPR (Bayesian Personalized Ranking) across the board. On the Amazon Electronics dataset, ATRank achieved an AUC of 0.8921, compared to 0.8757 for a Bi-LSTM. Crucially, the model reached peak performance significantly faster than RNN-based models, converging in roughly half the time required by the Bi-LSTM + Attention baseline.
Multi-Task Versatility
The "all2all" version of the model, which predicts multiple types of future behaviors simultaneously, achieved performance comparable to individual models highly optimized for single tasks. This suggests that learning to predict searches helps the model better predict purchases, and vice versa.
Discussion and Conclusion
ATRank demonstrates that recurrence is not necessary for modeling user sequences if time and type information are correctly encoded. By factorizing behaviors into multiple latent spaces, the model preserves specific relationships that would be lost in a single-score attention mechanism. While self-attention has a quadratic complexity $O(n^2)$ relative to sequence length, its parallelizable nature and faster convergence make it highly efficient for industrial-scale recommendation.
Future work may explore dynamic latent spaces to determine the number of semantic spaces needed based on user behavior complexity, as well as integrating more complex neural architectures for downstream ranking tasks.
Summary updated