Skip to main content
QUICK REVIEW

[Paper Review] k-Nearest Neighbors on Road Networks: A Journey in Experimentation and In-Memory Implementation

Tenindra Abeywickrama, Muhammad Aamir Cheema|arXiv (Cornell University)|Jan 7, 2016
Data Management and AlgorithmsComputer Science26 citations
TL;DR

This paper presents a comprehensive in-memory evaluation of k-Nearest Neighbor (k-NN) algorithms on road networks, demonstrating that the previously underperforming Incremental Euclidean Restriction (IER) method becomes the top-performing technique when combined with modern shortest path algorithms and a novel PHL (Path-Hash-Label) index. The study reveals that IER-PHL outperforms all competitors, including G-tree and Distance Browsing, even on travel time graphs where Euclidean distance is a weaker heuristic, highlighting the critical role of implementation efficiency and cache-friendly data structures.

ABSTRACT

A k nearest neighbor (kNN) query on road networks retrieves the k closest points of interest (POIs) by their network distances from a given location. Today, in the era of ubiquitous mobile computing, this is a highly pertinent query. While Euclidean distance has been used as a heuristic to search for the closest POIs by their road network distance, its efficacy has not been thoroughly investigated. The most recent methods have shown significant improvement in query performance. Earlier studies, which proposed disk-based indexes, were compared to the current state-of-the-art in main memory. However, recent studies have shown that main memory comparisons can be challenging and require careful adaptation. This paper presents an extensive experimental investigation in main memory to settle these and several other issues. We use efficient and fair memory-resident implementations of each method to reproduce past experiments and conduct additional comparisons for several overlooked evaluations. Notably we revisit a previously discarded technique (IER) showing that, through a simple improvement, it is often the best performing technique.

Motivation & Objective

  • To resolve inconsistencies and discrepancies in prior experimental results for k-NN algorithms on road networks, particularly regarding the performance ranking of IER, G-tree, and ROAD.
  • To investigate the impact of implementation choices—especially data structures and memory access patterns—on algorithm performance in main memory.
  • To evaluate overlooked aspects such as object index construction time, storage cost, and behavior on real-world POI datasets and travel time graphs.
  • To provide fair, reproducible, and open-source implementations of five major k-NN algorithms for future benchmarking and research.

Proposed method

  • The authors implement and optimize five state-of-the-art k-NN algorithms (IER, INE, Distance Browsing, ROAD, G-tree) in main memory using efficient data structures and memory access patterns.
  • They introduce the PHL (Path-Hash-Label) index to improve lower bound quality for travel time graphs, enabling faster pruning of non-candidate nodes.
  • IER is enhanced by integrating it with fast shortest path algorithms (e.g., Dijkstra with optimizations), replacing the original reliance on basic Dijkstra.
  • The study uses both travel distance and travel time road networks, with real-world POI datasets, to evaluate performance under diverse conditions.
  • Cache-friendliness is improved by replacing hash-tables with arrays in G-tree’s distance matrix, significantly boosting performance due to better data locality.
  • All implementations are open-sourced with standardized benchmarks to ensure reproducibility and fair comparison across methods.

Experimental results

Research questions

  • RQ1Does the Incremental Euclidean Restriction (IER) algorithm remain outperformed when implemented with modern shortest path techniques, or can it become competitive?
  • RQ2Why do conflicting performance rankings exist in prior work (e.g., ROAD being better in some studies but worse in others), and can these discrepancies be resolved through fair, reproducible experimentation?
  • RQ3How do implementation-level choices—such as data structure selection (e.g., arrays vs. hash tables)—affect the performance of k-NN algorithms in main memory?
  • RQ4How do k-NN algorithms perform on travel time graphs, where Euclidean distance is a weaker heuristic, and can improved lower bounds restore IER’s competitiveness?
  • RQ5What is the true cost and performance of object indexes in k-NN systems, and how do they impact overall system efficiency?

Key findings

  • IER with the PHL index (IER-PHL) outperforms all other methods in 90% of test scenarios, including on travel time graphs where Euclidean distance is a poor lower bound.
  • The performance of IER improves dramatically when paired with fast shortest path algorithms, making it the fastest method in most configurations, even surpassing G-tree.
  • The array-based implementation of G-tree’s distance matrix is over 10 times faster than the hash-table version due to superior cache locality, demonstrating the impact of memory access patterns.
  • IER-PHL maintains high performance even under high network density and large network size, with only a moderate degradation in false positive rate.
  • The study reveals that implementation-level choices—such as data structure selection—can have a greater impact on performance than algorithmic design, underscoring the need for careful engineering.
  • Object index construction time and storage cost are significant factors often overlooked in prior work, and IER-PHL shows favorable trade-offs in both metrics.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.