揭示了数据内在维度如何决定Transformer模型的缩放规律
Understanding Scaling Laws with Statistical and Approximation Theory for Transformer Neural Networks on Intrinsically Low-dimensional Data
- 基于低维流形假设,构建了Transformer的统计估计与近似理论
- 理论预测误差随数据量和模型规模呈幂律下降,指数由数据内在维数决定
- 适用于理解大语言模型训练中的缩放现象,尤其适合研究者与算法工程师
训练深度神经网络时,模型泛化误差常表现出依赖于模型规模和数据规模的幂律缩放。最典型的例子是基于Transformer的大语言模型,在万亿级文本令牌上训练数十亿参数的网络。尽管广泛关注,但对Transformer缩放规律为何存在的严格理论解释仍缺失。本文针对输入数据集中在低维流形上的情况,建立了新的统计估计与数学逼近理论。理论预测:对于Transformer,泛化误差与训练数据量及网络规模之间存在幂律关系,幂指数取决于数据的内在维数 $d$。值得注意的是,所构造的模型架构极浅,深度仅需关于 $d$ 的对数级别。通过利用流形假设下的低维数据结构,我们从数据几何角度解释了变压器缩放规律。此外,我们在自然语言数据集上训练大语言模型进行实证验证,发现观测到的缩放规律与理论预测高度一致。结果表明,数据内在维数是影响变压器缩放规律的关键因素,兼具理论与实践意义。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。