mlsanityData to 7 Oct 2026

Optimality and NP-Hardness of Transformers in Learning Markovian Dynamical Functions

arXiv 2510.18638 ↗First posted 21 Oct 2025cs.LG stat.MLcited by 0

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

  1. 2017Attention Is All You Needcited by 59,932
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2023GPT-4 Technical Reportcited by 18,132
  4. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
  5. 2020Scaling Laws for Neural Language Modelscited by 6,411
  6. 2021Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processingcited by 2,222
  7. 2021Scaling Language Models: Methods, Analysis & Insights from Training Gophercited by 1,199
  8. 2022In-context Learning and Induction Headscited by 930
  9. 2022Transformers learn in-context by gradient descentcited by 714
  10. 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
  11. 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
  12. 2023Trained Transformers Learn Linear Models In-Contextcited by 331
27 more
  1. 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 291
  2. 2023Transformers learn to implement preconditioned gradient descent for in-context learningcited by 274
  3. 2023Looped Transformers as Programmable Computerscited by 224
  4. 2023Transformers as Algorithms: Generalization and Stability in In-context Learningcited by 220
  5. 2023One Step of Gradient Descent is Provably the Optimal In-Context Learner with One Layer of Linear Self-Attentioncited by 168
  6. 2023Birth of a Transformer: A Memory Viewpointcited by 154
  7. 2023Representational Strengths and Limitations of Transformerscited by 132
  8. 2024The Evolution of Statistical Induction Heads: In-Context Learning Markov Chainscited by 115
  9. 2024How Transformers Learn Causal Structure with Gradient Descentcited by 114
  10. 2023In-Context Convergence of Transformerscited by 112
  11. 2016Towards better decoding and language model integration in sequence to sequence modelscited by 100
  12. 2022Vision Transformers provably learn spatial structurecited by 92
  13. 2023How Do Transformers Learn Topic Structure: Towards a Mechanistic Understandingcited by 85
  14. 2024Transformers, parallel computation, and logarithmic depthcited by 75
  15. 2023How Do Transformers Learn In-Context Beyond Simple Functions? A Case Study on Learning with Representationscited by 72
  16. 2024Can Looped Transformers Learn to Implement Multi-step Gradient Descent for In-context Learning?cited by 60
  17. 2023Do Transformers Parse while Predicting the Masked Word?cited by 48
  18. 2024Unveiling Induction Heads: Provable Training Dynamics and Feature Learning in Transformerscited by 46
  19. 2024Attention with Markov: A Framework for Principled Analysis of Transformers via Markov Chainscited by 39
  20. 2024How Do Nonlinear Transformers Learn and Generalize in In-Context Learning?cited by 35
  21. 2025Transformers Learn to Implement Multi-step Gradient Descent with Chain of Thoughtcited by 32
  22. 2024Toward a Theory of Tokenization in LLMscited by 28
  23. 2024Transformers on Markov Data: Constant Depth Sufficescited by 26
  24. 2024Fine-grained Analysis of In-context Linear Estimation: Data, Architecture, and Beyondcited by 22
  25. 2024How do Transformers perform In-Context Autoregressive Learning?cited by 16
  26. 2024Local to Global: Learning Dynamics and Effect of Initialization for Transformerscited by 11
  27. 2024Provably Transformers Harness Multi-Concept Word Semantics for Efficient In-Context Learningcited by 6

Built on by

Not cited yet.