用强化学习自动优化近邻搜索,速度更快且精度不降。
CRINN: Contrastive Reinforcement Learning for Approximate Nearest Neighbor Search
- 将近邻搜索优化建模为强化学习问题,以速度为奖励信号。
- 在6个基准数据集上3个领先,2个并列第一,性能优越。
- 证明大模型+强化学习可自动化复杂算法优化,适合研发人员参考。
近似最近邻搜索(ANNS)算法在近期人工智能应用中愈发关键,尤其在检索增强生成(RAG)和基于代理的大型语言模型(LLM)应用中。本文提出CRINN,一种全新的ANNS算法范式。CRINN将ANNS优化视为强化学习问题,以执行速度作为奖励信号,从而自动生成逐步更快的ANNS实现,同时满足精度约束。实验评估显示,CRINN在六个广泛使用的近邻搜索基准数据集上表现优异。相较于现有开源ANNS算法,它在三个数据集(GIST-960-Euclidean、MNIST-784-Euclidean、GloVe-25-angular)上取得最佳性能,并在两个数据集(SIFT-128-Euclidean、GloVe-25-angular)上并列第一。CRINN的成功意义深远:验证了经强化学习增强的大模型可作为有效工具,自动化那些需要专业知识与繁琐人工调优的复杂算法优化任务。代码见https://github.com/ornith-ai/CRINN。
原文摘要 · Abstract (English)
Approximate nearest-neighbor search (ANNS) algorithms have become increasingly critical for recent AI applications, particularly in retrieval-augmented generation (RAG) and agent-based LLM applications. In this paper, we present CRINN, a new paradigm for ANNS algorithms. CRINN treats ANNS optimization as a reinforcement learning problem where execution speed serves as the reward signal. This approach enables the automatic generation of progressively faster ANNS implementations while maintaining accuracy constraints. Our experimental evaluation demonstrates CRINN's effectiveness across six widely-used NNS benchmark datasets. When compared against state-of-the-art open-source ANNS algorithms, CRINN achieves best performance on three of them (GIST-960-Euclidean, MNIST-784-Euclidean, and GloVe-25-angular), and tied for first place on two of them (SIFT-128-Euclidean and GloVe-25-angular). The implications of CRINN's success reach well beyond ANNS optimization: It validates that LLMs augmented with reinforcement learning can function as an effective tool for automating sophisticated algorithmic optimizations that demand specialized knowledge and labor-intensive manual refinement. Code can be found at https://github.com/ornith-ai/CRINN
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。