Suppr超能文献

当使用正算数时,深度神经网络中激活函数的快速逼近。

Fast Approximations of Activation Functions in Deep Neural Networks when using Posit Arithmetic.

机构信息

Department of Information Engineering, Università di Pisa, Via Girolamo Caruso, 16, 56122 Pisa PI, Italy.

Medical Microinstruments (MMI) S.p.A., Via Sterpulino, 3, 56121 Pisa PI, Italy.

出版信息

Sensors (Basel). 2020 Mar 10;20(5):1515. doi: 10.3390/s20051515.

Abstract

With increasing real-time constraints being put on the use of Deep Neural Networks (DNNs) by real-time scenarios, there is the need to review information representation. A very challenging path is to employ an encoding that allows a fast processing and hardware-friendly representation of information. Among the proposed alternatives to the IEEE 754 standard regarding floating point representation of real numbers, the recently introduced Posit format has been theoretically proven to be really promising in satisfying the mentioned requirements. However, with the absence of proper hardware support for this novel type, this evaluation can be conducted only through a software emulation. While waiting for the widespread availability of the Posit Processing Units (the equivalent of the Floating Point Unit (FPU)), we can already exploit the Posit representation and the currently available Arithmetic-Logic Unit (ALU) to speed up DNNs by manipulating the low-level bit string representations of Posits. As a first step, in this paper, we present new arithmetic properties of the Posit number system with a focus on the configuration with 0 exponent bits. In particular, we propose a new class of Posit operators called L1 operators, which consists of fast and approximated versions of existing arithmetic operations or functions (e.g., hyperbolic tangent (TANH) and extended linear unit (ELU)) only using integer arithmetic. These operators introduce very interesting properties and results: (i) faster evaluation than the exact counterpart with a negligible accuracy degradation; (ii) an efficient ALU emulation of a number of Posits operations; and (iii) the possibility to vectorize operations in Posits, using existing ALU vectorized operations (such as the scalable vector extension of ARM CPUs or advanced vector extensions on Intel CPUs). As a second step, we test the proposed activation function on Posit-based DNNs, showing how 16-bit down to 10-bit Posits represent an exact replacement for 32-bit floats while 8-bit Posits could be an interesting alternative to 32-bit floats since their performances are a bit lower but their high speed and low storage properties are very appealing (leading to a lower bandwidth demand and more cache-friendly code). Finally, we point out how small Posits (i.e., up to 14 bits long) are very interesting while PPUs become widespread, since Posit operations can be tabulated in a very efficient way (see details in the text).

摘要

随着实时场景对深度神经网络 (DNN) 使用的实时约束不断增加,有必要审查信息表示。一个非常具有挑战性的方法是采用一种编码,允许快速处理和硬件友好的信息表示。在关于实数浮点表示的 IEEE 754 标准的替代方案中,最近提出的 Posit 格式在理论上被证明在满足上述要求方面非常有前途。然而,由于这种新型没有适当的硬件支持,这种评估只能通过软件仿真进行。在等待 Posit 处理单元(浮点处理单元 (FPU) 的等效物)广泛可用的同时,我们已经可以利用 Posit 表示和当前可用的算术逻辑单元 (ALU) 通过操作 Posit 的低级别位字符串表示来加速 DNN。作为第一步,在本文中,我们介绍了 Posit 数制的新算术特性,重点介绍了具有 0 指数位的配置。特别是,我们提出了一类新的 Posit 运算符,称为 L1 运算符,它仅使用整数算术由现有算术运算或函数(例如双曲正切 (TANH) 和扩展线性单元 (ELU))的快速和近似版本组成。这些运算符引入了非常有趣的特性和结果:(i) 比精确对应物更快的评估,精度降低可忽略不计;(ii) 使用现有 ALU 矢量化操作(例如 ARM CPU 的可扩展矢量扩展或 Intel CPU 的高级矢量扩展)对许多 Posit 操作进行高效的 ALU 仿真;(iii) 能够在 Posit 中对操作进行矢量化。作为第二步,我们在基于 Posit 的 DNN 上测试了所提出的激活函数,展示了 16 位到 10 位 Posit 如何精确替代 32 位浮点数,而 8 位 Posit 可能是 32 位浮点数的有趣替代品,因为它们的性能略低,但它们的高速和低存储特性非常吸引人(导致带宽需求降低和更适合缓存的代码)。最后,我们指出在 Posit 操作可以非常有效地制表(请参阅文本中的详细信息)时,小 Posit(即长度最长可达 14 位)非常有趣,而当 PPUs 变得广泛时更是如此。

https://cdn.ncbi.nlm.nih.gov/pmc/blobs/3355/7085555/15c2cb276c3b/sensors-20-01515-g001.jpg

文献AI研究员

20分钟写一篇综述,助力文献阅读效率提升50倍。

立即体验

用中文搜PubMed

大模型驱动的PubMed中文搜索引擎

马上搜索

文档翻译

学术文献翻译模型,支持多种主流文档格式。

立即体验