Optimality and NP-Hardness of Transformers in Learning Markovian Dynamical Functions
Not on the map. Why?
Abstract (arXiv)
Transformer architectures can solve unseen tasks based on input-output pairs in a given prompt due to in-context learning (ICL). Existing theoretical studies on ICL have mainly focused on linear regression tasks, often with i.i.d. inputs. To understand how transformers express ICL when modeling dynamics-driven functions, we investigate Markovian function learning through a structured ICL setup, where we characterize the loss landscape to reveal underlying optimization behaviors. Specifically, we (1) provide the closed-form expression of the global minimizer (in an enlarged parameter space) for a single-layer linear self-attention (LSA) model; (2) prove that recovering transformer parameters that realize the optimal solution is NP-hard in general, revealing a fundamental limitation of one-layer LSA in representing structured dynamical functions; and (3) supply a novel interpretation of a multilayer LSA as performing preconditioned gradient descent to optimize multiple objectives beyond the square loss. These theoretical results are numerically validated using simplified transformers.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 39 of its 49 references that are in the map. First posted on arXiv 21 Oct 2025.
Builds on
39 of 49 references.
References · 39
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023GPT-4 Technical Reportcited by 18,132
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2020Scaling Laws for Neural Language Modelscited by 6,411
- 2021Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processingcited by 2,222
- 2021Scaling Language Models: Methods, Analysis & Insights from Training Gophercited by 1,199
- 2022In-context Learning and Induction Headscited by 930
- 2022Transformers learn in-context by gradient descentcited by 714
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
- 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
- 2023Trained Transformers Learn Linear Models In-Contextcited by 331
27 more
- 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 291
- 2023Transformers learn to implement preconditioned gradient descent for in-context learningcited by 274
- 2023Looped Transformers as Programmable Computerscited by 224
- 2023Transformers as Algorithms: Generalization and Stability in In-context Learningcited by 220
- 2023One Step of Gradient Descent is Provably the Optimal In-Context Learner with One Layer of Linear Self-Attentioncited by 168
- 2023Birth of a Transformer: A Memory Viewpointcited by 154
- 2023Representational Strengths and Limitations of Transformerscited by 132
- 2024The Evolution of Statistical Induction Heads: In-Context Learning Markov Chainscited by 115
- 2024How Transformers Learn Causal Structure with Gradient Descentcited by 114
- 2023In-Context Convergence of Transformerscited by 112
- 2016Towards better decoding and language model integration in sequence to sequence modelscited by 100
- 2022Vision Transformers provably learn spatial structurecited by 92
- 2023How Do Transformers Learn Topic Structure: Towards a Mechanistic Understandingcited by 85
- 2024Transformers, parallel computation, and logarithmic depthcited by 75
- 2023How Do Transformers Learn In-Context Beyond Simple Functions? A Case Study on Learning with Representationscited by 72
- 2024Can Looped Transformers Learn to Implement Multi-step Gradient Descent for In-context Learning?cited by 60
- 2023Do Transformers Parse while Predicting the Masked Word?cited by 48
- 2024Unveiling Induction Heads: Provable Training Dynamics and Feature Learning in Transformerscited by 46
- 2024Attention with Markov: A Framework for Principled Analysis of Transformers via Markov Chainscited by 39
- 2024How Do Nonlinear Transformers Learn and Generalize in In-Context Learning?cited by 35
- 2025Transformers Learn to Implement Multi-step Gradient Descent with Chain of Thoughtcited by 32
- 2024Toward a Theory of Tokenization in LLMscited by 28
- 2024Transformers on Markov Data: Constant Depth Sufficescited by 26
- 2024Fine-grained Analysis of In-context Linear Estimation: Data, Architecture, and Beyondcited by 22
- 2024How do Transformers perform In-Context Autoregressive Learning?cited by 16
- 2024Local to Global: Learning Dynamics and Effect of Initialization for Transformerscited by 11
- 2024Provably Transformers Harness Multi-Concept Word Semantics for Efficient In-Context Learningcited by 6
Built on by
Not cited yet.