Inferensys

Glossary

Asymmetric Search

A retrieval architecture where queries and documents are processed by separate, independently parameterized neural encoders, optimizing for efficient offline indexing and fast online querying.
Stylish WeWork-like workspace with hot desks and document wall, professional searching through enterprise knowledge base on a mounted ultrawide display, warm industrial pendants overhead.
DUAL-ENCODER RETRIEVAL

What is Asymmetric Search?

Asymmetric search defines a neural retrieval architecture where queries and documents are processed by separate, independently parameterized encoder models.

Asymmetric search is a retrieval paradigm where the query encoder and the document encoder are distinct neural networks with independent weights and architectures. Unlike symmetric setups that apply a single encoder to both inputs, this design allows the query encoder to be lightweight for low-latency inference while the document encoder can be a high-capacity model run offline to produce richly expressive passage embeddings.

This separation is foundational to the Dense Passage Retrieval (DPR) framework. The document encoder pre-computes all passage vectors and stores them in an approximate nearest neighbor (ANN) index. At query time, only the compact query encoder runs, generating a query embedding used for fast maximum inner product search (MIPS) against the static document index, enabling scalable semantic retrieval.

DUAL-ENCODER ARCHITECTURE

Key Characteristics of Asymmetric Search

Asymmetric search defines a retrieval paradigm where queries and documents are processed by separate, independently parameterized encoders. This architectural choice enables massive scalability by pre-computing document embeddings offline while allowing lightweight query encoding at runtime.

01

Independent Query and Document Encoders

Unlike symmetric architectures that use a shared encoder, asymmetric search employs two distinct neural networks. The query encoder is optimized for short, often ambiguous text, while the document encoder processes longer, structured passages. This separation allows each encoder to specialize: the query tower learns to map terse user intent into the embedding space, while the document tower captures rich semantic content from paragraphs. The two encoders are trained jointly with a contrastive loss but operate independently during inference.

02

Offline Indexing with Pre-Computed Embeddings

The defining operational advantage of asymmetric search is that all document embeddings are computed once and stored in a vector index. This happens offline, before any user query arrives. When a query is submitted, only the lightweight query encoder runs in real-time. This decoupling means retrieval latency is dominated by the Approximate Nearest Neighbor (ANN) search, not by re-encoding documents. For billion-scale corpora, this pre-computation strategy is the only viable path to sub-second retrieval.

03

Maximum Inner Product Search (MIPS)

Asymmetric search relies on MIPS as its core retrieval operation. The query embedding is treated as a probe vector, and the system finds document embeddings with the highest dot product. This is mathematically equivalent to cosine similarity when vectors are normalized. Efficient MIPS is enabled by specialized indices like FAISS with HNSW or IVF-PQ structures. The choice of inner product over Euclidean distance is deliberate: it maps naturally to the contrastive training objective and enables faster approximate search algorithms.

04

Contrastive Training with In-Batch Negatives

Training an asymmetric dual-encoder requires teaching the model to pull relevant query-document pairs together while pushing irrelevant pairs apart. A critical efficiency technique is in-batch negatives: other positive pairs within the same mini-batch are reused as negative examples. This dramatically increases the number of training signals without additional computation. For a batch size of 128, each query gets 127 negatives for free. Advanced setups supplement these with hard negatives—passages that are superficially similar but irrelevant—to sharpen the model's discriminative power.

05

Knowledge Distillation from Cross-Encoders

A bi-encoder's speed comes at a cost: it cannot model fine-grained token-level interactions between query and document. To bridge this accuracy gap, asymmetric retrievers are often trained via cross-encoder distillation. A powerful cross-encoder—which processes the concatenated query-document pair with full self-attention—scores training pairs. The bi-encoder then learns to mimic these scores. This transfers the cross-encoder's deep semantic understanding into the fast dual-encoder architecture, yielding a model that is both accurate and scalable.

06

Scalability Through Vector Compression

Storing full-precision dense vectors for billions of documents is memory-prohibitive. Asymmetric search systems employ product quantization (PQ) and scalar quantization to compress embeddings by 4x–16x with minimal recall loss. PQ decomposes a high-dimensional vector into sub-vectors, clusters each subspace independently, and stores only the cluster IDs. Combined with an Inverted File Index (IVF) that partitions the embedding space, this enables billion-scale retrieval on a single machine while maintaining Recall@100 above 95%.

ARCHITECTURAL COMPARISON

Asymmetric vs. Symmetric vs. Cross-Encoder Architectures

A comparison of encoder architectures used for dense passage retrieval, highlighting differences in parameter sharing, computational cost, and interaction granularity.

FeatureAsymmetric (Bi-Encoder)Symmetric (Siamese)Cross-Encoder

Encoder Parameters

Independent (Query ≠ Doc)

Shared (Query = Doc)

Joint (Query + Doc)

Interaction Type

Post-hoc (Dot Product/Cosine)

Post-hoc (Dot Product/Cosine)

Full Token-Level Attention

Indexability

Inference Speed

< 10 ms per query

< 10 ms per query

1000 ms per query

Typical Use Case

Open-Domain Retrieval (DPR)

Semantic Textual Similarity (STS)

Re-Ranking / Validation

Document Embedding Pre-computation

Scalability (Docs)

Billions

Billions

Thousands

Sensitivity to Paraphrase

Moderate

Moderate

High

ASYMMETRIC SEARCH EXPLAINED

Frequently Asked Questions

Clear, technical answers to the most common questions about dual-encoder retrieval architectures and their role in modern semantic search systems.

Asymmetric search is a neural retrieval architecture where queries and documents are processed by separate, independently parameterized encoder models rather than a single shared encoder. In a standard setup like Dense Passage Retrieval (DPR), a query encoder $E_Q$ maps a user query to a dense vector, while a passage encoder $E_P$ independently maps each document to a dense vector in the same embedding space. Retrieval is then performed via Maximum Inner Product Search (MIPS) between the query vector and all pre-computed document vectors. This asymmetry is crucial: the query encoder can be lightweight and optimized for real-time inference, while the passage encoder can be run offline at scale. The two encoders are trained jointly using contrastive loss with in-batch negatives, learning to pull relevant query-passage pairs together while pushing irrelevant pairs apart. Unlike symmetric architectures that use a single encoder for both sides, asymmetric search acknowledges that queries and documents have fundamentally different linguistic properties—queries are typically short, ambiguous, and keyword-like, while documents are longer, well-formed, and information-dense.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.