Contextualized Query Embeddings for Conversational Search

Sheng-Chieh Lin, Jheng-Hong Yang, Jimmy Lin

TL;DR

Researchers have developed Contextualized Query Embeddings (CQE), a method that simplifies conversational search by replacing slow, multi-stage pipelines with a single, high-speed dense retrieval model. By learning to "rewrite" queries directly in a latent vector space, CQE achieves competitive accuracy with an order of magnitude lower latency (~11ms vs. 300ms+), while remaining surprisingly interpretable.

Conversational search is inherently difficult because human dialogue is often ambiguous. Users frequently use pronouns ("it," "they") or omit context entirely, expecting the system to maintain the thread of the conversation. For example, a question like "Is it treatable?" only makes sense if the system remembers a previous query about a specific disease.

Currently, the state-of-the-art approach relies on a complex multi-stage pipeline:

  1. Reformulation: A large language model (e.g., T5 or GPT) rewrites the ambiguous query into a standalone version.
  2. Retrieval: An IR system (e.g., BM25) finds relevant documents based on the rewrite.
  3. Re-ranking: A model like BERT sorts the top results for final precision.
A typical conversational search example from TREC CAsT and the standard multi-stage pipeline used to address it.

While effective, this modular approach is slow—often taking hundreds of milliseconds or even seconds—and sub-optimal because each component is trained independently.

Contextualized Query Embeddings (CQE)

The authors propose CQE, a BERT-based bi-encoder architecture designed to collapse these stages into a single, end-to-end process. Instead of generating a textual rewrite, the Conversational Query Encoder processes the current query alongside the previous context to produce a single dense vector representation in a latent space.

To overcome the scarcity of end-to-end conversational training data, the researchers employed weakly supervised training. They used the CANARD dataset (human rewrites) and a strong ranking model (ColBERT) to identify "gold" passages, creating a bridge between conversational context and retrieval targets. This was further enhanced by hard negative mining and knowledge distillation from more complex models.

Core Innovations and Interpretability

One of the most significant findings is the model's inherent interpretability. By analyzing the $L_2$ norms of individual token embeddings, the authors discovered that the model naturally learns to "weight" terms. It boosts the importance of relevant context words (like "neolithic" or "revolution") while suppressing generic or irrelevant ones (like "start" or "end").

The CQE architecture showing contextualized embeddings and hybrid (dense-sparse) retrieval.

This discovery enables Dense-to-Sparse Hybridization. Since the model can identify key context words via their embeddings, it can generate a "bag-of-words" query for traditional sparse retrieval (BM25) alongside its dense semantic search. This hybrid approach combines the precision of keyword matching with the semantic depth of dense embeddings.

Datasets and Evaluation

The study evaluates CQE across several key benchmarks:

  • TREC CAsT (2019 & 2020): The primary benchmarks for conversational assistance.
  • CANARD: Used to build the weakly supervised training set from human reformulations.
  • MS MARCO: Used for initial "warm-up" training on general passage retrieval.
  • ORConvQA: An open-domain conversational QA dataset used to test zero-shot generalization.

Performance and Efficiency

CQE demonstrates a remarkable balance of speed and effectiveness:

  • Latency: CQE achieves a latency of approximately 11ms per query. In contrast, a standard BERT-base re-ranker takes ~314ms, and pipelines using T5 for reformulation can exceed 500ms.
  • Accuracy: On CAsT-19 and CAsT-20, CQE matched or outperformed multi-stage pipelines. The CQE-hybrid model achieved an nDCG@3 of 0.515, rivaling much heavier systems.
  • Generalization: Without task-specific fine-tuning, CQE significantly outperformed baselines on the ORConvQA dataset, indicating it learns robust, transferable conversational patterns.

Limitations and Future Work

While promising, the authors note several areas for improvement. Currently, the model only considers historical user queries; future versions should incorporate the system's own previous responses. Additionally, while bi-encoders are fast, the researchers are interested in whether "contextualized" strategies can improve the accuracy of cross-encoders without a prohibitive latency penalty. Finally, refining negative sampling during training could help the model avoid occasionally adding "distracting" related terms that weren't explicitly required by the context.

Summary updated

BibTeX
@inproceedings{lin2021contextualized,
  author = {Sheng-Chieh Lin and Jheng-Hong Yang and Jimmy Lin},
  title = {{Contextualized Query Embeddings for Conversational Search}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2021},
  doi = {10.18653/v1/2021.emnlp-main.77},
}
Figure