arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2505.24009cs.CLcs.AIcs.LG
收藏

Transformer层的多样性:参数缩放定律的一个方面

Diversity of Transformer Layers: One Aspect of Parameter Scaling Laws

Nara Institute of Science and Technology(奈良科学技術大學);RIKEN Center for Advanced Intelligence Project(RIKEN先進 Intelligenceプロジェクト);Chungnam National University(Chungnam國立大學);The University of Tokyo(東京大學);Institute of Science Tokyo(東京科學研究院)

Hidetaka Kamigaito, Ying Zhang, Jingun Kwon, Katsuhiko Hayashi, Manabu Okumura, Taro Watanabe

AI总结:

本文通过偏置-多样性分解与信息论多样性分析Transformer层,揭示层数增加仅在新增层行为多样时提升性能,且增益具有子模性。

摘要:

Transformers在广泛任务中表现出色,现已成为大型语言模型(LLM)的主导骨干架构。正如近期关于参数缩放定律的研究所表明的,增加参数规模可以提升其任务解决性能。尽管近期的机制可解释性研究通过分析残差流加深了我们对Transformers内部行为的理解,但这些内部机制与参数缩放定律之间的关系仍不明确。为弥合这一差距,我们聚焦于主要决定Transformers参数规模的层及其大小。为此,我们首先通过偏置-多样性分解,对残差流内的各层进行理论研究。该分解将(i)偏置(每层输出相对于真实值的误差)与(ii)多样性(表示各层输出彼此之间的差异程度)分离开来。在该理论下分析Transformers表明,当各个层做出接近正确答案的预测并保持相互多样时,性能会提升。我们表明,当各个层的输出远离真实值时,多样性变得尤为关键。最后,我们引入一种信息论意义上的多样性,并展示主要发现:只有当新增层表现不同,即具有多样性时,增加层才会提升性能。我们还揭示,增加层数带来的性能增益呈现子模性:随着额外层增加,边际改进递减,这与参数缩放定律预测的对数收敛相呼应。在多种LLM上针对多个语义理解任务进行的实验,从经验上证实了本研究得出的理论性质。

英文摘要:

Transformers deliver outstanding performance across a wide range of tasks and are now a dominant backbone architecture for large language models (LLMs). Their task-solving performance is improved by increasing parameter size, as shown in the recent studies on parameter scaling laws. Although recent mechanistic-interpretability studies have deepened our understanding of the internal behavior of Transformers by analyzing their residual stream, the relationship between these internal mechanisms and the parameter scaling laws remains unclear. To bridge this gap, we focus on layers and their size, which mainly decide the parameter size of Transformers. For this purpose, we first theoretically investigate the layers within the residual stream through a bias-diversity decomposition. The decomposition separates (i) bias, the error of each layer's output from the ground truth, and (ii) diversity, which indicates how much the outputs of each layer differ from each other. Analyzing Transformers under this theory reveals that performance improves when individual layers make predictions close to the correct answer and remain mutually diverse. We show that diversity becomes especially critical when individual layers' outputs are far from the ground truth. Finally, we introduce an information-theoretic diversity and show our main findings that adding layers enhances performance only when those layers behave differently, i.e., are diverse. We also reveal the performance gains from increasing the number of layers exhibit submodularity: marginal improvements diminish as additional layers increase, mirroring the logarithmic convergence predicted by the parameter scaling laws. Experiments on multiple semantic-understanding tasks with various LLMs empirically confirm the theoretical properties derived in this study.

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

↑