Skip to main content
QUICK REVIEW

[论文解读] Accelerating Generalized Linear Models with MLWeaving: A One-Size-Fits-All System for Any-precision Learning (Technical Report)

Zeke Wang, Kaan Kara|arXiv (Cornell University)|Mar 8, 2019
Neural Networks and Applications参考文献 132被引用 4
一句话总结

MLWeaving 通过采用位串行、转置内存布局和基于 FPGA 的硬件加速,实现了数据库中广义线性模型训练的动态、任意精度学习,从而加速了训练过程。它通过减少内存访问流量,并在单一硬件设计下实现 FPGA 上高效、精度自适应的随机梯度下降(SGD),相较于低精度 CPU 实现最高可提升 16 倍性能。

ABSTRACT

Learning from the data stored in a database is an important function increasingly available in relational engines. Methods using lower precision input data are of special interest given their overall higher efficiency but, in databases, these methods have a hidden cost: the quantization of the real value into a smaller number is an expensive step. To address the issue, in this paper we present MLWeaving, a data structure and hardware acceleration technique intended to speed up learning of generalized linear models in databases. ML-Weaving provides a compact, in-memory representation enabling the retrieval of data at any level of precision. MLWeaving also takes advantage of the increasing availability of FPGA-based accelerators to provide a highly efficient implementation of stochastic gradient descent. The solution adopted in MLWeaving is more efficient than existing designs in terms of space (since it can process any resolution on the same design) and resources (via the use of bit-serial multipliers). MLWeaving also enables the runtime tuning of precision, instead of a fixed precision level during the training. We illustrate this using a simple, dynamic precision schedule. Experimental results show MLWeaving achieves up to16 performance improvement over low-precision CPU implementations of first-order methods.

研究动机与目标

  • 解决数据库系统在机器学习训练过程中低精度数据处理带来的高内存开销问题。
  • 消除对预量化数据副本或每种精度级别均需独立微架构的需求。
  • 在 SGD 训练过程中实现动态精度选择,且不损失性能。
  • 在 FPGA 上实现硬件高效的同步 SGD,其效率可匹配或超过异步 CPU 方法。
  • 在单一系统中统一广义线性模型在所有精度级别下的数据表示与硬件加速。

提出的方法

  • MLWeaving 使用转置内存布局,将每个特征值的位存储在不同的内存段中,从而实现对任意精度下位级别的高效访问。
  • 它将数据序列化为位流格式,使硬件能够实现位串行乘法,从而在不同精度级别下高效计算梯度。
  • 基于 FPGA 的 SGD 加速器每周期处理一个位片,相比先前设计减少了资源占用并提高了时钟频率。
  • 通过在每个训练周期读取每个特征的更多或更少位,系统支持动态精度调节,实现在训练过程中自适应精度。
  • 该设计在 FPGA 上采用同步 SGD 执行模型,在保持快速收敛的同时实现高硬件效率。
  • 该设计与列存数据库(DoppioDB)集成,并利用片上内存以最小化片外数据移动。

实验结果

研究问题

  • RQ1单一硬件加速器是否能高效支持所有精度级别的随机梯度下降(SGD),而无需为每种精度级别设计独立的微架构?
  • RQ2数据库系统在使用低精度输入训练广义线性模型时,如何最小化内存访问流量和数据移动开销?
  • RQ3在 FPGA 上实现的同步 SGD 是否能达到与 CPU 异步 SGD 相当或更优的硬件效率,同时实现更快收敛?
  • RQ4何种内存中的数据布局可实现无需预量化即可在任意精度级别下高效、动态地检索数据?
  • RQ5在 FPGA 上进行位串行计算是否能在资源利用率和吞吐量方面优于传统的字并行方法,尤其在低精度学习场景下?

主要发现

  • MLWeaving 在广义线性模型训练中,相较于最先进的低精度一阶 CPU 实现,最高可实现 16 倍性能提升。
  • 基于 FPGA 的实现仅需先前 FPGA 加速器用于低精度 SGD 所需资源的三分之一。
  • 由于内存带宽利用率提升和时钟频率提高,该系统的数据处理速率是先前 FPGA 设计的两倍。
  • MLWeaving 支持训练过程中的动态精度调节,使收敛所需周期数少于异步 CPU 对手。
  • 转置位级内存布局使内存访问次数与精度级别成比例减少,精度降低时实现线性加速。
  • 该系统可支持高达 32K 维度的模型,利用片上内存,未来可在更大 FPGA 上进一步扩展。

更好的研究,从现在开始

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

无需绑定信用卡

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