跳到正文
arXiv cs.AI· Xiaoya Li, Albert Wang, Guoyin Wang, Chris Shum, Jiwei Li·· 3 小时前AI 评分39

CRINN:用对比强化学习优化近似最近邻搜索

CRINN: Contrastive Reinforcement Learning for Approximate Nearest Neighbor Search

AI 导读

CRINN 将近似最近邻搜索(ANNS)优化转化为强化学习问题,以执行速度作为奖励信号,在保持精度的约束下自动生成更快的 ANNS 实现。在六个常用 NNS 基准数据集上,CRINN 在三个数据集上达到开源最先进算法的最佳性能,另在两个数据集上并列第一。代码已开源,该结果验证了结合强化学习的 LLM 可自动化需要专业知识的算法优化。

正文 · 原文

View PDF HTML (experimental)

Abstract: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 this https URL
Comments: Preprint Version
Subjects: Machine Learning (cs.LG); Artificial Intelligence (cs.AI); Computation and Language (cs.CL); Databases (cs.DB)
Cite as: arXiv:2508.02091 [cs.LG]
  (or arXiv:2508.02091v5 [cs.LG] for this version)
  https://doi.org/10.48550/arXiv.2508.02091

arXiv-issued DOI via DataCite

Submission history

From: Jiwei Li [view email]
[v1] Mon, 4 Aug 2025 05:57:46 UTC (582 KB)
[v2] Wed, 20 Aug 2025 01:47:01 UTC (582 KB)
[v3] Mon, 13 Jul 2026 00:35:17 UTC (582 KB)
[v4] Wed, 5 Aug 2026 21:49:02 UTC (582 KB)
[v5] Wed, 11 Nov 2026 21:43:48 UTC (581 KB)

来源:arXiv cs.AI · arxiv.org