CRINN: 근사 최근접 이웃 탐색을 위한 대조 강화 학습
CRINN: Contrastive Reinforcement Learning for Approximate Nearest Neighbor Search
August 4, 2025
저자: Xiaoya Li, Xiaofei Sun, Albert Wang, Chris Shum, Jiwei Li
cs.AI
초록
근사 최근접 이웃 탐색(Approximate Nearest-Neighbor Search, ANNS) 알고리즘은 최근 AI 애플리케이션, 특히 검색 강화 생성(Retrieval-Augmented Generation, RAG) 및 에이전트 기반 대형 언어 모델(LLM) 애플리케이션에서 점점 더 중요한 역할을 하고 있다. 본 논문에서는 ANNS 알고리즘을 위한 새로운 패러다임인 CRINN을 제안한다. CRINN은 ANNS 최적화를 실행 속도를 보상 신호로 사용하는 강화 학습 문제로 접근한다. 이 접근법은 정확도 제약을 유지하면서 점점 더 빠른 ANNS 구현을 자동으로 생성할 수 있게 한다. 우리의 실험 평가는 CRINN이 널리 사용되는 6개의 NNS 벤치마크 데이터셋에서 효과적임을 보여준다. 최신 오픈소스 ANNS 알고리즘과 비교했을 때, CRINN은 그 중 3개(GIST-960-Euclidean, MNIST-784-Euclidean, GloVe-25-angular)에서 최고 성능을 달성했으며, 2개(SIFT-128-Euclidean 및 GloVe-25-angular)에서는 공동 1위를 기록했다. CRINN의 성공은 ANNS 최적화를 넘어서는 중요한 의미를 지닌다: 이는 강화 학습으로 강화된 LLM이 전문 지식과 노동 집약적인 수동 개선을 요구하는 정교한 알고리즘 최적화를 자동화하는 효과적인 도구로 기능할 수 있음을 검증한다. 코드는 https://github.com/deepreinforce-ai/CRINN에서 확인할 수 있다.
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/deepreinforce-ai/CRINN