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

理解基于内在低维数据的Transformer神经网络的统计与逼近理论缩放定律

Understanding Scaling Laws with Statistical and Approximation Theory for Transformer Neural Networks on Intrinsically Low-dimensional Data

Georgia Institute of Technology(佐治亚理工学院)

Alex Havrilla, Wenjing Liao

AI总结:

针对Transformer缩放定律缺乏严格理论解释的问题,本文基于低维流形假设建立统计估计与逼近理论,证明了泛化误差遵循由数据内在维度决定的幂律,并在浅层架构下得到实验验证。

摘要:

在训练深度神经网络时,模型的泛化误差通常被观察到遵循依赖于模型大小和数据大小的幂律缩放定律。此类缩放定律最著名的例子可能是基于Transformer的大型语言模型,其中具有数十亿参数的网络在数万亿个文本token上进行训练。然而,尽管持续受到广泛关注,对于Transformer缩放定律为何存在,目前仍缺乏严格的理解。为了回答这一问题,当输入数据集中于低维流形时,我们为Transformer建立了新颖的统计估计和数学逼近理论。我们的理论预测,Transformer的泛化误差与训练数据大小和网络大小之间存在幂律关系,其中幂指数取决于训练数据的内在维度$d$。值得注意的是,所构建的模型架构是浅层的,仅需对数于$d$的深度。通过利用流形假设下的低维数据结构,我们能够以尊重数据几何特性的方式解释Transformer缩放定律。此外,我们通过在自然语言数据集上训练LLM,用经验观测检验了我们的理论。我们发现,观测到的经验数据缩放定律与我们的理论预测高度一致。总而言之,这些结果严格表明,数据的内在维度是影响理论和实践中Transformer缩放定律的关键量。

英文摘要:

When training deep neural networks, a model's generalization error is often observed to follow a power scaling law dependent both on the model size and the data size. Perhaps the best known example of such scaling laws are for transformer-based large language models, where networks with billions of parameters are trained on trillions of tokens of text. Yet, despite sustained widespread interest, a rigorous understanding of why transformer scaling laws exist is still missing. To answer this question, we establish novel statistical estimation and mathematical approximation theories for transformers when the input data are concentrated on a low-dimensional manifold. Our theory predicts a power law between the generalization error and both the training data size and the network size for transformers, where the power depends on the intrinsic dimension $d$ of the training data. Notably, the constructed model architecture is shallow, requiring only logarithmic depth in $d$. By leveraging low-dimensional data structures under a manifold hypothesis, we are able to explain transformer scaling laws in a way which respects the data geometry. Moreover, we test our theory with empirical observation by training LLMs on natural language datasets. We find the observed empirical data scaling laws closely agree with our theoretical predictions. Taken together, these results rigorously show the intrinsic dimension of data to be a crucial quantity affecting transformer scaling laws in both theory and practice.

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

↑