Skip to content

PLAID: an efficient engine for late-interaction retrieval

optionalextendedfundamentalpaperrubric 8/122022 · CIKM 2022 · ~20 min

Keshav Santhanam, Omar Khattab, Christopher Potts, Matei Zaharia

Read first: ColBERTv2: lightweight late interaction

Status

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.

Late interaction: MaxSim scoring and how ColBERTv2 and PLAID make it cheap Left: the query and the document are encoded separately into one vector per token. A grid shows the similarity of every query token with every document token; the maximum in each query row is highlighted, and the row maxima are summed into the relevance score. Right: ColBERTv2 stores each document vector as a centroid id plus a small quantized residual, and PLAID first scores passages using centroids only, prunes, and decompresses residuals only for the final candidates. ColBERT: encode separately, interact late query encoder doc encoder doc vectors precomputed and indexed offline q₁…q₄ (one per token) d₁…d₆ (one per token) sim(qᵢ, dⱼ) = qᵢ · dⱼ d₁d₂d₃d₄d₅d₆ q₁q₂q₃q₄ max max max max Σ = score(q, d) sum of per-token maxima Making it cheap ColBERTv2: residual compression d ≈ centroid[c] + quantized residual (1–2 bits per dimension) + denoised supervision: distil a cross-encoder, mine hard negatives → 6–10× smaller index PLAID: centroids first 1 · candidates from nearest centroids 2 · centroid interaction + pruning 3 · centroid interaction, no pruning 4 · decompress residuals, full MaxSim each stage keeps fewer passages
Bottom right: PLAID's four stages, each keeping fewer passages.
SettingComparatorPLAIDVanilla ColBERTv2Note
MS MARCO v1 (8.8M passages, ≈ 598M token vectors), k = 1,000, 8 CPU threadssame model and index101.3 ms—2-bit residuals
MS MARCO v2 (140M passages, ≈ 9.4B vectors), k = 1,000, 8 CPU threadssame model and index251.3 ms5,228.5 ms1-bit residuals; both run out of GPU memory at this k
MS MARCO v2 Recall@1000same85.788.1the “same quality” claim is approximate at this scale
Speedup decomposition (Figure 6, k = 1,000, 500-query sample)vanillacentroid stages 5.2× GPU / 8.6× CPU; kernels a further 1.3× / 4.9×—no run-to-run variance reported
  • 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.

  1. 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.
  2. 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.
  3. 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.

Done with this page?

Status