---
title: Embedding-Based Retrieval Techniques
url: https://www.emergentmind.com/topics/embedding-based-retrieval-ebr-b5819931-e27b-4473-8890-4d4e3afe5474
type: topic
---

# Embedding-Based Retrieval Techniques

Embedding-Based Retrieval (EBR) is a retrieval paradigm in which queries and candidate entities—documents, products, ads, users, videos, or listings—are encoded into a shared embedding space so that retrieval can be reduced to nearest-neighbor search under a simple similarity function, typically an inner product or cosine similarity. In industrial systems, EBR is widely used as the candidate-generation stage because item-side embeddings can be precomputed offline and searched efficiently with approximate nearest neighbor (ANN) infrastructure such as FAISS, HNSW, IVF-PQ, and DiskANN, while downstream stages perform more expensive reranking on a much smaller candidate set [2303.11009] [2202.06212].

## 1. Core formulation and role in retrieval systems

The canonical EBR architecture is the two-tower or dual-encoder model. A query tower \(f_q\) maps query-side features \(x_q\) to an embedding \(q \in \mathbb{R}^d\), and an item tower \(f_p\) or \(g\) maps item-side features \(x_p\) to an embedding \(p \in \mathbb{R}^d\). In one representative formulation,
\[
q = f_q(x_q; \theta_q) \in \mathbb{R}^d,\qquad p = f_p(x_p; \theta_p) \in \mathbb{R}^d,
\]
with similarity
\[
S(q,p)=\langle q,p\rangle.
\]
Equivalent formulations appear across recommender, sponsored search, and marketplace systems as \(h_\theta(u,i)={\mathbf e_\theta^u}^\top \mathbf v_\theta^i\) or \(F_\theta(l,q)=\mathrm{sim}(Q_\theta(q),L_\theta(l))\) [2303.11009] [2504.12920] [2601.06873].

This factorization makes EBR the standard mechanism for large-scale candidate generation. Industrial pipelines typically reduce a corpus of millions to billions of items to a few hundred or thousand candidates before preranking or ranking. The retrieval stage is therefore a bottleneck: if relevant candidates are not retrieved, later stages cannot recover them. This point is explicit in e-commerce search, friend recommendation, sponsored search, and Airbnb search, where retrieval is described as the initial stage that filters a massive eligible set under strict latency constraints [2302.02657] [2409.14682] [2202.06212] [2601.06873].

A recurrent theme in the literature is that EBR is not a single application-specific technique but a common abstraction spanning heterogeneous domains. The same basic pattern appears in billion-scale e-commerce search, graph-based friend recommendation, ads retrieval, short-video recommendation, multimodal content moderation, and scoped social search, with the main differences arising from how encoders, objectives, and indexes are designed [2303.11009] [2411.10057] [2507.01066].

## 2. Representation learning and objective design

The simplest EBR objectives optimize a supervised retrieval loss over query–positive and query–negative pairs. In graph-aware friend recommendation, for example, a Graph Attention Network encoder is trained with a softmax over candidate users using dot-product logits and categorical cross-entropy; in recommender systems, binary cross-entropy, sampled-softmax, and InfoNCE-style formulations are also standard [2409.14682] [2302.02657]. These objectives shape embedding geometry for ANN search, but multiple papers argue that industrial performance depends critically on how training signals are chosen.

One major line of work enriches supervision beyond a single positive/negative dichotomy. In JD.com search, MMSE introduces multi-stage information mining over ordered items, clicked items, exposed-but-unclicked items, and random negatives, together with a multi-grained objective
\[
\mathcal L=\mathcal L_{cn}+\mathcal L_{un}+\mathcal L_{cu}+\mathcal L_{ou},
\]
combining retrieval losses for global comparison ability with hinge and Bayesian Personalized Ranking losses for local comparison ability. The target hierarchy is explicitly
\[
\text{ordered} \succ \text{clicked} \succ \text{unclicked} \succ \text{random negative},
\]
so that the same embedding space reflects multiple similarity levels rather than only clicked-versus-negative discrimination [2303.11009].

A second line of work aligns EBR with multiple business objectives. Bing’s Uni-Retriever jointly optimizes a relevance objective distilled from a cross-encoder teacher and a CTR-oriented contrastive objective, using a unified embedding that favors both high-relevance and high-CTR ads [2202.06212]. Walmart’s product-search retriever similarly combines engagement and relevance through a multi-objective listwise loss, where a cross-encoder Relevance Reward Model trained on Exact/Substitute/Irrelevant human labels is used both to revise noisy engagement labels and to define a relevance target for distillation [2408.04884]. CSMF goes further by modeling exposure, click, and conversion as a cascade, partitioning one EBR network into objective-specific parameter subspaces through selective masking and introducing Adaptive Margin Loss so downstream objectives can exploit or correct upstream scores without increasing serving-time dimensionality [2504.12920].

A third direction replaces purely supervised retrieval losses with auxiliary self-supervision or probabilistic modeling. In industrial friend recommendation, a supervised link-prediction loss is augmented with a CCA-based decorrelation objective and a masked autoencoder objective,
\[
\mathcal L_{\text{combined}}=\alpha \mathcal L_{\text{retrieval}}+\beta \mathcal L_{\text{CCA}}+\gamma \mathcal L_{\text{MAE}},
\]
to improve robustness and task generalization at scale, while keeping the main retrieval objective dominant [2409.14682]. In pEBR, the score distribution itself is modeled probabilistically, either with an exponential or a Beta family, so that a query-specific cosine threshold can be computed from a cumulative distribution function rather than using a fixed top-\(K\) or a global score threshold. This is used to address insufficient retrieval for head queries and irrelevant retrieval for tail queries [2410.19349].

These variants share an important characteristic: they usually keep the retrieval-time interface ANN-friendly—single query/item vectors or a small number of vectors with simple similarity—while moving complexity into data construction and training objectives. This suggests that much of modern EBR research is less about abandoning the dual-encoder abstraction than about redefining what the embeddings are forced to encode.

## 3. Indexing, compression, and serving architectures

The industrial value of EBR depends on whether embeddings can be searched under memory and latency budgets. The standard pattern is offline computation of item embeddings, construction of an ANN index, and online computation of the query embedding. In JD.com search, for instance, item embeddings are indexed with FAISS IVF-PQ using embedding dimension 128, \(nlist=32768\), and \(nprobe=32\), enabling billion-scale retrieval with low latency [2303.11009]. Airbnb deploys FAISS IVF rather than HNSW because IVF integrates more cleanly with Lucene filtering, dynamic availability updates, and real-time marketplace constraints; the final system uses Euclidean distance because it yields more balanced clusters and therefore lower \(nprobes\) for high recall [2601.06873].

Several papers focus on reducing memory or improving post-verification. Uni-Retriever uses an optimized DiskANN serving pipeline and introduces Matching-oriented Product Quantization so compressed embeddings are learned for retrieval quality rather than only reconstruction error, then adapts dense embeddings to the ranking function so post-verification can approximate reranking directly [2202.06212]. BiDR introduces a bi-granular document representation in which compact sparse embeddings remain in memory for coarse retrieval while dense embeddings are hosted on disk for fine-grained post verification; sparse codes are trained with contrastive quantization and dense embeddings are trained with locality-centric sampling conditioned on the sparse candidate distribution [2201.05409]. Tencent’s BEBR compresses float embeddings into recurrent binary embeddings and uses Symmetric Distance Calculation to accelerate similarity computation, with the stated goal of supporting tens or hundreds of billions of documents under high concurrency [2302.08714].

A different systems direction keeps dense ANN but adds cheap interaction terms after coarse retrieval. In Tencent Advertising, a dual-tower retriever is augmented with an IPNN-style implicit interaction and a Wide-like HitMatch component implemented through a GPU-accelerated compressed inverted list. The final score is the sum of the dual-tower/IPNN inner product and the sparse feature-interaction score, allowing ranking-style cross features to influence retrieval without replacing ANN [2511.22460].

The following patterns recur across these systems.

| Strategy | Representative systems | Key mechanism |
|---|---|---|
| Dense ANN over precomputed item vectors | JD.com, Airbnb | FAISS IVF-PQ or IVF with online query encoding [2303.11009] [2601.06873] |
| Disk-backed post verification | Bing, BiDR | Compressed coarse stage in memory, dense verification from SSD or disk [2202.06212] [2201.05409] |
| Learned compression | BEBR, MoPQ | Binary recurrent embeddings or retrieval-oriented quantization [2302.08714] [2202.06212] |
| ANN plus sparse interaction refinement | Tencent Advertising | Dual-tower retrieval plus GPU HitMatch on sparse cross features [2511.22460] |

A plausible implication is that EBR system design has become a co-optimization problem over representation quality, ANN recall, filtering constraints, and update patterns. The index is no longer a neutral back-end detail; it often determines which modeling choices are viable.

## 4. Variants and domain-specific extensions

Recent EBR work extends the basic shared-space retrieval paradigm in several orthogonal directions. One direction addresses multi-stage business logic. MMSE in e-commerce search explicitly mines ordered, clicked, unclicked, and random sampled items to improve consistency between retrieval and later ranking stages [2303.11009]. Que2Engage in Facebook Marketplace treats context as a modality in the document tower and combines a contrastive relevance loss with an engagement-oriented binary cross-entropy loss so retrieval candidates are both relevant and more engaging [2302.11052]. CSMF frames exposure, click, and conversion as a sequential chain and allocates independent learning space to each objective by pruning and freezing subsets of one EBR network [2504.12920].

A second direction changes the encoder family. In friend recommendation, EBR becomes graph-aware by replacing the standard user tower with a GAT over a user–user graph, while keeping the retrieval interface as dot product plus ANN [2409.14682]. KuaiFormer replaces the conventional DNN user tower with a causal Transformer trained under a Next Action Prediction objective, uses adaptive item compression to handle long sequences, and emits multiple interest embeddings through learned query tokens, but still performs ANN search over item embeddings at serving time [2411.10057].

A third direction enriches the information represented by each embedding. Event-enhanced Retrieval appends a decoder to the document encoder during training so titles can generate event triplets, and adds a query–event contrastive objective to reduce semantic drift in real-time search; the decoder is removed at inference, preserving the efficiency profile of dual-encoder retrieval [2404.05989]. In multimodal content moderation, a supervised-contrastive foundation embedding model is trained over video and text, then used in a seed-based EBR system where similarity to risk seeds determines retrieval and auto-action thresholds for emerging harmful trends [2507.01066]. The abstract of CPS-MEBR states that single-embedding web-page representation is often insufficient for long and complex structured pages, and proposes click-feedback-aware summarization plus multiple embeddings per page to match different potential queries [2210.09787].

A fourth direction structures the corpus itself. Divide-and-Conquer EBR partitions items into clusters, trains within-cluster retrieval tasks with within-cluster negatives, and retrieves candidates from each cluster in parallel before quota-based merging. This reframes EBR as a controllable multi-task system and provides explicit control over diversity and fairness via per-cluster quotas [2302.02657]. Hybrid lexical–semantic retrieval is another structured extension: Facebook Group Scoped Search integrates Search Semantic Retriever into an existing keyword pipeline so lexical and embedding candidates are merged before ranking, with large language models used for scalable offline relevance assessment [2509.13603].

Taken together, these variants show that EBR is no longer only “encode once, compare once.” It now includes graph-structured encoders, multimodal towers, multiple user interests, dynamic thresholds, clustered corpora, and hybrid lexical–dense pipelines, while retaining the core requirement that retrieval remain indexable and low-latency.

## 5. Empirical performance and industrial impact

The empirical literature presents EBR as a production technology rather than a purely benchmark-driven method. Offline improvements are routinely validated by online A/B tests on revenue, conversion, engagement, or moderation actions.

In JD.com search, MMSE improves offline recall across multiple baselines; for DSSM, Recall@1 rises from 0.0069 to 0.0228 and Recall@1000 from 0.6806 to 0.8067, while online A/B tests show Num\_prank +2.0%, RPM +0.35% with \(p\)-value 0.0013, CVR +0.30% with \(p\)-value 0.0004, and UV-value +0.47% [2303.11009]. In a large-scale friend recommendation system, SSMTL-based EBR yields statistically significant increases of up to 5.45% in new friends made and 1.91% in new friends made with low-degree users [2409.14682]. Bing’s Uni-Retriever reports RPM improvements of +3.27% for its multi-objective representation, +3.06% from improved negative sampling, and +1.63% from optimized DiskANN serving [2202.06212]. Kuaishou’s divide-and-conquer retriever improves App Usage Time by +0.096%, Likes by +0.75%, Follows by +1.01%, Shares by +1.04%, and Downloads by +2.40% in an online experiment with more than 40M users [2302.02657].

Compression-oriented EBR also produces system-level gains. Tencent’s BEBR reports that its method significantly saves 30%~50% index costs with almost no loss of accuracy at the system level, including memory usage −73.91%, QPS +90%, and overall retrieval cost −55% in web search, and memory usage −89.65%, QPS +72%, and overall retrieval cost −31% in video copyright detection [2302.08714]. In Tencent Advertising, GPU-powered feature interaction improves GMV by +1.58% in WeChat-Moment traffic and +1.49% in WeChat-Channel traffic, while Recall@100\_1 increases by +1.8% and +2.5% respectively [2511.22460].

Multi-objective and relevance-focused refinements show similar effects. Que2Engage reports a +4.5% improvement in online searcher engagement with neutral NDCG in Facebook Marketplace Search [2302.11052]. Walmart’s relevance-enhanced EBR yields incremental online improvements up to +0.98% NDCG@10 and +0.43% revenue in A/B tests after adding label revision, typo-aware training, semi-positive generation, and multi-objective loss [2408.04884]. Airbnb reports a combined +0.31% booking conversion across successive EBR launches and +2.3% bookings from email promotions when the same retrieval system is used for marketing campaigns [2601.06873]. In content moderation, EBR improves ROC-AUC from 0.85 to 0.99 and PR-AUC from 0.35 to 0.95 on 25 emerging trends, increases action rates by 10.32%, and reduces operational costs by over 80% [2507.01066].

These results are heterogeneous in task and metric, but they support a consistent conclusion: improvements in candidate-generation embeddings can materially affect end-to-end system behavior even when ranking remains unchanged. This suggests that retrieval is not merely a high-recall prefilter; in modern multi-stage systems it is already a substantive optimization layer.

## 6. Limitations, misconceptions, and open problems

A persistent misconception is that better embeddings alone solve retrieval. Multiple papers document settings in which the basic dual-encoder objective is insufficient or even counterproductive. Walmart reports numerous instances of relevance degradation caused by false positives and false negatives in training data and by the inability to handle query misspellings [2408.04884]. MMSE argues that click-only retrieval training is inconsistent with multi-stage e-commerce search systems whose later stages explicitly optimize conversion-oriented behaviors [2303.11009]. KuaiFormer identifies single-vector user representations as inadequate for rapidly changing, multi-interest short-video behavior [2411.10057].

Another misconception is that a fixed top-\(K\) policy is a neutral serving decision. pEBR argues that fixed retrieval counts lead to insufficient retrieval for head queries and irrelevant retrieval for tail queries, and proposes a query-dependent threshold derived from a learned score distribution instead [2410.19349]. Likewise, divide-and-conquer EBR argues that greedy global nearest-neighbor retrieval provides little explicit control over diversity and fairness, motivating clusterwise retrieval and quota-based merging [2302.02657].

Several controversies concern auxiliary objectives and system integration. In graph-based friend recommendation, not all self-supervised tasks help: global contrastive graph SSL can cause negative transfer under K-hop subgraph training, whereas local non-contrastive CCA and MAE objectives align better with link prediction [2409.14682]. In Facebook Group Scoped Search, the blended lexical–semantic system performs best when semantic scores are treated as ranking features rather than as a replacement for keyword retrieval, indicating that hybrid retrieval remains important in settings where precision and explainability matter [2509.13603]. Airbnb shows that offline evaluation itself is difficult in dynamic marketplaces because logs do not record the full eligible set, forcing the construction of random-negative logging and traffic replay systems [2601.06873].

Open problems recur across papers. These include better handling of dynamic inventory and evolving graphs, more principled clustering and merge strategies, stronger treatment of exposure bias and position bias, richer multimodal encoders, and closer joint optimization of retrieval and ranking [2601.06873] [2302.02657] [2303.11009]. Compression and quantization remain a trade-off space rather than a solved problem: BEBR shows large memory and cost savings, but its framing also implies that binary or quantized representations must still preserve the retrieval geometry needed by downstream systems [2302.08714]. In moderation, seed quality and feedback loops become operational dependencies; in event-centric retrieval, event extraction quality constrains the value of event-aware supervision [2507.01066] [2404.05989].

A plausible synthesis is that EBR research is converging on a stable deployment interface—precompute item vectors, compute query vectors online, search with ANN—but an increasingly rich training-time and system-level design space. The central question is no longer whether embeddings can replace lexical or heuristic retrieval in principle. It is how to make shared embedding spaces express business objectives, sequence dynamics, multimodal semantics, robustness constraints, and systems requirements without losing the retrieval efficiency that made EBR useful in the first place.

Source: https://www.emergentmind.com/topics/embedding-based-retrieval-ebr-b5819931-e27b-4473-8890-4d4e3afe5474