arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2309.10975cs.LGstat.ML
收藏

SPFQ:一种用于神经网络量化的随机算法及其误差分析

SPFQ: A Stochastic Algorithm and Its Error Analysis for Neural Network Quantization

University of California San Diego(加州大学圣地亚哥分校);Halıcıoğlu Data Science Institute(哈利西奥卢数据科学研究所)

Jinjie Zhang, Rayan Saab

AI总结:

本文提出SPFQ随机量化算法,以线性计算复杂度量化大型神经网络权重,并首次在无限字母表条件下建立全网络误差界,证明过参数化程度越高误差线性衰减,且仅需约loglogN比特即可达到无限字母表情形下的误差界。

摘要:

量化是一种广泛使用的压缩方法,能够有效减少过参数化神经网络中的冗余。然而,由于深度神经网络中存在非凸损失函数和非线性激活,现有的量化技术往往缺乏全面的误差分析。本文提出了一种快速随机算法,用于对已充分训练的神经网络权重进行量化。我们的方法结合了贪心路径跟随机制与随机量化器。其计算复杂度仅随网络中权重数量线性增长,从而能够高效量化大型网络。重要的是,我们首次在无限字母表条件以及对权重和输入数据的最小假设下,建立了全网络误差界。作为该结果的一个应用,我们证明:当对具有高斯权重的多层网络进行量化时,相对平方量化误差随着过参数化程度的增加呈线性衰减。此外,我们证明,使用每个权重仅约 $\log\log N$ 比特,即可获得与无限字母表情形下等价的误差界,其中 $N$ 表示一层中神经元的最大数量。

英文摘要:

Quantization is a widely used compression method that effectively reduces redundancies in over-parameterized neural networks. However, existing quantization techniques for deep neural networks often lack a comprehensive error analysis due to the presence of non-convex loss functions and nonlinear activations. In this paper, we propose a fast stochastic algorithm for quantizing the weights of fully trained neural networks. Our approach leverages a greedy path-following mechanism in combination with a stochastic quantizer. Its computational complexity scales only linearly with the number of weights in the network, thereby enabling the efficient quantization of large networks. Importantly, we establish, for the first time, full-network error bounds, under an infinite alphabet condition and minimal assumptions on the weights and input data. As an application of this result, we prove that when quantizing a multi-layer network having Gaussian weights, the relative square quantization error exhibits a linear decay as the degree of over-parametrization increases. Furthermore, we demonstrate that it is possible to achieve error bounds equivalent to those obtained in the infinite alphabet case, using on the order of a mere $\log\log N$ bits per weight, where $N$ represents the largest number of neurons in a layer.

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

↑