arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.17770cs.LGcond-mat.dis-nn
收藏

小奇异值的重要性:Transformer模型的随机矩阵分析

Small Singular Values Matter: A Random Matrix Analysis of Transformer Models

Center for Scalable Data Analytics and Artificial Intelligence(可扩展数据与人工智能研究中心);Leipzig University(莱比锡大学);Institute for Theoretical Physics(理论物理研究所)

Max Staats, Matthias Thamm, Bernd Rosenow

AI总结:

本文通过随机矩阵理论分析Transformer权重矩阵的奇异值谱,发现小奇异值同样承载重要信息,并据此为基于SVD的大语言模型剪枝与压缩提供理论与实用指导。

摘要:

本文分析预训练Transformer模型中权重矩阵的奇异值谱,以理解信息如何在谱的两端被存储。以随机矩阵理论(RMT)作为零信息假设,我们将与RMT一致视为随机性的证据,将偏离视为学习的证据。令人惊讶的是,我们观察到不仅在最大的奇异值——通常的离群值——中存在明显的RMT偏离,而且在最小的奇异值中也存在明显偏离。将相关奇异向量与激活协方差矩阵的特征向量进行比较表明,在RMT被违反的地方存在相当大的重叠。因此,数据中的重要方向既被大奇异值及其向量捕获,也被小奇异值及其向量捕获。我们从经验上证实了这一点:将偏离RMT的奇异值置零对语言模型困惑度的提升远大于移除谱主体中的值,并且在微调后,最小的十分位可以成为谱中第三最具影响力的部分。为了解释与小奇异值相关的向量如何能比与较大值相关的向量携带更多信息,我们提出了一个线性随机矩阵模型。我们的发现凸显了谱低端被忽视的重要性,并为基于SVD的大语言模型剪枝和压缩提供了理论和实践指导。

英文摘要:

This work analyzes singular-value spectra of weight matrices in pretrained transformer models to understand how information is stored at both ends of the spectrum. Using Random Matrix Theory (RMT) as a zero information hypothesis, we associate agreement with RMT as evidence of randomness and deviations as evidence for learning. Surprisingly, we observe pronounced departures from RMT not only among the largest singular values -- the usual outliers -- but also among the smallest ones. A comparison of the associated singular vectors with the eigenvectors of the activation covariance matrices shows that there is considerable overlap wherever RMT is violated. Thus, significant directions in the data are captured by small singular values and their vectors as well as by the large ones. We confirm this empirically: zeroing out the singular values that deviate from RMT raises language-model perplexity far more than removing values from the bulk, and after fine-tuning the smallest decile can be the third most influential part of the spectrum. To explain how vectors linked to small singular values can carry more information than those linked to larger values, we propose a linear random-matrix model. Our findings highlight the overlooked importance of the low end of the spectrum and provide theoretical and practical guidance for SVD-based pruning and compression of large language models.

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

↑