Skip to main content
QUICK REVIEW

[论文解读] Efficient Algorithms with Asymmetric Read and Write Costs

Guy E. Blelloch, Jeremy T. Fineman|arXiv (Cornell University)|Nov 3, 2015
Interconnection Networks and Systems参考文献 40被引用 12
一句话总结

本文引入了$(M,\omega)$-ARAM模型以研究在内存访问成本不对称情况下的算法设计问题,其中读取操作成本低廉(1),而写入操作成本昂贵($\omega \gg 1$)。该研究建立了基本的下界,并提出了高效算法,通过冗余计算来最小化昂贵的写入操作。结果表明,在$\omega$相对于$M$为多项式关系时,FFT和排序网络等经典问题无法实现渐近性能提升;而通过路径压缩(path sketches)和组件捷径化(component shortcutting)等新颖技术,编辑距离和最小生成树(MST)算法可实现显著的成本降低。

ABSTRACT

In several emerging technologies for computer memory (main memory), the cost of reading is significantly cheaper than the cost of writing. Such asymmetry in memory costs poses a fundamentally different model from the RAM for algorithm design. In this paper we study lower and upper bounds for various problems under such asymmetric read and write costs. We consider both the case in which all but $O(1)$ memory has asymmetric cost, and the case of a small cache of symmetric memory. We model both cases using the $(M,ω)$-ARAM, in which there is a small (symmetric) memory of size $M$ and a large unbounded (asymmetric) memory, both random access, and where reading from the large memory has unit cost, but writing has cost $ω\gg 1$. For FFT and sorting networks we show a lower bound cost of $Ω(ωn\log_{ωM} n)$, which indicates that it is not possible to achieve asymptotic improvements with cheaper reads when $ω$ is bounded by a polynomial in $M$. Also, there is an asymptotic gap (of $\min(ω,\log n)/\log(ωM)$) between the cost of sorting networks and comparison sorting in the model. This contrasts with the RAM, and most other models. We also show a lower bound for computations on an $n imes n$ diamond DAG of $Ω(ωn^2/M)$ cost, which indicates no asymptotic improvement is achievable with fast reads. However, we show that for the edit distance problem (and related problems), which would seem to be a diamond DAG, there exists an algorithm with only $O(ωn^2/(M\min(ω^{1/3},M^{1/2})))$ cost. To achieve this we make use of a "path sketch" technique that is forbidden in a strict DAG computation. Finally, we show several interesting upper bounds for shortest path problems, minimum spanning trees, and other problems. A common theme in many of the upper bounds is to have redundant computation to tradeoff between reads and writes.

研究动机与目标

  • 建模并分析在读取与写入内存成本不对称(写入远贵于读取)条件下的算法性能。
  • 通过冗余计算识别在该类不对称内存模型中性能提升的根本限制。
  • 设计高效算法,以最小化昂贵的写入操作,同时充分利用廉价的读取操作。
  • 理解哪些经典算法问题在不对称模型下相比传统RAM模型可实现渐近成本优化。
  • 探讨标准算法等价性(如比较排序与排序网络)在不对称成本下的失效情况。

提出的方法

  • 提出$(M,\omega)$-ARAM模型:包含大小为$M$的小型对称内存和一个大而无界的非对称内存,其写入成本为$\omega \gg 1$。
  • 使用会计论证法为计算图中的节点分配分数权重,推导ARAM成本的下界。
  • 提出“路径压缩”(path sketch)技术,用于压缩和重用计算路径,从而在编辑距离及相关问题中降低写入成本。
  • 在Borůvka算法中应用组件捷径化与多阶段处理策略,以减少每轮中的昂贵写入次数。
  • 设计算法,通过牺牲冗余读取来换取更少的写入操作,尤其适用于最短路径、MST和图遍历等问题。
  • 结合外部内存与并行算法技术,优化在写入密集型场景下的不对称计算环境。

实验结果

研究问题

  • RQ1当写入昂贵而读取廉价时,FFT和排序等基础问题是否能实现算法成本的渐近优化?
  • RQ2在不对称内存成本下,排序网络和钻石DAG等任务的ARAM成本是否存在基本下界?
  • RQ3在不对称内存模型中,经典等价性(如比较排序与排序网络)在多大程度上会失效?
  • RQ4编辑距离等类似钻石DAG的问题,是否能通过路径压缩技术实现低于一般DAG下界的成本?
  • RQ5哪些算法技术能够在$(M,\omega)$-ARAM模型中实现读写操作之间的高效权衡?

主要发现

  • 对于FFT和排序网络,ARAM成本为$\Omega(\omega n \log_{\omega M} n)$,表明当$\omega$为$M$的多项式时,无法实现渐近性能提升。
  • 比较排序($O(n(\log n + \omega))$)与排序网络($\Omega(\omega n \log n / \log(\omega M))$)之间的成本差距为$\min(\omega, \log n)/\log(\omega M)$,揭示了该模型中存在根本性的不对称性。
  • 对于$n \times n$的钻石DAG,下界为$\Omega(\omega n^2 / M)$,且仅靠快速读取无法实现渐近优化。
  • 编辑距离与LCS问题的ARAM成本为$O(\omega n^2 / (M \min(\omega^{1/3}, M^{1/2})))$,通过路径压缩技术优于一般DAG的下界。
  • MST的一种Borůvka算法变体实现$O(m \min(n/M, \log n) + \omega n)$的ARAM成本,时间复杂度为$O(Q(n,m) + n \log n)$,优于标准的写入密集型方法。
  • 对于单源最短路径问题,ARAM成本为$O(\min(n(\omega + m/M), (m+n\log n)\omega, m(\omega + \log n)))$,展示了工作量与写入减少之间的权衡。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。