[Paper Review] Contextual Sequence Modeling for Recommendation with Recurrent Neural Networks
This paper proposes Contextual Recurrent Neural Networks (CRNNs) that enhance session-based recommendation by integrating contextual features—such as interaction type, time gaps, and time of day—into both input/output layers and hidden state dynamics. CRNNs significantly outperform non-contextual RNNs and baselines, achieving up to 12.5% higher Recall@10 on rare sale events and 10.2% improvement on non-historical items.
Recommendations can greatly benefit from good representations of the user state at recommendation time. Recent approaches that leverage Recurrent Neural Networks (RNNs) for session-based recommendations have shown that Deep Learning models can provide useful user representations for recommendation. However, current RNN modeling approaches summarize the user state by only taking into account the sequence of items that the user has interacted with in the past, without taking into account other essential types of context information such as the associated types of user-item interactions, the time gaps between events and the time of day for each interaction. To address this, we propose a new class of Contextual Recurrent Neural Networks for Recommendation (CRNNs) that can take into account the contextual information both in the input and output layers and modifying the behavior of the RNN by combining the context embedding with the item embedding and more explicitly, in the model dynamics, by parametrizing the hidden unit transitions as a function of context information. We compare our CRNNs approach with RNNs and non-sequential baselines and show good improvements on the next event prediction task.
Motivation & Objective
- Address the limitation of existing RNN-based recommendation models that ignore contextual features like interaction type, time gaps, and time of day.
- Improve next-item prediction accuracy by modeling contextual information not only in input/output layers but also in hidden state transitions.
- Demonstrate that contextual modeling leads to significant gains on hard cases such as rare events (e.g., sales) and previously unseen items.
- Benchmark CRNNs against non-sequential and sequential baselines on real-world e-commerce datasets to validate effectiveness.
Proposed method
- Introduce a family of Contextual RNNs (CRNNs) that combine item embeddings with context embeddings via nonlinear transformations in input/output layers.
- Parametrize hidden state transitions as a function of context, enabling context-aware dynamics in the RNN cell.
- Explore two architectural variants: context-dependent input/output modeling and context-dependent dynamics modeling.
- Use GRU-based RNNs with concatenation and multiplicative interactions between item and context embeddings.
- Apply multi-layered CRNNs with residual connections and batch normalization to stabilize training.
- Train models end-to-end using cross-entropy loss for next-item prediction on session-level sequences.
Experimental results
Research questions
- RQ1Can incorporating contextual features (e.g., interaction type, time gaps, time of day) into RNN-based recommendation models improve next-item prediction accuracy?
- RQ2How do different architectural designs—context in input/output vs. context in dynamics—affect model performance?
- RQ3Does the inclusion of context lead to measurable improvements on hard prediction cases such as rare events (e.g., sales) and non-historical items?
- RQ4How does model performance vary with sequence length and time since the last event?
- RQ5Can CRNNs generalize better than non-contextual RNNs and traditional baselines on real-world e-commerce data?
Key findings
- The Concat-Mult-Context-RNN model achieved the highest performance, with a 12.5% uplift in Recall@10 on sale events over the best baseline on the YooChoose dataset.
- On non-historical items, the best CRNN model improved Recall@10 by 10.2% over the baseline, indicating better generalization to unseen items.
- Performance gains were most pronounced on rare events (e.g., sales, <5% of total events) and for longer sequences, with improvements increasing as sequence length grew.
- The model showed the largest improvement on very recent events (time gap < 2 seconds), suggesting strong sensitivity to temporal context.
- All CRNN variants significantly outperformed non-contextual RNNs and baselines, with statistical significance confirmed via 95% confidence intervals from 30 bootstraps.
- The combination of context in both input/output layers and hidden state dynamics (Concat-Mult-Context-RNN) yielded the strongest overall gains.
Better researchstarts right now
From reading papers to final review, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.