Inferensys

Glossary

Late Interaction

A retrieval paradigm that stores token-level embeddings and performs partial computation at query time, balancing the efficiency of bi-encoders with the expressiveness of cross-encoders.
Developer working on RAG retrieval system, document chunks visible on screen, technical workspace with code editor.
RETRIEVAL ARCHITECTURE

What is Late Interaction?

A retrieval paradigm that stores token-level embeddings and performs partial computation at query time, balancing the efficiency of bi-encoders with the expressiveness of cross-encoders.

Late Interaction is a neural retrieval paradigm where query and document representations are encoded independently into sets of token-level embeddings, with their fine-grained relevance computed after the query is issued via a lightweight interaction function like MaxSim. Unlike a cross-encoder, which performs full joint attention over the query-document pair, late interaction models pre-compute and store document token embeddings, deferring only the final, cheap interaction step to query time.

This approach, exemplified by the ColBERT model, avoids the prohibitive latency of online cross-encoding while capturing richer semantic matches than a single-vector bi-encoder. By scoring the maximum cosine similarity between each query token embedding and the document's token embeddings, late interaction retains the ability to model soft term matches and contextualized token importance, making it highly effective for passage retrieval tasks where precision is paramount.

Architectural Paradigm

Key Characteristics of Late Interaction

Late interaction models balance the speed of bi-encoders with the expressiveness of cross-encoders by deferring the most expensive computation to the final scoring stage.

01

Token-Level Storage

Unlike standard bi-encoders that compress an entire passage into a single vector, late interaction models store multi-vector representations—typically one embedding per token. This preserves fine-grained linguistic information such as word order, syntax, and local context that is lost during mean pooling. The index stores these token-level embeddings, enabling a more nuanced comparison at query time without requiring the document to be re-encoded.

02

MaxSim Scoring

The core relevance computation in late interaction is the Maximum Similarity (MaxSim) operator. For each query token embedding, the model finds the document token embedding with the highest cosine similarity and sums these maximum values. This allows the model to softly align query terms to the most relevant parts of a document, handling lexical mismatch and synonymy without the quadratic complexity of full cross-attention.

03

Pre-Computed Document Index

All document-side computation is performed offline and stored in a vector index. During indexing, a passage is encoded into a matrix of token embeddings. At query time, only the query is encoded, and the MaxSim scoring is computed against the pre-computed document token embeddings. This asymmetric computation shifts the heavy lifting to the indexing phase, enabling sub-second retrieval latency even against large corpora.

04

Bi-Encoder vs. Cross-Encoder Trade-off

Late interaction occupies a unique position on the speed-accuracy Pareto frontier:

  • Bi-Encoders: Fastest retrieval via single-vector dot product, but lose token-level detail.
  • Cross-Encoders: Highest accuracy via full joint attention, but computationally prohibitive for retrieval.
  • Late Interaction: Achieves cross-encoder-like expressiveness by storing token vectors, while maintaining bi-encoder-like speed through pre-computation and efficient MaxSim aggregation.
05

ColBERT Architecture

The canonical implementation of late interaction is ColBERT (Contextualized Late Interaction over BERT). It uses a BERT-based encoder shared between queries and documents, but processes them independently. Documents are encoded into a bag of token embeddings, and queries are encoded similarly. The final relevance score is the sum of MaxSim operations. ColBERT introduced a denoising mechanism that filters out punctuation and stopword embeddings from the document representation, reducing index size by approximately 50% without degrading retrieval quality.

06

Index Compression with Residuals

Storing full-precision token embeddings for every document can be memory-intensive. ColBERTv2 addresses this by using a residual compression technique. Token embeddings are clustered, and only the centroid IDs and residual vectors are stored. The residuals are further compressed using product quantization. This reduces the index footprint by 6-10x compared to storing full embeddings, making billion-document retrieval feasible on a single machine while preserving the fine-grained matching capability of late interaction.

LATE INTERACTION ARCHITECTURES

Frequently Asked Questions

Clear answers to common questions about late interaction retrieval models, their mechanisms, and how they compare to other neural search paradigms.

Late interaction is a neural retrieval paradigm that defers the costly computation of query-document relevance until after both the query and the document have been independently encoded into sets of token-level embeddings. Unlike a bi-encoder, which collapses an entire passage into a single dense vector, a late interaction model like ColBERT stores one embedding per token. At query time, it computes relevance using a cheap, non-parametric operation—typically the MaxSim (Maximum Similarity) operator—which finds the maximum cosine similarity between each query token embedding and all document token embeddings, then sums these maximum scores. This architecture preserves fine-grained token-level matching signals that are lost in single-vector pooling, while avoiding the prohibitive computational cost of running a full cross-encoder over every query-document pair. The document embeddings are pre-computed and indexed offline, so the query-time latency is dominated by the MaxSim computation against the stored token embeddings, making late interaction a pragmatic balance between the efficiency of bi-encoders and the expressiveness of cross-encoders.

RETRIEVAL ARCHITECTURE COMPARISON

Late Interaction vs. Bi-Encoders vs. Cross-Encoders

A technical comparison of the three dominant neural retrieval paradigms, evaluating the trade-offs between computational cost, retrieval latency, and ranking expressiveness.

FeatureBi-EncoderCross-EncoderLate Interaction

Encoding Strategy

Independent query and document encoding into a single fixed-size vector

Joint encoding of the query-document pair through full self-attention

Independent encoding into sets of token-level vectors; interaction deferred to scoring

Interaction Type

None (vector dot product)

Full token-level cross-attention

Token-level MaxSim after encoding

Indexing Capability

Documents can be pre-computed and indexed offline

No pre-computation possible; requires the pair at runtime

Token embeddings can be pre-computed and indexed offline

Retrieval Latency

< 10 ms

1000 ms (per pair)

< 50 ms

Scoring Expressiveness

Low (single vector bottleneck)

Very High (full attention)

High (fine-grained token matching)

Suitable for Candidate Retrieval

Suitable for Re-Ranking

Memory Footprint

Low (one vector per document)

N/A (no index)

High (multiple vectors per document)

Example Architecture

DPR, Sentence-BERT

BERT (monoBERT)

ColBERT

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.