Diversifying Top-K Results

Lu Qin, Jeffrey Xu Yu, Lijun Chang

Abstract

Standard top-k search often returns redundant results (e.g., multiple nearly identical news articles about the same event). This paper introduces a general framework that transforms diversification into a graph problem, providing a suite of algorithms—culminating in the highly efficient div-cut—that can find the optimal set of $k$ diverse, high-scoring results in seconds, even for large result sets.

Introduction

When you search for "Apple" on an image search engine, you might get ten nearly identical versions of the corporate logo. While these are all "relevant" (high score), the set as a whole has low utility because of redundancy.

The challenge in "Diversified Top-K Search" is finding a subset of $k$ results that maximizes the total relevance score while ensuring no two results are too similar to each other. This is computationally expensive because choosing the best $k$ items out of a large pool is a combinatorial explosion. If we model similarity as edges in a graph, finding the best diverse set is equivalent to finding the Maximum Weight Independent Set, a classic NP-Hard problem.

Diversified selection for K=2 and K=3 on a similarity graph. Edges represent similarity thresholds; shaded nodes are the selected top-K.

Methods

The authors propose a "plug-and-play" framework that can be added to existing top-k search algorithms. Their approach relies on three main components:

  1. A General Framework: They extend standard incremental and bounding top-k frameworks with new stopping conditions. This allows the search to stop early without exploring every possible result if it can mathematically prove that no better diverse set exists in the unseen data.
  2. Diversity Graph Modeling: They represent results as nodes in a graph where an edge exists between two nodes if they are "too similar" (based on a user-defined threshold $\tau$). The goal is to find the highest-scoring set of nodes with no edges between them.
  3. The Algorithms:
    • div-astar: Uses A* search with a heuristic upper bound to prune the search space.
  4. div-dp: Decomposes the similarity graph into connected components, solving them individually.
  5. div-cut: The most advanced approach. It identifies "cut points" (nodes that, if removed, split a graph into two) to decompose the graph into a tree structure (a cptree). This allows the algorithm to solve the NP-Hard problem much more efficiently by processing the tree bottom-up.
Decomposition strategies for handling NP-hard diversity constraints, moving from a single hard problem (ivstr) to a tree-structured approach (ivut).

Key Insights and Ideas

  • Exploiting Sparsity: Document similarity graphs in the real world are rarely a "dense web." They are often sparse or clustered. By using graph theory concepts like cut points, the authors turn a terrifying NP-Hard problem into a manageable tree-based search.
  • Early Stopping is the Key to Speed: You don't need to see the 10,000th result to know it won't make it into your top-10 diverse set. The paper provides a rigorous best(S) function that calculates the maximum possible score of any unseen result set, allowing the engine to stop as soon as the current best solution exceeds that bound.
  • NP-Hard $\neq$ Impossible: While the general problem is hard, the specific constraints of top-k search (where we only care about the highest scores) allow for massive pruning that makes the optimal solution reachable in practice.

Key Results

The algorithms were evaluated on real-world text datasets including enwiki (12 million Wikipedia articles) and reuters.

  • Scalability: The div-cut algorithm is the clear winner. It can find the optimal diversified results for $k=2,000$ in just a few seconds.
  • Efficiency vs. Baselines: Standard A* search (div-astar) and the basic DP approach (div-dp) both fail or run out of memory as $k$ grows (typically around $k=200$ for Wikipedia data), whereas div-cut remains stable.
  • Real-world Performance: On the enwiki dataset, div-cut was often 100x faster and used 1,000x less memory than the basic A* approach for small $k$, and was the only algorithm capable of handling large $k$.

Limitations and Future Work

The model currently assumes a hard binary threshold for similarity (either two things are similar or they aren't). Future work could explore "softer" diversification that allows slight similarity for very high-scoring items. Additionally, the performance of the graph decomposition depends on the similarity threshold $\tau$; if set very low, the graph becomes dense, potentially diminishing the benefits of the div-cut approach.

Summary updated

BibTeX
@article{qin2012diversifying,
  author = {Lu Qin and Jeffrey Xu Yu and Lijun Chang},
  title = {{Diversifying Top-K Results}},
  journal = {Proc. VLDB Endow.},
  year = {2012},
  doi = {10.14778/2350229.2350233},
}
Figure