Transformer工作记忆实现正则语言推理与自然语言长度外推
Transformer Working Memory Enables Regular Language Reasoning and Natural Language Length Extrapolation
AI总结:
针对Transformer难以建模正则语言的问题,提出RegularGPT变体,通过权重共享、自适应深度和滑动膨胀注意力构建工作记忆,成功建模PARITY等正则语言,并在长度外推中重现局部窗口注意力效应。
摘要:
与循环模型不同,传统观点认为Transformer无法完美建模正则语言。受工作记忆概念的启发,我们提出了一种名为RegularGPT的新型Transformer变体。通过其新颖的权重共享、自适应深度和滑动膨胀注意力组合,RegularGPT沿深度维度构建工作记忆,从而能够高效且成功地建模诸如PARITY之类的正则语言。我们进一步在自然语言长度外推任务上测试RegularGPT,并惊讶地发现它重新发现了先前工作中被认为对长度外推至关重要的局部窗口注意力效应。
英文摘要:
Unlike recurrent models, conventional wisdom has it that Transformers cannot perfectly model regular languages. Inspired by the notion of working memory, we propose a new Transformer variant named RegularGPT. With its novel combination of Weight-Sharing, Adaptive-Depth, and Sliding-Dilated-Attention, RegularGPT constructs working memory along the depth dimension, thereby enabling efficient and successful modeling of regular languages such as PARITY. We further test RegularGPT on the task of natural language length extrapolation and surprisingly find that it rediscovers the local windowed attention effect deemed necessary in prior work for length extrapolation.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。