arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2509.07025cs.LGcs.AI
收藏

1比特足矣:二值归一化神经网络

1 bit is all we need: binary normalized neural networks

Mauá Institute of Technology(马瑙理工学院);Nuclear and Energy Research Institute(核能与能源研究所);Polytechnic School – University of São Paulo(圣保罗理工学院 – 圣保罗大学)

Eduardo Lobo Lustoda Cabral, Paulo Pirozelli, Larissa Driemeier

AI总结:

本文提出仅用单比特参数的二值归一化层,构建模型在图像分类和语言建模中性能与32位模型相当,内存减少32倍,无需专用硬件,便于在廉价设备上部署。

摘要:

大型神经网络模型(特别是语言模型和基础图像模型)的规模日益增大,给部署带来了挑战,促使人们努力降低内存需求并提高计算效率。这些努力对于确保这些模型在各种应用中的实际部署和有效利用至关重要。在本工作中,开发了一种新型的神经网络层和模型,仅使用单比特参数。在这种新型模型中,所有层的所有参数(包括卷积核权重和偏置)仅取值为0或1。这种新型模型使用称为二值归一化层的层。这些二值归一化层可以是任意类型,如全连接、卷积、注意力等,它们由相应传统层的轻微变体组成。为了展示二值归一化层的有效性,配置了两个不同的模型来解决多类图像分类问题,以及一个用于预测序列下一个词元的语言解码器。用于图像分类的模型包含卷积层和全连接层,语言模型由带有多头注意力的Transformer块组成。结果表明,具有二值归一化层的模型与具有实数32位参数的等效模型相比,呈现出几乎相同的结果。二值归一化层使得开发出的模型比当前模型少使用32倍的内存,且性能相当。此外,二值归一化层可以很容易地在当前计算机上使用1比特数组实现,并且不需要开发专用的电子硬件。这种新型层为大型神经网络模型开启了新时代,这些模型具有降低的内存需求,可以在简单且廉价的硬件(如移动设备或仅使用CPU)上部署。

英文摘要:

The increasing size of large neural network models, specifically language models and foundational image models, poses deployment challenges, prompting efforts to reduce memory requirements and enhance computational efficiency. These efforts are critical to ensure practical deployment and effective utilization of these models across various applications. In this work, a novel type of neural network layers and models is developed that uses only single-bit parameters. In this novel type of models all parameters of all layers, including kernel weights and biases, only have values equal to zero or one. This novel type of models uses layers named as binary normalized layer. These binary normalized layers can be of any type, such as fully connected, convolutional, attention, etc., and they consist of slight variations of the corresponding conventional layers. To show the effectiveness of the binary normalized layers, two different models are configured to solve a multiclass image classification problem and a language decoder to predict the next token of a sequence. The model to solve the image classification has convolutional and fully connected layers, and the language model is composed of transformer blocks with multi-head attention. The results show that models with binary normalized layers present almost the same results obtained by equivalent models with real 32-bit parameters. The binary normalized layers allow to develop models that use 32 times less memory than current models and have equivalent performance. Besides, the binary normalized layers can be easily implemented on current computers using 1-bit arrays, and do not require the development of dedicated electronic hardware. This novel type of layers opens a new era for large neural network models with reduced memory requirements that can be deployed using simple and cheap hardware, such as mobile devices or only cpus.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑