[Paper Review] A Hierarchical Contextual Attention-based GRU Network for Sequential Recommendation
This paper proposes HCA-GRU, a hierarchical contextual attention-based GRU network that enhances sequential recommendation by modeling both long-term user preferences and short-term interests through dual-level attention mechanisms on inputs and hidden states. The method outperforms standard RNNs and SOTA baselines on two real-world datasets, achieving state-of-the-art performance in ranking metrics like MAP and NDCG.
Sequential recommendation is one of fundamental tasks for Web applications. Previous methods are mostly based on Markov chains with a strong Markov assumption. Recently, recurrent neural networks (RNNs) are getting more and more popular and has demonstrated its effectiveness in many tasks. The last hidden state is usually applied as the sequence's representation to make recommendation. Benefit from the natural characteristics of RNN, the hidden state is a combination of long-term dependency and short-term interest to some degrees. However, the monotonic temporal dependency of RNN impairs the user's short-term interest. Consequently, the hidden state is not sufficient to reflect the user's final interest. In this work, to deal with this problem, we propose a Hierarchical Contextual Attention-based GRU (HCA-GRU) network. The first level of HCA-GRU is conducted on the input. We construct a contextual input by using several recent inputs based on the attention mechanism. This can model the complicated correlations among recent items and strengthen the hidden state. The second level is executed on the hidden state. We fuse the current hidden state and a contextual hidden state built by the attention mechanism, which leads to a more suitable user's overall interest. Experiments on two real-world datasets show that HCA-GRU can effectively generate the personalized ranking list and achieve significant improvement.
Motivation & Objective
- To address the limitation of RNNs in modeling user short-term interest due to their monotonic temporal dependency assumption.
- To improve sequential recommendation by capturing complex local correlations among recent items.
- To fuse long-term dependency and short-term interest effectively for better user representation.
- To develop a hierarchical attention mechanism that assigns non-monotonic, time-independent weights to recent items and hidden states.
- To achieve superior performance in personalized ranking using Bayesian Personalized Ranking (BPR) and Back Propagation Through Time (BPTT).
Proposed method
- Introduces a two-level hierarchical architecture: first-level attention on input sequences to build a contextual input from recent items.
- Applies an attention mechanism to assign dynamic, non-monotonic weights to recent inputs, enabling better modeling of local item correlations.
- Constructs a contextual hidden state from recent hidden states using another attention mechanism to capture short-term interest patterns.
- Fuses the current hidden state with the contextual hidden state to form a richer user representation that combines long-term and short-term interests.
- Employs a window-based approach with learnable window widths for contextual modeling on both inputs and hidden states.
- Trains the model using BPR loss and BPTT to optimize ranking performance on sequential recommendation tasks.
Experimental results
Research questions
- RQ1Can a hierarchical attention mechanism improve the modeling of short-term user interest in sequential recommendation?
- RQ2Does decoupling input-level and hidden-state-level attention enhance representation learning beyond standard RNNs?
- RQ3How do window sizes for contextual input and hidden state affect performance on different sequential recommendation datasets?
- RQ4Can non-monotonic attention weights better capture salient items in recent user behavior compared to RNN’s fixed temporal decay?
- RQ5Does the proposed HCA-GRU achieve state-of-the-art performance in ranking metrics like MAP and NDCG?
Key findings
- HCA-GRU achieves significant improvements in MAP and NDCG on both Taobao and Outbrain datasets, outperforming standard GRU and SOTA baselines.
- The optimal window width for input contextualization is w_x = 3 on Taobao and w_x = 2 on Outbrain, indicating dataset-specific sequence length sensitivity.
- The optimal window width for hidden state contextualization is w_h = 5 on Taobao and w_h = 3 on Outbrain, with performance peaking at these values.
- Attention weights on inputs show non-monotonic, context-sensitive importance, with key items receiving high weights regardless of temporal proximity.
- Hidden state attention weights on Outbrain show a monotonic descending pattern, while on Taobao they are more evenly distributed, suggesting different behavioral dynamics.
- The combination w_x = 5, w_h = 5 on Taobao and w_x = 2, w_h = 3 on Outbrain yields the best overall performance, confirming the effectiveness of the hierarchical design.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.