NeuRoute: Logit-Guided Neural Routing for Billion-Scale Vector Search with Sub-Hour Index Construction
Organizations: University of Arkansas at Little Rock
Abstract
Building approximate nearest neighbor (ANN) indexes at billion scale is often dominated by expensive global clustering or graph construction, making time-to-index a first-order systems concern. We present NeuRoute, a learned hashing index that turns short binary codes into an effective routing primitive for large-scale vector search. NeuRoute trains a lightweight neural network encoder with a selective similarity-preserving objective to produce well-balanced binary addresses. During construction, NeuRoute organizes vectors into buckets by their codes and performs bucket-local clustering in the encoder's low-dimensional space to form centroids. At query time, NeuRoute exploits the encoder logits as an uncertainty signal: it uses deviation-to-threshold scores to prioritize uncertain-bit perturbations for query-adaptive multi-bucket probing, scores bucket-local centroids by their distances to the query to form a compact candidate cluster set, and applies centroid-stage gating with heap-quality-driven early stopping to prune low-value clusters before exact refinement. On billion-scale benchmarks, NeuRoute achieves strong accuracy-throughput trade-offs with fast index construction: on BigANN-1B it reaches Recall@10 at 2,414 QPS and is faster than OPQ+IVF-PQ (refine) at comparable accuracy, while completing end-to-end training+construction in under an hour on both BigANN-1B and Deep1B-1B. These results show that logit-guided neural routing can make hashing competitive as a lightweight ANN indexing framework at billion scale. Source code and artifacts are available at https://github.com/XingqiaoWang/NeuRoute.
Figures & tables
| Dataset | Train (s) [GPU] | Index build (s) [CPU] | CSR build (s) [CPU] | Clustering (s) [CPU] | Other/I/O (s) [CPU] | Add/Build (s) [CPU] | Total (s) |
|---|---|---|---|---|---|---|---|
| BigANN-100M | 1,197.56 | 49.96 | 40.78 | 43.00 | 53.26 | 187.00 | 1,384.56 (0.39 h) |
| Deep1B-100M | 1,176.27 | 41.85 | 64.44 | 69.00 | 53.71 | 229.00 | 1,405.27 (0.39 h) |
| BigANN-1B | 1,183.46 | 529.29 | 420.50 | 380.00 | 442.21 | 1,772.00 | 2,955.47 (0.82 h) |
| Deep1B-1B | 1,124.43 | 368.00 | 903.36 | 614.00 | 326.64 | 2,212.00 | 3,336.43 (0.93 h) |
| GLDv2 | 2,471.15 | 84.78 | 51.27 | 44.00 | 56.96 | 237.00 | 2,708.15 (0.75 h) |
| Dataset | Method | Train (h) | Add/Build (h) | Total (h) | Serving footprint (GB) | Peak RSS (GB) |
|---|---|---|---|---|---|---|
| GLDv2 | IVF-PQ | 7.15 | 3.64 | 10.80 | 1.28 | 18.83 |
| GLDv2 | IVF-Flat | 9.32 | 4.32 | 13.63 | 58.07 | 149.21 |
| GLDv2 | DiskANN | 0.00 | 1.89 | 1.89 | 76.93 | 107.92 |
| GLDv2 | HNSW | 0.00 | 1.79 | 1.79 | 56.11 | 100.84 |
| GLDv2 | NeuRoute | 0.69 | 0.07 | 0.75 | 0.24 / 53.98 | 59.38 |
| BigANN-100M | IVF-PQ | 1.17 | 5.96 | 7.12 | 4.03 | 20.54 |
| Method (22b) | Recall@10 (%) | QPS |
|---|---|---|
| LSH | 37.55 | 82.94 |
| ITQ | 57.27 | 111.17 |
| TBH | 74.99 | 18.52 |
| NeuRoute (no clustering) | 93.86 | 111.40 |
| Dataset | Method | Recall@10 | QPS | Build time (h) |
|---|---|---|---|---|
| BigANN-1B | DiskANN | 0.9040 | 2,744 | 17.96 |
| BigANN-1B | OPQ+IVF-PQ (refine) | 0.9080 | 1,406 | 10.72 |
| BigANN-1B | NeuRoute | 0.9030 | 2,414 | 0.82 |
| Deep1B-1B | DiskANN | 0.8891 | 914.68 | 36.47 |
| Deep1B-1B | OPQ+IVF-PQ (refine) | 0.9120 | 3,342 | 10.51 |
| Deep1B-1B | NeuRoute | 0.9010 | 842 | 0.93 |
| Op. | Variant | Recall@10 | QPS | Cand./q (k) |
|---|---|---|---|---|
| A | No early stop | 0.90335 | 1440 | 249 |
| A | Early stop | 0.90260 | 2414 | 201 |
| B | No early stop | 0.90038 | 1682 | 230 |
| B | Early stop | 0.89965 | 2595 | 194 |
| (%) | Base-sampled pairs | Encoded-sampled pairs | ||
|---|---|---|---|---|
| Pearson | Spearman | Pearson | Spearman | |
| 0.1 | 0.8335 | 0.7722 | 0.8027 | 0.7362 |
| 0.2 | 0.8422 | 0.7789 | 0.8162 | 0.7429 |
| 0.3 | 0.8458 | 0.7813 | 0.8190 | 0.7457 |
| 0.5 | 0.8460 | 0.7800 | 0.8130 | 0.7430 |
| 0.5 (w/o mask, run-1) | 0.8368 | 0.7535 | 0.5496 | 0.5617 |
| Dataset | Variant | Recall@10 | QPS | Cand./q (k) |
|---|---|---|---|---|
| BigANN-1B | w/ clustering | 0.90260 | 2414 | 201 |
| BigANN-1B | no clustering | 0.88780 | 543.6 | 940 |
| Deep1B-1B | w/ clustering | 0.90144 | 756.9 | 351 |
| Deep1B-1B | no clustering | 0.90007 | 165.5 | 1353 |
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
Approximate Nearest Neighbor Search
Approximate nearest neighbor search finds close vectors without exhaustive comparisons, enabling scalable retrieval in high-dimensional datasets.
See all 43 papers