Skip to main content
QUICK REVIEW

[论文解读] Fast offset corrected in-memory training

Malte J. Rasch, Fabio Carta|arXiv (Cornell University)|Mar 8, 2023
Advanced Memory and Neural Computing被引用 4
一句话总结

本文提出了两种新型的内存内训练算法——Chopped-TTv2(c-TTv2)和带动态参考的模拟梯度累积(AGAD),通过使用斩波器和实时参考值估计,校正电阻交叉条阵列中的器件偏移误差。两种算法在保持 O(n) 时间复杂度的同时,即使在器件非理想性和偏移变化的情况下,也能实现仅使用 20 个电导状态的高精度训练。

ABSTRACT

In-memory computing with resistive crossbar arrays has been suggested to accelerate deep-learning workloads in highly efficient manner. To unleash the full potential of in-memory computing, it is desirable to accelerate the training as well as inference for large deep neural networks (DNNs). In the past, specialized in-memory training algorithms have been proposed that not only accelerate the forward and backward passes, but also establish tricks to update the weight in-memory and in parallel. However, the state-of-the-art algorithm (Tiki-Taka version 2 (TTv2)) still requires near perfect offset correction and suffers from potential biases that might occur due to programming and estimation inaccuracies, as well as longer-term instabilities of the device materials. Here we propose and describe two new and improved algorithms for in-memory computing (Chopped-TTv2 (c-TTv2) and Analog Gradient Accumulation with Dynamic reference (AGAD)), that retain the same runtime complexity but correct for any remaining offsets using choppers. These algorithms greatly relax the device requirements and thus expanding the scope of possible materials potentially employed for such fast in-memory DNN training.

研究动机与目标

  • 解决内存内深度学习训练中器件偏移误差这一关键挑战,该问题限制了电阻交叉条阵列的实际应用。
  • 克服最先进 TTv2 算法对理想对称点(SP)的依赖,该依赖对编程不准确性和材料不稳定性高度敏感。
  • 通过在偏移变化和非理想开关行为下实现稳健训练,降低对器件材料的严苛要求。
  • 通过保持 O(n) 时间复杂度,同时提升梯度更新精度,确保高计算效率。
  • 通过减少所需电导状态数量(例如 20 个状态),使当前及新兴电阻存储技术下的内存内训练成为可能。

提出的方法

  • c-TTv2 利用斩波器在读出过程中翻转梯度信号的符号,实现在无需稳定对称点的情况下进行偏移校正。
  • AGAD 通过最近梯度信号的滚动平均值实时估计参考值,消除了对专用参考交叉条阵列的需求。
  • 两种算法均保留了 TTv2 的核心架构,用于内存内前向传播和反向传播,以及使用脉冲重合计算外积梯度。
  • 梯度累积以列为基础在数字域进行,同时应用噪声滤波以稳定更新过程。
  • 算法使用数字隐藏矩阵 H 存储累积梯度,仅在达到阈值时才触发权重更新。
  • c-TTv2 通过在数字累积前反转梯度信号符号来校正偏移,而 AGAD 则通过计算动态参考值来归一化信号。
Figure 1: Physical implementaton of in-memory matrix-vector multiplication ( MVM ) for forward and backward passes and outer product update according to Gokmen & Vlasov ( 2016 ) .
Figure 1: Physical implementaton of in-memory matrix-vector multiplication ( MVM ) for forward and backward passes and outer product update according to Gokmen & Vlasov ( 2016 ) .

实验结果

研究问题

  • RQ1是否可以在不依赖理想对称点的前提下,使内存内训练对器件偏移误差具有鲁棒性?
  • RQ2是否可以在保持高训练精度的同时减少所需电导状态的数量?
  • RQ3偏移变化和材料不稳定性对现有内存内训练算法(如 TTv2)的性能有何影响?
  • RQ4动态参考值估计是否能消除对专用参考交叉条阵列的需求并提升鲁棒性?
  • RQ5在真实器件非理想性条件下,c-TTv2 和 AGAD 在仅使用 20 个电导状态时,能在多大程度上实现接近浮点精度的性能?

主要发现

  • c-TTv2 能有效校正高达一定阈值的参考偏移误差,与 TTv2 相比显著提升了鲁棒性。
  • AGAD 对参考偏移完全不敏感,在所有测试的 DNN 和器件模型中均持续优于 TTv2 和 c-TTv2。
  • 在仅使用 20 个电导状态时,c-TTv2 和 AGAD 的测试误差接近或低于浮点基准,尤其在权重交叉条阵列的对称点得到校正时表现更优。
  • AGAD 的性能随电导状态数量的增加而提升,表明其可扩展至更先进的材料。
  • 即使在无偏移误差的情况下,两种新算法也优于 TTv2,证明其在梯度计算和更新精度方面具有内在优势。
  • 结果证实,当结合偏移校正技术时,20 个状态已足够实现高精度内存内训练,从而拓展了电阻交叉条阵列的可行材料范围。
Figure 2: Improved in-memory training algorithms, c-TTv2 and AGAD . The blue color indicates equations unique and in addition for AGAD . The reference subtraction (in red) is not needed for AGAD . Removing blue equations and fixing the choppers recovers TTv2 .
Figure 2: Improved in-memory training algorithms, c-TTv2 and AGAD . The blue color indicates equations unique and in addition for AGAD . The reference subtraction (in red) is not needed for AGAD . Removing blue equations and fixing the choppers recovers TTv2 .

更好的研究,从现在开始

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

无需绑定信用卡

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