Exact search on learned 128d vectors beats HNSW up to 100K passages in RAG benchmark

StopHungry881 · reddit · 2026-11-27

The author froze Contriever and trained a shared 768d→128d linear projection on MS MARCO labels, then compared exact search on the learned vectors against HNSW on original 768d vectors across 30K/100K/300K passages on an Apple M3 (single-threaded Faiss, top-10, p95 latency):

When HNSW also uses the learned 128d vectors, it wins big at 300K: 0.236ms vs 2.673ms, with nearly identical nDCG@10 (0.5179 vs 0.5182). Learned compression beats PCA by a wide margin (0.5182 vs 0.3268 nDCG@10). Code, projections, and benchmark data are open-sourced.

Original post →

More from Research

Research channel →