Passer au contenu

Bitcoin accepté au paiement  |  Expédié depuis Laval, QC, Canada  |  Soutien expert depuis 2016

Late Interaction (ColBERT)

Sovereign AI

Definition

Late interaction is a retrieval architecture, popularized by the ColBERT model (Khattab and Zaharia, 2020), that sits between cheap single-vector search and expensive cross-encoder reranking. Instead of compressing a document into one embedding, ColBERT keeps a separate contextual embedding for every token. Queries are likewise represented as a bag of per-token vectors, and relevance is scored by matching the two bags against each other. The design earns its place in any retrieval stack you host yourself, because it recovers much of a cross-encoder's accuracy at a fraction of its query-time cost.

The MaxSim operator

Relevance is computed with a late-interaction operator called MaxSim. For each query-token embedding, the system finds its maximum similarity against all document-token embeddings, then sums those per-token maxima into a final score. This winner-takes-all matching captures fine-grained, term-level alignment that a single pooled vector loses: a query about "S19 fan error" can match a document's tokens for the model name, the component, and the fault independently, even if they sit sentences apart. Crucially, document embeddings are computed and stored offline ahead of time; nothing about the document side depends on the query.

Why "late"

The interaction between query and document happens late, only at the cheap MaxSim step, rather than early, inside a transformer that must process the pair jointly. A cross-encoder reruns the full model for every query-document pair, which is why it is accurate and slow; a single-vector bi-encoder never lets the two sides interact at token level, which is why it is fast and coarse. Late interaction threads the needle: encode documents once, index their token vectors, and at query time do only lightweight similarity math. In the standard pipeline it serves either as a high-quality first-stage retriever or as a middle reranking tier that filters candidates before an expensive final scorer.

The storage bill, and how it is paid

The cost is storage and memory: many vectors per document instead of one, easily an order of magnitude or two more than single-vector indexes, which is the main thing to budget for when self-hosting. Newer variants attack exactly this. ColBERTv2 compresses token vectors with aggressive residual quantization, and the PLAID engine prunes candidate documents using centroid interactions alone before touching full vectors, together cutting storage and latency dramatically while holding quality. The practical recipe on home hardware is a modest corpus, compressed token vectors, and honest measurement of whether the accuracy gain over single-vector search justifies the footprint for your data.

Choosing your tier

Late interaction is one point on a spectrum of accuracy-versus-cost trade-offs. Compare it with the heavier cross-encoder reranker at one extreme and lightweight single-vector dense retrieval at the other, and remember the token-level matching spirit also echoes classic lexical scoring like BM25, which is why ColBERT handles rare exact terms, error codes, part numbers, command names, better than pooled embeddings do. For a self-hosted knowledge base full of exactly that kind of content, that strength is often the deciding argument.

A sensible evaluation plan for your own corpus: index a representative slice three ways, BM25, single-vector dense, and late interaction, then score them against a few dozen real queries you know the right answers to. Late interaction typically shows its margin on queries mixing natural language with exact identifiers, and shows its cost in index size and build time. If your content is prose, the cheaper tiers may be enough; if it is manuals, logs, and part numbers, the token-level matching usually earns its storage. Either way, measure on your own data with your own queries before committing an index format, because retrieval benchmarks built on other people's corpora transfer far less reliably than their leaderboards imply, and the decision then makes itself.

In Simple Terms

Late interaction is a retrieval architecture, popularized by the ColBERT model (Khattab and Zaharia, 2020), that sits between cheap single-vector search and expensive cross-encoder reranking.…

Explore the Full Glossary

Browse all Bitcoin mining terms from A to Z. Whether you are a beginner or expert, deepen your understanding of the mining ecosystem.

Glossaire du minage

ASIC Miner Database

Compare 500+ miners with real-time profitability data, home mining scores, and detailed specs.

Comparer les mineurs