跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 机器学习

arXiv:2402.04161 (cs)
[提交于 2024年2月6日 (v1),最后修订于 2025年7月21日 (此版本, v2)]

标题:Attention with Markov: A Framework for Principled Analysis of Transformers via Markov Chains

作者:Ashok Vardhan Makkuva, Marco Bondaschi, Adway Girish, Alliot Nagle, Martin Jaggi, Hyeji Kim, Michael Gastpar
查看论文《Attention with Markov: A Framework for Principled Analysis of Transformers via Markov Chains》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:Attention-based transformers have achieved tremendous success across a variety of disciplines including natural languages. To deepen our understanding of their sequential modeling capabilities, there is a growing interest in using Markov input processes to study them. A key finding is that when trained on first-order Markov chains, transformers with two or more layers consistently develop an induction head mechanism to estimate the in-context bigram conditional distribution. In contrast, single-layer transformers, unable to form an induction head, directly learn the Markov kernel but often face a surprising challenge: they become trapped in local minima representing the unigram distribution, whereas deeper models reliably converge to the ground-truth bigram. While single-layer transformers can theoretically model first-order Markov chains, their empirical failure to learn this simple kernel in practice remains a curious phenomenon. To explain this contrasting behavior of single-layer models, in this paper we introduce a new framework for a principled analysis of transformers via Markov chains. Leveraging our framework, we theoretically characterize the loss landscape of single-layer transformers and show the existence of global minima (bigram) and bad local minima (unigram) contingent on data properties and model architecture. We precisely delineate the regimes under which these local optima occur. Backed by experiments, we demonstrate that our theoretical findings are in congruence with the empirical results. Finally, we outline several open problems in this arena. Code is available at https://github.com/Bond1995/Markov .
评论: Published at ICLR 2025 under the title "Attention with Markov: A Curious Case of Single-Layer Transformers"
主题: 机器学习 (cs.LG); 计算与语言 (cs.CL); 信息论 (cs.IT); 信息论 (math.IT); 机器学习 (stat.ML)
引用方式: arXiv:2402.04161 [cs.LG]
  (或者 arXiv:2402.04161v2 [cs.LG] 对于此版本)
  https://doi.org/10.48550/arXiv.2402.04161

提交历史

来自:Marco Bondaschi
[v1] 2024年2月6日 星期二 17:18:59 UTC
[v2] 2025年7月21日 星期一 14:23:40 UTC
全文链接:

访问论文:

  • 查看原文 PDF
  • 中文 PDF (下批处理)
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

stat.ML
< 上一篇   |   下一篇 >
最新 | 近期 | 2025-07
切换浏览方式为:
cs
cs.LG
cs.CL
cs.IT
math.IT

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站