NITI:使用整数运算训练递归神经网络
NITI: Training Integer Neural Networks Using Integer-only Arithmetic
摘要:
虽然整数运算已被广泛采用以提高深度量化神经网络推理的性能,但训练仍然是主要使用浮点运算执行的任务。这是因为高动态范围和数值精度是大多数现代训练算法成功的关键。然而,由于其潜在的计算,存储和能量优势的硬件加速器,神经网络训练方法,可以实现低精度的整数运算仍然是一个积极的研究挑战。在本文中,我们提出了NITI,这是一个高效的深度神经网络训练框架,它将所有参数和中间值存储为整数,并使用整数运算进行专门计算。伪随机舍入方案,消除了外部随机数生成的需要,提出了促进从较宽的中间结果到低精度存储的转换。在此基础上,提出了一种基于整数运算的交叉熵损失反向传播算法。NITI的概念验证开源软件实现,利用现代GPU中的原生8位整数运算来实现端到端训练。与使用浮点存储和算术实现的等效训练设置相比,NITI使用8位整数存储和计算在MNIST和CIFAR10数据集上实现了可忽略不计的精度下降。在ImageNet上,使用8位数据路径进行权重累积需要16位整数。这实现了与全浮点实现相当的训练结果。
英文摘要:
While integer arithmetic has been widely adopted for improved performance in deep quantized neural network inference, training remains a task primarily executed using floating point arithmetic. This is because both high dynamic range and numerical accuracy are central to the success of most modern training algorithms. However, due to its potential for computational, storage and energy advantages in hardware accelerators, neural network training methods that can be implemented with low precision integer-only arithmetic remains an active research challenge. In this paper, we present NITI, an efficient deep neural network training framework that stores all parameters and intermediate values as integers, and computes exclusively with integer arithmetic. A pseudo stochastic rounding scheme that eliminates the need for external random number generation is proposed to facilitate conversion from wider intermediate results to low precision storage. Furthermore, a cross-entropy loss backpropagation scheme computed with integer-only arithmetic is proposed. A proof-of-concept open-source software implementation of NITI that utilizes native 8-bit integer operations in modern GPUs to achieve end-to-end training is presented. When compared with an equivalent training setup implemented with floating point storage and arithmetic, NITI achieves negligible accuracy degradation on the MNIST and CIFAR10 datasets using 8-bit integer storage and computation. On ImageNet, 16-bit integers are needed for weight accumulation with an 8-bit datapath. This achieves training results comparable to all-floating-point implementations.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。