Transformer在长序列状态跟踪上数据效率差,不如循环网络共享经验。
On the "Induction Bias" in Sequence Models
- 对比Transformer与RNN在不同序列长度下的训练数据需求
- Transformer随序列变长需更多数据,且无法跨长度复用经验
- 适合关注模型泛化能力与数据效率的研究者
尽管基于Transformer的语言模型在实践中表现优异,但近期研究质疑其在状态跟踪任务中的能力。本文通过大规模实验,比较了Transformer与循环神经网络(RNN)在多种监督模式下的数据效率。结果表明,随着状态空间大小和序列长度增加,Transformer所需训练数据的增长速度远超RNN。进一步分析显示,Transformer在不同序列长度间几乎无法共享学习到的状态跟踪机制,表现为长度无关的权重共享极弱甚至有害;而循环模型则能有效通过跨长度权重共享实现知识迁移,使一种长度的数据提升其他长度的表现。这些发现表明,即使在分布一致的情况下,状态跟踪仍是Transformer的核心挑战。
原文摘要 · Abstract (English)
Despite the remarkable practical success of transformer-based language models, recent work has raised concerns about their ability to perform state tracking. In particular, a growing body of literature has shown this limitation primarily through failures in out-of-distribution (OOD) generalization, such as length extrapolation. In this work, we shift attention to the in-distribution implications of these limitations. We conduct a large-scale experimental study of the data efficiency of transformers and recurrent neural networks (RNNs) across multiple supervision regimes. We find that the amount of training data required by transformers grows much more rapidly with state-space size and sequence length than for RNNs. Furthermore, we analyze the extent to which learned state-tracking mechanisms are shared across different sequence lengths. We show that transformers exhibit negligible or even detrimental weight sharing across lengths, indicating that they learn length-specific solutions in isolation. In contrast, recurrent models exhibit effective amortized learning by sharing weights across lengths, allowing data from one sequence length to improve performance on others. Together, these results demonstrate that state tracking remains a fundamental challenge for transformers, even when training and evaluation distributions match.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。