Sampling hidden objects using nearest-neighbor oracles

Nilesh N. Dalvi, Ravi Kumar, Ashwin Machanavajjhala, Vibhor RastogiKDD 2011

Abstract

Given an unknown set of objects embedded in the Euclidean plane and a nearest-neighbor oracle, how to estimate the set size and other properties of the objects? In this paper we address this problem. We propose an efficient method that uses the Voronoi partitioning of the space by the objects and a nearest-neighbor oracle. Our method can be used in the hidden web/databases context where the goal is to estimate the number of certain objects of interest. Here, we assume that each object has a geographic location and the nearest-neighbor oracle can be realized by applications such as maps, local, or store-locator APIs. We illustrate the performance of our method on several real-world datasets.

Introduction

In the era of the "Hidden Web," many valuable datasets are inaccessible for direct download. Platforms like Yelp, Bing Maps, or corporate store locators often restrict access to their full databases, providing only a "nearest-neighbor oracle" interface. Such an interface answers queries like "What are the $k$ closest locations to these coordinates?"

Estimating the total population of objects in these hidden databases is challenging. Simple random sampling of coordinates is biased because objects in sparse areas (e.g., a lone store in a rural area) have much larger "catchment areas" than those in dense urban clusters. To obtain an accurate count, one must account for this geographic bias.

Methodology: Voronoi Partitioning and EdgeChase

The proposed solution leverages Voronoi Partitioning. In a Voronoi diagram, the plane is divided into cells such that every point within a cell is closer to its "owner" object than to any other object in the set.

The Unbiased Estimator

The probability of a random point falling into an object’s Voronoi cell is proportional to that cell's area. The authors demonstrate that by selecting a random point, identifying the nearest object $d$, and calculating the area of its Voronoi cell ($a_i$), an unbiased estimate of the total population can be constructed by weighting the result by $1/a_i$.

The EdgeChase Algorithm

Since the boundaries of Voronoi cells are unknown, the authors developed the EdgeChase algorithm. This algorithm uses the nearest-neighbor oracle to discover the edges of an object's cell by performing binary searches on angles and distances to find where the "closest neighbor" changes.

Visualization of the EdgeChase algorithm discovering the boundaries of a Voronoi cell.

Weighted Sampling

To further improve efficiency, the authors introduced Weighted Sampling. Instead of uniform sampling across a map, points are selected based on known distributions (e.g., population density) that correlate with the density of the target objects.

Experimental Results

The method was validated using several real-world datasets, including Yahoo! Local restaurants (182,510 locations), chain stores (Starbucks, McDonald's, Walmart), and services (dentists, gas stations).

Efficiency and Convergence

The EdgeChase algorithm is highly efficient, requiring only 30 to 55 oracle calls to accurately estimate a single cell's area. This efficiency stems from the "six-neighbor rule," which notes that a 2D Voronoi cell has, on average, only six sides.

The study found that for the massive Restaurants dataset, a 10% error margin could be achieved with just 434 samples using uniform sampling. Weighted sampling significantly outperformed this, reaching the same error threshold with only 72 samples.

Comparison of sampling error between uniform and weighted sampling methods as the number of samples increases.

Conclusion and Future Work

This research transforms a data sampling problem into a computational geometry problem. By utilizing the spatial properties of hidden data, it overcomes the limitations of restrictive APIs. Key insights include the diminishing returns of $k$ in top-$k$ queries (where $k=6$ is often sufficient) and the significant gains from weighted sampling.

Future work may address the challenges of higher dimensions, where Voronoi cell complexity grows exponentially, and the impact of non-Euclidean distance metrics (e.g., driving time) which result in non-convex cells.

Summary updated

BibTeX
@inproceedings{dalvi2011sampling,
  author = {Nilesh N. Dalvi and Ravi Kumar and Ashwin Machanavajjhala and Vibhor Rastogi},
  title = {{Sampling hidden objects using nearest-neighbor oracles}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2011},
  url = {https://openreview.net/forum?id=SJZUYNW_Wr},
}
Figure