arXiv:2501.06121cs.IR2025-01被引 5

kANNolo 用模块化设计让近邻搜索既快又易用,适合快速实验新想法。

kANNolo: Sweet and Smooth Approximate k-Nearest Neighbors Search

  • 基于 Rust 的可组合架构,支持稠密与稀疏向量的混合使用
  • 在速度与准确率平衡上达顶尖水平,支持多种相似度计算和索引结构
  • 专为研究者打造,方便快速原型验证,代码开源可直接使用

近似最近邻(ANN)搜索在推荐系统和信息检索中至关重要。现有主流 ANN 库虽性能优越,但缺乏模块化与易用性,不利于研究想法的快速原型验证。为此,我们提出 kANNolo——一个以研究为导向的 ANN 库,采用 Rust 编写,兼具易用性与高性能。kANNolo 提供全可组合的架构,支持稠密与稀疏向量表示,允许研究人员在统一框架内灵活搭配相似度度量、向量量化方法(如乘积量化)和索引结构(如 HNSW)。这些功能通过 Rust traits 实现抽象,保障灵活性并便于新组件集成。实验表明,kANNolo 在速度-准确率权衡上达到当前最优水平,同时支持快速原型开发,是推进 ANN 研究的有力工具。源码已公开于 GitHub:https://github.com/TusKANNy/kannolo。

原文摘要 · Abstract (English)

Approximate Nearest Neighbors (ANN) search is a crucial task in several applications like recommender systems and information retrieval. Current state-of-the-art ANN libraries, although being performance-oriented, often lack modularity and ease of use. This translates into them not being fully suitable for easy prototyping and testing of research ideas, an important feature to enable. We address these limitations by introducing kANNolo, a novel research-oriented ANN library written in Rust and explicitly designed to combine usability with performance effectively. kANNolo introduces a fully composable architecture for ANN search that supports both dense and sparse vector representations. It enables researchers to seamlessly mix and match different similarity measures, vector quantization techniques (e.g., Product Quantization), and index structures (e.g., HNSW) within a single unified framework. These functionalities are managed through Rust traits, allowing shared behaviors to be handled abstractly. This abstraction ensures flexibility and facilitates an easy integration of new components. In this work, we detail the architecture of kANNolo and demonstrate that its flexibility does not compromise performance. The experimental analysis shows that kANNolo achieves state-of-the-art performance in terms of speed-accuracy trade-off while allowing fast and easy prototyping, thus making kANNolo a valuable tool for advancing ANN research. Source code available on GitHub: https://github.com/TusKANNy/kannolo.

近邻搜索Rust可组合架构研究工具

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。