Milvus 把 embedding 列表直接塞进 HNSW,质量几乎追上暴力搜索,比 MUVERA 高了一截,但成本也翻了 6-18 倍,长文档还不支持。适合对精度有极致需求的项目。
Milvus 尝试跳过压缩步骤,直接在文档完整 embedding list 上建立 HNSW 图索引。该方法在 TREC-COVID 上 nDCG@10 达 0.98,远超 MUVERA、LEMUR 等方法的 0.87-0.89。端到端检索中 TREC-COVID 分数 0.516 与 BruteForce 完全持平,MS MARCO 上 0.957 接近精确上限的 0.966。但构建成本显著增大:MS MARCO 平均长度 87 时耗时 6 倍,TREC-COVID 长度 236 时达 18 倍。对于 ColQwen2 等每文档含 5143 个 patches 的长向量,该方法成本过高无法实用。实验揭示当前近似策略的质量损失主要源自向量压缩步骤而非 HNSW 索引本身。
We built HNSW directly on the embedding lists, with no encoding step in between. 𝗧𝗵𝗲 ...
We built HNSW directly on the embedding lists, with no encoding step in between. 𝗧𝗵𝗲 𝗾𝘂𝗮𝗹𝗶𝘁𝘆 𝗰𝗮𝗺𝗲 𝗼𝘂𝘁 𝗮𝗹𝗺𝗼𝘀𝘁 𝗹𝗼𝘀𝘀𝗹𝗲𝘀𝘀, 𝗯𝘂𝘁 𝘁𝗵𝗲 𝗳𝗶𝗻𝗱𝗶𝗻𝗴 𝗶𝘀 𝘄𝗵𝗮𝘁'𝘀 𝗺𝗼𝘀𝘁 𝘃𝗮𝗹𝘂𝗮𝗯𝗹𝗲: 𝘁𝗼𝗱𝗮𝘆'𝘀 𝗮𝗽𝗽𝗿𝗼𝘅𝗶𝗺𝗮𝘁𝗲 𝘀𝘁𝗿𝗮𝘁𝗲𝗴𝗶𝗲𝘀 𝗹𝗼𝘀𝗲 𝗺𝗼𝘀𝘁 𝗾𝘂𝗮𝗹𝗶𝘁𝘆 𝗶𝗻 𝘁𝗵𝗲 𝗿𝗲𝗱𝘂𝗰𝘁𝗶𝗼𝗻 𝘀𝘁𝗲𝗽, 𝗻𝗼𝘁 𝘁𝗵𝗲 𝗶𝗻𝗱𝗲𝘅. TokenANN, MUVERA, and LEMUR all reduce a document's token vectors to single-vector ANN, just from opposite ends: MUVERA and LEMUR squeeze each document into one vector, TokenANN indexes every token separately and reassembles. Either way it's an approximation of MaxSim, and that's where the quality goes. So skip the reduction: make the whole list the index unit, one document, one list of vectors. We tried it, and it works — the quality stays close to exact. 𝗛𝗼𝘄 𝗶𝘁'𝘀 𝘀𝗲𝘁 𝘂𝗽: • Each document's full embedding list is one HNSW node • Distance between two nodes is bidirectional MeanMaxSim: 𝗠𝗲𝗮𝗻𝗠𝗮𝘅𝗦𝗶𝗺(𝗔,𝗕) + 𝗠𝗲𝗮𝗻𝗠𝗮𝘅𝗦𝗶𝗺(𝗕,𝗔) • Bidirectional, because HNSW needs a symmetric distance and MaxSim isn't symmetric • Mean, because raw MaxSim grows with vector count, so dividing it out keeps different-length documents comparable • At query time it's the standard one-way MaxSim(query, doc); the query is short, so the reverse direction is mostly noise 𝗪𝗵𝗮𝘁 𝗶𝘁 𝘀𝗰𝗼𝗿𝗲𝗱: • Math nDCG @10 (fidelity to exact BruteForce ranking): 𝗮𝗯𝗼𝘃𝗲 𝟬.𝟵𝟴, vs 𝟬.𝟴𝟳–𝟬.𝟴𝟵 for the best of the three approximate strategies • End to end: 𝘁𝗶𝗲𝘀 𝗕𝗿𝘂𝘁𝗲𝗙𝗼𝗿𝗰𝗲 𝗼𝗻 𝗧𝗥𝗘𝗖-𝗖𝗢𝗩𝗜𝗗 (𝟬.𝟱𝟭𝟲), near-matches on MS MARCO (0.957 vs 0.966) That gap is the whole point. All four run on HNSW, and only the three that reduce the list first lose fidelity — roughly 𝘁𝗲𝗻 𝗽𝗼𝗶𝗻𝘁𝘀 of it. The graph search is identical everywhere; the loss tracks the reduction. Get that near-lossless and end-to-end quality sits close to the exact ceiling. 𝗧𝘄𝗼 𝘁𝗵𝗶𝗻𝗴𝘀 𝗸𝗲𝗲𝗽 𝗶𝘁 𝗼𝘂𝘁 𝗼𝗳 𝗽𝗿𝗼𝗱𝘂𝗰𝘁𝗶𝗼𝗻, 𝗯𝗼𝘁𝗵 𝗮𝗯𝗼𝘂𝘁 𝗰𝗼𝘀𝘁: • 𝗕𝘂𝗶𝗹𝗱 𝗰𝗼𝘀𝘁: each distance is inner products over every token pair between two lists — O(avg_len² × dim). Node count drops from N × avg_len to N, but net cost still scales with avg_len. Measured: 𝟲𝘅 a single-vector HNSW at avg_len 87 (MS MARCO), 𝟭𝟴𝘅 at avg_len 236 (TREC-COVID). • 𝗟𝗶𝘀𝘁 𝗹𝗲𝗻𝗴𝘁𝗵: when a document carries thousands of vectors (𝗖𝗼𝗹𝗤𝘄𝗲𝗻𝟮: 𝟱,𝟭𝟰𝟯 𝗽𝗮𝘁𝗰𝗵𝗲𝘀 𝗽𝗲𝗿 𝗽𝗮𝗴𝗲), distance cost climbs until build and search latency aren't acceptable. That rules out multimodal and long complex-query documents — exactly where multi-vector wins most. Building HNSW straight on the full lists, with no reduction step, matched BruteForce almost exactly. 𝗧𝗵𝗮𝘁 𝘁𝗲𝗹𝗹𝘀 𝘂𝘀 𝘁𝗵𝗲 𝗾𝘂𝗮𝗹𝗶𝘁𝘆 𝗠𝗨𝗩𝗘𝗥𝗔, 𝗟𝗘𝗠𝗨𝗥, 𝗮𝗻𝗱 𝗧𝗼𝗸𝗲𝗻𝗔𝗡𝗡 𝗴𝗶𝘃𝗲 𝘂𝗽 𝗰𝗼𝗺𝗲𝘀 𝗳𝗿𝗼𝗺 𝗵𝗼𝘄 𝘁𝗵𝗲𝘆 𝗿𝗲𝗱𝘂𝗰𝗲 𝘁𝗵𝗲 𝗲𝗺𝗯𝗲𝗱𝗱𝗶𝗻𝗴 𝗹𝗶𝘀𝘁, 𝗻𝗼𝘁 𝗳𝗿𝗼𝗺 𝘁𝗵𝗲 𝗛𝗡𝗦𝗪 𝗶𝗻𝗱𝗲𝘅 𝘁𝗵𝗲𝘆 𝗮𝗹𝗹 𝘀𝗵𝗮𝗿𝗲. 𝗦𝗼 𝘁𝗵𝗲 𝗻𝗲𝘅𝘁 𝗿𝗼𝘂𝗻𝗱 𝗼𝗳 𝘄𝗼𝗿𝗸 𝗴𝗼𝗲𝘀 𝘁𝗵𝗲𝗿𝗲: 𝘀𝗵𝗮𝗿𝗽𝗲𝗻 𝘁𝗵𝗲 𝗿𝗲𝗱𝘂𝗰𝘁𝗶𝗼𝗻 𝘀𝘁𝗲𝗽, 𝗮𝗻𝗱 𝗮 𝘀𝗵𝗶𝗽𝗽𝗮𝗯𝗹𝗲 𝗺𝗲𝘁𝗵𝗼𝗱 𝗰𝗼𝘂𝗹𝗱 𝗿𝗲𝗮𝗰𝗵 𝗕𝗿𝘂𝘁𝗲𝗙𝗼𝗿𝗰𝗲-𝗹𝗲𝘃𝗲𝗹 𝗾𝘂𝗮𝗹𝗶𝘁𝘆. 💬 0 🔄 1 ❤️ 1 👀 95 📊 1 ⚡