uniCOIL
What it is
uniCOIL (Lin & Ma, 2021) is a learned sparse retrieval model that assigns a single scalar importance weight to each token position using a BERT encoder, then aggregates weights by term for inverted index storage. It is simpler than SPLADE (no vocabulary expansion, no FLOPS regularization) and slightly more principled than DeepImpact (per-position scores rather than per-type). The “uni” refers to the single scalar per token (as opposed to a full dense vector).
[illustrate: BERT encoder → linear projection to scalar per token → max-pooling by term → sparse inverted list; query-time: sum matched term weights]
How it works
-
Per-token scalar scoring:
- Encode document with BERT
- Linear layer projects each token representation to a single scalar
- ReLU to ensure non-negative weights
-
Term aggregation:
- For repeated terms, take max weight across all positions
- Result: one weight per unique term in the document
-
Index storage:
- Store (term, weight) in an inverted index
- Weights quantized to integers for efficiency
-
Query expansion variant:
- uniCOIL+doc2query: expand documents with DocT5Query-generated synthetic queries before scoring
- Substantially improves recall without changing the scoring model
Variants and history
uniCOIL (2021) showed that single-scalar-per-token scoring is a competitive middle ground between BM25 and full dense retrieval. The combination with doc2query expansion closed much of the gap with SPLADE on MS MARCO. SPLADEv2 and SPLADE++ later surpassed it by adding vocabulary expansion during the encoding step itself, but uniCOIL remains a useful baseline for constrained deployments.
When to use it
Use uniCOIL when:
- Inverted index infrastructure is fixed and ANN cannot be added
- Query-time latency is critical (no encoder inference needed)
- uniCOIL + doc2query expansion is an option (large recall improvement for modest cost)
- Simpler alternative to SPLADE is preferred