| 🏠 Project Page | 📄 Paper
This repo contains the code for CRINN, a reinforcement learning-augmented LLM framework for automated optimization of approximate nearest-neighbor search (ANNS) algorithms. CRINN achieves best-in-class performance on three out of six widely-used NNS benchmark datasets (GIST-960-Euclidean, MNIST-784-Euclidean, and GloVe-25-angular) and tied for first place on two (SIFT-128-Euclidean and GloVe-25-angular). The current version uses GLASS as the starting point for RL training.
Stay tuned!
- [3 Aug, 2025] The repository is created and we release the first version.
- Add RL version based on ParlayANN
- Incorporate both Euclidean and angular distances as RL training rewards
- Adaptive Search Scaling: Dynamic ef parameter adjustment based on recall requirements
- Multi-Level Prefetching: Intelligent prefetching considering neighbor density and search layer
- Multi-Entry Point Architecture: Parallel exploration from diverse entry points
- Convergence Detection: Smart early termination to avoid unnecessary exploration
sudo apt-get update && sudo apt-get install -y build-essential git python3 python3-distutils python3-venv
pip3 install numpy
pip3 install pybind11
bash build.shpython examples/main.py@article{deepreinforce2025crinn,
title={CRINN: Contrastive Reinforcement Learning for Approximate Nearest Neighbor Search},
author={Li, Xiaoya and Sun, Xiaofei and Wang, Albert and Chris, Shum and Li, Jiwei},
journal={arXiv preprint arXiv:2508.02091},
year={2025}
}Feel free to raise github issues or directly reach out to us at research@deep-reinforce.com.