PLAID: an efficient engine for late-interaction retrieval
Read first: ColBERTv2: lightweight late interaction
TL;DR. In ColBERTv2, most query time goes on decompressing residuals for many candidate passages. PLAID notices that the centroid ids alone rank passages well enough to throw most of them away. It runs a multi-stage pipeline in which only the last stage touches residuals.
Headline numbers with their comparator
Section titled “Headline numbers with their comparator”| Setting | Comparator | PLAID | Vanilla ColBERTv2 | Note |
|---|---|---|---|---|
| MS MARCO v1 (8.8M passages, ≈ 598M token vectors), k = 1,000, 8 CPU threads | same model and index | 101.3 ms | — | 2-bit residuals |
| MS MARCO v2 (140M passages, ≈ 9.4B vectors), k = 1,000, 8 CPU threads | same model and index | 251.3 ms | 5,228.5 ms | 1-bit residuals; both run out of GPU memory at this k |
| MS MARCO v2 Recall@1000 | same | 85.7 | 88.1 | the “same quality” claim is approximate at this scale |
| Speedup decomposition (Figure 6, k = 1,000, 500-query sample) | vanilla | centroid stages 5.2× GPU / 8.6× CPU; kernels a further 1.3× / 4.9× | — | no run-to-run variance reported |
Connections
Section titled “Connections”- Before: ColBERTv2 (centroid + residual codec).
- After: later engines that index token vectors in standard vector databases. Multi-vector serving is still an active systems problem. For fixed-budget successors see FLINT and MICE / MICE-P; for modern late-interaction models see ColPali and pplx-embed-v2-late. PLAID is a 2022 engine, not the late-interaction frontier.
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
Toy centroid interaction. Two query tokens and four centroids, with query-centroid scores q1 → [C1 0.9, C2 0.3, C3 0.6, C4 0.45] and q2 → [C1 0.2, C2 0.8, C3 0.7, C4 0.4]. Each passage is the bag of centroid ids of its tokens: P1 = {C1, C4}, P2 = {C3}, P3 = {C1, C2}. Compute the centroid-interaction score of each passage, then recompute with centroid pruning at t_cs = 0.5. Which passage is hurt, and what does that reveal about what pruning approximates?
What a strong answer covers
- No pruning: P1 = max(0.9, 0.45) + max(0.2, 0.4) = 0.9 + 0.4 = 1.3; P2 = 0.6 + 0.7 = 1.3; P3 = 0.9 + 0.8 = 1.7.
- Pruning keeps only centroids whose best score over the query tokens is ≥ t_cs. Maxima: C1 0.9, C2 0.8, C3 0.7, C4 0.45, so C4 is dropped. P1 becomes 0.9 + 0.2 = 1.1; P2 and P3 are unchanged.
- P1 is hurt because its best match for q2 was a weak centroid. Pruning removes low-magnitude contributions, which are usually a query token's background match, and turns a tie into a ranking.
- Both scores are approximations of true MaxSim: centroid interaction ignores residuals, and pruning ignores weak tokens. That is why PLAID uses them only to filter (ndocs → ndocs/4) and runs full residual decompression for the final top-k.
- Failure mode: a passage whose relevance comes from many moderate matches (all just below t_cs) can be eliminated before exact scoring. The k = 1000 setting lowers t_cs to 0.4 and raises ndocs to 4096 to hedge against this.
- What if…
Figure 6 decomposes PLAID's speedup over vanilla ColBERTv2 at the conservative k = 1000 setting: centroid interaction stages give 5.2× on GPU and 8.6× on CPU; the optimised kernels add a further 1.3× (GPU) and 4.9× (CPU); kernels alone on CPU give only 3×, against 42.4× for full PLAID. Explain why the algorithmic and implementation gains compose multiplicatively on CPU but not on GPU, and what this implies about where vanilla ColBERTv2's time was going.
What a strong answer covers
- Vanilla ColBERTv2 decompresses residuals for about 10–40k candidate passages. Decompression and data movement dominate, not the MaxSim arithmetic.
- Centroid interaction shrinks the set that needs decompression to ndocs/4 (1,024 at k = 1000). It removes work on both devices, hence 5–9×.
- On CPU, centroid interaction and decompression are rewritten in multithreaded C++ that skips padding (O(|Q|) memory against O(|D||Q|)) and decodes residuals with a 2^8-entry lookup table. On GPU only decompression gets a CUDA kernel, and centroid interaction stays in PyTorch, which already batches padded tensors well. Hence 4.9× against 1.3×.
- Kernels alone give only 3× because they speed up work that should not be done at all. Once centroid interaction removes most of it, the kernels speed up what remains: 8.6 × 4.9 ≈ 42.
- Caveat: the ablation uses a 500-query sample, and numbers differ slightly from Table 3. No variance across runs or hardware is reported.
- Design
You are scaling PLAID to a 140M-passage corpus (MS MARCO v2 scale, ≈ 9.4B embeddings, 1-bit residuals). On v1 (8.8M passages, ≈ 598M embeddings), PLAID at k = 1000 runs at 101.3 ms on 8 CPU threads. Predict v2 latency using the paper's square-root-of-embeddings scaling observation, compare with the reported 251.3 ms, and decide whether the 85.7 vs 88.1 Recall@1000 gap against vanilla is acceptable for a RAG product. What would you tune, and how would you evaluate it?
What a strong answer covers
- Embedding ratio 9.4B / 598M ≈ 15.7, √ ≈ 4.0, so the prediction is ≈ 400 ms. The observed 251.3 ms is ≈ 2.5×, better than predicted: v2's 1-bit residuals (vs 2-bit on v1) are cheaper to decompress, and the scaling law was fit across datasets with different passage lengths.
- Vanilla needs 5,228.5 ms on 8 CPUs (≈ 21× slower), and both run out of GPU memory at k = 1000. At this scale PLAID is the only practical option of the two.
- The 2.4-point R@1k gap matters only if the RAG reader consumes deep lists. For a reader using the top 10–20, measure nDCG@10 / R@20 instead. The "99+% of vanilla top-k" overlap is agreement with vanilla, not relevance.
- Tuning knobs: raise ndocs and nprobe and lower t_cs, then trace the recall–latency Pareto curve. Consider 2-bit residuals if RAM allows: both systems used 1-bit on v2, so the recall cost of 1-bit at this scale is never isolated.
- Evaluate on judged in-domain queries plus the product's own traffic sample. Report p50/p95 latency under concurrency, not single-query timings.