Unlocking Efficient Ad Retrieval: Offline Approximate Nearest Neighbors in Pinterest Ads
Read Full ArticleSummary
The article explores the implementation of Offline Approximate Nearest Neighbors (ANN) for ad retrieval at Pinterest, highlighting its advantages over Online ANN in terms of cost efficiency and scalability. It discusses the transition from the Hierarchical Navigable Small World (HNSW) algorithm to the Inverted File (IVF) algorithm, emphasizing the need for improved efficiency due to the expanding ads inventory. The architecture of both online and offline ANN retrieval systems is detailed, along with their respective pros and cons. The article also presents specific use cases, such as similar item ads and visual embedding, demonstrating the effectiveness of Offline ANN in enhancing ad relevance while reducing infrastructure costs.
Key Learnings
- 1Offline ANN can significantly reduce infrastructure costs by up to 80% compared to online methods, making it ideal for stable query contexts.
- 2Transitioning from HNSW to IVF algorithms allows for greater scalability in ad inventory management, accommodating more ads without compromising performance.
- 3The architecture of online and offline ANN retrieval systems highlights the trade-offs between real-time processing capabilities and cost efficiency.
- 4Implementing Offline ANN requires careful consideration of fixed neighbors and real-time limitations, necessitating strategic planning for optimal performance.
- 5Pinterest's future plans for developing an offline ANN framework indicate a commitment to enhancing ad retrieval systems and expanding their capabilities.
Who Should Read This
Senior Machine Learning Engineers focused on optimizing ad retrieval systems and enhancing algorithm efficiency.
Test Your Knowledge
What are the key trade-offs between using Offline ANN and Online ANN in ad retrieval systems?
How does the transition from HNSW to IVF improve the efficiency of the ANN algorithm in the context of large ad inventories?
What specific challenges does Pinterest face with real-time ad retrieval that Offline ANN addresses?
In what scenarios would Offline ANN be preferred over Online ANN, and why?
How can the limitations of fixed neighbors in Offline ANN be mitigated to enhance ad targeting?
What future enhancements are being considered for the offline ANN framework at Pinterest, and how might they impact ad retrieval?
Topics
More articles about Machine Learning
Explore Machine Learning engineering →Decoupled by Design: Billion-Scale Vector Search
The article discusses the challenges and solutions in building a billion-scale vector search system at Databricks. It highlights the limitations of traditional vector databases that couple storage...
Introducing Kasal
Kasal is a low-code platform developed by Databricks Labs for designing, deploying, and orchestrating agentic AI systems. It provides a visual interface that allows users, regardless of their...
Business Intelligence Analytics: A Complete Guide for the AI Era
The article discusses the evolution of business intelligence (BI) analytics, emphasizing the need for organizations to bridge the gap between data collection and actionable insights. It outlines the...
Engineering Platform Trust: Cutting Customer Case Volume 20x with Petabyte-Scale Health Signals
The article details the development of a Technical Health Score system at Salesforce, aimed at quantifying platform trust through analytics pipelines that handle petabytes of telemetry data. By...
Building What’s Next. Together. Introducing the Brickbuilder Partner Network for the Agentic AI Era
The Brickbuilder Partner Network is a newly established global partner program aimed at fostering growth and innovation among consulting firms, independent software vendors (ISVs), and data providers...
More from Pinterest Engineering
View Pinterest engineering blogs →Unified Context-Intent Embeddings for Scalable Text-to-SQL
The article outlines Pinterest's evolution from basic Text-to-SQL systems to a sophisticated Analytics Agent that leverages unified context-intent embeddings for enhanced query understanding and SQL...
Unifying Ads Engagement Modeling Across Pinterest Surfaces
The article presents a comprehensive approach to unify ads engagement modeling across different surfaces at Pinterest, addressing the challenges posed by previously independent models. It outlines...
Bridging the Gap: Diagnosing Online–Offline Discrepancy in Pinterest’s L1 Conversion Models
The article discusses the challenges faced by Pinterest in reconciling offline and online performance metrics of their L1 conversion models. It highlights the discrepancies observed between strong...
Piqama: Pinterest Quota Management Ecosystem
The article introduces Piqama, Pinterest's comprehensive quota management ecosystem designed to oversee resource quotas across various systems. It outlines the architecture of Piqama, emphasizing its...
Drastically Reducing Out-of-Memory Errors in Apache Spark at Pinterest
This article details Pinterest's approach to significantly reduce out-of-memory (OOM) errors in their Apache Spark applications through a feature called Auto Memory Retries. By automatically...