Ads Candidate Generation using Behavioral Sequence Modeling

Pinterest Engineering
10 min readintermediate
--
View Original

Overview

The article discusses how Pinterest enhances its ad candidate generation process using behavioral sequence modeling. It details the challenges of delivering relevant ads in a dynamic environment and describes the implementation of transformer-based models to predict user interactions with advertisers and products.

What You'll Learn

1

How to implement a transformer-based sequence model for ad candidate generation

2

Why understanding user behavior is crucial for effective ad targeting

3

How to evaluate model performance using Recall@K metrics

4

When to apply log-Q bias correction in model training

Prerequisites & Requirements

  • Understanding of machine learning concepts and sequence modeling
  • Experience with transformer models and ad systems(optional)

Key Questions Answered

How does Pinterest use behavioral sequence modeling for ad targeting?
Pinterest employs behavioral sequence modeling to analyze historical user behavior and predict future interactions with advertisers. This approach allows the system to generate personalized ad candidates, improving the relevance of ads shown to users based on their evolving interests.
What metrics are used to evaluate the performance of ad candidate generation models?
The primary evaluation metric for the models is Recall@K, which measures the ability to retrieve positive labels from a random indexed set of advertisers. The model's performance is assessed based on cosine similarity scores between user and advertiser embeddings.
What improvements were observed in online experiments after implementing the new model?
Online experiments showed a significant lift in conversion volume and a reduction in cost per action (CPA). The advertiser-level model has been serving production traffic since its launch in Spring 2024, demonstrating its effectiveness in real-world scenarios.
What challenges does Pinterest face in delivering relevant ads?
Pinterest faces challenges due to the rapid evolution of user interests and shopping intents, making it difficult for traditional ad targeting methods, which rely on static demographic data, to effectively capture user behavior.

Key Statistics & Figures

Improvement in user checkout performance
up to 45%
This was observed during offline evaluations of the item-level model.
Cost per action (CPA) reduction
significant
This was noted during online experiments after implementing the new ad candidate generation model.

Technologies & Tools

Machine Learning
Transformer
Used for modeling user behavior and predicting ad interactions.

Key Actionable Insights

1
Implement a two-tower model architecture to enhance ad candidate generation.
This architecture allows for better encoding of user behavior and advertiser interactions, leading to more personalized ad experiences.
2
Utilize in-batch negatives in training to improve model robustness.
This technique helps in constructing effective triplets for training, which can enhance the model's ability to differentiate between relevant and irrelevant ads.
3
Continuously evaluate model performance using Recall@K metrics.
This ensures that the model remains effective in retrieving relevant ads, adapting to changes in user behavior over time.

Common Pitfalls

1
Over-reliance on popular items can lead to poor personalization.
This occurs when models favor frequently interacted items, neglecting less popular but potentially relevant options. To avoid this, it's essential to tune bias correction parameters and measure diversity in predictions.

Related Concepts

Behavioral Sequence Modeling
Transformer Models
Ad Targeting Strategies
Machine Learning Evaluation Metrics