arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.00258cs.LG
收藏

延迟注意力训练提升Transformer--RNN混合模型的长度泛化能力

Delayed Attention Training Improves Length Generalization in Transformer--RNN Hybrids

University of Toronto(多伦多大学);Qualcomm AI Research(高通AI研究)

Buu Phan, Reza Ebrahimi, Sanjay Haresh, Roland Memisevic

AI总结:

针对序列模型在复合任务中存在能力互补短板,本研究构建Transformer-RNN混合模型并提出延迟注意力层训练的策略,缓解了Transformer组件依赖捷径的问题,显著提升了模型的长度泛化能力,在三倍长序列上准确率超90%。

摘要:

我们研究序列模型在涉及状态跟踪与联想回忆的复合问题上的长度泛化能力。现有研究发现,循环网络擅长状态跟踪但在回忆任务上表现不佳,而Transformer在回忆任务表现优异却无法将状态跟踪能力扩展到更长序列。受这两种架构互补优势的启发,我们构建了融合循环组件与基于注意力组件的混合模型,并在组合任务上训练它们,以评估两种能力是否都能得以保留。我们的结果表明,在这类混合模型中,Transformer组件倾向于利用捷径解,导致长度泛化能力较差。我们将这种对捷径的依赖认定为关键障碍,并提出了一种简单却有效的训练策略——延迟注意力层的训练——该策略可缓解这一效应,并显著提升长度泛化性能。我们的实验显示,该方法使混合模型在长度为训练所用序列三倍的混合序列上,实现了近乎完美的准确率(>90%)。

英文摘要:

We study length generalization in sequence models on a composite problem involving both state tracking and associative recall. Prior work finds that recurrent networks handle state tracking well but struggle with recall, whereas Transformers excel at recall yet fail to extend state-tracking capabilities to longer sequences. Motivated by the complementary strengths of these architectures, we construct hybrid models integrating recurrent and attention-based components, and train them on the combined task to evaluate whether both capabilities can be preserved. Our results reveal that, in such hybrids, the Transformer component tends to exploit shortcut solutions, leading to poor length generalization. We identify this shortcut reliance as a key obstacle and propose a simple yet effective training strategy -- delaying the training of the attention layers -- that mitigates this effect and significantly improves length generalization performance. Our experiments show that this approach enables hybrid models to achieve near-perfect accuracy ($>90\%$) on hybrid sequences three times longer than those used during training.

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

↑