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

刻画固定精度变换器语言模型的表达能力

Characterizing the Expressivity of Fixed-Precision Transformer Language Models

Jiaoda Li, Ryan Cotterell

AI总结:

本研究通过分析固定精度变换器的表达能力,发现其与线性时间逻辑中单一时间运算符的片段一致,并通过实验证明其在语言泛化中的表现。

摘要:

基于变换器的语言模型(LMs)在经验上取得了广泛的成功,但其理论表达能力仍仅部分被理解。在本工作中,我们分析了一种受限的理想化固定精度变换器,其严格未来掩码、软注意力和无位置编码。我们证明此类模型的表达能力与仅包含单一时间运算符(即过去运算符)的线性时间逻辑特定片段完全一致。我们进一步将此片段连接到形式语言理论、自动机理论和代数中已确立的类别,从而在这一理想化下建立了一个统一的框架来理解变换器的表达能力。最后,我们展示了与理论一致的实证结果:在其表达示能力内的语言上训练的变换器能够可靠地在序列长度上泛化,而在超出该能力的语言上则始终无法泛化。

英文摘要:

Transformer-based language models (LMs) have achieved widespread empirical success, but their theoretical expressive power remains only partially understood. In this work, we analyze a restricted idealization of fixed-precision transformers with strict future masking, soft attention, and no positional encodings. We establish that this class of models is exactly as expressive as a specific fragment of linear temporal logic that contains only a single temporal operator: the past operator. We further connect this fragment to established classes in formal language theory, automata theory, and algebra, yielding a unified framework for understanding transformer expressivity under this idealization. Finally, we present empirical results that align closely with our theory: transformers trained on languages within their characterized expressive capacity generalize reliably across sequence lengths, while they consistently fail to generalize on languages beyond it.

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

↑