arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2507.02782cs.LG
收藏

理解与改进循环模型的长度泛化

Understanding and Improving Length Generalization in Recurrent Models

Ricardo Buitrago Ruiz, Albert Gu

AI总结:

本文提出未探索状态假设解释循环模型长度泛化失败的原因,并通过用高斯噪声或不同序列最终状态初始化状态等简单干预措施,以极低成本实现超长序列的稳健长度泛化。

摘要:

最近,状态空间模型和线性注意力等循环模型因其序列长度上的线性复杂度而变得流行。得益于其循环特性,原则上它们可以处理任意长度的序列,但有时在超出其训练上下文长度时,性能会显著下降——即它们无法实现长度泛化。在这项工作中,我们提供了全面的实证和理论分析来支持未探索状态假设,该假设认为,当模型在训练期间仅暴露于所有可达状态分布的有限子集(即如果将循环应用于长序列时所达到的状态)时,模型就无法实现长度泛化。此外,我们研究了一些简单的训练干预措施,旨在增加模型训练状态的覆盖率,例如用高斯噪声或不同输入序列的最终状态来初始化状态。仅需500个训练后步骤(约预训练预算的0.1%),这些干预措施就能对长度比训练上下文长几个数量级的序列(例如2k到128k)实现长度泛化,并在长上下文任务中表现出改进的性能,从而为通用循环模型提供了一种简单有效的方法来实现稳健的长度泛化。

英文摘要:

Recently, recurrent models such as state space models and linear attention have become popular due to their linear complexity in the sequence length. Thanks to their recurrent nature, in principle they can process arbitrarily long sequences, but their performance sometimes drops considerably beyond their training context lengths-i.e. they fail to length generalize. In this work, we provide comprehensive empirical and theoretical analysis to support the unexplored states hypothesis, which posits that models fail to length generalize when during training they are only exposed to a limited subset of the distribution of all attainable states (i.e. states that would be attained if the recurrence was applied to long sequences). Furthermore, we investigate simple training interventions that aim to increase the coverage of the states that the model is trained on, e.g. by initializing the state with Gaussian noise or with the final state of a different input sequence. With only 500 post-training steps ($\sim 0.1\%$ of the pre-training budget), these interventions enable length generalization for sequences that are orders of magnitude longer than the training context (e.g. $2k\longrightarrow 128k$) and show improved performance in long context tasks, thus presenting a simple and efficient way to enable robust length generalization in general recurrent models.

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

↑