arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2505.02809cs.LGmath.OCstat.ML
收藏

迈向量化神经网络的Hessian结构

Towards Quantifying the Hessian Structure of Neural Networks

The Chinese University of Hong Kong, Shenzhen(香港中文大学(深圳));Shenzhen Research Institute of Big Data(深圳大数据研究院)

Zhaorui Dong, Yushun Zhang, Jianfeng Yao, Ruoyu Sun

AI总结:

本文通过随机矩阵理论分析随机初始化下的线性模型和单隐层网络,证明类别数C增大是神经网络Hessian矩阵呈现近似块对角结构的主要驱动因素,并为理解大语言模型的Hessian结构提供新视角。

摘要:

实证研究报告称,神经网络(NNs)的Hessian矩阵呈现出近似块对角结构,但其理论基础仍不清楚。在本工作中,我们揭示了所报告的Hessian结构来源于两种力量的混合:一种根植于架构设计的“静态力”,以及一种由训练产生的“动态力”。随后,我们在随机初始化条件下对“静态力”进行了严格的理论分析。我们研究了用于具有$C$个类别的分类任务的线性模型和单隐层网络。通过利用随机矩阵理论,我们比较了对角块和非对角Hessian块的极限分布,发现当$C$变大时会出现块对角结构。我们的发现表明,$C$是近似块对角结构的一个主要驱动因素。这些结果可能为大型语言模型(LLMs)的Hessian结构提供新的见解,因为LLMs通常以超过$10^4$的大$C$运行。

英文摘要:

Empirical studies reported that the Hessian matrix of neural networks (NNs) exhibits a near-block-diagonal structure, yet its theoretical foundation remains unclear. In this work, we reveal that the reported Hessian structure comes from a mixture of two forces: a ``static force'' rooted in the architecture design, and a ''dynamic force'' arisen from training. We then provide a rigorous theoretical analysis of ''static force'' at random initialization. We study linear models and 1-hidden-layer networks for classification tasks with $C$ classes. By leveraging random matrix theory, we compare the limit distributions of the diagonal and off-diagonal Hessian blocks and find that the block-diagonal structure arises as $C$ becomes large. Our findings reveal that $C$ is one primary driver of the near-block-diagonal structure. These results may shed new light on the Hessian structure of large language models (LLMs), which typically operate with a large $C$ exceeding $10^4$.

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

↑