arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2405.17767cs.LGcs.CLstat.ML
收藏

语言崩溃:(大型)语言模型中的神经崩溃

Linguistic Collapse: Neural Collapse in (Large) Language Models

University of Toronto(多伦多大学);Vector Institute(向量研究所)

Robert Wu, Vardan Papyan

AI总结:

本文研究语言模型中的神经崩溃($\mathcal{NC}$)现象,发现因果语言模型(CLMs)随规模和正则化发展的$\mathcal{NC}$特性与泛化性相关,且存在独立于规模的$\mathcal{NC}$-泛化关联,强调$\mathcal{NC}$的普遍性并启发后续研究。

摘要:

神经崩溃($\mathcal{NC}$)是分类任务中观察到的一种现象,即顶层表示会坍缩到其类均值,这些类均值具有等范数、等角性且与分类器对齐。这些与泛化性和鲁棒性相关的行为会在特定条件下显现:模型以零损失为目标训练,使用属于平衡类别的无噪声标签,且类别数量不超过模型的隐藏维度。近期研究在缺少一个或多个上述条件的情况下探索了$\mathcal{NC}$,以扩展和利用理想几何结构的相关优势。语言建模是一个有趣的前沿领域,因为“通过token预测进行训练”构成了一个不满足任何上述条件的分类任务:词汇表不平衡且维度超过嵌入维度;不同token可能对应相似的上下文嵌入;特别是大型语言模型(LLMs)通常仅训练几个epoch。本文实证研究了因果语言模型(CLMs)的架构和训练规模对其向$\mathcal{NC}$发展的影响。我们发现,随规模(和正则化)发展的$\mathcal{NC}$特性与泛化性相关。此外,有证据表明$\mathcal{NC}$与泛化性之间存在独立于规模的某种关系。因此,我们的工作强调了$\mathcal{NC}$的普遍性,因为它扩展到了语言建模这一新颖且更具挑战性的场景。在后续研究中,我们旨在启发对该现象的进一步研究,以加深对LLMs(以及更广泛的神经网络)的理解,并基于$\mathcal{NC}$相关特性改进现有架构。我们的代码托管在GitHub上,地址为https://github.com/rhubarbwu/linguistic-collapse。

英文摘要:

Neural collapse ($\mathcal{NC}$) is a phenomenon observed in classification tasks where top-layer representations collapse into their class means, which become equinorm, equiangular and aligned with the classifiers. These behaviours -- associated with generalization and robustness -- would manifest under specific conditions: models are trained towards zero loss, with noise-free labels belonging to balanced classes, which do not outnumber the model's hidden dimension. Recent studies have explored $\mathcal{NC}$ in the absence of one or more of these conditions to extend and capitalize on the associated benefits of ideal geometries. Language modelling presents a curious frontier, as \textit{training by token prediction} constitutes a classification task where none of the conditions exist: the vocabulary is imbalanced and exceeds the embedding dimension; different tokens might correspond to similar contextual embeddings; and large language models (LLMs) in particular are typically only trained for a few epochs. This paper empirically investigates the impact of scaling the architectures and training of causal language models (CLMs) on their progression towards $\mathcal{NC}$. We find that $\mathcal{NC}$ properties that develop with scale (and regularization) are linked to generalization. Moreover, there is evidence of some relationship between $\mathcal{NC}$ and generalization independent of scale. Our work thereby underscores the generality of $\mathcal{NC}$ as it extends to the novel and more challenging setting of language modelling. Downstream, we seek to inspire further research on the phenomenon to deepen our understanding of LLMs -- and neural networks at large -- and improve existing architectures based on $\mathcal{NC}$-related properties. Our code is hosted on GitHub at https://github.com/rhubarbwu/linguistic-collapse .

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

↑