ColPali: Efficient Document Retrieval with Vision Language Models
arXiv ↗PDF ↗Paper ↗Website ↗Code ↗
Read first: ColBERT: contextualized late interaction over BERT
TL;DR. ColPali skips PDF parsing. It feeds the screenshot of a page to a vision-language model (PaliGemma-3B), keeps one 128-d vector per image patch, and scores queries with ColBERT’s late interaction. On the ViDoRe benchmark, introduced in the same paper, it reaches 81.3 nDCG@5 on average, against 67.0 for the best OCR/captioning + text-embedding pipeline. Indexing is about 18× faster than that pipeline.
Why it matters now. Enterprise and scientific RAG corpora are PDFs full of tables, charts and layout. Text pipelines lose this information before retrieval starts. ColPali showed that a VLM’s patch outputs are good multi-vector document representations. It started the visual-document retrieval line (ColQwen, ViDoRe v2/v3, multimodal late-interaction models like pplx-embed-v2-late). It is more than a ColBERT variant: it changes what the “document” is, and ViDoRe became the standard leaderboard for that task.
Key idea
Section titled “Key idea”A page image goes through SigLIP (1,024 patches). The patches are projected into Gemma-2B, which also sees a short text prompt with full prefix attention, and a linear layer maps every output position to . A query is encoded by the same model as text tokens. The score is ColBERT’s sum of maxima:
Training uses a pairwise loss against the hardest in-batch negative, , where is the highest-scoring other page in the batch.
Key results
Section titled “Key results”- ViDoRe, Table 2 (average nDCG@5):
- ColPali: 81.3.
- Unstructured + captioning: BM25 65.1, BGE-M3 67.0.
- Unstructured + OCR: BM25 65.5, BGE-M3 66.1.
- Single-vector models: BiPali 58.8, BiSigLIP 58.6, SigLIP 51.4, Jina-CLIP 17.7, Nomic-vision 12.9.
- Per task, ColPali scores, for example, ArxivQA 79.1, InfoVQA 81.8, TabFQuAD 83.9 and Shift 73.2.
- Indexing, Table 5 (per page): the captioning pipeline takes 7.22 s (layout 0.81, OCR 2.67, captioning 3.71, encoding 0.03). ColPali takes 0.39 s and SigLIP 0.12 s.
- Ablations (§6):
- Using 512 instead of 1,024 patches costs 24.8 points.
- Unfreezing the vision encoder costs 0.7, and in-batch cross-entropy instead of the pairwise loss costs 1.6.
- Swapping the backbone to Qwen2-VL (ColQwen2) adds 5.3.
- Training only on DocMatix (disjoint from ViDoRe sources) costs 2.2 and still beats the best baseline by over 12.
Limitations & open questions
Section titled “Limitations & open questions”- Storage. Roughly 30× BGE-M3 per page, so million-page corpora need pooling, quantisation or PLAID-style indexing. The paper only measures brute-force scoring.
- Benchmark shares a generator with training. The practical ViDoRe queries and 37% of the training queries are both Claude-3 Sonnet generations. Human-written and multi-page queries are untested.
- Single-page granularity. Each page is retrieved independently. Questions that span pages, and long documents, are left open.
- Interpretability is anecdotal. The §5.3 heatmaps show OCR-like matching (the query token for “hour” lights up the words “hourly” and “hours”) and attention to a chart’s x-axis. How often the model reads text versus relying on layout cues is not measured.
Connections
Section titled “Connections”- Before: ColBERT (late interaction), ColBERTv2 and PLAID (how to make multi-vector storage and search affordable).
- After: pplx-embed-v2-late trains one late-interaction space for text, images and visual documents and reports on ViDoRe-V3. FLINT attacks the same vector-count cost with a fixed budget of learned pooled vectors.
- Alternatives: single-vector multilingual text embedders such as BGE-M3 after OCR, and context-aware chunk embeddings in the contextual retrieval overview.
Questions to think through
These questions have no single right answer. Write or say your answer before you open the hints. Mark a question once you could defend your answer in a reading group.
- Derive / compute
ColPali stores about 1,030 vectors per page (1,024 image patches plus a short text prompt), each 128-d in 16-bit floats. Derive the 257.5 KB per page reported in the paper, scale it to a 2M-page corpus, and compare with BGE-M3 at 8.60 KB per page. Then apply token pooling with factor 3, and estimate the MaxSim cost of scoring one page for a 20-token query (the query length here is assumed, not from the paper).
What a strong answer covers
- 1,030 × 128 × 2 B = 263,680 B = 257.5 KiB, which matches the paper's 257.5 KB.
- 2M pages: 2M × 263,680 B ≈ 527 GB for ColPali, against 2M × 8.6 KB ≈ 17 GB for BGE-M3, about 30× more.
- Pool factor 3: about 1,030 / 3 ≈ 343 vectors, about 88 KB per page and about 176 GB for 2M pages. The paper reports 66.7% fewer vectors while keeping 97.8% of performance, with Shift the most hurt.
- MaxSim: 20 query vectors × 1,030 page vectors × 128 dims ≈ 2.6M multiply-adds per page, or about 0.9M after pooling. Matrix-multiply friendly, consistent with the reported ~1 ms per 1,000 pages on a GPU, but brute force does not scale to millions of pages without a PLAID-style index.
- Storage, not compute, is the binding constraint at corpus scale. This motivates pooling, binarisation or residual compression as in ColBERTv2.
- Mechanism
On ViDoRe (average nDCG@5), BiSigLIP scores 58.6, BiPali (PaliGemma outputs mean-pooled into one vector) 58.8, ColPali 81.3, and a ColSigLIP variant (late interaction directly on SigLIP patch embeddings) performs very badly. Explain at the level of what each patch vector encodes and what the training objective rewards why late interaction only helps once the patch embeddings pass through the language model.
What a strong answer covers
- SigLIP is trained contrastively on pooled image–caption pairs. Its individual patch embeddings are never trained to align with text tokens, so MaxSim between a query token and a raw SigLIP patch compares vectors from unaligned spaces. That explains ColSigLIP's collapse.
- In PaliGemma, patch embeddings are projected into Gemma's input space and processed by the LM, which was trained to generate text about image regions (captioning, OCR, VQA). After the LM, each patch position carries language-aligned content, such as the text in that region.
- Late interaction then lets each query token pick its best-matching region (a table cell, a chart label, a title). Mean pooling in BiPali averages about 1,000 regions into one vector, so a query about one small cell is diluted by the rest of the page.
- The training loss (softplus of hardest in-batch negative minus positive) only optimises the score. The sum-of-maxima form makes the gradient flow to the patches that won the max, so specific regions are trained to align with specific query terms.
- What if…
Use ColPali's §6 ablations to decide what matters most: halving image patches to 512 (−24.8 nDCG@5), ColIdefics2 with only 64 patches (+20.1 over ColPali-512 but 4.7 below ColPali-1024 and about 2× slower), unfreezing the vision encoder (−0.7), replacing the pairwise loss with in-batch cross-entropy (−1.6), removing the query-augmentation tokens (no significant change in English, but +9.8 on Shift and +6.3 on TabFQuAD in French when kept), and ColQwen2-VL (+5.3). Rank the factors and explain the surprising ColIdefics2 result.
What a strong answer covers
- Resolution and backbone dominate. Patch count costs 24.8 points, and the backbone swap (Qwen2-VL) adds 5.3. Loss and vision-tower choices move only 1–2 points.
- ColIdefics2 pairs SigLIP with a perceiver resampler (64 tokens after resampling) and a Mistral-7B LM instead of Gemma-2B. It beats ColPali-512 by 20.1 with 8× fewer vectors. The authors read this as a better LM packing more into each vector, so the vector count alone is not the variable.
- ColPali-1024 still wins by 4.7, so for small text in dense documents spatial granularity matters. ColIdefics2 is about 2× slower in training and inference because its LM is larger, even though it emits fewer vectors.
- The query-augmentation tokens act like ColBERT's mask tokens: extra learned query vectors that soft-expand the query. They help most when the query language (French) differs from the English-only training data.
- Unfreezing SigLIP slightly hurts. With LoRA on 118k pairs, adapting the vision tower probably overfits; the LM, not the vision encoder, is where retrieval alignment happens.
- Critique
ViDoRe's practical tasks use queries that Claude-3 Sonnet generated from pages, filtered by humans, with 100 queries over 1,000 pages per topic and nDCG@5 as the metric. ColPali's training set is 63% train splits of the academic datasets and 37% pages with Claude-3 Sonnet pseudo-questions. Critique how far the 81.3 vs 67.0 gap over the best text pipeline can be trusted, and propose a falsifying experiment.
What a strong answer covers
- Generator overlap: the training and test queries for the practical tasks come from the same VLM and prompt style. A model can learn that style (question phrasing, what parts of a page get asked about) rather than general page retrieval.
- Academic tasks reuse the distributions of the training splits (DocVQA, InfoVQA, TAT-DQA, arXivQA), so they are in-domain. The authors did check that no multi-page PDF appears in both ViDoRe and training.
- Mitigating evidence: a DocMatix-only variant (training disjoint from ViDoRe sources) drops only 2.2 nDCG@5 and still beats the best baseline by over 12 points. French tasks were never in training.
- Small pools (1,000 pages) and nDCG@5 with one gold page per query say little about recall at web or enterprise scale, or about queries needing several pages.
- Falsifier: human-written queries (for example from real search logs) over a much larger page pool, comparing ColPali with a modern OCR + strong text embedder + reranker. Report Recall@100 too, and slice by page type (text-only vs chart and table pages).
- Design
You build retrieval for a deep-research agent over 2M scanned PDF pages (reports, tables, charts) with a 200 GB index budget and one GPU for indexing. Using ColPali's indexing time (0.39 s per page vs 7.22 s for the Unstructured + captioning pipeline), storage numbers and pooling result, design the system and say what you would measure.
What a strong answer covers
- Indexing: ColPali at 0.39 s per page ≈ 9 GPU-days for 2M pages, against ≈ 167 days for the 7.22 s captioning pipeline. Only the image route is practical on one GPU, unless OCR without captioning is fast enough for text-heavy pages.
- Storage: unpooled ≈ 527 GB is over budget. Pool factor 3 gives ≈ 176 GB. Pooling plus 2-bit residual compression or binarisation brings it well under budget, at an effectiveness cost to measure.
- Serving: brute-force MaxSim over 2M pages is too slow per query. Use a two-stage system: single-vector or PLAID-style candidate generation, then full MaxSim on a few thousand pages.
- Hybrid: keep a cheap text channel (OCR text + BM25 or a dense embedder) for exact strings, numbers and identifiers, and fuse it with ColPali, since agent queries are often lexical.
- Measure: Recall@100 and nDCG@10 on human-written queries, results split by page type, p95 latency per call at agent call rates, and end-to-end answer accuracy of the agent.