Some pairs problems

Jeffrey D. Ullman, Jonathan R. UllmanBeyondmr@sigmod 2016

TL;DR

This paper introduces the "some-pairs" problem class, common in data analysis tasks like similarity joins, and analyzes the efficiency of MapReduce algorithms for solving them. The authors establish fundamental lower bounds on communication costs for general algorithms and propose a recursive approach that can outperform simpler methods on problems with exploitable structure.

What Problem Does This Paper Address?

Many real-world data processing tasks involve finding relationships between pairs of data items. A prime example is "similarity joins," where we want to find pairs of records that are "close" to each other based on some metric (e.g., strings with a small Hamming distance). These problems, collectively termed "some-pairs" problems, are characterized by having outputs that depend on pairs of inputs, but not necessarily all possible pairs.

The challenge lies in efficiently solving these problems using the MapReduce framework, which is designed for distributed data processing. MapReduce algorithms are evaluated based on two key metrics: reducer size (how many inputs a single reducer can handle) and replication rate (how many reducers each input needs to be sent to, on average). The authors aim to understand the theoretical limits of MapReduce for this class of problems and to develop algorithms that can achieve better performance than naive approaches, especially for problems with specific structures.

Methods

The paper explores two fundamental approaches to solving some-pairs problems in MapReduce:

  • Algorithm A: This is a "general-purpose" algorithm that treats the problem as if all possible pairs of inputs have an output. It partitions inputs into groups and assigns reducers to handle pairs of these groups. Its replication rate is $O(n/q)$, where $n$ is the number of inputs and $q$ is the reducer size.
  • Algorithm B: This approach creates a dedicated reducer for each potential output (edge in the connection graph). Each input is sent to the reducers corresponding to the outputs it participates in. Its replication rate is $O(m/n)$, where $m$ is the number of outputs.

The authors then delve into theoretical analysis:

  • Lower Bounds: They establish a fundamental lower bound on the replication rate for any "general-purpose" MapReduce algorithm. This bound shows that no algorithm can significantly outperform the better of Algorithms A and B in the worst case, with the replication rate being $O(\min\{m/n, n/q\} \cdot \log n)$. This is achieved by constructing specific "expanding" graph structures that are hard to process efficiently.
  • Algorithm C (Recursive Decomposition): To overcome the worst-case lower bound, the paper proposes a recursive algorithm. This algorithm works by recursively dividing the input sets (X and Y) into smaller subsets and solving the subproblems. The key insight is that if the problem has a structure that allows for unbalanced partitions (where edges are concentrated in only a few subproblems), this recursive approach can achieve significantly lower replication rates.

Datasets

Not discussed in the paper. The paper focuses on theoretical analysis and algorithm design, using abstract "some-pairs" problems represented by bipartite graphs rather than specific real-world datasets.

Key Insights and Ideas

  • Fundamental Trade-off: The paper clearly defines the inherent trade-off between reducer size ($q$) and replication rate ($r$) for some-pairs problems in MapReduce.
  • No Universal Best: There isn't a single "best" general-purpose algorithm. Algorithm A is better when the number of outputs ($m$) is large relative to $n^2$, while Algorithm B excels when $m$ is small.
  • Worst-Case Limits: The paper proves that for general-purpose algorithms, there's a theoretical limit to how much communication can be saved, dictated by the $\log n$ factor in the lower bound.
  • Structure Matters: The most significant insight is that exploiting the specific structure of a some-pairs problem can lead to algorithms that dramatically outperform general-purpose ones. Algorithm C demonstrates this by achieving replication rates like $\sqrt{m/q}$ or even $1 + \log(n/q)$ on problems with exploitable structure.
  • Recursive Decomposition as a Strategy: The recursive decomposition method is a powerful technique for breaking down complex problems into manageable subproblems, especially when the partitioning can be done unevenly.

Key Results

  • Lower Bound: For any general-purpose MapReduce algorithm solving a some-pairs problem with $n$ inputs and $m$ outputs, and reducer size $q$, the replication rate $r$ is bounded below by $\Omega(\min\{m/n, n/q\} \cdot \log n)$.
  • Algorithm C Performance:
    • For problems where $n$ is a power of $q^2$, Algorithm C achieves a replication rate of $O(\sqrt{m/q})$.
  • For a specific structured problem (Hamming-distance-1 with a particular partition), Algorithm C can achieve a replication rate of $1 + \log(n/q)$, which is significantly better than the general bounds when $n$ is not much larger than $q$.

Limitations and Future Work

  • Worst-Case vs. Average Case: The lower bounds are worst-case. The paper acknowledges that in practice, many instances might not exhibit the pathological structures that lead to these worst-case bounds.
  • Algorithm C Complexity: While Algorithm C offers better theoretical performance for structured problems, its practical implementation might involve more complex partitioning logic.
  • Heuristics for Structure Discovery: The paper hints at the need for heuristics to identify exploitable structures in real-world data to effectively apply Algorithm C.
  • Generalizing Beyond Bipartite Graphs: The current framework focuses on bipartite graphs. Future work could explore extending these concepts to more general graph structures.

Summary updated

BibTeX
@inproceedings{ullman2016some,
  author = {Jeffrey D. Ullman and Jonathan R. Ullman},
  title = {{Some pairs problems}},
  booktitle = {Beyondmr@sigmod},
  year = {2016},
  doi = {10.1145/2926534.2926543},
}
Figure