Embedding-based Retrieval in Facebook Search
By Jui-Ting Huang, Jui-Ting Huang, Ashish Sharma, Shuying Sun, Li Xia, David Zhang, Philip Pronin, Janani Padmanabhan, Giuseppe Ottaviano, Linjun Yang. 2020
410 citations recorded by the source corpus.
Search in social networks such as Facebook poses different challenges than in classical web search: besides the query text, it is important to take into account the searcher's context to provide relevant results. Their social graph is an integral part of this context and is a unique aspect of Facebook search. While embedding-based retrieval (EBR) has been applied in web search engines for years, Facebook search was still mainly based on a Boolean matching model. In this paper, we discuss the techniques for applying EBR to a Facebook Search system. We introduce the unified embedding framework developed to model semantic embeddings for personalized search, and the system to serve embedding-based retrieval in a typical search system based on an inverted index. We discuss various tricks and experiences on end-to-end optimization of the whole system, including ANN parameter tuning and full-stack optimization. Finally, we present our progress on two selected advanced topics about modeling. We evaluated EBR on verticals for Facebook Search with significant metrics gains observed in online A/B experiments. We believe this paper will provide useful insights and experiences to help people on developing embedding-based retrieval systems in search engines.
Subfields: Computer Vision and Pattern Recognition, Information Retrieval & Search, Representation & Self-Supervised Learning
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Computer Vision and Pattern Recognition
- Ji-rong Wen
- Wayne Xin Zhao
- Jing Liu
- Ruiyang Ren
- Haifeng Wang
- Niklas Muennighoff
- Hua Wu
- Chenyan Xiong
In Information Retrieval & Search
In Representation & Self-Supervised Learning
- Niklas Muennighoff
- Nouamane Tazi
- Nils Reimers
- L. Magne
- Ji-rong Wen
- Wayne Xin Zhao
- Jing Liu
- Ruiyang Ren
Citations in the corpus
- Approximate Nearest Neighbor Negative Contrastive Learning for Dense Text Retrieval (2020, background): “Recent research explored various ways to construct negative training instances for dense retrieval (Huang et al., 2020; Karpukhin et al., 2020).”
- RocketQA: An Optimized Training Approach to Dense Passage Retrieval for Open-Domain Question Answering (2020, positive): “This design is important, and there is similar observation in Facebook Search (Huang et al., 2020).”
- Optimizing Dense Retrieval Model Training with Hard Negatives (2021, methodology): “Rand Neg outperforms BM25, DeepCT, and LeToR even by a large margin on some metrics.”
- Qwen3 Embedding: Advancing Text Embedding and Reranking Through Foundation Models (2025, neutral): “Text embedding and reranking are fundamental components in numerous natural language processing and information retrieval applications, including web search, question answering, recommendation systems, and beyond (Karpukhin et al., 2020; Huang et al., 2020; Zhao et al., 2023; 2024).”
- MTEB: Massive Text Embedding Benchmark (2022, background): “…power a variety of use cases from clustering and topic representation (Aggarwal and Zhai, 2012; Angelov, 2020) to search systems and text mining (Huang et al., 2020; Zhu et al., 2021; Nayak, 2019) to feature representations for downstream models (Saharia et al., 2022; Borgeaud et al., 2022).”
- Where to Go Next for Recommender Systems? ID- vs. Modality-based Recommender Models Revisited (2023, background): “Fair comparison here means that MoRec and IDRec should at least be compared with the same backbone network and experimental settings, such as samplers and loss functions [25].”
- RocketQAv2: A Joint Training Method for Dense Passage Retrieval and Passage Re-ranking (2021, background): “Apart from separately considering the above two tasks, it has been proved that passage retrieval and passage re-ranking are actually highly related and dependent (Huang et al., 2020; Gao et al., 2020; Khattab and Zaharia, 2020).”
- Dense Text Retrieval Based on Pretrained Language Models: A Survey (2022, methodology): “have attempted to deploy dense retrieval techniques in real systems26, including Web search [345], sponsor search [131], [346], product search [347], [348] and personalized search [281].”
- RePlay: Retrieval-Based Voice Playback for Multi-Turn spoken dialogue (2026, unknown): “Neural embedding models [9] enable retrieval by semantic similarity [10, 11] and extended to retrieval-augmented generation [12].”
- MINT: Multi-Vector Search Index Tuning (2025, unknown): “Vector similarity search has become increasingly important in real-world applications, such as recommendation systems, semantic search, and retrieval-augmented generation (RAG) [1–4].”
- Mieb: Massive Image Embedding Benchmark (2025, unknown): “Image and text embeddings power a wide range of use cases, from search engines to recommendation systems [19, 23, 67].”
- A Survey of Model Architectures in Information Retrieval (2025, unknown): “…focus on unbiased relevance estimation using biased feedback (Wang et al., 2016; Joachims et al., 2017b,a; Ai et al., 2018c,b; Wang et al., 2018; Hu et al., 2019; Ren et al., 2022) while other focus on jointly optimizing effectiveness and fairness of the ranking systems (Singh and Joachims,…”
- Open-Source Embedding Models: A Comprehensive Survey of Techniques, Benchmarks, and Applications (2026, unknown): “In search engines, embedding models enable semantic search capabilities, allowing users to find relevant information even when their queries use different keywords that have the same underlying meaning [93], [94].”