Indexing Reverse Top-k Queries

Sean Chester, Alex Thomo, S. Venkatesh, Sue WhitesidesarXiv 2012

TL;DR

This paper introduces a novel indexing technique for "reverse top-k queries," a problem where we want to find all traditional top-k queries for which a specific new data point is a top result. Their approach uses a geometric insight to represent the dataset as an arrangement of lines, identifying a "k-polygon" that efficiently answers these queries with guaranteed logarithmic time complexity.

What Problem Does This Paper Address?

Imagine you're developing a new video game and want to understand how to best position it in the market. You know that players care about graphics and AI, but different players prioritize these differently. A "top-k query" in this context would be a specific weighting of graphics vs. AI (e.g., "players who value graphics twice as much as AI"). A "reverse top-k query" flips this: given a new game (your data point q) and a set of existing games (D), you want to find all possible weightings (traditional top-k queries) for which your new game would be among the top k results. This is crucial for understanding how to maximize your game's "top-k exposure" across various user preferences.

The challenge is that there are infinitely many possible weightings (represented as angles in 2D). Existing methods for answering these queries are computationally expensive, often requiring re-computation for each new query. This paper addresses the need for an efficient, index-based solution, particularly for scenarios where many such queries are made in batches. They also introduce "maximal reverse top-k queries" to address the issue of fragmented and uninterpretable results from previous methods.

Methods

The core of their approach lies in a clever geometric transformation. They represent each data point in the 2D dataset D as a line in a new space. The arrangement of these lines forms a complex structure. Within this arrangement, they identify a critical geometric object called the "k-polygon." This polygon has the remarkable property that the answer to a reverse top-k query for a new point q can be found by simply intersecting the line representing q with this k-polygon.

To make this practical, they develop an index structure based on this k-polygon. The construction involves:

  1. k-Skyband Approximation: Identifying a subset of data points (the k-skyband) that are most likely to influence the k-polygon, significantly reducing the data needed for index construction.
  2. Radial Plane Sweep: An algorithm to construct the k-polygon from the approximated k-skyband.
  3. Dual-Array Representation: Storing the k-polygon efficiently, including its convex hull, to facilitate fast querying.

The query process then involves a binary search on the convex hull of the k-polygon, followed by a localized scan of a small number of edges, resulting in a guaranteed logarithmic query time.

Datasets

The authors evaluated their approach using real-world basketball statistics from the NBA. They generated five different datasets by projecting combinations of two attributes (e.g., "Points" and "Field Goals Made," "Defensive Rebounds" and "Assists"). They used one season (2009) as query points and the remaining seasons (1946-2008) as the main dataset. This approach allows them to test their algorithms on various degrees of attribute correlation.

Key Insights and Ideas

  • Geometric Duality for Reverse Top-k: The most significant insight is the transformation of the reverse top-k problem into a geometric problem involving arrangements of lines and polygons. This geometric perspective unlocks efficient indexing.
  • The Power of the k-Polygon: The k-polygon acts as a pre-computed summary of the dataset, encoding the answers to all possible reverse top-k queries. This allows for very fast query processing once the index is built.
  • Maximal Reverse Top-k Queries: Recognizing that fragmented results are unhelpful, they introduce and naturally support "maximal" query results, where adjacent output intervals are merged. Their k-polygon approach inherently produces these cleaner results.
  • k-Skyband for Efficient Construction: The realization that only points within the k-skyband are crucial for constructing the k-polygon significantly prunes the data needed for index building, making construction more efficient.

Key Results

  • Guaranteed Logarithmic Query Time: The proposed index structure provides a worst-case query time complexity of O(log n + k), which simplifies to O(log n) when k is considered constant or logarithmic. This is a significant improvement over previous linear-time methods.
  • Efficient Index Construction: While not the primary focus, their construction algorithm is also efficient, with experimental results showing average construction times around 34ms.
  • Compact Index Size: Experiments showed that the k-polygon is typically composed of a small fraction of the original data, leading to a data structure size of O(n), which is space-efficient.
  • Practical Performance: Experimental results demonstrated that their approach is significantly faster (1-2 orders of magnitude) than existing methods, even outperforming them in many cases without requiring pre-sorted data.

Limitations and Future Work

  • Higher Dimensions: The current work is focused on two-dimensional data. Extending the geometric approach to higher dimensions for reverse top-k queries remains an open and challenging problem.
  • Bichromatic Reverse Top-k Queries: The paper primarily addresses monochromatic reverse top-k queries. The authors suggest that their index structure could potentially lead to improved execution times for bichromatic queries as well.
  • Geometric Insights for Traditional Top-k: The geometric analysis used for reverse top-k queries might offer insights into optimizing traditional top-k query processing, which could be an interesting avenue for future research.
  • Dataset Influence on Contour Shape: The experiments revealed that the shape of the k-polygon (contour) is heavily influenced by the correlation of attributes in the dataset. Further research into understanding and leveraging these contour shapes for construction algorithms is suggested.

Summary updated

BibTeX
@misc{chester2012indexing,
  author = {Sean Chester and Alex Thomo and S. Venkatesh and Sue Whitesides},
  title = {{Indexing Reverse Top-k Queries}},
  year = {2012},
  eprint = {1205.0837},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1205.0837},
}
Figure