[Paper Review] Learning to Route in Similarity Graphs
This paper proposes learnable routing in similarity graphs for nearest neighbor search by training vertex representations to guide greedy traversal toward the true nearest neighbor, reducing local minima. By optimizing routing policies using imitation learning, the method achieves significantly higher recall (up to 9.4% improvement) than baseline graphs under the same computational budget.
Recently similarity graphs became the leading paradigm for efficient nearest neighbor search, outperforming traditional tree-based and LSH-based methods. Similarity graphs perform the search via greedy routing: a query traverses the graph and in each vertex moves to the adjacent vertex that is the closest to this query. In practice, similarity graphs are often susceptible to local minima, when queries do not reach its nearest neighbors, getting stuck in suboptimal vertices. In this paper we propose to learn the routing function that overcomes local minima via incorporating information about the graph global structure. In particular, we augment the vertices of a given graph with additional representations that are learned to provide the optimal routing from the start vertex to the query nearest neighbor. By thorough experiments, we demonstrate that the proposed learnable routing successfully diminishes the local minima problem and significantly improves the overall search performance.
Motivation & Objective
- To address the local minima problem in greedy routing on similarity graphs, where queries get stuck in suboptimal vertices.
- To improve search accuracy in high-dimensional data by incorporating global graph structure into routing decisions.
- To learn compact vertex representations that guide optimal routing paths from any start vertex to the nearest neighbor.
- To reduce reliance on purely local, distance-based routing heuristics that fail in complex graph topologies.
- To demonstrate that learned routing outperforms standard greedy routing and existing NNS methods under fixed computational budgets.
Proposed method
- Augment each vertex in a similarity graph with a learned, low-dimensional representation that encodes global routing context.
- Train the routing function using imitation learning, where the agent learns to mimic optimal routing paths from a supervised dataset of query-to-NN trajectories.
- Use a deep neural network $f_{\theta}(\cdot)$ with convolutional and feed-forward layers to map vertex features into routing scores.
- Optimize the model using a multi-component loss combining top-$k$ selection and full-path routing supervision to improve robustness and generalization.
- Apply the learned routing policy during inference: at each step, select the neighbor with the highest routing score, not just the closest distance.
- Use a teacher forcing objective during training to stabilize learning by providing optimal routing trajectories instead of self-generated ones.
Experimental results
Research questions
- RQ1Can learned vertex representations improve greedy routing in similarity graphs by reducing local minima?
- RQ2Does incorporating global graph structure into routing decisions lead to higher search accuracy?
- RQ3How does the performance of learnable routing compare to standard greedy routing and other state-of-the-art NNS methods?
- RQ4What is the impact of different neural architectures and training objectives on routing performance?
- RQ5Does the benefit of learnable routing increase with data dimensionality?
Key findings
- The proposed learnable routing achieves a 9.4% higher Recall@1 on the GloVe100K dataset compared to standard NSW graphs under a DCS=512 budget.
- On SIFT100K, the method outperforms all baselines, including NSG and HNSW, with a Recall@1 of 0.949.
- The ablation study shows that using a convolutional architecture with a feed-forward head yields 60.4% Recall@1, significantly outperforming PCA (39.4%) and feed-forward-only models (54.9%).
- Training with the full imitation learning objective (Eq. 4) yields better results than teacher forcing (37.7% Recall@1), indicating that self-consistent policy learning is more effective.
- The method achieves competitive performance even when trained only on top-$k$ selection, suggesting that the routing policy can be learned with partial supervision.
- The performance gain is most pronounced in high-dimensional spaces, confirming that the method is especially beneficial in challenging, high-dimensional settings.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.