Introduction
Information Retrieval (IR) has traditionally relied on exact term matching or static word embeddings like GloVe. However, these methods struggle with polysemy—where a single word has multiple meanings depending on context. While contextualized language models (LMs) like BERT and ELMo have transformed NLP, their integration into IR for long-form document ranking remained a challenge. CEDR (Contextualized Embeddings for Document Ranking) addresses this by deeply integrating these models into existing neural IR architectures.
Methodology
The CEDR framework introduces two primary innovations to bridge the gap between contextual LMs and IR:
- Contextualized Similarity Tensors: Rather than a 2D similarity matrix, CEDR constructs a 3D tensor that includes a "layer" dimension. This allows the model to leverage information from all layers of the LM, capturing both low-level syntactic and high-level semantic signals.
- Hybrid Architecture: CEDR combines the global classification signal from BERT's
[CLS]token with local term-matching signals from established rankers like PACRR, KNRM, and DRMM. This joint approach ensures the model benefits from both deep semantic understanding and traditional relevance signals like term frequency.
To handle document length constraints (e.g., BERT's 512-token limit), CEDR employs a sliding window approach, processing overlapping segments and aggregating their scores.
Key Insights: The Power of Context
A core strength of CEDR is its ability to disambiguate terms based on their usage. For instance, in a query regarding "restraining population growth," the word "curb" acts as a verb. BERT correctly identifies this context, showing high similarity to relevant documents using "curb" as a synonym for "restrain," while assigning low similarity when "curb" refers to a physical roadside structure.
Furthermore, the authors discovered a "Layer 5" sweet spot: most of the ranking performance is achieved using only the first five layers of BERT. Pruning subsequent layers can significantly reduce inference time without substantial loss in accuracy.
Experimental Results
CEDR was evaluated on the TREC Robust 2004 and WebTrack 2012–2014 benchmarks. The results demonstrate that CEDR models consistently outperform both traditional neural rankers and "Vanilla BERT" baselines.
On the Robust04 dataset, CEDR-KNRM achieved an nDCG@20 of 0.5381, significantly surpassing the BM25 baseline (0.4140) and the fine-tuned Vanilla BERT (0.4541). The study also highlights that fine-tuning the LM specifically for the ranking task is critical for achieving peak performance.
Conclusion
CEDR demonstrates a robust method for incorporating contextualized embeddings into document ranking. While highly effective, these models remain computationally expensive compared to static embeddings. Future work involves optimizing inference through more efficient architectures and better handling of extremely long documents beyond simple segmentation.
Summary updated