论文

层级表示与量化如何取舍:基于 MTEB 38 任务的实证研究

Balancing hierarchical representation and quantization: A performance trade-off in text embeddings

精选理由

如果你在做向量检索或嵌入压缩,这篇直接给答案:int8 基本无损、二值量化别用、降维一次没事两次翻车,还有 32 倍存储压缩的可行组合。

这项 arXiv 研究在 Massive Text Embedding Benchmark (MTEB) 的 38 个任务上,用 4 个 transformer 嵌入模型测试了层级表示与量化的组合,共 168 种配置。结果显示 int8 量化在配对分类和重排序任务上与 float32 统计上无差异,整体最多损失 1.5 个百分点,而二值量化在所有任务类别上都显著更差。将嵌入维度减半一次在 m=16 以上检测不出差异,连续减半两次则总有影响。8 倍降维配合 int8 可将每向量存储压缩 32 倍,保留 94.4% 的基线效果。检索任务退化速度远超其他类别,且实验未发现量化能加速评估,从中间层采样反而能明显缩短评估时间。

原文 · arXiv cs.LG

Balancing hierarchical representation and quantization: A performance trade-off in text embeddings

Hierarchical text embedding models offer variable-length representations, while quantization reduces numerical precision; both aim to improve computational efficiency. This work is an empirical benchmark study of how these two orthogonal, already-established techniques interact. We evaluate 38 tasks from the Massive Text Embedding Benchmark (MTEB) using four transformer-based embedding models, covering 1D and 2D hierarchical representations combined with 32-bit, 8-bit, and binary quantization, for 168 configurations per task. We report each efficiency dimension separately: theoretical per-vector storage and end-to-end evaluation time. Under a Friedman test with Nemenyi post-hoc analysis, int8 quantization is statistically indistinguishable from float32 for pair classification and re-ranking and costs at most 1.5 percentage points overall, whereas binary quantization is significantly worse across every task category. Halving the embedding dimension once is not statistically detectable above $m=16$; two successive halvings always are. Combining an 8x dimensionality reduction with int8 yields a 32x reduction in per-vector storage at 94.4% of baseline effectiveness. Because evaluation times were measured once, we treat them as indicative: we find no evidence that quantization speeds up evaluation, whereas sampling from intermediate layers shortens it substantially. Retrieval degrades far faster than every other category, so we report findings per task category.