[论文解读] ZipML: An End-to-end Bitwise Framework for Dense Generalized Linear Models.
ZipML 为训练密集型广义线性模型引入了一种端到端的位级框架,数据、模型和梯度的每个分量仅使用最低 2 位。它实现了输入、梯度和模型的 16 倍压缩,同时保持收敛性和准确性,即使在 8 位或 6 位精度下,通过特定量化策略也能实现稳健训练。
We present ZipML, the first framework for training dense generalized linear models using end-to-end low-precision representation--in ZipML, all movements of data, including those for input samples, model, and gradients, are represented using as little as two bits per component. Within our framework, we have successfully compressed, separately, the input data by 16x, gradient by 16x, and model by 16x while still getting the same training result. Even for the most challenging datasets, we find that robust convergence can be ensured using only an end-to-end 8-bit representation or a 6-bit representation if only samples are quantized. Our work builds on previous research on using low-precision representations for gradient and model in the context of stochastic gradient descent. Our main technical contribution is a new set of techniques which allow the training samples to be processed with low precision, without affecting the convergence of the algorithm. In turn, this leads to a system where all data items move in a quantized, low precision format. In particular, we first establish that randomized rounding, while sufficient when quantizing the model and the gradients, is biased when quantizing samples, and thus leads to a different training result. We propose two new data representations which converge to the same solution as in the original data representation both in theory and empirically and require as little as 2-bits per component. As a result, if the original data is stored as 32-bit floats, we decrease the bandwidth footprint for each training iteration by up to 16x. Our results hold for models such as linear regression and least squares SVM. ZipML raises interesting theoretical questions related to the robustness of SGD to approximate data, model, and gradient representations. We conclude this working paper by a description of ongoing work extending these preliminary results.
研究动机与目标
- 通过启用低精度数据表示,解决分布式训练广义线性模型时通信和内存带宽的问题。
- 克服随机舍入在量化训练样本时引入的偏差,该偏差此前会破坏收敛性。
- 设计一种系统,使所有数据——输入、梯度和模型参数——均以低精度格式处理和传输,而不会牺牲训练准确性。
- 建立理论和实证条件,证明即使对输入数据使用低精度表示,仍可确保收敛到与全精度训练相同的解。
提出的方法
- 提出两种新颖的数据表示方法,通过校正随机舍入量化输入样本时引入的偏差,从而保持收敛性。
- 使用位级量化,以每个分量最低 2 位表示输入、梯度和模型参数,显著降低带宽和内存使用。
- 确保输入样本的量化不会改变随机梯度的期望值,从而保持 SGD 的收敛特性。
- 应用独立的量化策略:端到端 2 位训练中所有组件均使用 2 位表示;或仅输入使用 6 位,梯度和模型使用 8 位。
- 从理论和实证上验证所提出的表示方法可收敛到与全精度训练相同的解。
- 利用模型和梯度量化可容忍随机舍入的事实,但输入量化需要采用偏差校正方法以保持准确性。
实验结果
研究问题
- RQ1是否可以使用端到端的低精度表示(特别是每个分量最低 2 位)对密集型广义线性模型进行训练,而不会降低收敛性或准确性?
- RQ2为何随机舍入在应用于输入样本时会失败,这种偏差如何被校正以保持收敛性?
- RQ3输入、梯度和模型表示所需的最低精度是多少,才能在具有挑战性的数据集上确保稳健收敛?
- RQ4当所有数据移动都经过量化时,该框架能否保持与全精度训练相同的解?
主要发现
- ZipML 在保持与全精度训练相同训练结果的同时,实现了输入数据、梯度和模型参数的 16 倍压缩。
- 仅使用端到端 8 位表示即可确保稳健收敛,即使仅输入量化时使用 6 位表示也足够。
- 随机舍入应用于输入样本时会引入偏差,导致训练发散,ZipML 通过新型数据表示方法对此偏差进行了校正。
- 所提出的框架可实现最低每个分量仅 2 位的完整端到端训练,与 32 位浮点数相比,每轮迭代的带宽最多降低 16 倍。
- 理论和实证验证表明,新表示方法可收敛到与原始全精度训练过程相同的解。
- 该框架对线性回归和最小二乘 SVM 等模型有效,展示了在广义线性模型族中的广泛适用性。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。