paper-with-me

Papers

One-Layer Transformers are Provably Optimal for In-context Reasoning and Distributional Association Learning in Next-Token Prediction Tasks

2025-05-21 · Quan Nguyen, Thanh Nguyen-Tang

We study the approximation capabilities and on-convergence behaviors of one-layer transformers on the noiseless and noisy in-context reasoning of next-token prediction. Existing theoretical results focus on understanding the in-context reasoning behaviors for either the first gradient step or when the number of samples is infinite. Furthermore, no convergence rates nor generalization abilities were known. Our work addresses these gaps by showing that there exists a class of one-layer transformers that are provably Bayes-optimal with both linear and ReLU attention. When being trained with gradient descent, we show via a finite-sample analysis that the expected loss of these transformers converges at linear rate to the Bayes risk. Moreover, we prove that the trained models generalize to unseen samples as well as exhibit learning behaviors that were empirically observed in previous works. Our theoretical findings are further supported by extensive empirical validations.

📄 PDF Abstract BibTeX arXiv:2505.15009

Code (1)

ngmq/onelayer-transformer-ICR-DA-NTP 공식 구현 pytorch

Methods 이 논문이 사용한 방법론

Focus 설명 없음
ReLU How Do I Communicate to Expedia? How Do I Communicate to Expedia? – Call ☎️ +1-(888) 829 (0881) or +1-805-330-4056 or +1-805-330-4056 for Live Support & Special Travel…

Similar Papers 제목 키워드 기반

Transformers Provably Learn Chain-of-Thought Reasoning with Length Generalization

2025-11-10 · Yu Huang, Zixin Wen, Aarti Singh, Yuejie Chi 외 arxiv

The ability to reason lies at the core of artificial intelligence (AI), and challenging problems usually call for deeper and longer reasoning to tackle. A crucial question about AI reasoning is whether models can extrapo…

Transformers are Provably Optimal In-context Estimators for Wireless Communications

2023-11-01 · Vishnu Teja Kunde, Vicram Rajagopalan, Chandra Shekhara Kaushik Valmeekam, Krishna Narayanan 외

Pre-trained transformers exhibit the capability of adapting to new tasks through in-context learning (ICL), where they efficiently utilize a limited set of prompts without explicit model optimization. The canonical commu…

AttributeIn-Context LearningModel Optimization

Multi-head Transformers Provably Learn Symbolic Multi-step Reasoning via Gradient Descent

2025-08-11 · Tong Yang, Yu Huang, Yingbin Liang, Yuejie Chi arxiv

Transformers have demonstrated remarkable capabilities in multi-step reasoning tasks. However, understandings of the underlying mechanisms by which they acquire these abilities through training remain limited, particular…

One Step of Gradient Descent is Provably the Optimal In-Context Learner with One Layer of Linear Self-Attention

2023-07-07 · Arvind Mahankali, Tatsunori B. Hashimoto, Tengyu Ma

Recent works have empirically analyzed in-context learning and shown that transformers trained on synthetic linear regression tasks can learn to implement ridge regression, which is the Bayes-optimal predictor, given suf…

In-Context Learningregression

One-Layer Transformer Provably Learns One-Nearest Neighbor In Context

2024-11-16 · Zihao Li, Yuan Cao, Cheng Gao, Yihan He 외

Transformers have achieved great success in recent years. Interestingly, transformers have shown particularly strong in-context learning capability -- even without fine-tuning, they are still able to solve unseen tasks w…

In-Context Learning