Skip to main content
QUICK REVIEW

[Paper Review] On Optimal Top-K String Retrieval

Rahul Shah, Cheng Sheng|arXiv (Cornell University)|Jul 11, 2012
Algorithms and Data CompressionComputer Science13 references6 citations
TL;DR

This paper presents an I/O-efficient external memory index for top-k string retrieval that achieves near-optimal query performance of $O(p/B + \log_B n + \log^{(h)}n + k/B)$ I/Os using linear space, with a variant achieving optimal $O(p/B + \log_B n + k/B)$ I/Os using $O(n\log^*n)$ space. The approach reinterprets top-k retrieval as interval stabbing with priority over a tree-shaped structure, enabling efficient external memory processing and optimal performance for practical workloads like desktop and email search.

ABSTRACT

Let ${\cal{D}}$ = $\{d_1, d_2, d_3, ..., d_D\}$ be a given set of $D$ (string) documents of total length $n$. The top-$k$ document retrieval problem is to index $\cal{D}$ such that when a pattern $P$ of length $p$, and a parameter $k$ come as a query, the index returns the $k$ most relevant documents to the pattern $P$. Hon et. al. \cite{HSV09} gave the first linear space framework to solve this problem in $O(p + k\log k)$ time. This was improved by Navarro and Nekrich \cite{NN12} to $O(p + k)$. These results are powerful enough to support arbitrary relevance functions like frequency, proximity, PageRank, etc. In many applications like desktop or email search, the data resides on disk and hence disk-bound indexes are needed. Despite of continued progress on this problem in terms of theoretical, practical and compression aspects, any non-trivial bounds in external memory model have so far been elusive. Internal memory (or RAM) solution to this problem decomposes the problem into $O(p)$ subproblems and thus incurs the additive factor of $O(p)$. In external memory, these approaches will lead to $O(p)$ I/Os instead of optimal $O(p/B)$ I/O term where $B$ is the block-size. We re-interpret the problem independent of $p$, as interval stabbing with priority over tree-shaped structure. This leads us to a linear space index in external memory supporting top-$k$ queries (with unsorted outputs) in near optimal $O(p/B + \log_B n + \log^{(h)} n + k/B)$ I/Os for any constant $h${$\log^{(1)}n =\log n$ and $\log^{(h)} n = \log (\log^{(h-1)} n)$}. Then we get $O(n\log^*n)$ space index with optimal $O(p/B+\log_B n + k/B)$ I/Os.

Motivation & Objective

  • To address the lack of non-trivial I/O bounds in external memory for top-k string retrieval, especially for disk-resident data in applications like desktop and email search.
  • To overcome the limitation of internal memory approaches that incur $O(p)$ I/Os instead of the optimal $O(p/B)$ by rethinking the problem as interval stabbing with priority.
  • To design a linear space index that supports top-k queries in near-optimal I/O complexity, even when outputs are unsorted.
  • To achieve optimal $O(p/B + \log_B n + k/B)$ I/Os using $O(n\log^*n)$ space, and to support sorted output in $O(k)$ time when the pattern locus is known in advance.

Proposed method

  • Reformulates top-k document retrieval as an interval stabbing problem with priority over a tree-shaped structure, leveraging the geometric properties of document scores and pattern occurrences.
  • Uses a persistent linked list to maintain intervals intersecting a sweeping line, sorted by weight, enabling efficient top-k retrieval via predecessor search and list traversal.
  • Employs a candidate tree structure over the generalized suffix tree (GST), with bit vectors at each node to mark which candidate links are stabbed, enabling fast selection of top-k results.
  • Augments bit vectors with rank/select structures to support $O(1)$-time selection of top-k scored links, ensuring optimal $O(k)$ query time for small $k$.
  • Integrates external memory data structures to reduce I/O complexity, achieving $O(p/B + \log_B n + \log^{(h)}n + k/B)$ I/Os for any constant $h$.
  • Combines online sorted range reporting with interval stabbing to merge results efficiently using a word-RAM heap, achieving $O(\log n + k)$ time in RAM.

Experimental results

Research questions

  • RQ1Can top-k string retrieval be solved efficiently in external memory with I/O complexity close to optimal?
  • RQ2Can the problem be restructured to avoid the $O(p)$ I/O bottleneck of traditional internal memory approaches?
  • RQ3Is it possible to achieve linear space while supporting near-optimal I/O complexity for top-k queries in external memory?
  • RQ4Can the $\log^*n$ space overhead be eliminated to achieve truly optimal space and I/O performance?
  • RQ5Can the framework support sorted output in $O(k)$ time when the pattern’s locus is precomputed?

Key findings

  • The paper achieves a linear space index in external memory with $O(p/B + \log_B n + \log^{(h)}n + k/B)$ I/Os for any constant $h$, which is near-optimal.
  • A variant of the index uses $O(n\log^*n)$ space and achieves optimal $O(p/B + \log_B n + k/B)$ I/Os for top-k queries.
  • In the RAM model, the framework supports sorted top-k retrieval in $O(k)$ time when the pattern’s locus is provided in advance, achieving optimal performance.
  • The use of persistent data structures and bit vector rank/select operations enables efficient interval stabbing with priority, reducing query time to $O(\log\log n + k)$.
  • The approach outperforms traditional 4-sided range query models by reinterpreting the problem as interval stabbing, avoiding the infeasibility of I/O-efficient 4D range queries.
  • The framework is applicable to real-world workloads such as desktop and email search, where $p/B$ and $k/B$ are typically small constants, making I/O efficiency critical.

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.