Abstract
Sequential recommendation requires the recommender to capture the evolving behavior characteristics from logged user behavior data for accurate recommendations. However, user behavior sequences are viewed as a script with multiple ongoing threads intertwined. We find that only a small set of pivotal behaviors can be evolved into the user's future action. As a result, the future behavior of the user is hard to predict. We conclude this characteristic for sequential behaviors of each user as the Behavior Pathway. Different users have their unique behavior pathways. Among existing sequential models, transformers have shown great capacity in capturing global-dependent characteristics. However, these models mainly provide a dense distribution over all previous behaviors using the self-attention mechanism, making the final predictions overwhelmed by the trivial behaviors not adjusted to each user. In this paper, we build the Recommender Transformer (RETR) with a novel Pathway Attention mechanism. RETR can dynamically plan the behavior pathway specified for each user, and sparingly activate the network through this behavior pathway to effectively capture evolving patterns useful for recommendation. The key design is a learned binary route to prevent the behavior pathway from being overwhelmed by trivial behaviors. We empirically verify the effectiveness of RETR on seven real-world datasets and RETR yields state-of-the-art performance.
Introduction: The Noise in Sequential Recommendation
Sequential recommendation aims to predict a user's next interaction based on their history. However, human behavior is rarely a linear progression; it is more akin to a script with multiple intertwined threads. A user's history might contain correlated behaviors (e.g., browsing for office supplies), casual behaviors (e.g., a one-off click on a backpack), or drifted behaviors (e.g., a sudden shift from keyboards to smartphones).
Existing Transformer-based models, such as SASRec or BERT4Rec, utilize dense self-attention mechanisms where every past action interacts with every other action. This approach often "floods" the model with trivial data, causing pivotal behaviors—those truly driving the next move—to be obscured by noise. The authors propose that each user follows a unique Behavior Pathway, and models must be able to isolate these pathways to remain effective.
Methodology: The RETR Architecture
To address the limitations of dense attention, the authors introduce RETR (Recommender Transformer). The core innovation is the Pathway Attention mechanism, which replaces standard self-attention with a sparse, adaptive alternative.
The architecture is built upon several key innovations:
- Pathway Router: A sequence-adaptive module that generates a binary "route" (a vector of 0s and 1s) for each user. It dynamically decides which behavior tokens are pivotal and which should be discarded as noise.
- Gumbel-Softmax Sampling: To maintain differentiability while making discrete "keep or drop" decisions, the model employs the Gumbel-Softmax trick, allowing the routing logic to be learned via backpropagation.
- Hierarchical Update Strategy: Once a token is dropped in an early layer, it remains excluded in all subsequent layers, creating a hierarchical pruning effect that refines the model's focus.
- Routed Query Attention: Only the Queries in the attention step are masked by the pathway route. This forces the model to focus its search on pivotal behaviors while allowing Keys and Values to provide broader context.
Experimental Evaluation
RETR was evaluated against several baselines (including SASRec, BERT4Rec, and SMRec) across seven real-world datasets: Amazon (Beauty, Sports, Toys), Yelp, Tmall, Steam, and MovieLens-1M. These datasets vary significantly in scale and sparsity.
Key Results
RETR consistently achieved state-of-the-art (SOTA) performance across all benchmarks. Notable highlights include:
- Significant Gains on Tmall: RETR achieved a 7% improvement in Hit Ratio (HR@10) and a 14% boost in Mean Reciprocal Rank (MRR) over the strongest baseline.
- Robustness on Steam: The model yielded a 6% MRR gain on Steam, proving effective even in datasets with complex, drifting user interests.
- Efficiency: Despite its superior accuracy, RETR maintains a parameter count and computational cost (GFLOPs) comparable to simpler models like SASRec.
Conclusion
RETR demonstrates that sparsity in recommendation systems is not merely an optimization for memory but a powerful tool for improving accuracy. By forcing the model to ignore "trivial" behaviors, it learns more robust representations of user intent. Future work may involve integrating side information (e.g., timestamps or item categories) into the router and exploring more flexible gating strategies for highly complex user histories.
Summary updated