ATRank: An Attention-Based User Behavior Modeling Framework for Recommendation

Chang Zhou, Jinze Bai, Junshuai Song, Xiaofei Liu, Zhengchao Zhao, Xiusi Chen, Jun Gao

Abstract

A user can be represented as what he/she does along the history. A common way to deal with the user modeling problem is to manually extract all kinds of aggregated features over the heterogeneous behaviors, which may fail to fully represent the data itself due to limited human instinct. Recent works usually use RNN-based methods to give an overall embedding of a behavior sequence, which then could be exploited by the downstream applications. However, this can only preserve very limited information, or aggregated memories of a person. When a downstream application requires to facilitate the modeled user features, it may lose the integrity of the specific highly correlated behavior of the user, and introduce noises derived from unrelated behaviors. This paper proposes an attention based user behavior modeling framework called ATRank, which we mainly use for recommendation tasks. Heterogeneous user behaviors are considered in our model that we project all types of behaviors into multiple latent semantic spaces, where influence can be made among the behaviors via self-attention. Downstream applications then can use the user behavior vectors via vanilla attention. Experiments show that ATRank can achieve better performance and faster training process. We further explore ATRank to use one unified model to predict different types of user behaviors at the same time, showing a comparable performance with the highly optimized individual models.

Introduction

In modern recommendation systems, "user modeling" is the process of representing a user based on their historical interactions. Traditionally, this relied on manual feature engineering, which is labor-intensive and often misses subtle behavioral nuances. While deep learning models like Recurrent Neural Networks (RNNs) and Convolutional Neural Networks (CNNs) have automated some of this, they face significant hurdles:

  1. Sequential Bottlenecks: RNNs are difficult to parallelize, leading to slow training on large-scale industrial data.
  2. Memory and Context Constraints: RNNs struggle with long-term dependencies, and CNNs are limited by fixed window sizes.
  3. Heterogeneity: Users engage in diverse actions (clicks, searches, purchases) that are difficult to integrate into a single cohesive representation.
  4. Attention Dilution: Standard attention mechanisms often use a single scalar score, which can "neutralize" relationships. For instance, a behavior might be relevant to a target item's brand but not its price; a single score cannot capture such multi-faceted relevance.

Methodology

ATRank addresses these challenges by replacing sequential processing with a multi-latent semantic space self-attention mechanism.

The ATRank framework architecture, featuring heterogeneous behavior projection into multiple latent semantic spaces.

The framework consists of several key components:

  • Temporal & Behavior Type Encoding: Instead of recursion, ATRank uses "bucketized" time intervals and behavior type embeddings. This allows the model to understand temporal context and action types without the computational overhead of an RNN.
  • Latent Semantic Subspaces: The model projects behaviors into $K$ different latent semantic spaces. This allows the model to analyze a product through different "filters" (e.g., style, price, functionality) simultaneously.
  • Self-Attention Layer: Within these subspaces, behaviors interact via self-attention. This mechanism strengthens signals from related behaviors (like a search for "running" followed by a click on "sneakers") while filtering out irrelevant noise.
  • Vanilla Attention for Ranking: A final attention layer compares the processed user history against a target item to produce a user vector optimized for recommendation.

Experiments and Results

The authors evaluated ATRank using the Amazon (Electronics and Clothing) and Taobao datasets. The Taobao dataset, in particular, allowed for testing the model's ability to handle highly heterogeneous data, including clicks, searches, and coupon usage.

Comparison of Test AUC over training time, demonstrating ATRank's superior accuracy and faster convergence.

Performance and Efficiency

ATRank consistently outperformed baselines such as Bi-LSTM and CNN+Pooling. On the Amazon Electronics dataset, ATRank achieved an AUC of 0.8921, surpassing Bi-LSTM+Attention (0.8769). Crucially, ATRank demonstrated significantly faster convergence, reaching peak performance in nearly half the time required by RNN-based methods due to its parallelizable nature.

Interpretability and Multi-Tasking

Heatmaps of self-attention scores revealed that different semantic spaces focus on distinct features, such as category similarity or action importance. Furthermore, the authors showed that a single "all2all" ATRank model could predict multiple future behaviors (e.g., purchases and coupon usage) simultaneously with performance comparable to specialized individual models.

Conclusion

ATRank provides a robust, efficient framework for user behavior modeling. By leveraging multi-space self-attention, it captures complex, multi-dimensional relationships between heterogeneous behaviors that traditional sequential models miss. While future work may focus on hyperparameter sensitivity and integration with more complex ranking architectures, ATRank represents a significant step forward in scalable, interpretable recommendation systems.

Summary updated

BibTeX
@inproceedings{zhou2018atrank,
  author = {Chang Zhou and Jinze Bai and Junshuai Song and Xiaofei Liu and Zhengchao Zhao and Xiusi Chen and Jun Gao},
  title = {{ATRank: An Attention-Based User Behavior Modeling Framework for Recommendation}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2018},
  url = {https://openreview.net/forum?id=rJbAKJ-Obr},
}
Figure