Özer Cem KELAHMETKELAHMET
Articles · Reranking

Late interaction for RAG reranking: ColBERT MaxSim, token pooling and Sentence Transformers 6

Late interaction keeps one vector per token instead of one per document, then scores with MaxSim. It is far cheaper than a cross-encoder at query time and often more accurate than a single vector. Sentence Transformers 6 now ships it as a built-in model type.

Download Markdown
At a glance
Reading time
17 min
Sections
8
Code examples
4
Tables
4
Sources
6
Published
25 Nov 2026
In 30 seconds
What changed
ColBERT introduces late interaction
Why it matters
Late interaction is now an ordinary engineering choice rather than a research project.
What to do
Measure your baseline ordering

Rerankers in RAG usually come in two kinds. A bi-encoder, the usual embedding model, turns the query and each document into one vector and compares them with a dot product: fast, but everything a document says must squeeze into that one vector. A cross-encoder reads the query and document together through a full transformer: accurate, but it has to run once for every query-document pair, at query time.

Late interaction sits between the two. It keeps one small vector for every token of every document, computed once at indexing time. At query time it encodes the query tokens and scores each document with a cheap operation called MaxSim. The idea comes from ColBERT, published in 2020, and for years it was mostly a research tool. In August 2026, Sentence Transformers 6.0 added it as a built-in model type, next to dense, sparse and cross-encoder models.

This article explains MaxSim step by step, measures why it helps on long documents with a small numpy experiment, works out the storage and compute costs, and shows where it fits in a RAG pipeline: as a first-stage retriever, as a reranker over dense or BM25 candidates, or both.

What happened

ColBERT introduces late interaction (27 April 2020)

Omar Khattab and Matei Zaharia's ColBERT paper encoded queries and documents separately into token-level vectors and scored them with a sum of maximum similarities. The abstract reports that it ran "two orders-of-magnitude faster" and needed "four orders-of-magnitude fewer FLOPs per query" than the BERT-based rerankers it was compared with, at competitive quality.

ColBERTv2 compresses the index (2 December 2021)

Keshav Santhanam and co-authors added residual compression and a denoised training strategy. The abstract reports a 6 to 10 times smaller space footprint for late interaction models. Later engines such as PLAID, and LightOn's FastPlaid and NextPlaid, continue this line of compressed multi-vector indexing.

PyLate makes training accessible (5 August 2025)

Antoine Chaffin and Raphaël Sourty published PyLate, a library built on Sentence Transformers for training and serving late interaction models. Its authors say it enabled models including GTE-ModernColBERT and Reason-ModernColBERT.

LightOn releases ColBERT-Zero (19 February 2026)

LightOn, with EPFL and the Swiss AI Initiative, released ColBERT-Zero, a late interaction model trained from scratch with PyLate under Apache 2.0. LightOn reports 55.43 nDCG@10 on BEIR, against 54.67 for GTE-ModernColBERT and 55.33 for the dense gte-modernbert-base.

Sentence Transformers 6.0 adds MultiVectorEncoder (18 August 2026)

A Hugging Face post announced a fourth model type in Sentence Transformers 6.0, MultiVectorEncoder, for ColBERT-style retrieval. It loads models such as lightonai/LateOn (149M parameters, 128 dimensions), lightonai/mLateOn (multilingual), colbert-ir/colbertv2.0 and visual document models such as vidore/colqwen2.5-v0.2. It also ships token pooling to shrink the index.

How MaxSim works

Imagine comparing a shopping list with the shelves in a shop. A single-vector model blends the whole list into one "average item" and the whole shop into one "average shelf", then compares the two blends. Late interaction walks the list item by item, finds the best matching shelf for each item, and adds up how good those matches were.

Formally, the query becomes a matrix Q with one row per query token, and the document becomes a matrix D with one row per document token. All rows are normalised to length 1, so a dot product is a cosine similarity. The score is:

score(Q, D) = sum over query tokens i of ( max over document tokens j of Q_i · D_j )

A small worked example with three query tokens and four document tokens. Suppose the cosine similarity matrix Q · Dᵀ is:

Table 1. How MaxSim works
Query token Doc token 1 Doc token 2 Doc token 3 Doc token 4 Row maximum
"capital" 0.21 0.88 0.15 0.30 0.88
"France" 0.12 0.25 0.93 0.18 0.93
"what" 0.40 0.35 0.22 0.31 0.40

The MaxSim score is 0.88 + 0.93 + 0.40 = 2.21. Each query token votes for its best match and nothing else. A long document with one strong paragraph is not penalised for its other paragraphs, because their tokens simply never win a maximum.

Two consequences follow. First, scores grow with query length, so they are only comparable across documents for the same query. Sentence Transformers offers a MeanMaxSim option that divides by the number of query tokens to keep scores bounded. Second, the expensive part, encoding documents, happens offline. At query time you encode only the query and do matrix multiplications.

Here is MaxSim in numpy:

import numpy as np

def maxsim(Q, D):
    """Q: (query_tokens, dim), D: (doc_tokens, dim), rows L2-normalised."""
    return (Q @ D.T).max(axis=1).sum()

S = np.array([[0.21, 0.88, 0.15, 0.30],
              [0.12, 0.25, 0.93, 0.18],
              [0.40, 0.35, 0.22, 0.31]])
print(S.max(axis=1).sum())   # 2.21, the worked example above

With a real model, the Sentence Transformers 6 API follows the same pattern as dense models. This is the pattern from the Hugging Face post; we could not download model weights in our test environment, so it is checked against the documentation rather than run:

# pip install -U sentence-transformers
from sentence_transformers import MultiVectorEncoder

model = MultiVectorEncoder("lightonai/LateOn")
query_embeddings = model.encode_query(["What is the capital of France?"])
document_embeddings = model.encode_document([
    "Paris is the capital of France.",
    "Berlin is the capital and largest city of Germany, by both area and population.",
])
scores = model.similarity(query_embeddings, document_embeddings)   # MaxSim scores

The post shows each embedding is a matrix, for example shape (10, 128) for the query and (19, 128) for the longer document with mLateOn.

Why one vector per token helps

The main argument for late interaction is that a single vector must summarise everything, and summaries lose detail as documents get longer. The script below tests that mechanism in a synthetic world. It creates 4,000 random "concept" vectors with word frequencies that follow a Zipf curve, builds 1,000 documents of 32, 128 or 512 noisy token vectors, and writes 300 queries from four informative terms in a target document plus four filler words. It then compares three scorers: an untrained single vector (the mean of the token vectors, as mean pooling would give), MaxSim over all tokens, and MaxSim after token pooling with factor 2.

# pip install numpy scipy
import numpy as np
from scipy.cluster.hierarchy import linkage, fcluster

rng = np.random.default_rng(0)
DIM, VOCAB, NDOC, NQ = 128, 4000, 1000, 300
concepts = rng.normal(size=(VOCAB, DIM))
concepts /= np.linalg.norm(concepts, axis=1, keepdims=True)
zipf = 1 / np.arange(1, VOCAB + 1); zipf /= zipf.sum()     # frequent words have low ids

def embed(ids, noise=0.09):                                 # a "token vector" = concept + noise
    v = concepts[ids] + noise * rng.normal(size=(len(ids), DIM))
    return v / np.linalg.norm(v, axis=1, keepdims=True)

def make_corpus(L):
    ids = [rng.choice(VOCAB, size=L, p=zipf) for _ in range(NDOC)]
    docs = [embed(x) for x in ids]
    queries = []
    for qi in range(NQ):
        rare = [t for t in ids[qi] if t > 300]               # 4 informative terms from the gold doc
        pick = rng.choice(rare, size=min(4, len(rare)), replace=False)
        queries.append((embed(np.concatenate([pick, rng.choice(50, 4)])), qi))  # + 4 filler words
    return docs, queries

def maxsim(Q, D):
    return (Q @ D.T).max(axis=1).sum()

def pool(D, factor):                                        # ward clustering, keep cluster means
    lab = fcluster(linkage(D, method="ward"), t=max(1, len(D) // factor), criterion="maxclust")
    P = np.stack([D[lab == c].mean(0) for c in np.unique(lab)])
    return P / np.linalg.norm(P, axis=1, keepdims=True)

def unit(v): return v / np.linalg.norm(v)

def recall_at_10(docs, queries, method):
    if method == "single": M = np.stack([unit(d.mean(0)) for d in docs])
    if method == "pool2": docs = [pool(d, 2) for d in docs]
    hits = 0
    for Q, gold in queries:
        s = M @ unit(Q.mean(0)) if method == "single" else np.array([maxsim(Q, d) for d in docs])
        hits += (s > s[gold]).sum() < 10
    return float(round(hits / len(queries), 3))

for L in [32, 128, 512]:
    docs, queries = make_corpus(L)
    print(L, {m: recall_at_10(docs, queries, m) for m in ["single", "maxsim", "pool2"]})

It runs in about a minute on one CPU core and prints:

Table 2. Why one vector per token helps
Document length (tokens) Single mean vector R@10 MaxSim R@10 MaxSim, pool factor 2, R@10 Vectors stored (MaxSim)
32 0.137 0.990 0.803 32,000
128 0.033 0.907 0.660 128,000
512 0.023 0.933 0.833 512,000
Toy test: recall@10 as documents get longer
single mean vectorMaxSimMaxSim, pool factor 2
00.20.40.60.8132128512single mean vector · 32: 0.137single mean vector · 128: 0.033single mean vector · 512: 0.023MaxSim · 32: 0.99MaxSim · 128: 0.907MaxSim · 512: 0.933MaxSim, pool factor 2 · 32: 0.803MaxSim, pool factor 2 · 128: 0.66MaxSim, pool factor 2 · 512: 0.833document length (tokens)recall@10
Figure 1. Computed with the numpy script in this article; synthetic token vectors, untrained single vector

Read this carefully, because a toy can mislead.

The dilution effect is real. The mean vector's recall falls from 0.137 to 0.023 as documents grow from 32 to 512 tokens, because four informative tokens are averaged with 28, 124 or 508 others. MaxSim stays above 0.9 at every length, because each query token finds its match regardless of how much else the document contains.

The single-vector baseline is deliberately weak. Trained dense models learn to pack meaning far better than a plain average, so real gaps are much smaller. On real benchmarks the Hugging Face post reports LateOn at 0.6868 nDCG@10 on NanoBEIR against 0.6764 for DenseOn, a dense model with the same backbone and parameter count, winning 9 of 13 datasets. The gap widens on long documents: on the MLDR long-document benchmark, mLateOn scored 77.92 against 51.59 for the dense mDenseOn. That matches the direction of our toy.

Pooling hurts the toy more than real text. Our random tokens share nothing with their neighbours, so merging two of them destroys information. Real token vectors are highly redundant: neighbouring tokens in a phrase point in similar directions. The original token pooling experiments, cited in the post, kept 100.6% of unpooled BEIR performance at pool factor 2 and 99.0% at factor 3.

Storage and compute: the real trade-off

Late interaction moves cost from query time to storage. The Hugging Face post measured this on 4,874 Natural Questions passages. LateOn produced 608,414 token vectors, about 124.8 per passage, and the float32 index took 311.5 MB. That checks out: 124.8 vectors × 128 dimensions × 4 bytes = 63,898 bytes per passage, and 311.5 MB / 4,874 passages = 63,911 bytes.

Table 3. Storage and compute: the real trade-off
Index for 4,874 passages Size Relative to float32 multi-vector
all-MiniLM-L6-v2 dense (384 dimensions) 7.5 MB 2.4%
gte-modernbert-base dense 15.0 MB 4.8%
LateOn, token pooling factor 4 78.8 MB 25.3%
LateOn, compressed fast-plaid index 92 MB 29.5%
LateOn, token pooling factor 3 104.7 MB 33.6%
LateOn, token pooling factor 2 156.4 MB 50.2%
LateOn, float32, no pooling 311.5 MB 100%
Index size for 4,874 Natural Questions passages
0 MB100 MB200 MB300 MB400 MBMiniLM denseMB · MiniLM dense: 7.5 MB7.5 MBgte-modernbert denseMB · gte-modernbert dense: 15 MB15 MBLateOn pool 4MB · LateOn pool 4: 78.8 MB78.8 MBLateOn fast-plaidMB · LateOn fast-plaid: 92 MB92 MBLateOn pool 3MB · LateOn pool 3: 105 MB105 MBLateOn pool 2MB · LateOn pool 2: 156 MB156 MBLateOn float32MB · LateOn float32: 312 MB312 MBindexmegabytes
Figure 2. Source: Hugging Face, Multi-Vector (Late Interaction) Embedding Models with Sentence Transformers, 18 August 2026

Scale the arithmetic to one million passages of the same size: 1,000,000 × 63,898 bytes = 63.9 GB in float32, or 32.0 GB in float16. A 768-dimensional dense index in float32 is 1,000,000 × 768 × 4 = 3.1 GB. So the unpooled multi-vector index is about 21 times larger than a 768-dimensional dense one, and about 42 times larger than the 384-dimensional MiniLM index (311.5 / 7.5 = 41.5). Pooling at factor 2 halves it, and compression schemes such as PLAID shrink it further, but late interaction will always cost more memory than one vector per document. Techniques from Matryoshka and binary quantisation attack the same problem for dense vectors.

Query-time compute is where late interaction wins. Take a 32-token query and 125-token documents with 128 dimensions. MaxSim for one document is 32 × 125 × 128 = 512,000 multiply-adds; reranking 100 candidates is 51.2 million. Compare a cross-encoder of the same size as LateOn, 149M parameters, reading the 157 tokens of each query-document pair. Using the common estimate of 2 FLOPs per parameter per token, one pair costs 2 × 149,000,000 × 157 = 46.8 GFLOPs, and 100 pairs cost 4.68 TFLOPs. Counting a multiply-add as 2 FLOPs, MaxSim needs 102.4 MFLOPs for the same 100 documents, about 45,700 times less. That is the "four orders of magnitude" the ColBERT paper reported, reproduced with simple arithmetic. The query still has to be encoded once, a single short forward pass.

Table 4. Storage and compute: the real trade-off
Scorer Work at index time Work per query (100 candidates) Storage per passage Typical role
Bi-encoder (dense) One vector per document One query encoding plus 100 dot products One vector, about 3 KB at 768 float32 First-stage retrieval
Late interaction One vector per token One query encoding plus about 51 million multiply-adds About 64 KB unpooled (LateOn) Retrieval or reranking
Cross-encoder Nothing 100 full transformer passes, about 4.7 TFLOPs at 149M parameters Text only Final reranking of a short list

The cross-encoder still has an edge: it lets every query token attend to every document token through all layers, which captures interactions MaxSim cannot. Our reranking guide covers cross-encoders and LLM rerankers, and the rerank simulation shows how reordering a short list changes what reaches the generator.

Use cases and examples

Reranking dense candidates without a GPU. A documentation assistant retrieves the top 100 chunks with a dense model and wants better ordering, but runs on CPU. Running a 149M-parameter cross-encoder over 100 pairs means 4.7 TFLOPs per query. Instead, the team stores LateOn token vectors for each chunk with pool factor 2 and reranks with MaxSim: about 51 million multiply-adds per query, plus one short query encoding. They report nDCG@10 on 200 labelled questions before and after.

Long technical documents. A legal team indexes contracts where the answer is often one clause inside a 2,000-token section. A single vector per section blurs the clause. Following the MLDR result (77.92 for mLateOn against 51.59 for mDenseOn), they use late interaction for retrieval over whole sections rather than cutting sections into ever smaller chunks.

One engine for retrieval and reranking. A team using Qdrant creates a collection with a dense vector for first-stage search and a multivector field with the max_sim comparator (available since Qdrant 1.10) for reranking. The query fetches 200 candidates by dense similarity and rescores them by MaxSim in the same request, avoiding a separate reranker service.

Visual document retrieval. A finance team retrieves scanned report pages. Models such as vidore/colqwen2.5-v0.2 produce multi-vector embeddings of page images, scored with the same MaxSim. This is the approach behind ColPali-style retrieval, covered in multimodal RAG.

What it means in practice

Late interaction is now an ordinary engineering choice rather than a research project. With Sentence Transformers 6.0 the API matches dense models, PyLate covers training, and vector stores such as Qdrant score multivectors natively. The decision comes down to memory against quality and query cost.

Use it as a reranker when you want better ordering than a dense model gives but cannot afford a cross-encoder's per-pair cost, especially on CPU or at high query volume. Use it for retrieval when documents are long or out of domain, where single vectors lose the most. Keep a cross-encoder for the final top 10 to 20 if latency allows, since full attention still captures interactions MaxSim cannot. And measure, because published gains are averages: on NanoBEIR the dense model still won 4 of 13 datasets. Combining it with BM25 in hybrid search remains a strong default for keyword-heavy queries.

What to do now

  1. Measure your baseline ordering. Compute nDCG@10 and MRR on a labelled question set, using the ranking metrics simulation to sanity-check your maths.
  2. Try late interaction as a reranker first. Keep your current retriever, store token vectors only for the corpus, and rescore the top 100 with MaxSim.
  3. Start with token pooling at factor 2. It halves storage, and published results show almost no quality loss at that setting.
  4. Budget memory before indexing everything. Multiply passages by tokens per passage by dimensions by bytes; about 64 KB per 125-token passage in float32 adds up fast.
  5. Use float16 or a compressed index. fp16 halves storage, and PLAID-style indexes compress further.
  6. Normalise for thresholds. If you filter on a score cut-off, use MeanMaxSim or normalise by query length, since raw MaxSim grows with query tokens.
  7. Keep the cross-encoder for the final short list. Rerank 100 candidates with MaxSim, then the top 20 with a cross-encoder if latency allows.
  8. Compare on long documents separately. Bucket your evaluation by document length; that is where late interaction should gain most.

Risks and open questions

Memory is the main cost. An unpooled multi-vector index is about 42 times larger than a 384-dimensional dense index in the Hugging Face measurement. At large scale, that changes hardware budgets.

Index updates are heavier. Each document adds about a hundred vectors rather than one, so ingestion, deletion and compaction move more data.

Benchmarks come from model builders. The LateOn, mLateOn and ColBERT-Zero numbers come from the teams that built them. Results on your corpus can differ.

Tooling is younger than for dense search. Fewer databases support multi-vector fields natively, and filtering, hybrid fusion and quantisation options vary between them.

Watch next: how quickly vector databases adopt Sentence Transformers 6 multi-vector models, whether multilingual late interaction models keep their long-document lead in independent tests, and whether pooling and compression close the memory gap with dense indexes.

Frequently asked questions

What is late interaction in one sentence?

Late interaction encodes the query and document separately into one vector per token and scores them with MaxSim, the sum over query tokens of each token's best match in the document. ColBERT introduced it in 2020.

Is ColBERT a retriever or a reranker?

It can be either. With a multi-vector index such as PLAID it retrieves directly from the whole corpus, and with stored token vectors it can rescore candidates from a dense or BM25 retriever.

How does it compare with a cross-encoder?

It is far cheaper per query because documents are encoded offline; our arithmetic for 100 candidates gives about 45,700 times fewer FLOPs than a 149M-parameter cross-encoder. A cross-encoder can still be more accurate because the query and document attend to each other through every layer.

How much storage does a ColBERT index need?

In the Hugging Face measurement, LateOn needed about 124.8 vectors of 128 dimensions per Natural Questions passage, about 64 KB in float32. Token pooling at factor 2 halved that, and a compressed fast-plaid index used 92 MB against 311.5 MB uncompressed.

Which libraries support it now?

Sentence Transformers 6.0 has a built-in MultiVectorEncoder, PyLate supports training and indexing, and Qdrant supports multivector fields with a max_sim comparator since version 1.10. Visual models such as ColQwen use the same scoring for page images.

Summary

Late interaction keeps one vector per token and scores documents with MaxSim, so documents are encoded once offline and query-time scoring is a few matrix multiplications. That places it between dense bi-encoders and cross-encoders: on our arithmetic, reranking 100 candidates costs about 45,700 times fewer FLOPs than a same-size cross-encoder, and published results show gains over same-backbone dense models, largest on long documents (77.92 against 51.59 on MLDR). The price is memory, about 64 KB per passage unpooled for LateOn, which token pooling and compression cut by half or more. With Sentence Transformers 6.0, PyLate and native multivector support in vector databases, it is now practical to try as a drop-in reranker before committing to it for retrieval.

Sources

Cite this article

Kelahmet, Ö. C. (2026, November 25). Late interaction for RAG reranking: ColBERT MaxSim, token pooling and Sentence Transformers 6. Özer Cem KELAHMET. https://www.ozercemkelahmet.com/articles/late-interaction-colbert-maxsim-reranking

BibTeX
@online{kelahmet2026late,
  author = {Kelahmet, {\"O}zer Cem},
  title  = {{Late interaction for RAG reranking: ColBERT MaxSim, token pooling and Sentence Transformers 6}},
  year   = {2026},
  month  = {nov},
  url    = {https://www.ozercemkelahmet.com/articles/late-interaction-colbert-maxsim-reranking}
}
Version historyfirst version
  1. Published

Factual corrections are listed here with what changed. Wording and formatting edits are not listed.

Last updated Nov 25, 2026
Type to search.
    ↑↓ navigate↵ open