HierTCN: Deep learning models for dynamic recommendations and inferring user interests

Pinterest Engineering
4 min readintermediate
--
View Original

Overview

The article discusses Hierarchical Temporal Convolutional Networks (HierTCN), a deep learning architecture designed for dynamic recommendations based on user interactions. It highlights the model's ability to adapt to evolving user interests and its performance improvements over existing models.

What You'll Learn

1

How to implement Hierarchical Temporal Convolutional Networks for dynamic recommendations

2

Why capturing both short-term and long-term user interests is crucial for recommendation systems

3

How to utilize Recurrent Neural Networks and Temporal Convolutional Networks in a hierarchical model

Prerequisites & Requirements

  • Understanding of deep learning concepts, particularly RNNs and TCNs
  • Experience with recommendation systems(optional)

Key Questions Answered

How does HierTCN improve dynamic recommendations compared to traditional models?
HierTCN outperforms traditional models by effectively capturing both short-term and long-term user interests, resulting in a consistent lift of 10-15% across various evaluation metrics. This is achieved through its hierarchical structure that combines Recurrent Neural Networks for session aggregation and Temporal Convolutional Networks for in-session interactions.
What are the key components of the HierTCN architecture?
The HierTCN architecture consists of a high-level model using Recurrent Neural Networks to aggregate long-term user interests across sessions and a low-level model implemented with Temporal Convolutional Networks to predict user embeddings based on current session interactions.
What performance improvements does HierTCN offer over existing models?
HierTCN is 2.5x faster than RNN-based models and uses 90% less memory compared to TCN-based models. It consistently outperforms state-of-the-art dynamic recommendation methods, achieving up to 18% improvement in recall and 10% in mean reciprocal rank.
What datasets were used to validate the HierTCN model?
The model was validated using a public XING dataset and a large-scale Pinterest dataset, which includes 6 million users and 1.6 billion interactions, demonstrating its scalability and effectiveness in real-world applications.

Key Statistics & Figures

Performance improvement over baseline models
10-15%
This improvement was observed across various evaluation metrics during offline validation.
Training speed compared to RNN-based models
2.5x faster
HierTCN achieves this speed due to its efficient architecture.
Memory usage compared to TCN-based models
90% less
This reduction in memory usage allows for more efficient processing of large datasets.
Improvement in recall
up to 18%
This improvement indicates better performance in retrieving relevant recommendations.
Improvement in mean reciprocal rank
10%
This metric reflects the model's effectiveness in ranking relevant items higher.

Technologies & Tools

Machine Learning
Hierarchical Temporal Convolutional Networks
Used for dynamic recommendations based on user interactions.
Machine Learning
Recurrent Neural Networks
Used to aggregate long-term user interests across different sessions.
Machine Learning
Temporal Convolutional Networks
Used to predict user embeddings based on interactions within current sessions.

Key Actionable Insights

1
Implementing a hierarchical model like HierTCN can significantly enhance the accuracy of recommendations by considering both short-term and long-term user interests.
This approach is particularly useful in applications where user preferences change frequently, such as e-commerce or content platforms.
2
Utilizing advanced caching techniques can improve the training speed and efficiency of deep learning models.
In the case of HierTCN, a data caching scheme and a queue-based mini-batch generator allowed for training within 24 hours on a single GPU, making it feasible for large-scale applications.
3
Regularly updating user models based on their interaction history can lead to better personalization in recommendation systems.
HierTCN's ability to adapt to evolving user interests ensures that recommendations remain relevant and engaging over time.

Common Pitfalls

1
Neglecting the importance of capturing both short-term and long-term user interests can lead to suboptimal recommendations.
Many traditional models focus on either short-term or long-term interests, which can result in a lack of personalization and relevance in recommendations.

Related Concepts

Deep Learning Architectures For Recommendation Systems
User Interest Modeling In Machine Learning
Scalability In Machine Learning Applications