COIL: Revisit Exact Lexical Match in Information Retrieval with Contextualized Inverted List

Luyu Gao, Zhuyun Dai, Jamie Callan

Abstract

Classical information retrieval systems such as BM25 rely on exact lexical match and carry out search efficiently with inverted list index. Recent neural IR models shift towards soft semantic matching of all query-document terms, but they often lose the computational efficiency of exact match systems. This paper presents COIL, a contextualized exact match retrieval architecture that brings semantic lexical matching to the traditional inverted list. COIL scoring is based on overlapping query-document tokens' contextualized representations. The new architecture stores these representations in inverted lists, bringing together the efficiency of exact match and the representation power of deep language models. Our experimental results show COIL outperforms classical lexical retrievers and state-of-the-art deep LM retrievers with similar or smaller latency.

Introduction

In Information Retrieval (IR), a persistent trade-off exists between efficiency and effectiveness. Traditional lexical systems like BM25 are highly efficient due to inverted list indexing but suffer from "semantic blindness," failing to account for vocabulary mismatch (e.g., "cat" vs. "kitty") and polysemy (e.g., the different meanings of "bank").

Conversely, modern neural IR models utilize Transformers like BERT to understand context. While accurate, cross-attention models are computationally prohibitive for large-scale retrieval, and late-interaction models like ColBERT require massive storage to maintain high-dimensional vectors for every token in a collection. COIL addresses this by asking: Can we perform exact lexical matching while using contextualized representations to score those matches?

The COIL Architecture

COIL (COntextualized Inverted List) reinvents the inverted list for the neural era by focusing on overlapping terms between queries and documents.

Comparison of IR architectures: (a) Cross-Attention, (b) Dense Retrievers, (c) ColBERT, and (d) COIL.

Contextualized Representations and Dimensionality Reduction

Instead of simple term frequencies, COIL uses BERT to produce a vector for each token. These vectors are contextualized, meaning the representation of a word depends on its surrounding text. To maintain index efficiency, COIL projects BERT’s standard 768-dimensional output down to a much smaller size, such as 32 or 8 dimensions.

The COIL Index and Scoring

The system constructs an inverted list where each term points to a list of (doc_id, vector) pairs. During retrieval, COIL only considers documents sharing at least one word with the query. For these overlapping words, it computes the dot product between the query token's vector and the document token's vector. To bridge the vocabulary gap where no words overlap, the COIL-full variant incorporates a global [CLS] vector similarity score.

Experimental Results

The researchers evaluated COIL on the MS MARCO Passage and Document ranking benchmarks, which contain millions of English documents.

Performance comparison on MS MARCO Passage Ranking.

Accuracy and Efficiency

As shown in the results table, COIL-tok (using only token matches) achieved an MRR@10 of 0.341 on the MS MARCO passage task, nearly doubling BM25’s 0.184. COIL-full further improved performance, outperforming standard dense retrievers (DPR).

Beyond accuracy, COIL demonstrated significant efficiency gains. It is approximately 10-20x faster than ColBERT on a CPU. Remarkably, reducing token vectors to just 8 dimensions resulted in negligible performance loss while drastically reducing the storage footprint.

Key Insights and Discussion

COIL demonstrates that the limitation of classic IR is not the "exact match" constraint itself, but rather the heuristic scoring (like BM25) used to evaluate those matches. By replacing counts with vector similarities, exact match becomes a powerful tool for disambiguation. For example, COIL can distinguish between "cabinet" as a government body versus kitchen furniture based on context.

While COIL-full mitigates vocabulary mismatch via [CLS] vectors, the core model still relies on lexical overlap. Future work may involve applying approximate nearest neighbor (ANN) search within inverted lists to further accelerate vector math for high-frequency terms.

Summary updated

BibTeX
@inproceedings{gao2021coil,
  author = {Luyu Gao and Zhuyun Dai and Jamie Callan},
  title = {{COIL: Revisit Exact Lexical Match in Information Retrieval with Contextualized Inverted List}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2021},
  url = {https://openreview.net/forum?id=_0ub45671E-},
}
Figure