TL;DR
This paper introduces two scalable MapReduce algorithms, GreedyMR and StackMR, to solve the weighted $b$-matching problem for social content recommendation. While GreedyMR provides higher-quality matches and an "any-time" stopping property, StackMR offers superior scalability with a provable poly-logarithmic number of MapReduce rounds, making it ideal for massive datasets like those from Flickr and Yahoo! Answers.
What Problem Does This Paper Address?
In social media, the goal is often to match "items" (photos, questions, ads) to "consumers" (users). This isn't just a simple recommendation task; it’s a matching problem with constraints. You want to maximize relevance (edge weights) while ensuring:
- Consumers aren't overwhelmed: Each user has a capacity $b(u)$ for how much content they can digest.
- Suppliers get exposure: Each item has a capacity $b(t)$ to ensure it reaches enough people.
This is formally known as the weighted $b$-matching problem. While exact solutions exist (via max-flow), they don't scale to the billions of edges found in modern social networks. The authors tackle the challenge of implementing efficient approximation algorithms for this problem within the MapReduce framework.
Methods
The authors propose a two-stage pipeline:
- Candidate Edge Generation: To avoid checking every possible user-item pair ($O(|T||C|)$), they use a similarity self-join algorithm based on prefix filtering. This prunes the graph to only include edges with a relevance score above a threshold $\sigma$.
- Matching Algorithms:
- GreedyMR: A MapReduce adaptation of the classic greedy approach. In each round, nodes propose their best available edges. If two nodes mutually propose an edge, it’s added to the matching. It provides a $\frac{1}{2}$-approximation guarantee.
- StackMR: A more complex algorithm based on the primal-dual schema. It works in two phases: a "push" phase that builds a stack of maximal $b$-matchings (layers) while updating dual variables, and a "pop" phase that greedily selects edges from the stack. It allows for slight capacity violations $(1+\epsilon)$ but guarantees termination in poly-logarithmic rounds.
Datasets
The algorithms were evaluated on three real-world datasets:
- flickr-small: 2,817 items, 526 users, ~550k edges.
- flickr-large: ~373k items, ~32k users, ~2 billion potential edges.
- yahoo-answers: ~4.8 million items, ~1.1 million users, ~18.8 billion potential edges.
For Flickr, relevance was determined by tag similarity. For Yahoo! Answers, it was based on the similarity between question text and a user's past answers (using tf-idf).
Key Insights and Ideas
- The Scalability vs. Quality Trade-off: GreedyMR consistently finds higher-weight matchings, but StackMR is theoretically more robust for massive scales because its round complexity doesn't depend linearly on the graph size.
- The "Any-time" Advantage: A standout feature of GreedyMR is that it maintains a feasible solution at every iteration. In a production environment, you can stop the algorithm early if you need results immediately, and it will likely already have 95% of the optimal value.
- Primal-Dual in MapReduce: The paper demonstrates that sophisticated distributed algorithms (like those for matching) can be effectively ported to MapReduce by thinking in terms of "layers" and iterative state updates across adjacency lists.
Key Results
- Quality: GreedyMR outperformed StackMR by 11% to 31% in total matching value across the datasets.
- Efficiency: On large datasets, StackMR lived up to its promise, requiring significantly fewer MapReduce iterations than GreedyMR as the number of edges increased.
- Convergence: As shown in Figure 5, GreedyMR converges extremely quickly, reaching 95% of its final value within roughly 30-45% of its total running time.
- Scalability: Figure 2 illustrates the performance on the
flickr-largedataset. While GreedyMR's iterations climb with the number of edges, StackMR remains relatively flat, demonstrating its suitability for very large-scale graphs.
Limitations and Future Work
- Capacity Violations: StackMR is allowed to violate node capacities by a factor of $(1+\epsilon)$. While the authors found these violations to be negligible in practice (often <6%), strict constraints might require the more complex version of the algorithm (Algorithm 1 in the Appendix).
- Dynamic Graphs: The current framework operates in "phases" (batch processing). Future work could explore how to update these matchings incrementally as new content arrives in real-time.
- Greedy Round Complexity: While GreedyMR performed well, the authors note it could theoretically take a linear number of rounds in worst-case scenarios (like a long path graph with increasing weights).
Summary updated