Bypassing the Exponential Dependency: Looped Transformers Efficiently Learn In-context by Multi-step Gradient Descent
Not on the map. Why?
Abstract (arXiv)
In-context learning has been recognized as a key factor in the success of Large Language Models (LLMs). It refers to the model's ability to learn patterns on the fly from provided in-context examples in the prompt during inference. Previous studies have demonstrated that the Transformer architecture used in LLMs can implement a single-step gradient descent update by processing in-context examples in a single forward pass. Recent work has further shown that, during in-context learning, a looped Transformer can implement multi-step gradient descent updates in forward passes. However, their theoretical results require an exponential number of in-context examples, n = exp(Omega(T)), where T is the number of loops or passes, to achieve a reasonably low error. In this paper, we study linear looped Transformers in-context learning on linear vector generation tasks. We show that linear looped Transformers can implement multi-step gradient descent efficiently for in-context learning. Our results demonstrate that as long as the input data has a constant condition number, e.g., n = O(d), the linear looped Transformers can achieve a small error by multi-step gradient descent during in-context learning. Furthermore, our preliminary experiments validate our theoretical analysis. Our findings reveal that the Transformer architecture possesses a stronger in-context learning capability than previously understood, offering new insights into the mechanisms behind LLMs and potentially guiding the better design of efficient inference algorithms for LLMs.
Key facts. Cited by 21 papers in the map (data through 7 Oct 2026). Builds on 94 of its 121 references that are in the map. First posted on arXiv 15 Oct 2024.
Builds on
94 of 121 references.
References · 94
- 2015Deep Residual Learning for Image Recognitioncited by 51,809
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
- 2021On the Opportunities and Risks of Foundation Modelscited by 3,961
- 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,878
- 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,769
- 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,747
38 more
- 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,155
- 2022Scaling Instruction-Finetuned Language Modelscited by 2,997
- 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,579
- 2022Emergent Abilities of Large Language Modelscited by 2,483
- 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,371
- 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,307
- 2020Making Pre-trained Language Models Better Few-shot Learnerscited by 1,255
- 2023LIMA: Less Is More for Alignmentcited by 1,080
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 915
- 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 871
- 2022Super-NaturalInstructions: Generalization via Declarative Instructions on 1600+ NLP Taskscited by 858
- 2023LLaMA-Adapter: Efficient Fine-tuning of Language Models with Zero-init Attentioncited by 776
- 2022Transformers learn in-context by gradient descentcited by 714
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
- 2021Cross-Task Generalization via Natural Language Crowdsourcing Instructionscited by 696
- 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
- 2023LLaMA-Adapter V2: Parameter-Efficient Visual Instruction Modelcited by 602
- 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 465
- 2021MetaICL: Learning to Learn In Contextcited by 450
- 2023Trained Transformers Learn Linear Models In-Contextcited by 331
- 2022Demonstrate-Search-Predict: Composing retrieval and language models for knowledge-intensive NLPcited by 316
- 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
- 2022Black-Box Tuning for Language-Model-as-a-Servicecited by 254
- 2022OPT-IML: Scaling Language Model Instruction Meta Learning through the Lens of Generalizationcited by 235
- 2023What Algorithms can Transformers Learn? A Study in Length Generalizationcited by 198
- 2022In-context Examples Selection for Machine Translationcited by 172
- 2023One Step of Gradient Descent is Provably the Optimal In-Context Learner with One Layer of Linear Self-Attentioncited by 168
- 2023Handbook of Convergence Theorems for (Stochastic) Gradient Methodscited by 158
- 2023Birth of a Transformer: A Memory Viewpointcited by 154
- 2023What In-Context Learning "Learns" In-Context: Disentangling Task Recognition and Task Learningcited by 149
- 2023Pretraining task diversity and the emergence of non-Bayesian in-context learning for regressioncited by 138
- 2023Looped Transformers are Better at Learning Learning Algorithmscited by 135
- 2023The mechanistic basis of data dependence and abrupt learning in an in-context classification taskcited by 115
- 2023In-Context Convergence of Transformerscited by 112
- 2022Teaching Algorithmic Reasoning via In-context Learningcited by 111
- 2023A Theory for Emergence of Complex Skills in Language Modelscited by 111
- 2023Scan and Snap: Understanding Training Dynamics and Token Composition in 1-layer Transformercited by 101
50 most cited of 94 All 94 (JSON)
Built on by
Citing papers per year: 2024: 5; 2025: 13; 2026: 3.
21 papers.
Sort:
By area:
- 2025A Survey on Latent Reasoningcited by 71
- 2024LazyDiT: Lazy Learning for the Acceleration of Diffusion Transformerscited by 35
- 2024Circuit Complexity Bounds for RoPE-based Transformer Architecturecited by 26
- 2024The Computational Limits of State-Space Models and Mamba via the Lens of Circuit Complexitycited by 21
- 2025Enhancing Auto-regressive Chain-of-Thought through Loop-Aligned Reasoningcited by 19
- 2025Data Whisperer: Efficient Data Selection for Task-Specific LLM Fine-Tuning via Few-Shot In-Context Learningcited by 19
- 2025High-Order Matching for One-Step Shortcut Diffusion Modelscited by 15
- 2024Theoretical Constraints on the Expressive Power of mathsfRoPE-based Tensor Attention Transformerscited by 12
- 2026Training-Free Looped Transformerscited by 12
- 2025Theoretical Guarantees for High Order Trajectory Refinement in Generative Flowscited by 9
- 2025Provable Failure of Language Models in Learning Majority Boolean Logic via Gradient Descentcited by 8
- 2026Outcome-Based RL Provably Leads Transformers to Reason, but Only With the Right Datacited by 5
9 more
- 2025Scaling Law Phenomena Across Regression Paradigms: Multiple and Kernel Approachescited by 4
- 2026Loop the Loopies!cited by 4
- 2024Unlocking the Theory Behind Scaling 1-Bit Neural Networkscited by 3
- 2025Neural Algorithmic Reasoning for Hypergraphs with Looped Transformerscited by 3
- 2025When Can We Solve the Weighted Low Rank Approximation Problem in Truly Subquadratic Time?cited by 3
- 2025In-Context Probing for Membership Inference in Fine-Tuned Language Modelscited by 3
- 2025Time and Memory Trade-off of KV-Cache Compression in Tensor Transformer Decodingcited by 2
- 2025Can Transformers Break Encryption Schemes via In-Context Learning?cited by 0
- 2025Fundamental Limits of Crystalline Equivariant Graph Neural Networks: A Circuit Complexity Perspectivecited by 0
- 2026Loop the Loopies!17 Jul 2026
- 2026Training-Free Looped Transformers22 May 2026
- 2026Outcome-Based RL Provably Leads Transformers to Reason, but Only With the Right Data21 Jan 2026
- 2025In-Context Probing for Membership Inference in Fine-Tuned Language Models18 Dec 2025
- 2025Fundamental Limits of Crystalline Equivariant Graph Neural Networks: A Circuit Complexity Perspective7 Oct 2025
- 2025Can Transformers Break Encryption Schemes via In-Context Learning?13 Aug 2025
- 2025A Survey on Latent Reasoning8 Jul 2025
- 2025Data Whisperer: Efficient Data Selection for Task-Specific LLM Fine-Tuning via Few-Shot In-Context Learning18 May 2025
- 2025Provable Failure of Language Models in Learning Majority Boolean Logic via Gradient Descent7 Apr 2025
- 2025Time and Memory Trade-off of KV-Cache Compression in Tensor Transformer Decoding14 Mar 2025
- 2025Theoretical Guarantees for High Order Trajectory Refinement in Generative Flows12 Mar 2025
- 2025Scaling Law Phenomena Across Regression Paradigms: Multiple and Kernel Approaches3 Mar 2025
9 more
- 2025When Can We Solve the Weighted Low Rank Approximation Problem in Truly Subquadratic Time?24 Feb 2025
- 2025Enhancing Auto-regressive Chain-of-Thought through Loop-Aligned Reasoning12 Feb 2025
- 2025High-Order Matching for One-Step Shortcut Diffusion Models2 Feb 2025
- 2025Neural Algorithmic Reasoning for Hypergraphs with Looped Transformers18 Jan 2025
- 2024Theoretical Constraints on the Expressive Power of mathsfRoPE-based Tensor Attention Transformers23 Dec 2024
- 2024LazyDiT: Lazy Learning for the Acceleration of Diffusion Transformers17 Dec 2024
- 2024The Computational Limits of State-Space Models and Mamba via the Lens of Circuit Complexity9 Dec 2024
- 2024Circuit Complexity Bounds for RoPE-based Transformer Architecture12 Nov 2024
- 2024Unlocking the Theory Behind Scaling 1-Bit Neural Networks3 Nov 2024
- 2025A Survey on Latent Reasoningcited by 71
- 2025Enhancing Auto-regressive Chain-of-Thought through Loop-Aligned Reasoningcited by 19
- 2025Provable Failure of Language Models in Learning Majority Boolean Logic via Gradient Descentcited by 8
- 2026Outcome-Based RL Provably Leads Transformers to Reason, but Only With the Right Datacited by 5
- 2025Neural Algorithmic Reasoning for Hypergraphs with Looped Transformerscited by 3
- 2026Outcome-Based RL Provably Leads Transformers to Reason, but Only With the Right Data21 Jan 2026
- 2025A Survey on Latent Reasoning8 Jul 2025
- 2025Provable Failure of Language Models in Learning Majority Boolean Logic via Gradient Descent7 Apr 2025
- 2025Enhancing Auto-regressive Chain-of-Thought through Loop-Aligned Reasoning12 Feb 2025
- 2025Neural Algorithmic Reasoning for Hypergraphs with Looped Transformers18 Jan 2025
- 2026Training-Free Looped Transformerscited by 12
- 2026Loop the Loopies!cited by 4
- 2026Loop the Loopies!17 Jul 2026
- 2026Training-Free Looped Transformers22 May 2026
- 2024Circuit Complexity Bounds for RoPE-based Transformer Architecturecited by 26
- 2025Data Whisperer: Efficient Data Selection for Task-Specific LLM Fine-Tuning via Few-Shot In-Context Learningcited by 19
- 2024Theoretical Constraints on the Expressive Power of mathsfRoPE-based Tensor Attention Transformerscited by 12
- 2025Scaling Law Phenomena Across Regression Paradigms: Multiple and Kernel Approachescited by 4
- 2024Unlocking the Theory Behind Scaling 1-Bit Neural Networkscited by 3
- 2025When Can We Solve the Weighted Low Rank Approximation Problem in Truly Subquadratic Time?cited by 3
- 2025Can Transformers Break Encryption Schemes via In-Context Learning?cited by 0
- 2025Fundamental Limits of Crystalline Equivariant Graph Neural Networks: A Circuit Complexity Perspectivecited by 0
- 2025Fundamental Limits of Crystalline Equivariant Graph Neural Networks: A Circuit Complexity Perspective7 Oct 2025
- 2025Can Transformers Break Encryption Schemes via In-Context Learning?13 Aug 2025
- 2025Data Whisperer: Efficient Data Selection for Task-Specific LLM Fine-Tuning via Few-Shot In-Context Learning18 May 2025
- 2025Scaling Law Phenomena Across Regression Paradigms: Multiple and Kernel Approaches3 Mar 2025
- 2025When Can We Solve the Weighted Low Rank Approximation Problem in Truly Subquadratic Time?24 Feb 2025
- 2024Theoretical Constraints on the Expressive Power of mathsfRoPE-based Tensor Attention Transformers23 Dec 2024
- 2024Circuit Complexity Bounds for RoPE-based Transformer Architecture12 Nov 2024
- 2024Unlocking the Theory Behind Scaling 1-Bit Neural Networks3 Nov 2024