PinterestPinterest EngineeringExplainer
Evolving Pinterest’s Embedding Retrieval Platform
Summary
Pinterest describes how its Manas distributed search platform is evolving embedding retrieval for a corpus growing toward tens of billions of embeddings. Traditional HNSW indexes require all data in RAM, while single-vector two-tower retrieval limits context-dependent relevance, motivating changes across quantization, SSD-based serving, and multi-embedding retrieval. Manas uses Scalar Quantization and Product Quantization across HNSW and IVF, with SQ preserving over 90% recall while reducing index size, and Linear Scaling plus SIMD cuts per-query computing resources by 10–15%. For disk-based serving, SPANN with PQ is reported as 4.5x faster than plain SPANN and over 3x DiskANN QPS, while a five-billion-embedding production evaluation saved over 40% CPU time with under 5% recall drop. The platform is also adding ColBERT-style late interaction using Sum of MaxSim, with a pilot in progress.
Context
Manas must support embedding retrieval as Pinterest’s corpus grows toward tens of billions of embeddings. The post identifies memory costs from RAM-resident HNSW indexes, latency and I/O constraints for SSD serving, and the limited context-dependent relevance of single-vector two-tower retrieval.
Approach / What changed
The team evolves Manas through vector quantization, SSD-based ANN serving, and multi-embedding retrieval. It implements SQ and PQ, Linear Scaling SQ with SIMD, and SPANN with quantized on-disk embeddings and in-memory centroids, while adding ColBERT-style late interaction with multi-embedding queries and Sum of MaxSim scoring.
Takeaways
Scalar Quantization reduced HNSW index size by 59% and IVF index size by 75%, while recall remained consistently above 90% in the reported benchmarks.
SPANN combined with PQ was 4.5x faster than plain SPANN and achieved over 3x DiskANN’s QPS with one-third the latency, at a 5% recall drop.
Multi-embedding retrieval adds ColBERT-style Sum of MaxSim scoring, requiring Manas to parse multi-embedding queries and run multiple ANN searches simultaneously.
Source and freshness
- Source
- medium.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.