Skip to main content
QUICK REVIEW

[论文解读] MapReduce Meets Fine-Grained Complexity: MapReduce Algorithms for APSP, Matrix Multiplication, 3-SUM, and Beyond

MohammadTaghi Hajiaghayi, Silvio Lattanzi|arXiv (Cornell University)|May 5, 2019
Stochastic Gradient Optimization TechniquesComputer Science参考文献 43被引用 3
一句话总结

本文提出了针对全对最短路径(APSP)、矩阵乘法和3-SUM等基础问题的新型MapReduce算法,通过利用每台机器内存与机器数量之间的细粒度权衡,实现了常数轮次执行。该工作引入了一种黑箱转换方法,将标准矩阵乘法算法适配至$(\min,+)$-矩阵乘法,从而在$O(\log n)$轮内实现高效求解,且内存使用量低于线性规模,机器数量接近最优。

ABSTRACT

Distributed processing frameworks, such as MapReduce, Hadoop, and Spark are popular systems for processing large amounts of data. The design of efficient algorithms in these frameworks is a challenging problem, as the systems both require parallelism---since datasets are so large that multiple machines are necessary---and limit the degree of parallelism---since the number of machines grows sublinearly in the size of the data. Although MapReduce is over a dozen years old~\cite{dean2008mapreduce}, many fundamental problems, such as Matrix Multiplication, 3-SUM, and All Pairs Shortest Paths, lack efficient MapReduce algorithms. We study these problems in the MapReduce setting. Our main contribution is to exhibit smooth trade-offs between the memory available on each machine, and the total number of machines necessary for each problem. Overall, we take the memory available to each machine as a parameter, and aim to minimize the number of rounds and number of machines. In this paper, we build on the well-known MapReduce theoretical framework initiated by Karloff, Suri, and Vassilvitskii ~\cite{karloff2010model} and give algorithms for many of these problems. The key to efficient algorithms in this setting lies in defining a sublinear number of large (polynomially sized) subproblems, that can then be solved in parallel. We give strategies for MapReduce-friendly partitioning, that result in new algorithms for all of the above problems. Specifically, we give constant round algorithms for the Orthogonal Vector (OV) and 3-SUM problems, and $O(\log n)$-round algorithms for Matrix Multiplication, All Pairs Shortest Paths (APSP), and Fast Fourier Transform (FFT), among others. In all of these we exhibit trade-offs between the number of machines and memory per machine.

研究动机与目标

  • 为APSP、矩阵乘法和3-SUM等核心问题填补高效MapReduce算法的空白,尽管这些问题是关键的,但目前仍缺乏可扩展的解决方案。
  • 建立每台机器内存与所需机器数量之间的平滑权衡,同时最小化轮次数与总机器数。
  • 通过黑箱转换方法,将已知的串行算法(尤其是矩阵乘法)扩展至$(\min,+)$-半环设置,以应用于APSP及相关问题。
  • 在MapReduce模型中实现工作高效性,通过平衡总内存使用量与计算开销。

提出的方法

  • 基于Karloff等人提出的理论MapReduce模型,结合子线性内存与机器数量的约束,设计可扩展的算法。
  • 提出一种新颖的转换方法,通过将元素以$(n+1)$进制编码,将环上的标准矩阵乘法映射为$(\min,+)$-矩阵乘法。
  • 将多项式规模的子问题划分到各台机器上,以实现并行计算,同时满足内存限制。
  • 采用黑箱方法:任何高效的MapReduce标准矩阵乘法算法均可通过仅增加$\widetilde{O}(R)$的内存开销和两个额外轮次,转换为$(\min,+)$-变体。
  • 将该转换应用于推导出$(\min,+)$-矩阵乘法与APSP的$O(\log n)$轮算法,使用$O(n^{\omega^*(2-\epsilon)/2})$台机器和每台$O(Rn^\epsilon)$的内存。
  • 应用工作高效性原则,最小化各台机器上的总处理时间,实现内存与并行度之间的平衡。

实验结果

研究问题

  • RQ1我们能否在子线性内存与机器数量约束下,为3-SUM和正交向量问题设计常数轮次的MapReduce算法?
  • RQ2如何将标准矩阵乘法算法适配至$(\min,+)$-半环设置,以应用于APSP及相关问题?
  • RQ3在MapReduce中,为实现高效且低轮次执行,每台机器内存与所需机器数量之间的权衡关系是什么?
  • RQ4在输入值范围有界的情况下,我们能否在扩展算法至$(\min,+)$-矩阵乘法的同时保持工作高效性?

主要发现

  • 通过使用$O(n^{\omega^*(2-\epsilon)/2})$台机器和每台$O(n^\epsilon)$的内存,成功实现了3-SUM与正交向量问题的常数轮次MapReduce算法。
  • 针对$(\min,+)$-矩阵乘法,开发出$O(\log n)$轮算法,使用$O(n^{\omega^*(2-\epsilon)/2})$台机器和每台$O(Rn^\epsilon)$的内存,其中$R$为输入值的取值范围。
  • 从标准矩阵乘法到$(\min,+)$-乘法的黑箱转换,使内存增加约$\widetilde{O}(R)$倍,并仅增加两个轮次,从而实现APSP的高效计算。
  • 对于无权APSP问题,该算法在$O(\log n)$轮内完成,使用$O(n^{\omega^*(2-\epsilon)/2})$台机器和每台$O(n^\epsilon)$的内存。
  • 通过将$\infty$视为$2R+1$,该框架支持输入值在$[-R,R] \cup \{\infty\}$范围内的数据,且渐近复杂度保持不变。
  • 该方法通过最小化各机器上的总处理时间,在满足内存与轮次约束的前提下,实现了工作高效执行。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。